{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls/comments/63104672","id":63104672,"diff_hunk":"@@ -308,6 +314,19 @@ public Double getFractionConsumed() {\n     }\n \n     @Override\n+    public long getParallelismConsumed() {\n+      return rangeTracker.getProcessedSplitPoints();\n+    }\n+\n+    @Override\n+    public long getParallelismRemaining() {\n+      if (getCurrentOffset() + 1 >= rangeTracker.getStopPosition()) {","path":"sdk/src/main/java/com/google/cloud/dataflow/sdk/io/OffsetBasedSource.java","position":25,"original_position":25,"commit_id":"82907d67cf894e2d179b07aec9dcf2cf5519e39c","original_commit_id":"82907d67cf894e2d179b07aec9dcf2cf5519e39c","user":{"login":"fahndrich","id":10427977,"avatar_url":"https://avatars.githubusercontent.com/u/10427977?v=3","gravatar_id":"","url":"https://api.github.com/users/fahndrich","html_url":"https://github.com/fahndrich","followers_url":"https://api.github.com/users/fahndrich/followers","following_url":"https://api.github.com/users/fahndrich/following{/other_user}","gists_url":"https://api.github.com/users/fahndrich/gists{/gist_id}","starred_url":"https://api.github.com/users/fahndrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fahndrich/subscriptions","organizations_url":"https://api.github.com/users/fahndrich/orgs","repos_url":"https://api.github.com/users/fahndrich/repos","events_url":"https://api.github.com/users/fahndrich/events{/privacy}","received_events_url":"https://api.github.com/users/fahndrich/received_events","type":"User","site_admin":false},"body":"Why + 1? Typically, if getCurrentOffset == getStopPosition, we would be done (0), so the fact that we are not done would indicate already 1. This source could also track done to return 0.","created_at":"2016-05-12T21:57:22Z","updated_at":"2016-05-12T21:57:22Z","html_url":"https://github.com/GoogleCloudPlatform/DataflowJavaSDK/pull/257#discussion_r63104672","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls/257","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls/comments/63104672"},"html":{"href":"https://github.com/GoogleCloudPlatform/DataflowJavaSDK/pull/257#discussion_r63104672"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls/257"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls/257","id":69899971,"html_url":"https://github.com/GoogleCloudPlatform/DataflowJavaSDK/pull/257","diff_url":"https://github.com/GoogleCloudPlatform/DataflowJavaSDK/pull/257.diff","patch_url":"https://github.com/GoogleCloudPlatform/DataflowJavaSDK/pull/257.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/issues/257","number":257,"state":"open","locked":false,"title":"[DRAFT] BoundedReader: add getParallelism{Consumed,Remaining}","user":{"login":"dhalperi","id":526415,"avatar_url":"https://avatars.githubusercontent.com/u/526415?v=3","gravatar_id":"","url":"https://api.github.com/users/dhalperi","html_url":"https://github.com/dhalperi","followers_url":"https://api.github.com/users/dhalperi/followers","following_url":"https://api.github.com/users/dhalperi/following{/other_user}","gists_url":"https://api.github.com/users/dhalperi/gists{/gist_id}","starred_url":"https://api.github.com/users/dhalperi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhalperi/subscriptions","organizations_url":"https://api.github.com/users/dhalperi/orgs","repos_url":"https://api.github.com/users/dhalperi/repos","events_url":"https://api.github.com/users/dhalperi/events{/privacy}","received_events_url":"https://api.github.com/users/dhalperi/received_events","type":"User","site_admin":false},"body":"And implement it for common sources","created_at":"2016-05-12T20:18:46Z","updated_at":"2016-05-12T21:57:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a6e137f9770c5b81ebacb4df9f605f32642b2cc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls/257/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls/257/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/issues/257/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/statuses/82907d67cf894e2d179b07aec9dcf2cf5519e39c","head":{"label":"dhalperi:limited-parallelism","ref":"limited-parallelism","sha":"82907d67cf894e2d179b07aec9dcf2cf5519e39c","user":{"login":"dhalperi","id":526415,"avatar_url":"https://avatars.githubusercontent.com/u/526415?v=3","gravatar_id":"","url":"https://api.github.com/users/dhalperi","html_url":"https://github.com/dhalperi","followers_url":"https://api.github.com/users/dhalperi/followers","following_url":"https://api.github.com/users/dhalperi/following{/other_user}","gists_url":"https://api.github.com/users/dhalperi/gists{/gist_id}","starred_url":"https://api.github.com/users/dhalperi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhalperi/subscriptions","organizations_url":"https://api.github.com/users/dhalperi/orgs","repos_url":"https://api.github.com/users/dhalperi/repos","events_url":"https://api.github.com/users/dhalperi/events{/privacy}","received_events_url":"https://api.github.com/users/dhalperi/received_events","type":"User","site_admin":false},"repo":{"id":45149594,"name":"DataflowJavaSDK","full_name":"dhalperi/DataflowJavaSDK","owner":{"login":"dhalperi","id":526415,"avatar_url":"https://avatars.githubusercontent.com/u/526415?v=3","gravatar_id":"","url":"https://api.github.com/users/dhalperi","html_url":"https://github.com/dhalperi","followers_url":"https://api.github.com/users/dhalperi/followers","following_url":"https://api.github.com/users/dhalperi/following{/other_user}","gists_url":"https://api.github.com/users/dhalperi/gists{/gist_id}","starred_url":"https://api.github.com/users/dhalperi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhalperi/subscriptions","organizations_url":"https://api.github.com/users/dhalperi/orgs","repos_url":"https://api.github.com/users/dhalperi/repos","events_url":"https://api.github.com/users/dhalperi/events{/privacy}","received_events_url":"https://api.github.com/users/dhalperi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dhalperi/DataflowJavaSDK","description":"Google Cloud Dataflow provides a simple, powerful model for building both batch and streaming parallel data processing pipelines.","fork":true,"url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK","forks_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/forks","keys_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/teams","hooks_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/hooks","issue_events_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/issues/events{/number}","events_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/events","assignees_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/assignees{/user}","branches_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/branches{/branch}","tags_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/tags","blobs_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/statuses/{sha}","languages_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/languages","stargazers_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/stargazers","contributors_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/contributors","subscribers_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/subscribers","subscription_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/subscription","commits_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/contents/{+path}","compare_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/merges","archive_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/downloads","issues_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/issues{/number}","pulls_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/pulls{/number}","milestones_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/milestones{/number}","notifications_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/labels{/name}","releases_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/releases{/id}","deployments_url":"https://api.github.com/repos/dhalperi/DataflowJavaSDK/deployments","created_at":"2015-10-29T00:13:29Z","updated_at":"2016-01-12T07:45:39Z","pushed_at":"2016-05-12T20:55:26Z","git_url":"git://github.com/dhalperi/DataflowJavaSDK.git","ssh_url":"git@github.com:dhalperi/DataflowJavaSDK.git","clone_url":"https://github.com/dhalperi/DataflowJavaSDK.git","svn_url":"https://github.com/dhalperi/DataflowJavaSDK","homepage":"http://cloud.google.com/dataflow","size":11536,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"ac2df4a0ee244fec60cc9b97e986e42de90aa800","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":27503425,"name":"DataflowJavaSDK","full_name":"GoogleCloudPlatform/DataflowJavaSDK","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/DataflowJavaSDK","description":"Google Cloud Dataflow provides a simple, powerful model for building both batch and streaming parallel data processing pipelines.","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/deployments","created_at":"2014-12-03T19:20:21Z","updated_at":"2016-05-11T19:46:01Z","pushed_at":"2016-05-12T21:54:13Z","git_url":"git://github.com/GoogleCloudPlatform/DataflowJavaSDK.git","ssh_url":"git@github.com:GoogleCloudPlatform/DataflowJavaSDK.git","clone_url":"https://github.com/GoogleCloudPlatform/DataflowJavaSDK.git","svn_url":"https://github.com/GoogleCloudPlatform/DataflowJavaSDK","homepage":"http://cloud.google.com/dataflow","size":12768,"stargazers_count":616,"watchers_count":616,"language":"Java","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":216,"mirror_url":null,"open_issues_count":24,"forks":216,"open_issues":24,"watchers":616,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls/257"},"html":{"href":"https://github.com/GoogleCloudPlatform/DataflowJavaSDK/pull/257"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/issues/257"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/issues/257/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls/257/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/pulls/257/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/DataflowJavaSDK/statuses/82907d67cf894e2d179b07aec9dcf2cf5519e39c"}}}}