{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-beam/pulls/comments/58464590","id":58464590,"diff_hunk":"@@ -175,13 +190,28 @@ public boolean isActive(W window) {\n   }\n \n   @Override\n-  public void addNew(W window) {\n+  public void seenWindow(W window) {\n     if (!windowToActiveWindow.containsKey(window)) {\n+      Preconditions.checkState(!activeWindowToStateAddressWindows.containsKey(window));\n       activeWindowToStateAddressWindows.put(window, new LinkedHashSet<W>());\n+      windowToActiveWindow.put(window, window);\n     }\n   }\n \n   @Override\n+  public void usingActiveWindow(W window) {\n+    Set<W> stateAddressWindows = activeWindowToStateAddressWindows.get(window);\n+    Preconditions.checkState(stateAddressWindows != null, \"Window %s is not ACTIVE or NEW\", window);","path":"sdks/java/core/src/main/java/com/google/cloud/dataflow/sdk/util/MergingActiveWindowSet.java","position":126,"original_position":126,"commit_id":"69eb778b354cd63fb23a48789c93ed48c2a01961","original_commit_id":"69eb778b354cd63fb23a48789c93ed48c2a01961","user":{"login":"bjchambers","id":35960,"avatar_url":"https://avatars.githubusercontent.com/u/35960?v=3","gravatar_id":"","url":"https://api.github.com/users/bjchambers","html_url":"https://github.com/bjchambers","followers_url":"https://api.github.com/users/bjchambers/followers","following_url":"https://api.github.com/users/bjchambers/following{/other_user}","gists_url":"https://api.github.com/users/bjchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/bjchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjchambers/subscriptions","organizations_url":"https://api.github.com/users/bjchambers/orgs","repos_url":"https://api.github.com/users/bjchambers/repos","events_url":"https://api.github.com/users/bjchambers/events{/privacy}","received_events_url":"https://api.github.com/users/bjchambers/received_events","type":"User","site_admin":false},"body":"\"Cannot mark window %s as in-use, since it is neither ACTIVE or NEW\"","created_at":"2016-04-04T23:11:11Z","updated_at":"2016-04-04T23:11:11Z","html_url":"https://github.com/apache/incubator-beam/pull/118#discussion_r58464590","pull_request_url":"https://api.github.com/repos/apache/incubator-beam/pulls/118","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/comments/58464590"},"html":{"href":"https://github.com/apache/incubator-beam/pull/118#discussion_r58464590"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/118"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-beam/pulls/118","id":65226463,"html_url":"https://github.com/apache/incubator-beam/pull/118","diff_url":"https://github.com/apache/incubator-beam/pull/118.diff","patch_url":"https://github.com/apache/incubator-beam/pull/118.patch","issue_url":"https://api.github.com/repos/apache/incubator-beam/issues/118","number":118,"state":"open","locked":false,"title":"[BEAM-162] Sensible interaction of merging and closed triggers","user":{"login":"mshields822","id":11642236,"avatar_url":"https://avatars.githubusercontent.com/u/11642236?v=3","gravatar_id":"","url":"https://api.github.com/users/mshields822","html_url":"https://github.com/mshields822","followers_url":"https://api.github.com/users/mshields822/followers","following_url":"https://api.github.com/users/mshields822/following{/other_user}","gists_url":"https://api.github.com/users/mshields822/gists{/gist_id}","starred_url":"https://api.github.com/users/mshields822/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshields822/subscriptions","organizations_url":"https://api.github.com/users/mshields822/orgs","repos_url":"https://api.github.com/users/mshields822/repos","events_url":"https://api.github.com/users/mshields822/events{/privacy}","received_events_url":"https://api.github.com/users/mshields822/received_events","type":"User","site_admin":false},"body":"Same bug, better approach.\r\n - We always check for closed triggers on the post-merged window state.\r\n - We are careful not to leak NEW windows.\r\n - More unit tests.\r\n - Along the way, discovered we were clearing trigger finished bits.\r\n   Since TriggerRunner does not currently have its own unit tests,\r\n   added new unit test in ReduceFnRunnerTest to hit that specific case.\r\n","created_at":"2016-04-04T22:57:26Z","updated_at":"2016-04-04T23:11:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b18564b0f166e3f7eddcf888233fd69e6bd85cdd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-beam/pulls/118/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-beam/pulls/118/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/118/comments","statuses_url":"https://api.github.com/repos/apache/incubator-beam/statuses/69eb778b354cd63fb23a48789c93ed48c2a01961","head":{"label":"mshields822:beam-162","ref":"beam-162","sha":"69eb778b354cd63fb23a48789c93ed48c2a01961","user":{"login":"mshields822","id":11642236,"avatar_url":"https://avatars.githubusercontent.com/u/11642236?v=3","gravatar_id":"","url":"https://api.github.com/users/mshields822","html_url":"https://github.com/mshields822","followers_url":"https://api.github.com/users/mshields822/followers","following_url":"https://api.github.com/users/mshields822/following{/other_user}","gists_url":"https://api.github.com/users/mshields822/gists{/gist_id}","starred_url":"https://api.github.com/users/mshields822/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshields822/subscriptions","organizations_url":"https://api.github.com/users/mshields822/orgs","repos_url":"https://api.github.com/users/mshields822/repos","events_url":"https://api.github.com/users/mshields822/events{/privacy}","received_events_url":"https://api.github.com/users/mshields822/received_events","type":"User","site_admin":false},"repo":{"id":52641502,"name":"incubator-beam","full_name":"mshields822/incubator-beam","owner":{"login":"mshields822","id":11642236,"avatar_url":"https://avatars.githubusercontent.com/u/11642236?v=3","gravatar_id":"","url":"https://api.github.com/users/mshields822","html_url":"https://github.com/mshields822","followers_url":"https://api.github.com/users/mshields822/followers","following_url":"https://api.github.com/users/mshields822/following{/other_user}","gists_url":"https://api.github.com/users/mshields822/gists{/gist_id}","starred_url":"https://api.github.com/users/mshields822/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshields822/subscriptions","organizations_url":"https://api.github.com/users/mshields822/orgs","repos_url":"https://api.github.com/users/mshields822/repos","events_url":"https://api.github.com/users/mshields822/events{/privacy}","received_events_url":"https://api.github.com/users/mshields822/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mshields822/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":true,"url":"https://api.github.com/repos/mshields822/incubator-beam","forks_url":"https://api.github.com/repos/mshields822/incubator-beam/forks","keys_url":"https://api.github.com/repos/mshields822/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mshields822/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mshields822/incubator-beam/teams","hooks_url":"https://api.github.com/repos/mshields822/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/mshields822/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/mshields822/incubator-beam/events","assignees_url":"https://api.github.com/repos/mshields822/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/mshields822/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/mshields822/incubator-beam/tags","blobs_url":"https://api.github.com/repos/mshields822/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mshields822/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mshields822/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/mshields822/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mshields822/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/mshields822/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/mshields822/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/mshields822/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/mshields822/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/mshields822/incubator-beam/subscription","commits_url":"https://api.github.com/repos/mshields822/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/mshields822/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/mshields822/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/mshields822/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/mshields822/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/mshields822/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mshields822/incubator-beam/merges","archive_url":"https://api.github.com/repos/mshields822/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mshields822/incubator-beam/downloads","issues_url":"https://api.github.com/repos/mshields822/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/mshields822/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/mshields822/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/mshields822/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mshields822/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/mshields822/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/mshields822/incubator-beam/deployments","created_at":"2016-02-27T00:22:15Z","updated_at":"2016-02-27T00:22:17Z","pushed_at":"2016-04-04T22:54:09Z","git_url":"git://github.com/mshields822/incubator-beam.git","ssh_url":"git@github.com:mshields822/incubator-beam.git","clone_url":"https://github.com/mshields822/incubator-beam.git","svn_url":"https://github.com/mshields822/incubator-beam","homepage":null,"size":11723,"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":"ac314eefd15b1e86a29799547d08c0f832377887","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-04-04T14:24:57Z","pushed_at":"2016-04-04T22:58:41Z","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":12128,"stargazers_count":111,"watchers_count":111,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":53,"mirror_url":"git://git.apache.org/incubator-beam.git","open_issues_count":21,"forks":53,"open_issues":21,"watchers":111,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/118"},"html":{"href":"https://github.com/apache/incubator-beam/pull/118"},"issue":{"href":"https://api.github.com/repos/apache/incubator-beam/issues/118"},"comments":{"href":"https://api.github.com/repos/apache/incubator-beam/issues/118/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/118/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/118/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-beam/statuses/69eb778b354cd63fb23a48789c93ed48c2a01961"}}}}