GitHub PullRequestReviewCommentEvent at 2014-12-19 17:50:36
Repository: azkaban-plugins
Actor: hreview
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls/comments/22117961","id":22117961,"diff_hunk":"@@ -97,6 +99,16 @@ public static void prepareResourcesToInject(Props props, String workingDir) {\n     }\n   }\n \n+  private static void addHadoopProperties(Props props) {\n+    props.put(injectPrefix + \"azkaban.flow.flowid\", props.get(\"azkaban.flow.flowid\"));\n+    props.put(injectPrefix + \"azkaban.flow.execid\", props.get(\"azkaban.flow.execid\"));\n+    props.put(injectPrefix + \"azkaban.job.id\", props.get(\"azkaban.job.id\"));\n+    props.put(injectPrefix + \"azkaban.flow.projectname\", props.get(\"azkaban.flow.projectname\"));\n+    props.put(injectPrefix + \"azkaban.flow.projectversion\", props.get(\"azkaban.flow.projectversion\"));\n+    props.put(injectPrefix + \"azkaban.flow.projectlastchangeddate\", props.get(\"azkaban.flow.projectlastchangeddate\"));\n+    props.put(injectPrefix + \"azkaban.flow.projectlasychangedby\", props.get(\"azkaban.flow.projectlasychangedby\"));","path":"plugins/jobtype/src/azkaban/jobtype/HadoopConfigurationInjector.java","position":36,"original_position":36,"commit_id":"f86c168121e449935bea0605ab3210697b395edc","original_commit_id":"f86c168121e449935bea0605ab3210697b395edc","user":{"login":"hreview","id":6517761,"avatar_url":"https://avatars.githubusercontent.com/u/6517761?v=3","gravatar_id":"","url":"https://api.github.com/users/hreview","html_url":"https://github.com/hreview","followers_url":"https://api.github.com/users/hreview/followers","following_url":"https://api.github.com/users/hreview/following{/other_user}","gists_url":"https://api.github.com/users/hreview/gists{/gist_id}","starred_url":"https://api.github.com/users/hreview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hreview/subscriptions","organizations_url":"https://api.github.com/users/hreview/orgs","repos_url":"https://api.github.com/users/hreview/repos","events_url":"https://api.github.com/users/hreview/events{/privacy}","received_events_url":"https://api.github.com/users/hreview/received_events","type":"User","site_admin":false},"body":"Also, it is preferable to put the lastchangeddate as a 'long' rather than a 'string', so you need to do a conversion here.\r\n\r\n-Subbu\r\n________________________________\r\nFrom: Anthony Hsu [notifications@github.com]\r\nSent: Thursday, December 18, 2014 11:52 PM\r\nTo: azkaban/azkaban-plugins\r\nSubject: Re: [azkaban-plugins] New metadata property for all the jobs #377 (#165)\r\n\r\n\r\nIn plugins/jobtype/src/azkaban/jobtype/HadoopConfigurationInjector.java<https://github.com/azkaban/azkaban-plugins/pull/165#discussion-diff-22093256>:\r\n\r\n> @@ -97,6 +99,16 @@ public static void prepareResourcesToInject(Props props, String workingDir) {\r\n>      }\r\n>    }\r\n>\r\n> +  private static void addHadoopProperties(Props props) {\r\n> +    props.put(injectPrefix + \"azkaban.flow.flowid\", props.get(\"azkaban.flow.flowid\"));\r\n> +    props.put(injectPrefix + \"azkaban.flow.execid\", props.get(\"azkaban.flow.execid\"));\r\n> +    props.put(injectPrefix + \"azkaban.job.id\", props.get(\"azkaban.job.id\"));\r\n> +    props.put(injectPrefix + \"azkaban.flow.projectname\", props.get(\"azkaban.flow.projectname\"));\r\n> +    props.put(injectPrefix + \"azkaban.flow.projectversion\", props.get(\"azkaban.flow.projectversion\"));\r\n> +    props.put(injectPrefix + \"azkaban.flow.projectlastchangeddate\", props.get(\"azkaban.flow.projectlastchangeddate\"));\r\n> +    props.put(injectPrefix + \"azkaban.flow.projectlasychangedby\", props.get(\"azkaban.flow.projectlasychangedby\"));\r\n\r\n\r\nIt might be less verbose if you created a helper function\r\n\r\nprivate static void addHadoopProperty(Props props, String name) {\r\n  props.put(injectPrefix + name, props.get(name));\r\n}\r\n\r\n\r\nand then do something like:\r\n\r\nprivate static void addHadoopProperties(Props props) {\r\n  String[] propsToInject = new String[]{CommonJobProperties.EXECUTION_LINK, CommonJobProperties.WORKFLOW_LINK, ...};\r\n  for (String propToInject : propsToInject) {\r\n    addHadoopProperty(props, propToInject);\r\n  }\r\n}\r\n\r\n\r\n—\r\nReply to this email directly or view it on GitHub<https://github.com/azkaban/azkaban-plugins/pull/165/files#r22093256>.","created_at":"2014-12-19T17:50:36Z","updated_at":"2014-12-19T17:50:36Z","html_url":"https://github.com/azkaban/azkaban-plugins/pull/165#discussion_r22117961","pull_request_url":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls/165","_links":{"self":{"href":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls/comments/22117961"},"html":{"href":"https://github.com/azkaban/azkaban-plugins/pull/165#discussion_r22117961"},"pull_request":{"href":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls/165"}}},"pull_request":{"url":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls/165","id":26340508,"html_url":"https://github.com/azkaban/azkaban-plugins/pull/165","diff_url":"https://github.com/azkaban/azkaban-plugins/pull/165.diff","patch_url":"https://github.com/azkaban/azkaban-plugins/pull/165.patch","issue_url":"https://api.github.com/repos/azkaban/azkaban-plugins/issues/165","number":165,"state":"open","locked":false,"title":"New metadata property for all the jobs #377","user":{"login":"logiclord","id":770329,"avatar_url":"https://avatars.githubusercontent.com/u/770329?v=3","gravatar_id":"","url":"https://api.github.com/users/logiclord","html_url":"https://github.com/logiclord","followers_url":"https://api.github.com/users/logiclord/followers","following_url":"https://api.github.com/users/logiclord/following{/other_user}","gists_url":"https://api.github.com/users/logiclord/gists{/gist_id}","starred_url":"https://api.github.com/users/logiclord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logiclord/subscriptions","organizations_url":"https://api.github.com/users/logiclord/orgs","repos_url":"https://api.github.com/users/logiclord/repos","events_url":"https://api.github.com/users/logiclord/events{/privacy}","received_events_url":"https://api.github.com/users/logiclord/received_events","type":"User","site_admin":false},"body":"Injecting new hadoop properties","created_at":"2014-12-18T23:27:09Z","updated_at":"2014-12-19T17:50:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"616735adaab3c239dcfaa9266b64b6f80dbec587","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls/165/commits","review_comments_url":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls/165/comments","review_comment_url":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls/comments/{number}","comments_url":"https://api.github.com/repos/azkaban/azkaban-plugins/issues/165/comments","statuses_url":"https://api.github.com/repos/azkaban/azkaban-plugins/statuses/f86c168121e449935bea0605ab3210697b395edc","head":{"label":"logiclord:master","ref":"master","sha":"f86c168121e449935bea0605ab3210697b395edc","user":{"login":"logiclord","id":770329,"avatar_url":"https://avatars.githubusercontent.com/u/770329?v=3","gravatar_id":"","url":"https://api.github.com/users/logiclord","html_url":"https://github.com/logiclord","followers_url":"https://api.github.com/users/logiclord/followers","following_url":"https://api.github.com/users/logiclord/following{/other_user}","gists_url":"https://api.github.com/users/logiclord/gists{/gist_id}","starred_url":"https://api.github.com/users/logiclord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logiclord/subscriptions","organizations_url":"https://api.github.com/users/logiclord/orgs","repos_url":"https://api.github.com/users/logiclord/repos","events_url":"https://api.github.com/users/logiclord/events{/privacy}","received_events_url":"https://api.github.com/users/logiclord/received_events","type":"User","site_admin":false},"repo":{"id":26245229,"name":"azkaban-plugins","full_name":"logiclord/azkaban-plugins","owner":{"login":"logiclord","id":770329,"avatar_url":"https://avatars.githubusercontent.com/u/770329?v=3","gravatar_id":"","url":"https://api.github.com/users/logiclord","html_url":"https://github.com/logiclord","followers_url":"https://api.github.com/users/logiclord/followers","following_url":"https://api.github.com/users/logiclord/following{/other_user}","gists_url":"https://api.github.com/users/logiclord/gists{/gist_id}","starred_url":"https://api.github.com/users/logiclord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logiclord/subscriptions","organizations_url":"https://api.github.com/users/logiclord/orgs","repos_url":"https://api.github.com/users/logiclord/repos","events_url":"https://api.github.com/users/logiclord/events{/privacy}","received_events_url":"https://api.github.com/users/logiclord/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/logiclord/azkaban-plugins","description":"Plugins for Azkaban.","fork":true,"url":"https://api.github.com/repos/logiclord/azkaban-plugins","forks_url":"https://api.github.com/repos/logiclord/azkaban-plugins/forks","keys_url":"https://api.github.com/repos/logiclord/azkaban-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/logiclord/azkaban-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/logiclord/azkaban-plugins/teams","hooks_url":"https://api.github.com/repos/logiclord/azkaban-plugins/hooks","issue_events_url":"https://api.github.com/repos/logiclord/azkaban-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/logiclord/azkaban-plugins/events","assignees_url":"https://api.github.com/repos/logiclord/azkaban-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/logiclord/azkaban-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/logiclord/azkaban-plugins/tags","blobs_url":"https://api.github.com/repos/logiclord/azkaban-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/logiclord/azkaban-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/logiclord/azkaban-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/logiclord/azkaban-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/logiclord/azkaban-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/logiclord/azkaban-plugins/languages","stargazers_url":"https://api.github.com/repos/logiclord/azkaban-plugins/stargazers","contributors_url":"https://api.github.com/repos/logiclord/azkaban-plugins/contributors","subscribers_url":"https://api.github.com/repos/logiclord/azkaban-plugins/subscribers","subscription_url":"https://api.github.com/repos/logiclord/azkaban-plugins/subscription","commits_url":"https://api.github.com/repos/logiclord/azkaban-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/logiclord/azkaban-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/logiclord/azkaban-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/logiclord/azkaban-plugins/issues/comments/{number}","contents_url":"https://api.github.com/repos/logiclord/azkaban-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/logiclord/azkaban-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/logiclord/azkaban-plugins/merges","archive_url":"https://api.github.com/repos/logiclord/azkaban-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/logiclord/azkaban-plugins/downloads","issues_url":"https://api.github.com/repos/logiclord/azkaban-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/logiclord/azkaban-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/logiclord/azkaban-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/logiclord/azkaban-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/logiclord/azkaban-plugins/labels{/name}","releases_url":"https://api.github.com/repos/logiclord/azkaban-plugins/releases{/id}","created_at":"2014-11-05T23:47:59Z","updated_at":"2014-12-18T23:26:25Z","pushed_at":"2014-12-18T23:26:23Z","git_url":"git://github.com/logiclord/azkaban-plugins.git","ssh_url":"git@github.com:logiclord/azkaban-plugins.git","clone_url":"https://github.com/logiclord/azkaban-plugins.git","svn_url":"https://github.com/logiclord/azkaban-plugins","homepage":"https://azkaban.github.io","size":131435,"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":"azkaban:master","ref":"master","sha":"09046e14fd8e00e1c946e38cccc77ed009832d07","user":{"login":"azkaban","id":213618,"avatar_url":"https://avatars.githubusercontent.com/u/213618?v=3","gravatar_id":"","url":"https://api.github.com/users/azkaban","html_url":"https://github.com/azkaban","followers_url":"https://api.github.com/users/azkaban/followers","following_url":"https://api.github.com/users/azkaban/following{/other_user}","gists_url":"https://api.github.com/users/azkaban/gists{/gist_id}","starred_url":"https://api.github.com/users/azkaban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azkaban/subscriptions","organizations_url":"https://api.github.com/users/azkaban/orgs","repos_url":"https://api.github.com/users/azkaban/repos","events_url":"https://api.github.com/users/azkaban/events{/privacy}","received_events_url":"https://api.github.com/users/azkaban/received_events","type":"Organization","site_admin":false},"repo":{"id":7566859,"name":"azkaban-plugins","full_name":"azkaban/azkaban-plugins","owner":{"login":"azkaban","id":213618,"avatar_url":"https://avatars.githubusercontent.com/u/213618?v=3","gravatar_id":"","url":"https://api.github.com/users/azkaban","html_url":"https://github.com/azkaban","followers_url":"https://api.github.com/users/azkaban/followers","following_url":"https://api.github.com/users/azkaban/following{/other_user}","gists_url":"https://api.github.com/users/azkaban/gists{/gist_id}","starred_url":"https://api.github.com/users/azkaban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azkaban/subscriptions","organizations_url":"https://api.github.com/users/azkaban/orgs","repos_url":"https://api.github.com/users/azkaban/repos","events_url":"https://api.github.com/users/azkaban/events{/privacy}","received_events_url":"https://api.github.com/users/azkaban/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azkaban/azkaban-plugins","description":"Plugins for Azkaban.","fork":false,"url":"https://api.github.com/repos/azkaban/azkaban-plugins","forks_url":"https://api.github.com/repos/azkaban/azkaban-plugins/forks","keys_url":"https://api.github.com/repos/azkaban/azkaban-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azkaban/azkaban-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azkaban/azkaban-plugins/teams","hooks_url":"https://api.github.com/repos/azkaban/azkaban-plugins/hooks","issue_events_url":"https://api.github.com/repos/azkaban/azkaban-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/azkaban/azkaban-plugins/events","assignees_url":"https://api.github.com/repos/azkaban/azkaban-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/azkaban/azkaban-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/azkaban/azkaban-plugins/tags","blobs_url":"https://api.github.com/repos/azkaban/azkaban-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azkaban/azkaban-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azkaban/azkaban-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/azkaban/azkaban-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azkaban/azkaban-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/azkaban/azkaban-plugins/languages","stargazers_url":"https://api.github.com/repos/azkaban/azkaban-plugins/stargazers","contributors_url":"https://api.github.com/repos/azkaban/azkaban-plugins/contributors","subscribers_url":"https://api.github.com/repos/azkaban/azkaban-plugins/subscribers","subscription_url":"https://api.github.com/repos/azkaban/azkaban-plugins/subscription","commits_url":"https://api.github.com/repos/azkaban/azkaban-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/azkaban/azkaban-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/azkaban/azkaban-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/azkaban/azkaban-plugins/issues/comments/{number}","contents_url":"https://api.github.com/repos/azkaban/azkaban-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/azkaban/azkaban-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azkaban/azkaban-plugins/merges","archive_url":"https://api.github.com/repos/azkaban/azkaban-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azkaban/azkaban-plugins/downloads","issues_url":"https://api.github.com/repos/azkaban/azkaban-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/azkaban/azkaban-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/azkaban/azkaban-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azkaban/azkaban-plugins/labels{/name}","releases_url":"https://api.github.com/repos/azkaban/azkaban-plugins/releases{/id}","created_at":"2013-01-11T20:53:36Z","updated_at":"2014-12-16T03:31:50Z","pushed_at":"2014-12-16T03:31:48Z","git_url":"git://github.com/azkaban/azkaban-plugins.git","ssh_url":"git@github.com:azkaban/azkaban-plugins.git","clone_url":"https://github.com/azkaban/azkaban-plugins.git","svn_url":"https://github.com/azkaban/azkaban-plugins","homepage":"https://azkaban.github.io","size":204436,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":22,"forks":49,"open_issues":22,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls/165"},"html":{"href":"https://github.com/azkaban/azkaban-plugins/pull/165"},"issue":{"href":"https://api.github.com/repos/azkaban/azkaban-plugins/issues/165"},"comments":{"href":"https://api.github.com/repos/azkaban/azkaban-plugins/issues/165/comments"},"review_comments":{"href":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls/165/comments"},"review_comment":{"href":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/azkaban/azkaban-plugins/pulls/165/commits"},"statuses":{"href":"https://api.github.com/repos/azkaban/azkaban-plugins/statuses/f86c168121e449935bea0605ab3210697b395edc"}}}}