{"action":"created","comment":{"url":"https://api.github.com/repos/apache/flink/pulls/comments/83075316","pull_request_review_id":3934580,"id":83075316,"diff_hunk":"@@ -137,42 +138,51 @@ public void testConnectedComponentsWithParametrizableConvergence() {\n \t\t\tfail(e.getMessage());\n \t\t}\n \t}\n+\n+\t@Test\n+\tpublic void testDeltaConnectedComponentsWithParametrizableConvergence() {\n+\t\ttry {\n+\n+\t\t\t// name of the aggregator that checks for convergence\n+\t\t\tfinal String UPDATED_ELEMENTS = \"updated.elements.aggr\";\n+\n+\t\t\t// the iteration stops if less than this number of elements change value\n+\t\t\tfinal long convergence_threshold = 3;\n+\n+\t\t\tfinal ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n+\n+\t\t\tDataSet<Tuple2<Long, Long>> initialSolutionSet = env.fromCollection(verticesInput);\n+\t\t\tDataSet<Tuple2<Long, Long>> edges = env.fromCollection(edgesInput);\n+\n+\t\t\tDeltaIteration<Tuple2<Long, Long>, Tuple2<Long, Long>> iteration =\n+\t\t\t\t\tinitialSolutionSet.iterateDelta(initialSolutionSet, 10, 0);\n+\n+\t\t\t// register the convergence criterion\n+\t\t\titeration.registerAggregationConvergenceCriterion(UPDATED_ELEMENTS,\n+\t\t\t\t\tnew LongSumAggregator(), new UpdatedElementsConvergenceCriterion(convergence_threshold));\n+\n+\t\t\tDataSet<Tuple2<Long, Long>> verticesWithNewComponents = iteration.getWorkset().join(edges).where(0).equalTo(0)\n+\t\t\t\t\t.with(new NeighborWithComponentIDJoin())\n+\t\t\t\t\t.groupBy(0).min(1);\n+\n+\t\t\tDataSet<Tuple2<Long, Long>> updatedComponentId =\n+\t\t\t\t\tverticesWithNewComponents.join(iteration.getSolutionSet()).where(0).equalTo(0)\n+\t\t\t\t\t\t\t.flatMap(new MinimumIdFilter(UPDATED_ELEMENTS));\n+\n+\t\t\tList<Tuple2<Long, Long>> result = iteration.closeWith(updatedComponentId, updatedComponentId).collect();\n+\t\t\tCollections.sort(result, new JavaProgramTestBase.TupleComparator<Tuple2<Long, Long>>());\n+\n+\t\t\tassertEquals(expectedResult, result);\n+\t\t}\n+\t\tcatch (Exception e) {","path":"flink-tests/src/test/java/org/apache/flink/test/iterative/aggregators/AggregatorConvergenceITCase.java","position":172,"original_position":172,"commit_id":"9f41af544eecae0c37ae9470f4ff26f19b5dbdc0","original_commit_id":"9f41af544eecae0c37ae9470f4ff26f19b5dbdc0","user":{"login":"greghogan","id":569655,"avatar_url":"https://avatars.githubusercontent.com/u/569655?v=3","gravatar_id":"","url":"https://api.github.com/users/greghogan","html_url":"https://github.com/greghogan","followers_url":"https://api.github.com/users/greghogan/followers","following_url":"https://api.github.com/users/greghogan/following{/other_user}","gists_url":"https://api.github.com/users/greghogan/gists{/gist_id}","starred_url":"https://api.github.com/users/greghogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greghogan/subscriptions","organizations_url":"https://api.github.com/users/greghogan/orgs","repos_url":"https://api.github.com/users/greghogan/repos","events_url":"https://api.github.com/users/greghogan/events{/privacy}","received_events_url":"https://api.github.com/users/greghogan/received_events","type":"User","site_admin":false},"body":"Catching and re-throwing exceptions looks to be unnecessary.","created_at":"2016-10-12T19:00:22Z","updated_at":"2016-10-12T19:00:22Z","html_url":"https://github.com/apache/flink/pull/2606#discussion_r83075316","pull_request_url":"https://api.github.com/repos/apache/flink/pulls/2606","_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/comments/83075316"},"html":{"href":"https://github.com/apache/flink/pull/2606#discussion_r83075316"},"pull_request":{"href":"https://api.github.com/repos/apache/flink/pulls/2606"}}},"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/2606","id":88424865,"html_url":"https://github.com/apache/flink/pull/2606","diff_url":"https://github.com/apache/flink/pull/2606.diff","patch_url":"https://github.com/apache/flink/pull/2606.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/2606","number":2606,"state":"open","locked":false,"title":"[FLINK-3888] Allow custom convergence criterion in delta iterations","user":{"login":"vasia","id":498957,"avatar_url":"https://avatars.githubusercontent.com/u/498957?v=3","gravatar_id":"","url":"https://api.github.com/users/vasia","html_url":"https://github.com/vasia","followers_url":"https://api.github.com/users/vasia/followers","following_url":"https://api.github.com/users/vasia/following{/other_user}","gists_url":"https://api.github.com/users/vasia/gists{/gist_id}","starred_url":"https://api.github.com/users/vasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasia/subscriptions","organizations_url":"https://api.github.com/users/vasia/orgs","repos_url":"https://api.github.com/users/vasia/repos","events_url":"https://api.github.com/users/vasia/events{/privacy}","received_events_url":"https://api.github.com/users/vasia/received_events","type":"User","site_admin":false},"body":"As discussed in the Jira issue, this PR contains the following changes:\r\n1. use `TaskConfig.setConvergenceCriterion()` to set the custom, user-defined convergence criterion (like in the case of bulk iteration)\r\n2. add a new method `TaskConfig.setDefaultConvergeCriterion()` to handle the default empty workset convergence\r\n​3. check both criteria in `IterationSynchronizationSinkTask.checkForConvergence()​`\r\n4. expose the custom convergence criterion in `DeltaIteration`\r\nIt also contains some minor cleanup and corresponding changes in the `CollectionExecutor`.\r\nThe iteration docs already state that custom convergence is possible, so no update needed there ;)","created_at":"2016-10-07T11:51:35Z","updated_at":"2016-10-12T19:14:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"768f8c47a8b7aa5bf919c178e46afeb5a79b0802","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/2606/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/2606/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/2606/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/9f41af544eecae0c37ae9470f4ff26f19b5dbdc0","head":{"label":"vasia:flink-3888","ref":"flink-3888","sha":"9f41af544eecae0c37ae9470f4ff26f19b5dbdc0","user":{"login":"vasia","id":498957,"avatar_url":"https://avatars.githubusercontent.com/u/498957?v=3","gravatar_id":"","url":"https://api.github.com/users/vasia","html_url":"https://github.com/vasia","followers_url":"https://api.github.com/users/vasia/followers","following_url":"https://api.github.com/users/vasia/following{/other_user}","gists_url":"https://api.github.com/users/vasia/gists{/gist_id}","starred_url":"https://api.github.com/users/vasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasia/subscriptions","organizations_url":"https://api.github.com/users/vasia/orgs","repos_url":"https://api.github.com/users/vasia/repos","events_url":"https://api.github.com/users/vasia/events{/privacy}","received_events_url":"https://api.github.com/users/vasia/received_events","type":"User","site_admin":false},"repo":{"id":20796928,"name":"flink","full_name":"vasia/flink","owner":{"login":"vasia","id":498957,"avatar_url":"https://avatars.githubusercontent.com/u/498957?v=3","gravatar_id":"","url":"https://api.github.com/users/vasia","html_url":"https://github.com/vasia","followers_url":"https://api.github.com/users/vasia/followers","following_url":"https://api.github.com/users/vasia/following{/other_user}","gists_url":"https://api.github.com/users/vasia/gists{/gist_id}","starred_url":"https://api.github.com/users/vasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasia/subscriptions","organizations_url":"https://api.github.com/users/vasia/orgs","repos_url":"https://api.github.com/users/vasia/repos","events_url":"https://api.github.com/users/vasia/events{/privacy}","received_events_url":"https://api.github.com/users/vasia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vasia/flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/vasia/flink","forks_url":"https://api.github.com/repos/vasia/flink/forks","keys_url":"https://api.github.com/repos/vasia/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vasia/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vasia/flink/teams","hooks_url":"https://api.github.com/repos/vasia/flink/hooks","issue_events_url":"https://api.github.com/repos/vasia/flink/issues/events{/number}","events_url":"https://api.github.com/repos/vasia/flink/events","assignees_url":"https://api.github.com/repos/vasia/flink/assignees{/user}","branches_url":"https://api.github.com/repos/vasia/flink/branches{/branch}","tags_url":"https://api.github.com/repos/vasia/flink/tags","blobs_url":"https://api.github.com/repos/vasia/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vasia/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vasia/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/vasia/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vasia/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/vasia/flink/languages","stargazers_url":"https://api.github.com/repos/vasia/flink/stargazers","contributors_url":"https://api.github.com/repos/vasia/flink/contributors","subscribers_url":"https://api.github.com/repos/vasia/flink/subscribers","subscription_url":"https://api.github.com/repos/vasia/flink/subscription","commits_url":"https://api.github.com/repos/vasia/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/vasia/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/vasia/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/vasia/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/vasia/flink/contents/{+path}","compare_url":"https://api.github.com/repos/vasia/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vasia/flink/merges","archive_url":"https://api.github.com/repos/vasia/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vasia/flink/downloads","issues_url":"https://api.github.com/repos/vasia/flink/issues{/number}","pulls_url":"https://api.github.com/repos/vasia/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/vasia/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/vasia/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vasia/flink/labels{/name}","releases_url":"https://api.github.com/repos/vasia/flink/releases{/id}","deployments_url":"https://api.github.com/repos/vasia/flink/deployments","created_at":"2014-06-13T08:09:41Z","updated_at":"2016-06-06T09:13:25Z","pushed_at":"2016-10-07T08:59:57Z","git_url":"git://github.com/vasia/flink.git","ssh_url":"git@github.com:vasia/flink.git","clone_url":"https://github.com/vasia/flink.git","svn_url":"https://github.com/vasia/flink","homepage":null,"size":93642,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"97c71675ad9e2b50b818362f92faef9eb44da627","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":20587599,"name":"flink","full_name":"apache/flink","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/flink","description":"Mirror of Apache Flink","fork":false,"url":"https://api.github.com/repos/apache/flink","forks_url":"https://api.github.com/repos/apache/flink/forks","keys_url":"https://api.github.com/repos/apache/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/flink/teams","hooks_url":"https://api.github.com/repos/apache/flink/hooks","issue_events_url":"https://api.github.com/repos/apache/flink/issues/events{/number}","events_url":"https://api.github.com/repos/apache/flink/events","assignees_url":"https://api.github.com/repos/apache/flink/assignees{/user}","branches_url":"https://api.github.com/repos/apache/flink/branches{/branch}","tags_url":"https://api.github.com/repos/apache/flink/tags","blobs_url":"https://api.github.com/repos/apache/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/flink/languages","stargazers_url":"https://api.github.com/repos/apache/flink/stargazers","contributors_url":"https://api.github.com/repos/apache/flink/contributors","subscribers_url":"https://api.github.com/repos/apache/flink/subscribers","subscription_url":"https://api.github.com/repos/apache/flink/subscription","commits_url":"https://api.github.com/repos/apache/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/flink/contents/{+path}","compare_url":"https://api.github.com/repos/apache/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/flink/merges","archive_url":"https://api.github.com/repos/apache/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/flink/downloads","issues_url":"https://api.github.com/repos/apache/flink/issues{/number}","pulls_url":"https://api.github.com/repos/apache/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/flink/labels{/name}","releases_url":"https://api.github.com/repos/apache/flink/releases{/id}","deployments_url":"https://api.github.com/repos/apache/flink/deployments","created_at":"2014-06-07T07:00:10Z","updated_at":"2016-10-12T15:28:45Z","pushed_at":"2016-10-12T17:32:05Z","git_url":"git://github.com/apache/flink.git","ssh_url":"git@github.com:apache/flink.git","clone_url":"https://github.com/apache/flink.git","svn_url":"https://github.com/apache/flink","homepage":null,"size":132784,"stargazers_count":1640,"watchers_count":1640,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1123,"mirror_url":"git://git.apache.org/flink.git","open_issues_count":148,"forks":1123,"open_issues":148,"watchers":1640,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/2606"},"html":{"href":"https://github.com/apache/flink/pull/2606"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/2606"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/2606/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/2606/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/2606/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/9f41af544eecae0c37ae9470f4ff26f19b5dbdc0"}}}}
{"actor":{"display_login":"greghogan"}}