{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-beam/pulls/comments/87948313","pull_request_review_id":8537193,"id":87948313,"diff_hunk":"@@ -537,48 +532,42 @@ public void outputWindowedValue(KV<String, OutputT> output, Instant timestamp,\n     }\n \n     @Override\n-    public TimerInternals timerInternals() {\n-      throw new UnsupportedOperationException(\n-          \"Testing triggers should not use timers from WindowingInternals.\");\n-    }\n-\n-    @Override\n-    public Collection<? extends BoundedWindow> windows() {\n-      throw new UnsupportedOperationException(\n-          \"Testing triggers should not use windows from WindowingInternals.\");\n-    }\n-\n-    @Override\n-    public PaneInfo pane() {\n-      throw new UnsupportedOperationException(\n-          \"Testing triggers should not use pane from WindowingInternals.\");\n+    public <SideOutputT> void sideOutputWindowedValue(\n+        TupleTag<SideOutputT> tag,\n+        SideOutputT output,\n+        Instant timestamp,\n+        Collection<? extends BoundedWindow> windows,\n+        PaneInfo pane) {\n+      throw new UnsupportedOperationException();\n     }\n+  }\n \n-    @Override\n-    public <T> void writePCollectionViewData(\n-        TupleTag<?> tag, Iterable<WindowedValue<T>> data, Coder<T> elemCoder) throws IOException {\n-      throw new UnsupportedOperationException(\n-          \"Testing triggers should not use writePCollectionViewData from WindowingInternals.\");\n-    }\n+  private class TestSideInputReader implements SideInputReader {\n+    private SideInputReader sideInputReader;\n \n-    @Override\n-    public StateInternals<Object> stateInternals() {\n-      // Safe for testing only\n-      @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n-      TestInMemoryStateInternals<Object> untypedStateInternals =\n-          (TestInMemoryStateInternals) stateInternals;\n-      return untypedStateInternals;\n+    private TestSideInputReader(SideInputReader sideInputReader) {\n+      this.sideInputReader = sideInputReader;\n     }\n \n     @Override\n-    public <T> T sideInput(PCollectionView<T> view, BoundedWindow mainInputWindow) {\n+    public <T> T get(PCollectionView<T> view, BoundedWindow mainInputWindow) {\n       if (!sideInputReader.contains(view)) {\n         throw new IllegalArgumentException(\"calling sideInput() with unknown view\");\n       }\n       BoundedWindow sideInputWindow =\n           view.getWindowingStrategyInternal().getWindowFn().getSideInputWindow(mainInputWindow);\n       return sideInputReader.get(view, sideInputWindow);\n     }\n+\n+    @Override\n+    public <T> boolean contains(PCollectionView<T> view) {\n+      throw new UnsupportedOperationException();","path":"runners/core-java/src/test/java/org/apache/beam/runners/core/ReduceFnTester.java","position":156,"original_position":156,"commit_id":"34cc847a0150e0bbe2a3eb8505a30baee03933c7","original_commit_id":"34cc847a0150e0bbe2a3eb8505a30baee03933c7","user":{"login":"kennknowles","id":575353,"avatar_url":"https://avatars.githubusercontent.com/u/575353?v=3","gravatar_id":"","url":"https://api.github.com/users/kennknowles","html_url":"https://github.com/kennknowles","followers_url":"https://api.github.com/users/kennknowles/followers","following_url":"https://api.github.com/users/kennknowles/following{/other_user}","gists_url":"https://api.github.com/users/kennknowles/gists{/gist_id}","starred_url":"https://api.github.com/users/kennknowles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennknowles/subscriptions","organizations_url":"https://api.github.com/users/kennknowles/orgs","repos_url":"https://api.github.com/users/kennknowles/repos","events_url":"https://api.github.com/users/kennknowles/events{/privacy}","received_events_url":"https://api.github.com/users/kennknowles/received_events","type":"User","site_admin":false},"body":"ditto","created_at":"2016-11-15T04:57:07Z","updated_at":"2016-11-15T04:59:24Z","html_url":"https://github.com/apache/incubator-beam/pull/1353#discussion_r87948313","pull_request_url":"https://api.github.com/repos/apache/incubator-beam/pulls/1353","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/comments/87948313"},"html":{"href":"https://github.com/apache/incubator-beam/pull/1353#discussion_r87948313"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/1353"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-beam/pulls/1353","id":93421486,"html_url":"https://github.com/apache/incubator-beam/pull/1353","diff_url":"https://github.com/apache/incubator-beam/pull/1353.diff","patch_url":"https://github.com/apache/incubator-beam/pull/1353.patch","issue_url":"https://api.github.com/repos/apache/incubator-beam/issues/1353","number":1353,"state":"open","locked":false,"title":"Liberates ReduceFnRunner from WindowingInternals, and lets WindowingInternals do windowed side outputs","user":{"login":"jkff","id":343722,"avatar_url":"https://avatars.githubusercontent.com/u/343722?v=3","gravatar_id":"","url":"https://api.github.com/users/jkff","html_url":"https://github.com/jkff","followers_url":"https://api.github.com/users/jkff/followers","following_url":"https://api.github.com/users/jkff/following{/other_user}","gists_url":"https://api.github.com/users/jkff/gists{/gist_id}","starred_url":"https://api.github.com/users/jkff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkff/subscriptions","organizations_url":"https://api.github.com/users/jkff/orgs","repos_url":"https://api.github.com/users/jkff/repos","events_url":"https://api.github.com/users/jkff/events{/privacy}","received_events_url":"https://api.github.com/users/jkff/received_events","type":"User","site_admin":false},"body":"- Introduces WindowingInternals.sideOutputWindowedValue (will be necessary for Splittable DoFn)\r\n- Implements it properly in all runners (required some minor refactoring in Spark and Flink ProcessContext implementations)\r\n- Introduces \"OutputWindowedValue\" interface and \"SideInputAccess\" interfaces, and uses them in ReduceFnRunner instead of directly using WindowingInternals.\r\n- Introduces adapters from WindowingInternals to these two interfaces, for use in OldDoFn contexts\r\n- Moves some StateContext functions into ReduceFnContextFactory, because they make more sense in runners-core than in sdk (because they are only invoked by different runners). The only remaining StateContexts function is nullContext, but I couldn't figure out an easy way to move it into runners-core and gave up (however in fact I'm not sure its current usages are correct at all...)\r\n\r\nR: @kennknowles (for bulk of the code and as committer)\r\nCC: @aljoscha @amitsela (for the minor refactorings in respective runners)","created_at":"2016-11-12T01:08:46Z","updated_at":"2016-11-15T04:59:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da46910829c5e224749eb69bba5982603db2b28b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-beam/pulls/1353/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-beam/pulls/1353/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-beam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-beam/issues/1353/comments","statuses_url":"https://api.github.com/repos/apache/incubator-beam/statuses/34cc847a0150e0bbe2a3eb8505a30baee03933c7","head":{"label":"jkff:reducefn-windowing-internals","ref":"reducefn-windowing-internals","sha":"34cc847a0150e0bbe2a3eb8505a30baee03933c7","user":{"login":"jkff","id":343722,"avatar_url":"https://avatars.githubusercontent.com/u/343722?v=3","gravatar_id":"","url":"https://api.github.com/users/jkff","html_url":"https://github.com/jkff","followers_url":"https://api.github.com/users/jkff/followers","following_url":"https://api.github.com/users/jkff/following{/other_user}","gists_url":"https://api.github.com/users/jkff/gists{/gist_id}","starred_url":"https://api.github.com/users/jkff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkff/subscriptions","organizations_url":"https://api.github.com/users/jkff/orgs","repos_url":"https://api.github.com/users/jkff/repos","events_url":"https://api.github.com/users/jkff/events{/privacy}","received_events_url":"https://api.github.com/users/jkff/received_events","type":"User","site_admin":false},"repo":{"id":53902119,"name":"incubator-beam","full_name":"jkff/incubator-beam","owner":{"login":"jkff","id":343722,"avatar_url":"https://avatars.githubusercontent.com/u/343722?v=3","gravatar_id":"","url":"https://api.github.com/users/jkff","html_url":"https://github.com/jkff","followers_url":"https://api.github.com/users/jkff/followers","following_url":"https://api.github.com/users/jkff/following{/other_user}","gists_url":"https://api.github.com/users/jkff/gists{/gist_id}","starred_url":"https://api.github.com/users/jkff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkff/subscriptions","organizations_url":"https://api.github.com/users/jkff/orgs","repos_url":"https://api.github.com/users/jkff/repos","events_url":"https://api.github.com/users/jkff/events{/privacy}","received_events_url":"https://api.github.com/users/jkff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jkff/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":true,"url":"https://api.github.com/repos/jkff/incubator-beam","forks_url":"https://api.github.com/repos/jkff/incubator-beam/forks","keys_url":"https://api.github.com/repos/jkff/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jkff/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jkff/incubator-beam/teams","hooks_url":"https://api.github.com/repos/jkff/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/jkff/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/jkff/incubator-beam/events","assignees_url":"https://api.github.com/repos/jkff/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/jkff/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/jkff/incubator-beam/tags","blobs_url":"https://api.github.com/repos/jkff/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jkff/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jkff/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/jkff/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jkff/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/jkff/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/jkff/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/jkff/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/jkff/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/jkff/incubator-beam/subscription","commits_url":"https://api.github.com/repos/jkff/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/jkff/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/jkff/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/jkff/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/jkff/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/jkff/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jkff/incubator-beam/merges","archive_url":"https://api.github.com/repos/jkff/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jkff/incubator-beam/downloads","issues_url":"https://api.github.com/repos/jkff/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/jkff/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/jkff/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/jkff/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jkff/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/jkff/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/jkff/incubator-beam/deployments","created_at":"2016-03-15T00:32:38Z","updated_at":"2016-03-15T00:32:41Z","pushed_at":"2016-11-14T23:32:41Z","git_url":"git://github.com/jkff/incubator-beam.git","ssh_url":"git@github.com:jkff/incubator-beam.git","clone_url":"https://github.com/jkff/incubator-beam.git","svn_url":"https://github.com/jkff/incubator-beam","homepage":null,"size":21241,"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":"fe17ef7f8f5a8037d0aeae8841b424cb76e86dcb","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":50904245,"name":"incubator-beam","full_name":"apache/incubator-beam","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/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-beam","forks_url":"https://api.github.com/repos/apache/incubator-beam/forks","keys_url":"https://api.github.com/repos/apache/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-beam/teams","hooks_url":"https://api.github.com/repos/apache/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-beam/events","assignees_url":"https://api.github.com/repos/apache/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-beam/tags","blobs_url":"https://api.github.com/repos/apache/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-beam/subscription","commits_url":"https://api.github.com/repos/apache/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-beam/merges","archive_url":"https://api.github.com/repos/apache/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-beam/downloads","issues_url":"https://api.github.com/repos/apache/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-beam/deployments","created_at":"2016-02-02T08:00:06Z","updated_at":"2016-11-15T01:58:50Z","pushed_at":"2016-11-15T04:44:31Z","git_url":"git://github.com/apache/incubator-beam.git","ssh_url":"git@github.com:apache/incubator-beam.git","clone_url":"https://github.com/apache/incubator-beam.git","svn_url":"https://github.com/apache/incubator-beam","homepage":null,"size":35579,"stargazers_count":463,"watchers_count":463,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":278,"mirror_url":"git://git.apache.org/incubator-beam.git","open_issues_count":63,"forks":278,"open_issues":63,"watchers":463,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/1353"},"html":{"href":"https://github.com/apache/incubator-beam/pull/1353"},"issue":{"href":"https://api.github.com/repos/apache/incubator-beam/issues/1353"},"comments":{"href":"https://api.github.com/repos/apache/incubator-beam/issues/1353/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/1353/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/1353/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-beam/statuses/34cc847a0150e0bbe2a3eb8505a30baee03933c7"}}}}
{"actor":{"display_login":"kennknowles"}}