{"action":"created","comment":{"url":"https://api.github.com/repos/linkedin/gobblin/pulls/comments/40135119","id":40135119,"diff_hunk":"@@ -70,10 +72,7 @@ public void onTaskCompletion(Task task) {\n \n         if (workUnit.getPropAsBoolean(ConfigurationKeys.MR_REPORT_METRICS_AS_COUNTERS_KEY,\n             ConfigurationKeys.DEFAULT_MR_REPORT_METRICS_AS_COUNTERS)) {\n-          Map<String, Counter> counters = JobMetrics.get(null, task.getJobId()).getMetricContext().getCounters();\n-          for (Map.Entry<String, Counter> entry : counters.entrySet()) {\n-            this.context.getCounter(MetricGroup.JOB.name(), entry.getKey()).setValue(entry.getValue().getCount());\n-          }\n+          updateCounters(task);","path":"gobblin-runtime/src/main/java/gobblin/runtime/mapreduce/MRTaskStateTracker.java","position":17,"original_position":17,"commit_id":"ecd51b231ef1a4c72e395d14132a7a60fcd70964","original_commit_id":"ecd51b231ef1a4c72e395d14132a7a60fcd70964","user":{"login":"lbendig","id":3898961,"avatar_url":"https://avatars.githubusercontent.com/u/3898961?v=3","gravatar_id":"","url":"https://api.github.com/users/lbendig","html_url":"https://github.com/lbendig","followers_url":"https://api.github.com/users/lbendig/followers","following_url":"https://api.github.com/users/lbendig/following{/other_user}","gists_url":"https://api.github.com/users/lbendig/gists{/gist_id}","starred_url":"https://api.github.com/users/lbendig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbendig/subscriptions","organizations_url":"https://api.github.com/users/lbendig/orgs","repos_url":"https://api.github.com/users/lbendig/repos","events_url":"https://api.github.com/users/lbendig/events{/privacy}","received_events_url":"https://api.github.com/users/lbendig/received_events","type":"User","site_admin":false},"body":"There's no reference to this. inside onTaskCompletion()","created_at":"2015-09-22T19:52:06Z","updated_at":"2015-09-22T19:52:06Z","html_url":"https://github.com/linkedin/gobblin/pull/336#discussion_r40135119","pull_request_url":"https://api.github.com/repos/linkedin/gobblin/pulls/336","_links":{"self":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/comments/40135119"},"html":{"href":"https://github.com/linkedin/gobblin/pull/336#discussion_r40135119"},"pull_request":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/336"}}},"pull_request":{"url":"https://api.github.com/repos/linkedin/gobblin/pulls/336","id":45699951,"html_url":"https://github.com/linkedin/gobblin/pull/336","diff_url":"https://github.com/linkedin/gobblin/pull/336.diff","patch_url":"https://github.com/linkedin/gobblin/pull/336.patch","issue_url":"https://api.github.com/repos/linkedin/gobblin/issues/336","number":336,"state":"open","locked":false,"title":"Filter Hadoop counter groups in MRTaskStateTracker","user":{"login":"lbendig","id":3898961,"avatar_url":"https://avatars.githubusercontent.com/u/3898961?v=3","gravatar_id":"","url":"https://api.github.com/users/lbendig","html_url":"https://github.com/lbendig","followers_url":"https://api.github.com/users/lbendig/followers","following_url":"https://api.github.com/users/lbendig/following{/other_user}","gists_url":"https://api.github.com/users/lbendig/gists{/gist_id}","starred_url":"https://api.github.com/users/lbendig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbendig/subscriptions","organizations_url":"https://api.github.com/users/lbendig/orgs","repos_url":"https://api.github.com/users/lbendig/repos","events_url":"https://api.github.com/users/lbendig/events{/privacy}","received_events_url":"https://api.github.com/users/lbendig/received_events","type":"User","site_admin":false},"body":"```MRTaskStateTracker``` exposes metrics as Hadoop counters if **mr.report.metrics.as.counters** is set. However, all the counters are associated to the JOB group (pull #169) which results in an emtpy taskCounterGroup in ```MRJobLauncher#countersToMetrics```. As a result, the TASK level counters will be shown in the JOB Counter group on the JobHistory UI.\r\n\r\nThe patch tries to differentiate between the MetricGroup type  by applying a filter on the counters returned by ```JobMetrics.get(null, task.getJobId()).getMetricContext().getCounters()```\r\nin ```MRTaskStateTracker```","created_at":"2015-09-22T18:34:24Z","updated_at":"2015-09-22T19:52:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd5acfa1e0ecc436aafdf0902bc935f4e4def2d0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/linkedin/gobblin/pulls/336/commits","review_comments_url":"https://api.github.com/repos/linkedin/gobblin/pulls/336/comments","review_comment_url":"https://api.github.com/repos/linkedin/gobblin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linkedin/gobblin/issues/336/comments","statuses_url":"https://api.github.com/repos/linkedin/gobblin/statuses/ecd51b231ef1a4c72e395d14132a7a60fcd70964","head":{"label":"lbendig:pr1","ref":"pr1","sha":"ecd51b231ef1a4c72e395d14132a7a60fcd70964","user":{"login":"lbendig","id":3898961,"avatar_url":"https://avatars.githubusercontent.com/u/3898961?v=3","gravatar_id":"","url":"https://api.github.com/users/lbendig","html_url":"https://github.com/lbendig","followers_url":"https://api.github.com/users/lbendig/followers","following_url":"https://api.github.com/users/lbendig/following{/other_user}","gists_url":"https://api.github.com/users/lbendig/gists{/gist_id}","starred_url":"https://api.github.com/users/lbendig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbendig/subscriptions","organizations_url":"https://api.github.com/users/lbendig/orgs","repos_url":"https://api.github.com/users/lbendig/repos","events_url":"https://api.github.com/users/lbendig/events{/privacy}","received_events_url":"https://api.github.com/users/lbendig/received_events","type":"User","site_admin":false},"repo":{"id":31592005,"name":"gobblin","full_name":"lbendig/gobblin","owner":{"login":"lbendig","id":3898961,"avatar_url":"https://avatars.githubusercontent.com/u/3898961?v=3","gravatar_id":"","url":"https://api.github.com/users/lbendig","html_url":"https://github.com/lbendig","followers_url":"https://api.github.com/users/lbendig/followers","following_url":"https://api.github.com/users/lbendig/following{/other_user}","gists_url":"https://api.github.com/users/lbendig/gists{/gist_id}","starred_url":"https://api.github.com/users/lbendig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbendig/subscriptions","organizations_url":"https://api.github.com/users/lbendig/orgs","repos_url":"https://api.github.com/users/lbendig/repos","events_url":"https://api.github.com/users/lbendig/events{/privacy}","received_events_url":"https://api.github.com/users/lbendig/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lbendig/gobblin","description":"","fork":true,"url":"https://api.github.com/repos/lbendig/gobblin","forks_url":"https://api.github.com/repos/lbendig/gobblin/forks","keys_url":"https://api.github.com/repos/lbendig/gobblin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lbendig/gobblin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lbendig/gobblin/teams","hooks_url":"https://api.github.com/repos/lbendig/gobblin/hooks","issue_events_url":"https://api.github.com/repos/lbendig/gobblin/issues/events{/number}","events_url":"https://api.github.com/repos/lbendig/gobblin/events","assignees_url":"https://api.github.com/repos/lbendig/gobblin/assignees{/user}","branches_url":"https://api.github.com/repos/lbendig/gobblin/branches{/branch}","tags_url":"https://api.github.com/repos/lbendig/gobblin/tags","blobs_url":"https://api.github.com/repos/lbendig/gobblin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lbendig/gobblin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lbendig/gobblin/git/refs{/sha}","trees_url":"https://api.github.com/repos/lbendig/gobblin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lbendig/gobblin/statuses/{sha}","languages_url":"https://api.github.com/repos/lbendig/gobblin/languages","stargazers_url":"https://api.github.com/repos/lbendig/gobblin/stargazers","contributors_url":"https://api.github.com/repos/lbendig/gobblin/contributors","subscribers_url":"https://api.github.com/repos/lbendig/gobblin/subscribers","subscription_url":"https://api.github.com/repos/lbendig/gobblin/subscription","commits_url":"https://api.github.com/repos/lbendig/gobblin/commits{/sha}","git_commits_url":"https://api.github.com/repos/lbendig/gobblin/git/commits{/sha}","comments_url":"https://api.github.com/repos/lbendig/gobblin/comments{/number}","issue_comment_url":"https://api.github.com/repos/lbendig/gobblin/issues/comments{/number}","contents_url":"https://api.github.com/repos/lbendig/gobblin/contents/{+path}","compare_url":"https://api.github.com/repos/lbendig/gobblin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lbendig/gobblin/merges","archive_url":"https://api.github.com/repos/lbendig/gobblin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lbendig/gobblin/downloads","issues_url":"https://api.github.com/repos/lbendig/gobblin/issues{/number}","pulls_url":"https://api.github.com/repos/lbendig/gobblin/pulls{/number}","milestones_url":"https://api.github.com/repos/lbendig/gobblin/milestones{/number}","notifications_url":"https://api.github.com/repos/lbendig/gobblin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lbendig/gobblin/labels{/name}","releases_url":"https://api.github.com/repos/lbendig/gobblin/releases{/id}","created_at":"2015-03-03T10:10:06Z","updated_at":"2015-04-22T19:28:33Z","pushed_at":"2015-09-22T18:25:49Z","git_url":"git://github.com/lbendig/gobblin.git","ssh_url":"git@github.com:lbendig/gobblin.git","clone_url":"https://github.com/lbendig/gobblin.git","svn_url":"https://github.com/lbendig/gobblin","homepage":null,"size":78801,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"linkedin:master","ref":"master","sha":"9c5afa3c6668be4c143fdb8432f77f1e47eaedad","user":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"repo":{"id":27392543,"name":"gobblin","full_name":"linkedin/gobblin","owner":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkedin/gobblin","description":"Universal data ingestion framework for Hadoop.","fork":false,"url":"https://api.github.com/repos/linkedin/gobblin","forks_url":"https://api.github.com/repos/linkedin/gobblin/forks","keys_url":"https://api.github.com/repos/linkedin/gobblin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkedin/gobblin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkedin/gobblin/teams","hooks_url":"https://api.github.com/repos/linkedin/gobblin/hooks","issue_events_url":"https://api.github.com/repos/linkedin/gobblin/issues/events{/number}","events_url":"https://api.github.com/repos/linkedin/gobblin/events","assignees_url":"https://api.github.com/repos/linkedin/gobblin/assignees{/user}","branches_url":"https://api.github.com/repos/linkedin/gobblin/branches{/branch}","tags_url":"https://api.github.com/repos/linkedin/gobblin/tags","blobs_url":"https://api.github.com/repos/linkedin/gobblin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkedin/gobblin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkedin/gobblin/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkedin/gobblin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkedin/gobblin/statuses/{sha}","languages_url":"https://api.github.com/repos/linkedin/gobblin/languages","stargazers_url":"https://api.github.com/repos/linkedin/gobblin/stargazers","contributors_url":"https://api.github.com/repos/linkedin/gobblin/contributors","subscribers_url":"https://api.github.com/repos/linkedin/gobblin/subscribers","subscription_url":"https://api.github.com/repos/linkedin/gobblin/subscription","commits_url":"https://api.github.com/repos/linkedin/gobblin/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkedin/gobblin/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkedin/gobblin/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkedin/gobblin/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkedin/gobblin/contents/{+path}","compare_url":"https://api.github.com/repos/linkedin/gobblin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkedin/gobblin/merges","archive_url":"https://api.github.com/repos/linkedin/gobblin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkedin/gobblin/downloads","issues_url":"https://api.github.com/repos/linkedin/gobblin/issues{/number}","pulls_url":"https://api.github.com/repos/linkedin/gobblin/pulls{/number}","milestones_url":"https://api.github.com/repos/linkedin/gobblin/milestones{/number}","notifications_url":"https://api.github.com/repos/linkedin/gobblin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkedin/gobblin/labels{/name}","releases_url":"https://api.github.com/repos/linkedin/gobblin/releases{/id}","created_at":"2014-12-01T18:10:50Z","updated_at":"2015-09-22T18:39:35Z","pushed_at":"2015-09-22T18:49:50Z","git_url":"git://github.com/linkedin/gobblin.git","ssh_url":"git@github.com:linkedin/gobblin.git","clone_url":"https://github.com/linkedin/gobblin.git","svn_url":"https://github.com/linkedin/gobblin","homepage":"","size":160951,"stargazers_count":185,"watchers_count":185,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":9,"forks":66,"open_issues":9,"watchers":185,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/336"},"html":{"href":"https://github.com/linkedin/gobblin/pull/336"},"issue":{"href":"https://api.github.com/repos/linkedin/gobblin/issues/336"},"comments":{"href":"https://api.github.com/repos/linkedin/gobblin/issues/336/comments"},"review_comments":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/336/comments"},"review_comment":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linkedin/gobblin/pulls/336/commits"},"statuses":{"href":"https://api.github.com/repos/linkedin/gobblin/statuses/ecd51b231ef1a4c72e395d14132a7a60fcd70964"}}}}