{"action":"created","comment":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/comments/50488296","id":50488296,"diff_hunk":"@@ -270,6 +278,99 @@ private void createStoreInternal(long fileId) throws FileAlreadyExistsException\n   }\n \n   /**\n+   * Deletes a completed key-value store.\n+   *\n+   * @param uri {@link TachyonURI} to the store\n+   * @throws IOException if non-Tachyon error occurs\n+   * @throws IsNotKeyValueStoreException if the uri exists but is not a key-value store\n+   * @throws FileDoesNotExistException if the uri does not exist\n+   * @throws TachyonException if other Tachyon error occurs\n+   */\n+  public synchronized void deleteStore(TachyonURI uri)\n+      throws IOException, IsNotKeyValueStoreException, FileDoesNotExistException, TachyonException {\n+    long fileId = mFileSystemMaster.getFileId(uri);\n+    if (fileId == IdUtils.INVALID_FILE_ID) {\n+      throw new FileDoesNotExistException(\n+          String.format(\"Failed to deleteStore: path %s does not exist\", uri));\n+    }\n+    if (!mCompleteStoreToPartitions.containsKey(fileId)) {\n+      // TODO(cc): If it is an incomplete store, throw a better exception.\n+      throw new IsNotKeyValueStoreException(\n+          String.format(\"Failed to deleteStore: path %s is not a completed key-value store\", uri));\n+    }\n+    mFileSystemMaster.deleteFile(uri, true);\n+    deleteStoreInternal(fileId);\n+    writeJournalEntry(newDeleteStoreEntry(fileId));\n+    flushJournal();\n+  }\n+\n+  // Internal implementation to deleteStore a key-value store.\n+  private void deleteStoreInternal(long fileId) {\n+    mCompleteStoreToPartitions.remove(fileId);\n+  }\n+\n+  // Deletes a store, called when replaying journals.\n+  private void deleteStoreFromEntry(DeleteStoreEntry entry) {\n+    deleteStoreInternal(entry.getStoreId());\n+  }","path":"keyvalue/servers/src/main/java/tachyon/master/keyvalue/KeyValueMaster.java","position":74,"original_position":74,"commit_id":"bc5495fc00fc165a1ffd5ad044741a2204fe8c12","original_commit_id":"bc5495fc00fc165a1ffd5ad044741a2204fe8c12","user":{"login":"calvinjia","id":2223813,"avatar_url":"https://avatars.githubusercontent.com/u/2223813?v=3","gravatar_id":"","url":"https://api.github.com/users/calvinjia","html_url":"https://github.com/calvinjia","followers_url":"https://api.github.com/users/calvinjia/followers","following_url":"https://api.github.com/users/calvinjia/following{/other_user}","gists_url":"https://api.github.com/users/calvinjia/gists{/gist_id}","starred_url":"https://api.github.com/users/calvinjia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calvinjia/subscriptions","organizations_url":"https://api.github.com/users/calvinjia/orgs","repos_url":"https://api.github.com/users/calvinjia/repos","events_url":"https://api.github.com/users/calvinjia/events{/privacy}","received_events_url":"https://api.github.com/users/calvinjia/received_events","type":"User","site_admin":false},"body":"methods out of order?","created_at":"2016-01-22T00:38:19Z","updated_at":"2016-01-22T00:38:19Z","html_url":"https://github.com/amplab/tachyon/pull/2530#discussion_r50488296","pull_request_url":"https://api.github.com/repos/amplab/tachyon/pulls/2530","_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments/50488296"},"html":{"href":"https://github.com/amplab/tachyon/pull/2530#discussion_r50488296"},"pull_request":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/2530"}}},"pull_request":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/2530","id":56699953,"html_url":"https://github.com/amplab/tachyon/pull/2530","diff_url":"https://github.com/amplab/tachyon/pull/2530.diff","patch_url":"https://github.com/amplab/tachyon/pull/2530.patch","issue_url":"https://api.github.com/repos/amplab/tachyon/issues/2530","number":2530,"state":"open","locked":false,"title":"[TACHYON-1574] Add KeyValueOutputFormat for key-value store","user":{"login":"uronce-cc","id":3663941,"avatar_url":"https://avatars.githubusercontent.com/u/3663941?v=3","gravatar_id":"","url":"https://api.github.com/users/uronce-cc","html_url":"https://github.com/uronce-cc","followers_url":"https://api.github.com/users/uronce-cc/followers","following_url":"https://api.github.com/users/uronce-cc/following{/other_user}","gists_url":"https://api.github.com/users/uronce-cc/gists{/gist_id}","starred_url":"https://api.github.com/users/uronce-cc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uronce-cc/subscriptions","organizations_url":"https://api.github.com/users/uronce-cc/orgs","repos_url":"https://api.github.com/users/uronce-cc/repos","events_url":"https://api.github.com/users/uronce-cc/events{/privacy}","received_events_url":"https://api.github.com/users/uronce-cc/received_events","type":"User","site_admin":false},"body":"KeyValueOutputFormat enables map-reduce compatible programs to directly write key-value pairs to key-value store.\r\n","created_at":"2016-01-21T03:08:53Z","updated_at":"2016-01-22T00:38:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33c7934e948e0bdaa396926cbcf930cabb6b418f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplab/tachyon/pulls/2530/commits","review_comments_url":"https://api.github.com/repos/amplab/tachyon/pulls/2530/comments","review_comment_url":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplab/tachyon/issues/2530/comments","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/bc5495fc00fc165a1ffd5ad044741a2204fe8c12","head":{"label":"uronce-cc:kv-output-format","ref":"kv-output-format","sha":"bc5495fc00fc165a1ffd5ad044741a2204fe8c12","user":{"login":"uronce-cc","id":3663941,"avatar_url":"https://avatars.githubusercontent.com/u/3663941?v=3","gravatar_id":"","url":"https://api.github.com/users/uronce-cc","html_url":"https://github.com/uronce-cc","followers_url":"https://api.github.com/users/uronce-cc/followers","following_url":"https://api.github.com/users/uronce-cc/following{/other_user}","gists_url":"https://api.github.com/users/uronce-cc/gists{/gist_id}","starred_url":"https://api.github.com/users/uronce-cc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uronce-cc/subscriptions","organizations_url":"https://api.github.com/users/uronce-cc/orgs","repos_url":"https://api.github.com/users/uronce-cc/repos","events_url":"https://api.github.com/users/uronce-cc/events{/privacy}","received_events_url":"https://api.github.com/users/uronce-cc/received_events","type":"User","site_admin":false},"repo":{"id":21723448,"name":"tachyon","full_name":"uronce-cc/tachyon","owner":{"login":"uronce-cc","id":3663941,"avatar_url":"https://avatars.githubusercontent.com/u/3663941?v=3","gravatar_id":"","url":"https://api.github.com/users/uronce-cc","html_url":"https://github.com/uronce-cc","followers_url":"https://api.github.com/users/uronce-cc/followers","following_url":"https://api.github.com/users/uronce-cc/following{/other_user}","gists_url":"https://api.github.com/users/uronce-cc/gists{/gist_id}","starred_url":"https://api.github.com/users/uronce-cc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uronce-cc/subscriptions","organizations_url":"https://api.github.com/users/uronce-cc/orgs","repos_url":"https://api.github.com/users/uronce-cc/repos","events_url":"https://api.github.com/users/uronce-cc/events{/privacy}","received_events_url":"https://api.github.com/users/uronce-cc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/uronce-cc/tachyon","description":"Memory-centric Storage System for Big Data Analytics","fork":true,"url":"https://api.github.com/repos/uronce-cc/tachyon","forks_url":"https://api.github.com/repos/uronce-cc/tachyon/forks","keys_url":"https://api.github.com/repos/uronce-cc/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uronce-cc/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uronce-cc/tachyon/teams","hooks_url":"https://api.github.com/repos/uronce-cc/tachyon/hooks","issue_events_url":"https://api.github.com/repos/uronce-cc/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/uronce-cc/tachyon/events","assignees_url":"https://api.github.com/repos/uronce-cc/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/uronce-cc/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/uronce-cc/tachyon/tags","blobs_url":"https://api.github.com/repos/uronce-cc/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uronce-cc/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uronce-cc/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/uronce-cc/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uronce-cc/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/uronce-cc/tachyon/languages","stargazers_url":"https://api.github.com/repos/uronce-cc/tachyon/stargazers","contributors_url":"https://api.github.com/repos/uronce-cc/tachyon/contributors","subscribers_url":"https://api.github.com/repos/uronce-cc/tachyon/subscribers","subscription_url":"https://api.github.com/repos/uronce-cc/tachyon/subscription","commits_url":"https://api.github.com/repos/uronce-cc/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/uronce-cc/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/uronce-cc/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/uronce-cc/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/uronce-cc/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/uronce-cc/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uronce-cc/tachyon/merges","archive_url":"https://api.github.com/repos/uronce-cc/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uronce-cc/tachyon/downloads","issues_url":"https://api.github.com/repos/uronce-cc/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/uronce-cc/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/uronce-cc/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/uronce-cc/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uronce-cc/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/uronce-cc/tachyon/releases{/id}","deployments_url":"https://api.github.com/repos/uronce-cc/tachyon/deployments","created_at":"2014-07-11T05:40:12Z","updated_at":"2015-03-24T23:33:22Z","pushed_at":"2016-01-21T12:49:16Z","git_url":"git://github.com/uronce-cc/tachyon.git","ssh_url":"git@github.com:uronce-cc/tachyon.git","clone_url":"https://github.com/uronce-cc/tachyon.git","svn_url":"https://github.com/uronce-cc/tachyon","homepage":"http://tachyon-project.org","size":38392,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"amplab:master","ref":"master","sha":"e4bd0d8472fc1d942119ccd5e737524b49f48be4","user":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"repo":{"id":7276954,"name":"tachyon","full_name":"amplab/tachyon","owner":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amplab/tachyon","description":"Memory Centric Reliable Distributed Storage","fork":false,"url":"https://api.github.com/repos/amplab/tachyon","forks_url":"https://api.github.com/repos/amplab/tachyon/forks","keys_url":"https://api.github.com/repos/amplab/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amplab/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amplab/tachyon/teams","hooks_url":"https://api.github.com/repos/amplab/tachyon/hooks","issue_events_url":"https://api.github.com/repos/amplab/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/amplab/tachyon/events","assignees_url":"https://api.github.com/repos/amplab/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/amplab/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/amplab/tachyon/tags","blobs_url":"https://api.github.com/repos/amplab/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amplab/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amplab/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/amplab/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/amplab/tachyon/languages","stargazers_url":"https://api.github.com/repos/amplab/tachyon/stargazers","contributors_url":"https://api.github.com/repos/amplab/tachyon/contributors","subscribers_url":"https://api.github.com/repos/amplab/tachyon/subscribers","subscription_url":"https://api.github.com/repos/amplab/tachyon/subscription","commits_url":"https://api.github.com/repos/amplab/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/amplab/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/amplab/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/amplab/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/amplab/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/amplab/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amplab/tachyon/merges","archive_url":"https://api.github.com/repos/amplab/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amplab/tachyon/downloads","issues_url":"https://api.github.com/repos/amplab/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/amplab/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/amplab/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/amplab/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amplab/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/amplab/tachyon/releases{/id}","deployments_url":"https://api.github.com/repos/amplab/tachyon/deployments","created_at":"2012-12-21T17:43:46Z","updated_at":"2016-01-21T20:51:14Z","pushed_at":"2016-01-22T00:34:20Z","git_url":"git://github.com/amplab/tachyon.git","ssh_url":"git@github.com:amplab/tachyon.git","clone_url":"https://github.com/amplab/tachyon.git","svn_url":"https://github.com/amplab/tachyon","homepage":"http://tachyon-project.org","size":46499,"stargazers_count":1915,"watchers_count":1915,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":754,"mirror_url":null,"open_issues_count":23,"forks":754,"open_issues":23,"watchers":1915,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/2530"},"html":{"href":"https://github.com/amplab/tachyon/pull/2530"},"issue":{"href":"https://api.github.com/repos/amplab/tachyon/issues/2530"},"comments":{"href":"https://api.github.com/repos/amplab/tachyon/issues/2530/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/2530/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/2530/commits"},"statuses":{"href":"https://api.github.com/repos/amplab/tachyon/statuses/bc5495fc00fc165a1ffd5ad044741a2204fe8c12"}}}}