{"action":"created","comment":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/comments/39331779","id":39331779,"diff_hunk":"@@ -168,4 +169,23 @@ public long getUsedBytes() throws IOException {\n       mContext.releaseMasterClient(blockMasterClient);\n     }\n   }\n+\n+  public void promote(long blockId) throws IOException {\n+    BlockMasterClient blockMasterClient = mContext.acquireMasterClient();\n+    try {\n+      BlockInfo info = blockMasterClient.getBlockInfo(blockId);\n+      if (info.getLocations().isEmpty()) {\n+        throw new IOException(\"Block \" + blockId + \" is not available in Tachyon.\");","path":"clients/unshaded/src/main/java/tachyon/client/block/TachyonBlockStore.java","position":18,"original_position":18,"commit_id":"1f4e14f946ff9484dedb8b96567b742dfa8139b1","original_commit_id":"1f4e14f946ff9484dedb8b96567b742dfa8139b1","user":{"login":"yupeng9","id":13425258,"avatar_url":"https://avatars.githubusercontent.com/u/13425258?v=3","gravatar_id":"","url":"https://api.github.com/users/yupeng9","html_url":"https://github.com/yupeng9","followers_url":"https://api.github.com/users/yupeng9/followers","following_url":"https://api.github.com/users/yupeng9/following{/other_user}","gists_url":"https://api.github.com/users/yupeng9/gists{/gist_id}","starred_url":"https://api.github.com/users/yupeng9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yupeng9/subscriptions","organizations_url":"https://api.github.com/users/yupeng9/orgs","repos_url":"https://api.github.com/users/yupeng9/repos","events_url":"https://api.github.com/users/yupeng9/events{/privacy}","received_events_url":"https://api.github.com/users/yupeng9/received_events","type":"User","site_admin":false},"body":"Instead of throwing exception, should we consider moving block into tachyon layer?","created_at":"2015-09-12T01:15:09Z","updated_at":"2015-09-12T01:15:09Z","html_url":"https://github.com/amplab/tachyon/pull/1540#discussion_r39331779","pull_request_url":"https://api.github.com/repos/amplab/tachyon/pulls/1540","_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments/39331779"},"html":{"href":"https://github.com/amplab/tachyon/pull/1540#discussion_r39331779"},"pull_request":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1540"}}},"pull_request":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/1540","id":44842950,"html_url":"https://github.com/amplab/tachyon/pull/1540","diff_url":"https://github.com/amplab/tachyon/pull/1540.diff","patch_url":"https://github.com/amplab/tachyon/pull/1540.patch","issue_url":"https://api.github.com/repos/amplab/tachyon/issues/1540","number":1540,"state":"open","locked":false,"title":"[TACHYON-594] [TACHYON-851] Add Cache Promote Write Type","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":"https://tachyon.atlassian.net/browse/TACHYON-594\r\nhttps://tachyon.atlassian.net/browse/TACHYON-851","created_at":"2015-09-12T00:54:49Z","updated_at":"2015-09-12T01:15:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"600119312a6534e2423e365206ab81fe937f3ca9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplab/tachyon/pulls/1540/commits","review_comments_url":"https://api.github.com/repos/amplab/tachyon/pulls/1540/comments","review_comment_url":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplab/tachyon/issues/1540/comments","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/1f4e14f946ff9484dedb8b96567b742dfa8139b1","head":{"label":"calvinjia:cache-promote","ref":"cache-promote","sha":"1f4e14f946ff9484dedb8b96567b742dfa8139b1","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},"repo":{"id":9278135,"name":"tachyon","full_name":"calvinjia/tachyon","owner":{"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},"private":false,"html_url":"https://github.com/calvinjia/tachyon","description":"Tachyon","fork":true,"url":"https://api.github.com/repos/calvinjia/tachyon","forks_url":"https://api.github.com/repos/calvinjia/tachyon/forks","keys_url":"https://api.github.com/repos/calvinjia/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calvinjia/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calvinjia/tachyon/teams","hooks_url":"https://api.github.com/repos/calvinjia/tachyon/hooks","issue_events_url":"https://api.github.com/repos/calvinjia/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/calvinjia/tachyon/events","assignees_url":"https://api.github.com/repos/calvinjia/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/calvinjia/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/calvinjia/tachyon/tags","blobs_url":"https://api.github.com/repos/calvinjia/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calvinjia/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calvinjia/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/calvinjia/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calvinjia/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/calvinjia/tachyon/languages","stargazers_url":"https://api.github.com/repos/calvinjia/tachyon/stargazers","contributors_url":"https://api.github.com/repos/calvinjia/tachyon/contributors","subscribers_url":"https://api.github.com/repos/calvinjia/tachyon/subscribers","subscription_url":"https://api.github.com/repos/calvinjia/tachyon/subscription","commits_url":"https://api.github.com/repos/calvinjia/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/calvinjia/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/calvinjia/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/calvinjia/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/calvinjia/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/calvinjia/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calvinjia/tachyon/merges","archive_url":"https://api.github.com/repos/calvinjia/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calvinjia/tachyon/downloads","issues_url":"https://api.github.com/repos/calvinjia/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/calvinjia/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/calvinjia/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/calvinjia/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calvinjia/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/calvinjia/tachyon/releases{/id}","created_at":"2013-04-07T14:56:38Z","updated_at":"2015-05-08T17:53:06Z","pushed_at":"2015-09-12T00:45:07Z","git_url":"git://github.com/calvinjia/tachyon.git","ssh_url":"git@github.com:calvinjia/tachyon.git","clone_url":"https://github.com/calvinjia/tachyon.git","svn_url":"https://github.com/calvinjia/tachyon","homepage":null,"size":21635,"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":"2b16c968c476a569c0a87dea0d7e31977d4681b4","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}","created_at":"2012-12-21T17:43:46Z","updated_at":"2015-09-11T05:59:24Z","pushed_at":"2015-09-12T00:54:50Z","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":47033,"stargazers_count":1567,"watchers_count":1567,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":610,"mirror_url":null,"open_issues_count":39,"forks":610,"open_issues":39,"watchers":1567,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1540"},"html":{"href":"https://github.com/amplab/tachyon/pull/1540"},"issue":{"href":"https://api.github.com/repos/amplab/tachyon/issues/1540"},"comments":{"href":"https://api.github.com/repos/amplab/tachyon/issues/1540/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1540/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1540/commits"},"statuses":{"href":"https://api.github.com/repos/amplab/tachyon/statuses/1f4e14f946ff9484dedb8b96567b742dfa8139b1"}}}}