{"action":"created","comment":{"url":"https://api.github.com/repos/apache/reef/pulls/comments/47448617","id":47448617,"diff_hunk":"@@ -174,10 +177,10 @@ public TOutput get(final long timeout, final TimeUnit unit)\n     }\n   }\n \n-  /**\n-   * Called by VortexMaster to let the user know that the task completed.\n-   */\n-  public void completed(final TOutput result) {\n+  @Private\n+  @Override\n+  public void completed(final int taskletId, final TOutput result) {\n+    assert taskletId == this.futureTaskletId;","path":"lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/api/VortexFuture.java","position":59,"original_position":59,"commit_id":"3cfc6ec4a56a7df5ee72d67992a62fe7ac88cc0f","original_commit_id":"3cfc6ec4a56a7df5ee72d67992a62fe7ac88cc0f","user":{"login":"afchung","id":2817619,"avatar_url":"https://avatars.githubusercontent.com/u/2817619?v=3","gravatar_id":"","url":"https://api.github.com/users/afchung","html_url":"https://github.com/afchung","followers_url":"https://api.github.com/users/afchung/followers","following_url":"https://api.github.com/users/afchung/following{/other_user}","gists_url":"https://api.github.com/users/afchung/gists{/gist_id}","starred_url":"https://api.github.com/users/afchung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afchung/subscriptions","organizations_url":"https://api.github.com/users/afchung/orgs","repos_url":"https://api.github.com/users/afchung/repos","events_url":"https://api.github.com/users/afchung/events{/privacy}","received_events_url":"https://api.github.com/users/afchung/received_events","type":"User","site_admin":false},"body":"As of this iteration, it does not yet support 1:many mapping. In a later iteration, I will add another Future-like object that will hold to many taskletIds, such that on callback from the VortexMaster, it knows that a subset of taskletId has completed.\r\nYou can imagine something like this:\r\n```\r\nAggregationFuture implements TaskletStateDelegate {\r\n  Map<int, VortexFunction> taskletIdToFunctionMapping;\r\n  void completed(final int Set<int> taskletIds, final TOutput result) {\r\n    // mark associated taskletIds as completed, such that when user calls get, the related VortexFunctions can be reported as completed\r\n  }\r\n}\r\n```\r\nOn that note, I should probably change the signature to `completed(Set<int>, TOutput)` instead.","created_at":"2015-12-13T19:15:18Z","updated_at":"2015-12-13T19:15:18Z","html_url":"https://github.com/apache/reef/pull/728#discussion_r47448617","pull_request_url":"https://api.github.com/repos/apache/reef/pulls/728","_links":{"self":{"href":"https://api.github.com/repos/apache/reef/pulls/comments/47448617"},"html":{"href":"https://github.com/apache/reef/pull/728#discussion_r47448617"},"pull_request":{"href":"https://api.github.com/repos/apache/reef/pulls/728"}}},"pull_request":{"url":"https://api.github.com/repos/apache/reef/pulls/728","id":53493222,"html_url":"https://github.com/apache/reef/pull/728","diff_url":"https://github.com/apache/reef/pull/728.diff","patch_url":"https://github.com/apache/reef/pull/728.patch","issue_url":"https://api.github.com/repos/apache/reef/issues/728","number":728,"state":"open","locked":false,"title":"[REEF-1075] Create Tasklet abstraction to enable one-to-many mapping …","user":{"login":"afchung","id":2817619,"avatar_url":"https://avatars.githubusercontent.com/u/2817619?v=3","gravatar_id":"","url":"https://api.github.com/users/afchung","html_url":"https://github.com/afchung","followers_url":"https://api.github.com/users/afchung/followers","following_url":"https://api.github.com/users/afchung/following{/other_user}","gists_url":"https://api.github.com/users/afchung/gists{/gist_id}","starred_url":"https://api.github.com/users/afchung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afchung/subscriptions","organizations_url":"https://api.github.com/users/afchung/orgs","repos_url":"https://api.github.com/users/afchung/repos","events_url":"https://api.github.com/users/afchung/events{/privacy}","received_events_url":"https://api.github.com/users/afchung/received_events","type":"User","site_admin":false},"body":"…of \"Future-like\" object to TaskletIds\r\n\r\nThis addressed the issue by\r\n  * Added TaskletStateDelegate and have VortexFuture inherit from it.\r\n  * Changed Tasklet to use TaskletStateDelegate instead of VortexFuture.\r\n\r\nJIRA:\r\n  [REEF-1075](https://issues.apache.org/jira/browse/REEF-1075)","created_at":"2015-12-13T05:22:21Z","updated_at":"2015-12-13T19:15:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39e7f7b8d26becaa08cde2e9b28a6de1d6e2e69d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/reef/pulls/728/commits","review_comments_url":"https://api.github.com/repos/apache/reef/pulls/728/comments","review_comment_url":"https://api.github.com/repos/apache/reef/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/reef/issues/728/comments","statuses_url":"https://api.github.com/repos/apache/reef/statuses/3cfc6ec4a56a7df5ee72d67992a62fe7ac88cc0f","head":{"label":"afchung:REEF-1075","ref":"REEF-1075","sha":"3cfc6ec4a56a7df5ee72d67992a62fe7ac88cc0f","user":{"login":"afchung","id":2817619,"avatar_url":"https://avatars.githubusercontent.com/u/2817619?v=3","gravatar_id":"","url":"https://api.github.com/users/afchung","html_url":"https://github.com/afchung","followers_url":"https://api.github.com/users/afchung/followers","following_url":"https://api.github.com/users/afchung/following{/other_user}","gists_url":"https://api.github.com/users/afchung/gists{/gist_id}","starred_url":"https://api.github.com/users/afchung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afchung/subscriptions","organizations_url":"https://api.github.com/users/afchung/orgs","repos_url":"https://api.github.com/users/afchung/repos","events_url":"https://api.github.com/users/afchung/events{/privacy}","received_events_url":"https://api.github.com/users/afchung/received_events","type":"User","site_admin":false},"repo":{"id":31485914,"name":"reef","full_name":"afchung/reef","owner":{"login":"afchung","id":2817619,"avatar_url":"https://avatars.githubusercontent.com/u/2817619?v=3","gravatar_id":"","url":"https://api.github.com/users/afchung","html_url":"https://github.com/afchung","followers_url":"https://api.github.com/users/afchung/followers","following_url":"https://api.github.com/users/afchung/following{/other_user}","gists_url":"https://api.github.com/users/afchung/gists{/gist_id}","starred_url":"https://api.github.com/users/afchung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afchung/subscriptions","organizations_url":"https://api.github.com/users/afchung/orgs","repos_url":"https://api.github.com/users/afchung/repos","events_url":"https://api.github.com/users/afchung/events{/privacy}","received_events_url":"https://api.github.com/users/afchung/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/afchung/reef","description":"Mirror of Apache REEF","fork":true,"url":"https://api.github.com/repos/afchung/reef","forks_url":"https://api.github.com/repos/afchung/reef/forks","keys_url":"https://api.github.com/repos/afchung/reef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/afchung/reef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/afchung/reef/teams","hooks_url":"https://api.github.com/repos/afchung/reef/hooks","issue_events_url":"https://api.github.com/repos/afchung/reef/issues/events{/number}","events_url":"https://api.github.com/repos/afchung/reef/events","assignees_url":"https://api.github.com/repos/afchung/reef/assignees{/user}","branches_url":"https://api.github.com/repos/afchung/reef/branches{/branch}","tags_url":"https://api.github.com/repos/afchung/reef/tags","blobs_url":"https://api.github.com/repos/afchung/reef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/afchung/reef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/afchung/reef/git/refs{/sha}","trees_url":"https://api.github.com/repos/afchung/reef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/afchung/reef/statuses/{sha}","languages_url":"https://api.github.com/repos/afchung/reef/languages","stargazers_url":"https://api.github.com/repos/afchung/reef/stargazers","contributors_url":"https://api.github.com/repos/afchung/reef/contributors","subscribers_url":"https://api.github.com/repos/afchung/reef/subscribers","subscription_url":"https://api.github.com/repos/afchung/reef/subscription","commits_url":"https://api.github.com/repos/afchung/reef/commits{/sha}","git_commits_url":"https://api.github.com/repos/afchung/reef/git/commits{/sha}","comments_url":"https://api.github.com/repos/afchung/reef/comments{/number}","issue_comment_url":"https://api.github.com/repos/afchung/reef/issues/comments{/number}","contents_url":"https://api.github.com/repos/afchung/reef/contents/{+path}","compare_url":"https://api.github.com/repos/afchung/reef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/afchung/reef/merges","archive_url":"https://api.github.com/repos/afchung/reef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/afchung/reef/downloads","issues_url":"https://api.github.com/repos/afchung/reef/issues{/number}","pulls_url":"https://api.github.com/repos/afchung/reef/pulls{/number}","milestones_url":"https://api.github.com/repos/afchung/reef/milestones{/number}","notifications_url":"https://api.github.com/repos/afchung/reef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/afchung/reef/labels{/name}","releases_url":"https://api.github.com/repos/afchung/reef/releases{/id}","created_at":"2015-03-01T03:44:31Z","updated_at":"2015-12-02T18:04:33Z","pushed_at":"2015-12-13T05:22:01Z","git_url":"git://github.com/afchung/reef.git","ssh_url":"git@github.com:afchung/reef.git","clone_url":"https://github.com/afchung/reef.git","svn_url":"https://github.com/afchung/reef","homepage":"","size":32819,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"e5a11f3bdbde6b7d4892b7f5b8cc81f78d61fcb4","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":25623941,"name":"reef","full_name":"apache/reef","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/reef","description":"Mirror of Apache REEF","fork":false,"url":"https://api.github.com/repos/apache/reef","forks_url":"https://api.github.com/repos/apache/reef/forks","keys_url":"https://api.github.com/repos/apache/reef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/reef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/reef/teams","hooks_url":"https://api.github.com/repos/apache/reef/hooks","issue_events_url":"https://api.github.com/repos/apache/reef/issues/events{/number}","events_url":"https://api.github.com/repos/apache/reef/events","assignees_url":"https://api.github.com/repos/apache/reef/assignees{/user}","branches_url":"https://api.github.com/repos/apache/reef/branches{/branch}","tags_url":"https://api.github.com/repos/apache/reef/tags","blobs_url":"https://api.github.com/repos/apache/reef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/reef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/reef/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/reef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/reef/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/reef/languages","stargazers_url":"https://api.github.com/repos/apache/reef/stargazers","contributors_url":"https://api.github.com/repos/apache/reef/contributors","subscribers_url":"https://api.github.com/repos/apache/reef/subscribers","subscription_url":"https://api.github.com/repos/apache/reef/subscription","commits_url":"https://api.github.com/repos/apache/reef/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/reef/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/reef/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/reef/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/reef/contents/{+path}","compare_url":"https://api.github.com/repos/apache/reef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/reef/merges","archive_url":"https://api.github.com/repos/apache/reef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/reef/downloads","issues_url":"https://api.github.com/repos/apache/reef/issues{/number}","pulls_url":"https://api.github.com/repos/apache/reef/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/reef/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/reef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/reef/labels{/name}","releases_url":"https://api.github.com/repos/apache/reef/releases{/id}","created_at":"2014-10-23T07:00:10Z","updated_at":"2015-12-12T17:36:49Z","pushed_at":"2015-12-13T11:44:04Z","git_url":"git://github.com/apache/reef.git","ssh_url":"git@github.com:apache/reef.git","clone_url":"https://github.com/apache/reef.git","svn_url":"https://github.com/apache/reef","homepage":"","size":44753,"stargazers_count":36,"watchers_count":36,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":40,"mirror_url":"git://git.apache.org/reef.git","open_issues_count":13,"forks":40,"open_issues":13,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/reef/pulls/728"},"html":{"href":"https://github.com/apache/reef/pull/728"},"issue":{"href":"https://api.github.com/repos/apache/reef/issues/728"},"comments":{"href":"https://api.github.com/repos/apache/reef/issues/728/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/reef/pulls/728/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/reef/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/reef/pulls/728/commits"},"statuses":{"href":"https://api.github.com/repos/apache/reef/statuses/3cfc6ec4a56a7df5ee72d67992a62fe7ac88cc0f"}}}}