{"action":"created","comment":{"url":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments/90372528","pull_request_review_id":10891806,"id":90372528,"diff_hunk":"@@ -0,0 +1,114 @@\n+/*\n+ * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0\n+ * (the \"License\"). You may not use this work except in compliance with the License, which is\n+ * available at www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n+ * either express or implied, as more fully set forth in the License.\n+ *\n+ * See the NOTICE file distributed with this work for information regarding copyright ownership.\n+ */\n+\n+package alluxio.proxy;\n+\n+import alluxio.Constants;\n+import alluxio.client.file.FileInStream;\n+import alluxio.client.file.FileOutStream;\n+\n+import com.google.common.cache.Cache;\n+import com.google.common.cache.CacheBuilder;\n+import com.google.common.cache.RemovalListener;\n+import com.google.common.cache.RemovalNotification;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import java.io.Closeable;\n+import java.util.concurrent.TimeUnit;\n+import java.util.concurrent.atomic.AtomicInteger;\n+\n+import javax.annotation.Nonnull;\n+\n+/**\n+ * Stream cache.\n+ */\n+public final class StreamCache {","path":"core/server/src/main/java/alluxio/proxy/StreamCache.java","position":34,"original_position":34,"commit_id":"21ecce6e0805f3da3befa9aa3c69449e111305d3","original_commit_id":"21ecce6e0805f3da3befa9aa3c69449e111305d3","user":{"login":"jsimsa","id":1072079,"avatar_url":"https://avatars.githubusercontent.com/u/1072079?v=3","gravatar_id":"","url":"https://api.github.com/users/jsimsa","html_url":"https://github.com/jsimsa","followers_url":"https://api.github.com/users/jsimsa/followers","following_url":"https://api.github.com/users/jsimsa/following{/other_user}","gists_url":"https://api.github.com/users/jsimsa/gists{/gist_id}","starred_url":"https://api.github.com/users/jsimsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsimsa/subscriptions","organizations_url":"https://api.github.com/users/jsimsa/orgs","repos_url":"https://api.github.com/users/jsimsa/repos","events_url":"https://api.github.com/users/jsimsa/events{/privacy}","received_events_url":"https://api.github.com/users/jsimsa/received_events","type":"User","site_admin":false},"body":"added configuration setting","created_at":"2016-12-01T02:25:24Z","updated_at":"2016-12-01T02:25:24Z","html_url":"https://github.com/Alluxio/alluxio/pull/4398#discussion_r90372528","pull_request_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/4398","_links":{"self":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments/90372528"},"html":{"href":"https://github.com/Alluxio/alluxio/pull/4398#discussion_r90372528"},"pull_request":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/4398"}}},"pull_request":{"url":"https://api.github.com/repos/Alluxio/alluxio/pulls/4398","id":95952042,"html_url":"https://github.com/Alluxio/alluxio/pull/4398","diff_url":"https://github.com/Alluxio/alluxio/pull/4398.diff","patch_url":"https://github.com/Alluxio/alluxio/pull/4398.patch","issue_url":"https://api.github.com/repos/Alluxio/alluxio/issues/4398","number":4398,"state":"open","locked":false,"title":"[ALLUXIO-2232] Reworking File System REST API.","user":{"login":"jsimsa","id":1072079,"avatar_url":"https://avatars.githubusercontent.com/u/1072079?v=3","gravatar_id":"","url":"https://api.github.com/users/jsimsa","html_url":"https://github.com/jsimsa","followers_url":"https://api.github.com/users/jsimsa/followers","following_url":"https://api.github.com/users/jsimsa/following{/other_user}","gists_url":"https://api.github.com/users/jsimsa/gists{/gist_id}","starred_url":"https://api.github.com/users/jsimsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsimsa/subscriptions","organizations_url":"https://api.github.com/users/jsimsa/orgs","repos_url":"https://api.github.com/users/jsimsa/repos","events_url":"https://api.github.com/users/jsimsa/events{/privacy}","received_events_url":"https://api.github.com/users/jsimsa/received_events","type":"User","site_admin":false},"body":"Addresses: https://alluxio.atlassian.net/browse/ALLUXIO-2232\r\n\r\nThis PR changes the REST API to better follow the RESTful principles (endpoints are resources not actions).\r\n\r\nThis PR decouples the metadata operations of file create / open / close from the data operation of reading / writing a file. To do so, it introduces adds stream resources to the API and implements a stream cache in the proxy.","created_at":"2016-11-30T18:58:31Z","updated_at":"2016-12-01T02:25:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a916adc9d39b8494e566190f915e9dd693230c5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/4398/commits","review_comments_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/4398/comments","review_comment_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Alluxio/alluxio/issues/4398/comments","statuses_url":"https://api.github.com/repos/Alluxio/alluxio/statuses/21ecce6e0805f3da3befa9aa3c69449e111305d3","head":{"label":"jsimsa:rest","ref":"rest","sha":"21ecce6e0805f3da3befa9aa3c69449e111305d3","user":{"login":"jsimsa","id":1072079,"avatar_url":"https://avatars.githubusercontent.com/u/1072079?v=3","gravatar_id":"","url":"https://api.github.com/users/jsimsa","html_url":"https://github.com/jsimsa","followers_url":"https://api.github.com/users/jsimsa/followers","following_url":"https://api.github.com/users/jsimsa/following{/other_user}","gists_url":"https://api.github.com/users/jsimsa/gists{/gist_id}","starred_url":"https://api.github.com/users/jsimsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsimsa/subscriptions","organizations_url":"https://api.github.com/users/jsimsa/orgs","repos_url":"https://api.github.com/users/jsimsa/repos","events_url":"https://api.github.com/users/jsimsa/events{/privacy}","received_events_url":"https://api.github.com/users/jsimsa/received_events","type":"User","site_admin":false},"repo":{"id":41324456,"name":"alluxio","full_name":"jsimsa/alluxio","owner":{"login":"jsimsa","id":1072079,"avatar_url":"https://avatars.githubusercontent.com/u/1072079?v=3","gravatar_id":"","url":"https://api.github.com/users/jsimsa","html_url":"https://github.com/jsimsa","followers_url":"https://api.github.com/users/jsimsa/followers","following_url":"https://api.github.com/users/jsimsa/following{/other_user}","gists_url":"https://api.github.com/users/jsimsa/gists{/gist_id}","starred_url":"https://api.github.com/users/jsimsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsimsa/subscriptions","organizations_url":"https://api.github.com/users/jsimsa/orgs","repos_url":"https://api.github.com/users/jsimsa/repos","events_url":"https://api.github.com/users/jsimsa/events{/privacy}","received_events_url":"https://api.github.com/users/jsimsa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jsimsa/alluxio","description":"Memory-Centric Virtual Distributed Storage System","fork":true,"url":"https://api.github.com/repos/jsimsa/alluxio","forks_url":"https://api.github.com/repos/jsimsa/alluxio/forks","keys_url":"https://api.github.com/repos/jsimsa/alluxio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsimsa/alluxio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsimsa/alluxio/teams","hooks_url":"https://api.github.com/repos/jsimsa/alluxio/hooks","issue_events_url":"https://api.github.com/repos/jsimsa/alluxio/issues/events{/number}","events_url":"https://api.github.com/repos/jsimsa/alluxio/events","assignees_url":"https://api.github.com/repos/jsimsa/alluxio/assignees{/user}","branches_url":"https://api.github.com/repos/jsimsa/alluxio/branches{/branch}","tags_url":"https://api.github.com/repos/jsimsa/alluxio/tags","blobs_url":"https://api.github.com/repos/jsimsa/alluxio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsimsa/alluxio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsimsa/alluxio/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsimsa/alluxio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsimsa/alluxio/statuses/{sha}","languages_url":"https://api.github.com/repos/jsimsa/alluxio/languages","stargazers_url":"https://api.github.com/repos/jsimsa/alluxio/stargazers","contributors_url":"https://api.github.com/repos/jsimsa/alluxio/contributors","subscribers_url":"https://api.github.com/repos/jsimsa/alluxio/subscribers","subscription_url":"https://api.github.com/repos/jsimsa/alluxio/subscription","commits_url":"https://api.github.com/repos/jsimsa/alluxio/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsimsa/alluxio/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsimsa/alluxio/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsimsa/alluxio/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsimsa/alluxio/contents/{+path}","compare_url":"https://api.github.com/repos/jsimsa/alluxio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsimsa/alluxio/merges","archive_url":"https://api.github.com/repos/jsimsa/alluxio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsimsa/alluxio/downloads","issues_url":"https://api.github.com/repos/jsimsa/alluxio/issues{/number}","pulls_url":"https://api.github.com/repos/jsimsa/alluxio/pulls{/number}","milestones_url":"https://api.github.com/repos/jsimsa/alluxio/milestones{/number}","notifications_url":"https://api.github.com/repos/jsimsa/alluxio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsimsa/alluxio/labels{/name}","releases_url":"https://api.github.com/repos/jsimsa/alluxio/releases{/id}","deployments_url":"https://api.github.com/repos/jsimsa/alluxio/deployments","created_at":"2015-08-24T20:06:14Z","updated_at":"2016-10-26T08:10:08Z","pushed_at":"2016-12-01T01:07:44Z","git_url":"git://github.com/jsimsa/alluxio.git","ssh_url":"git@github.com:jsimsa/alluxio.git","clone_url":"https://github.com/jsimsa/alluxio.git","svn_url":"https://github.com/jsimsa/alluxio","homepage":"http://www.alluxio.org/","size":63514,"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":"Alluxio:master","ref":"master","sha":"3fed79cab236a13b0f31a7758963e5efc6da30d0","user":{"login":"Alluxio","id":16203694,"avatar_url":"https://avatars.githubusercontent.com/u/16203694?v=3","gravatar_id":"","url":"https://api.github.com/users/Alluxio","html_url":"https://github.com/Alluxio","followers_url":"https://api.github.com/users/Alluxio/followers","following_url":"https://api.github.com/users/Alluxio/following{/other_user}","gists_url":"https://api.github.com/users/Alluxio/gists{/gist_id}","starred_url":"https://api.github.com/users/Alluxio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alluxio/subscriptions","organizations_url":"https://api.github.com/users/Alluxio/orgs","repos_url":"https://api.github.com/users/Alluxio/repos","events_url":"https://api.github.com/users/Alluxio/events{/privacy}","received_events_url":"https://api.github.com/users/Alluxio/received_events","type":"Organization","site_admin":false},"repo":{"id":7276954,"name":"alluxio","full_name":"Alluxio/alluxio","owner":{"login":"Alluxio","id":16203694,"avatar_url":"https://avatars.githubusercontent.com/u/16203694?v=3","gravatar_id":"","url":"https://api.github.com/users/Alluxio","html_url":"https://github.com/Alluxio","followers_url":"https://api.github.com/users/Alluxio/followers","following_url":"https://api.github.com/users/Alluxio/following{/other_user}","gists_url":"https://api.github.com/users/Alluxio/gists{/gist_id}","starred_url":"https://api.github.com/users/Alluxio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alluxio/subscriptions","organizations_url":"https://api.github.com/users/Alluxio/orgs","repos_url":"https://api.github.com/users/Alluxio/repos","events_url":"https://api.github.com/users/Alluxio/events{/privacy}","received_events_url":"https://api.github.com/users/Alluxio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Alluxio/alluxio","description":"Alluxio, formerly Tachyon, A Virtual Distributed Storage at Memory Speed","fork":false,"url":"https://api.github.com/repos/Alluxio/alluxio","forks_url":"https://api.github.com/repos/Alluxio/alluxio/forks","keys_url":"https://api.github.com/repos/Alluxio/alluxio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alluxio/alluxio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alluxio/alluxio/teams","hooks_url":"https://api.github.com/repos/Alluxio/alluxio/hooks","issue_events_url":"https://api.github.com/repos/Alluxio/alluxio/issues/events{/number}","events_url":"https://api.github.com/repos/Alluxio/alluxio/events","assignees_url":"https://api.github.com/repos/Alluxio/alluxio/assignees{/user}","branches_url":"https://api.github.com/repos/Alluxio/alluxio/branches{/branch}","tags_url":"https://api.github.com/repos/Alluxio/alluxio/tags","blobs_url":"https://api.github.com/repos/Alluxio/alluxio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alluxio/alluxio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alluxio/alluxio/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alluxio/alluxio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alluxio/alluxio/statuses/{sha}","languages_url":"https://api.github.com/repos/Alluxio/alluxio/languages","stargazers_url":"https://api.github.com/repos/Alluxio/alluxio/stargazers","contributors_url":"https://api.github.com/repos/Alluxio/alluxio/contributors","subscribers_url":"https://api.github.com/repos/Alluxio/alluxio/subscribers","subscription_url":"https://api.github.com/repos/Alluxio/alluxio/subscription","commits_url":"https://api.github.com/repos/Alluxio/alluxio/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alluxio/alluxio/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alluxio/alluxio/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alluxio/alluxio/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alluxio/alluxio/contents/{+path}","compare_url":"https://api.github.com/repos/Alluxio/alluxio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alluxio/alluxio/merges","archive_url":"https://api.github.com/repos/Alluxio/alluxio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alluxio/alluxio/downloads","issues_url":"https://api.github.com/repos/Alluxio/alluxio/issues{/number}","pulls_url":"https://api.github.com/repos/Alluxio/alluxio/pulls{/number}","milestones_url":"https://api.github.com/repos/Alluxio/alluxio/milestones{/number}","notifications_url":"https://api.github.com/repos/Alluxio/alluxio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alluxio/alluxio/labels{/name}","releases_url":"https://api.github.com/repos/Alluxio/alluxio/releases{/id}","deployments_url":"https://api.github.com/repos/Alluxio/alluxio/deployments","created_at":"2012-12-21T17:43:46Z","updated_at":"2016-11-30T14:41:04Z","pushed_at":"2016-12-01T01:34:03Z","git_url":"git://github.com/Alluxio/alluxio.git","ssh_url":"git@github.com:Alluxio/alluxio.git","clone_url":"https://github.com/Alluxio/alluxio.git","svn_url":"https://github.com/Alluxio/alluxio","homepage":"http://www.alluxio.org/","size":100517,"stargazers_count":2740,"watchers_count":2740,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1243,"mirror_url":null,"open_issues_count":17,"forks":1243,"open_issues":17,"watchers":2740,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/4398"},"html":{"href":"https://github.com/Alluxio/alluxio/pull/4398"},"issue":{"href":"https://api.github.com/repos/Alluxio/alluxio/issues/4398"},"comments":{"href":"https://api.github.com/repos/Alluxio/alluxio/issues/4398/comments"},"review_comments":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/4398/comments"},"review_comment":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/4398/commits"},"statuses":{"href":"https://api.github.com/repos/Alluxio/alluxio/statuses/21ecce6e0805f3da3befa9aa3c69449e111305d3"}}}}
{"actor":{"display_login":"jsimsa"}}