{"action":"created","comment":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/comments/31371973","id":31371973,"diff_hunk":"@@ -59,14 +89,15 @@ public void channelRead(final ChannelHandlerContext ctx, final Object msg) throw\n \n     BlockHandler handler = null;\n     try {\n-      validateInput(req);\n+      req.validate();\n       handler = storageDir.getBlockHandler(blockId);\n \n       final long fileLength = handler.getLength();\n       validateBounds(req, fileLength);\n       final long readLength = returnLength(offset, len, fileLength);\n       ChannelFuture future =\n-          ctx.writeAndFlush(new BlockResponse(blockId, offset, readLength, handler));\n+          ctx.writeAndFlush(new RPCBlockResponse(blockId, offset, readLength, getDataBuffer(req,\n+              handler, (int) readLength)));","path":"servers/src/main/java/tachyon/worker/netty/DataServerHandler.java","position":null,"original_position":99,"commit_id":"8d685116910b5df556f9a9209a0a6b1950787e42","original_commit_id":"b843ae0d2a241ec86a791d020701c324ed9c1d13","user":{"login":"gpang","id":429032,"avatar_url":"https://avatars.githubusercontent.com/u/429032?v=3","gravatar_id":"","url":"https://api.github.com/users/gpang","html_url":"https://github.com/gpang","followers_url":"https://api.github.com/users/gpang/followers","following_url":"https://api.github.com/users/gpang/following{/other_user}","gists_url":"https://api.github.com/users/gpang/gists{/gist_id}","starred_url":"https://api.github.com/users/gpang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpang/subscriptions","organizations_url":"https://api.github.com/users/gpang/orgs","repos_url":"https://api.github.com/users/gpang/repos","events_url":"https://api.github.com/users/gpang/events{/privacy}","received_events_url":"https://api.github.com/users/gpang/received_events","type":"User","site_admin":false},"body":"It is not, but handler.read() is.","created_at":"2015-05-29T22:58:41Z","updated_at":"2015-05-29T22:58:41Z","html_url":"https://github.com/amplab/tachyon/pull/962#discussion_r31371973","pull_request_url":"https://api.github.com/repos/amplab/tachyon/pulls/962","_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments/31371973"},"html":{"href":"https://github.com/amplab/tachyon/pull/962#discussion_r31371973"},"pull_request":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/962"}}},"pull_request":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/962","id":36351546,"html_url":"https://github.com/amplab/tachyon/pull/962","diff_url":"https://github.com/amplab/tachyon/pull/962.diff","patch_url":"https://github.com/amplab/tachyon/pull/962.patch","issue_url":"https://api.github.com/repos/amplab/tachyon/issues/962","number":962,"state":"open","locked":false,"title":"[TACHYON-481] Refactor Netty DataServer","user":{"login":"gpang","id":429032,"avatar_url":"https://avatars.githubusercontent.com/u/429032?v=3","gravatar_id":"","url":"https://api.github.com/users/gpang","html_url":"https://github.com/gpang","followers_url":"https://api.github.com/users/gpang/followers","following_url":"https://api.github.com/users/gpang/following{/other_user}","gists_url":"https://api.github.com/users/gpang/gists{/gist_id}","starred_url":"https://api.github.com/users/gpang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpang/subscriptions","organizations_url":"https://api.github.com/users/gpang/orgs","repos_url":"https://api.github.com/users/gpang/repos","events_url":"https://api.github.com/users/gpang/events{/privacy}","received_events_url":"https://api.github.com/users/gpang/received_events","type":"User","site_admin":false},"body":"This refactors the netty DataServer to enable the ability to easily add new message types in the future. The changes are primarily on the server side, so the client is mostly unchanged.\r\n\r\nThere are a few places where certain values are hardcoded. The main reason for that was to keep the changes minimal on the client side. Later, the tcp client will be probably be refactored to use netty, and at that time, the hardcoded TODO's will be addressed.","created_at":"2015-05-27T21:38:27Z","updated_at":"2015-05-29T22:58:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0447793a939a93b3bf910455682ee189e68e343b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplab/tachyon/pulls/962/commits","review_comments_url":"https://api.github.com/repos/amplab/tachyon/pulls/962/comments","review_comment_url":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplab/tachyon/issues/962/comments","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/8d685116910b5df556f9a9209a0a6b1950787e42","head":{"label":"gpang:dataserver","ref":"dataserver","sha":"8d685116910b5df556f9a9209a0a6b1950787e42","user":{"login":"gpang","id":429032,"avatar_url":"https://avatars.githubusercontent.com/u/429032?v=3","gravatar_id":"","url":"https://api.github.com/users/gpang","html_url":"https://github.com/gpang","followers_url":"https://api.github.com/users/gpang/followers","following_url":"https://api.github.com/users/gpang/following{/other_user}","gists_url":"https://api.github.com/users/gpang/gists{/gist_id}","starred_url":"https://api.github.com/users/gpang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpang/subscriptions","organizations_url":"https://api.github.com/users/gpang/orgs","repos_url":"https://api.github.com/users/gpang/repos","events_url":"https://api.github.com/users/gpang/events{/privacy}","received_events_url":"https://api.github.com/users/gpang/received_events","type":"User","site_admin":false},"repo":{"id":32651495,"name":"tachyon","full_name":"gpang/tachyon","owner":{"login":"gpang","id":429032,"avatar_url":"https://avatars.githubusercontent.com/u/429032?v=3","gravatar_id":"","url":"https://api.github.com/users/gpang","html_url":"https://github.com/gpang","followers_url":"https://api.github.com/users/gpang/followers","following_url":"https://api.github.com/users/gpang/following{/other_user}","gists_url":"https://api.github.com/users/gpang/gists{/gist_id}","starred_url":"https://api.github.com/users/gpang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpang/subscriptions","organizations_url":"https://api.github.com/users/gpang/orgs","repos_url":"https://api.github.com/users/gpang/repos","events_url":"https://api.github.com/users/gpang/events{/privacy}","received_events_url":"https://api.github.com/users/gpang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gpang/tachyon","description":" A Reliable Memory Centric Distributed Storage System","fork":true,"url":"https://api.github.com/repos/gpang/tachyon","forks_url":"https://api.github.com/repos/gpang/tachyon/forks","keys_url":"https://api.github.com/repos/gpang/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gpang/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gpang/tachyon/teams","hooks_url":"https://api.github.com/repos/gpang/tachyon/hooks","issue_events_url":"https://api.github.com/repos/gpang/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/gpang/tachyon/events","assignees_url":"https://api.github.com/repos/gpang/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/gpang/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/gpang/tachyon/tags","blobs_url":"https://api.github.com/repos/gpang/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gpang/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gpang/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/gpang/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gpang/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/gpang/tachyon/languages","stargazers_url":"https://api.github.com/repos/gpang/tachyon/stargazers","contributors_url":"https://api.github.com/repos/gpang/tachyon/contributors","subscribers_url":"https://api.github.com/repos/gpang/tachyon/subscribers","subscription_url":"https://api.github.com/repos/gpang/tachyon/subscription","commits_url":"https://api.github.com/repos/gpang/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/gpang/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/gpang/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/gpang/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/gpang/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/gpang/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gpang/tachyon/merges","archive_url":"https://api.github.com/repos/gpang/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gpang/tachyon/downloads","issues_url":"https://api.github.com/repos/gpang/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/gpang/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/gpang/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/gpang/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gpang/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/gpang/tachyon/releases{/id}","created_at":"2015-03-21T21:51:11Z","updated_at":"2015-05-01T21:22:09Z","pushed_at":"2015-05-29T22:55:07Z","git_url":"git://github.com/gpang/tachyon.git","ssh_url":"git@github.com:gpang/tachyon.git","clone_url":"https://github.com/gpang/tachyon.git","svn_url":"https://github.com/gpang/tachyon","homepage":"http://tachyon-project.org","size":13589,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"771e884a686411f8f8a20464412561730a4e4231","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":" A Reliable Memory Centric Distributed Storage System","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-05-28T13:28:30Z","pushed_at":"2015-05-29T22:55:09Z","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":34518,"stargazers_count":1415,"watchers_count":1415,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":512,"mirror_url":null,"open_issues_count":19,"forks":512,"open_issues":19,"watchers":1415,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/962"},"html":{"href":"https://github.com/amplab/tachyon/pull/962"},"issue":{"href":"https://api.github.com/repos/amplab/tachyon/issues/962"},"comments":{"href":"https://api.github.com/repos/amplab/tachyon/issues/962/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/962/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/962/commits"},"statuses":{"href":"https://api.github.com/repos/amplab/tachyon/statuses/8d685116910b5df556f9a9209a0a6b1950787e42"}}}}