{"action":"created","comment":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/comments/35595674","id":35595674,"diff_hunk":"@@ -42,9 +42,9 @@ protected void encode(ChannelHandlerContext ctx, RPCMessage in, List<Object> out\n     long bodyBytes = 0;\n     DataBuffer payload = null;\n \n-    if (in.hasPayload()) {\n-      payload = in.getPayloadDataBuffer();\n-      bodyBytes = payload.getLength();\n+    if (in instanceof PayloadMessage) {\n+      payload = ((PayloadMessage)in).getPayloadDataBuffer();\n+      bodyBytes = (payload == null) ? 0 : payload.getLength();","path":"common/src/main/java/tachyon/network/protocol/RPCMessageEncoder.java","position":9,"original_position":9,"commit_id":"d54cde24361a2a64239b9818d9b480a13e6a0f2e","original_commit_id":"d54cde24361a2a64239b9818d9b480a13e6a0f2e","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":"It seems like the previous code looked a bit cleaner? Will `PayloadMessage` have more functionality in the future?","created_at":"2015-07-27T22:33:23Z","updated_at":"2015-07-27T22:33:23Z","html_url":"https://github.com/amplab/tachyon/pull/1187#discussion_r35595674","pull_request_url":"https://api.github.com/repos/amplab/tachyon/pulls/1187","_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments/35595674"},"html":{"href":"https://github.com/amplab/tachyon/pull/1187#discussion_r35595674"},"pull_request":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1187"}}},"pull_request":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/1187","id":40950238,"html_url":"https://github.com/amplab/tachyon/pull/1187","diff_url":"https://github.com/amplab/tachyon/pull/1187.diff","patch_url":"https://github.com/amplab/tachyon/pull/1187.patch","issue_url":"https://api.github.com/repos/amplab/tachyon/issues/1187","number":1187,"state":"open","locked":false,"title":"[Tachyon-683] Refactor out an interface for messages with payloads.","user":{"login":"yuzhu","id":736171,"avatar_url":"https://avatars.githubusercontent.com/u/736171?v=3","gravatar_id":"","url":"https://api.github.com/users/yuzhu","html_url":"https://github.com/yuzhu","followers_url":"https://api.github.com/users/yuzhu/followers","following_url":"https://api.github.com/users/yuzhu/following{/other_user}","gists_url":"https://api.github.com/users/yuzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/yuzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuzhu/subscriptions","organizations_url":"https://api.github.com/users/yuzhu/orgs","repos_url":"https://api.github.com/users/yuzhu/repos","events_url":"https://api.github.com/users/yuzhu/events{/privacy}","received_events_url":"https://api.github.com/users/yuzhu/received_events","type":"User","site_admin":false},"body":"https://tachyon.atlassian.net/browse/TACHYON-683\r\n\r\nCreate an interface for those messages with payloads, so that hasPayload wouldn't\r\nbe necessary anymore.","created_at":"2015-07-27T21:14:40Z","updated_at":"2015-07-27T22:33:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"677c2cc366b2c790c1f4fc29bd7ef6f41dfd81ca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplab/tachyon/pulls/1187/commits","review_comments_url":"https://api.github.com/repos/amplab/tachyon/pulls/1187/comments","review_comment_url":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplab/tachyon/issues/1187/comments","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/d54cde24361a2a64239b9818d9b480a13e6a0f2e","head":{"label":"yuzhu:jira683","ref":"jira683","sha":"d54cde24361a2a64239b9818d9b480a13e6a0f2e","user":{"login":"yuzhu","id":736171,"avatar_url":"https://avatars.githubusercontent.com/u/736171?v=3","gravatar_id":"","url":"https://api.github.com/users/yuzhu","html_url":"https://github.com/yuzhu","followers_url":"https://api.github.com/users/yuzhu/followers","following_url":"https://api.github.com/users/yuzhu/following{/other_user}","gists_url":"https://api.github.com/users/yuzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/yuzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuzhu/subscriptions","organizations_url":"https://api.github.com/users/yuzhu/orgs","repos_url":"https://api.github.com/users/yuzhu/repos","events_url":"https://api.github.com/users/yuzhu/events{/privacy}","received_events_url":"https://api.github.com/users/yuzhu/received_events","type":"User","site_admin":false},"repo":{"id":22582928,"name":"tachyon","full_name":"yuzhu/tachyon","owner":{"login":"yuzhu","id":736171,"avatar_url":"https://avatars.githubusercontent.com/u/736171?v=3","gravatar_id":"","url":"https://api.github.com/users/yuzhu","html_url":"https://github.com/yuzhu","followers_url":"https://api.github.com/users/yuzhu/followers","following_url":"https://api.github.com/users/yuzhu/following{/other_user}","gists_url":"https://api.github.com/users/yuzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/yuzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuzhu/subscriptions","organizations_url":"https://api.github.com/users/yuzhu/orgs","repos_url":"https://api.github.com/users/yuzhu/repos","events_url":"https://api.github.com/users/yuzhu/events{/privacy}","received_events_url":"https://api.github.com/users/yuzhu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yuzhu/tachyon","description":" A Reliable Memory Centric Storage for Big Data Analytics","fork":true,"url":"https://api.github.com/repos/yuzhu/tachyon","forks_url":"https://api.github.com/repos/yuzhu/tachyon/forks","keys_url":"https://api.github.com/repos/yuzhu/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuzhu/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuzhu/tachyon/teams","hooks_url":"https://api.github.com/repos/yuzhu/tachyon/hooks","issue_events_url":"https://api.github.com/repos/yuzhu/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/yuzhu/tachyon/events","assignees_url":"https://api.github.com/repos/yuzhu/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/yuzhu/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/yuzhu/tachyon/tags","blobs_url":"https://api.github.com/repos/yuzhu/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuzhu/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuzhu/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuzhu/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuzhu/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/yuzhu/tachyon/languages","stargazers_url":"https://api.github.com/repos/yuzhu/tachyon/stargazers","contributors_url":"https://api.github.com/repos/yuzhu/tachyon/contributors","subscribers_url":"https://api.github.com/repos/yuzhu/tachyon/subscribers","subscription_url":"https://api.github.com/repos/yuzhu/tachyon/subscription","commits_url":"https://api.github.com/repos/yuzhu/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuzhu/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuzhu/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuzhu/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuzhu/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/yuzhu/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuzhu/tachyon/merges","archive_url":"https://api.github.com/repos/yuzhu/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuzhu/tachyon/downloads","issues_url":"https://api.github.com/repos/yuzhu/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/yuzhu/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/yuzhu/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/yuzhu/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuzhu/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/yuzhu/tachyon/releases{/id}","created_at":"2014-08-03T20:27:08Z","updated_at":"2014-08-03T21:29:08Z","pushed_at":"2015-07-27T22:03:30Z","git_url":"git://github.com/yuzhu/tachyon.git","ssh_url":"git@github.com:yuzhu/tachyon.git","clone_url":"https://github.com/yuzhu/tachyon.git","svn_url":"https://github.com/yuzhu/tachyon","homepage":"http://tachyon-project.org","size":15363,"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":"4b8cf7f8eb4c0f6c3e5ec9b57e50984536de1c57","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-07-26T11:07:30Z","pushed_at":"2015-07-27T22:16:08Z","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":37740,"stargazers_count":1481,"watchers_count":1481,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":568,"mirror_url":null,"open_issues_count":21,"forks":568,"open_issues":21,"watchers":1481,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1187"},"html":{"href":"https://github.com/amplab/tachyon/pull/1187"},"issue":{"href":"https://api.github.com/repos/amplab/tachyon/issues/1187"},"comments":{"href":"https://api.github.com/repos/amplab/tachyon/issues/1187/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1187/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/1187/commits"},"statuses":{"href":"https://api.github.com/repos/amplab/tachyon/statuses/d54cde24361a2a64239b9818d9b480a13e6a0f2e"}}}}