{"action":"created","comment":{"url":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls/comments/36274015","id":36274015,"diff_hunk":"@@ -42,13 +47,39 @@ public static void main(String[] args) {\n             System.err.println(e.getMessage());\n             return;\n         }\n+\n+        String zk = spraynozzleArgs.getZk();\n+        String leaderLatchZkPath = spraynozzleArgs.getLeaderLatchZkPath();\n+        String counterZkPath = spraynozzleArgs.getDistributedAtomicCounterZkPath();\n+        boolean buffering = spraynozzleArgs.getBuffering();\n+        String hostName = getHostNameFromInetAddress();\n+        if (isStringEmpty(hostName)) {\n+            hostName = getHostNameFromFile();\n+        }\n+\n+        if (!isStringEmpty(leaderLatchZkPath) && !isStringEmpty(counterZkPath)) {\n+            System.out.println(\"Performing leader election through zookeeper and picking leader that will proceed.\");\n+            //use same zk as kafka\n+            SpraynozzleLeaderLatch curatorClient = new SpraynozzleLeaderLatch(zk, leaderLatchZkPath, counterZkPath, \"spraynozzle-\" + hostName);","path":"src/main/java/com/uber/kafkaSpraynozzle/KafkaSpraynozzle.java","position":null,"original_position":40,"commit_id":"3595d3423c3bdfe0b3b35c5a8b9e7a1af3107b11","original_commit_id":"75ab29a2d629fd3c565ac6f44dd30082e2e8eb78","user":{"login":"dfellis","id":765551,"avatar_url":"https://avatars.githubusercontent.com/u/765551?v=3","gravatar_id":"","url":"https://api.github.com/users/dfellis","html_url":"https://github.com/dfellis","followers_url":"https://api.github.com/users/dfellis/followers","following_url":"https://api.github.com/users/dfellis/following{/other_user}","gists_url":"https://api.github.com/users/dfellis/gists{/gist_id}","starred_url":"https://api.github.com/users/dfellis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfellis/subscriptions","organizations_url":"https://api.github.com/users/dfellis/orgs","repos_url":"https://api.github.com/users/dfellis/repos","events_url":"https://api.github.com/users/dfellis/events{/privacy}","received_events_url":"https://api.github.com/users/dfellis/received_events","type":"User","site_admin":false},"body":"Can we include the topic name and cleaned URL, too? There may be more than one spraynozzle sitting on the same box, though part of a different cluster.","created_at":"2015-08-05T06:56:11Z","updated_at":"2015-08-05T06:56:11Z","html_url":"https://github.com/uber/kafka-spraynozzle/pull/12#discussion_r36274015","pull_request_url":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls/comments/36274015"},"html":{"href":"https://github.com/uber/kafka-spraynozzle/pull/12#discussion_r36274015"},"pull_request":{"href":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls/12","id":41534661,"html_url":"https://github.com/uber/kafka-spraynozzle/pull/12","diff_url":"https://github.com/uber/kafka-spraynozzle/pull/12.diff","patch_url":"https://github.com/uber/kafka-spraynozzle/pull/12.patch","issue_url":"https://api.github.com/repos/uber/kafka-spraynozzle/issues/12","number":12,"state":"open","locked":false,"title":"initial leader election in place","user":{"login":"depombo","id":2381303,"avatar_url":"https://avatars.githubusercontent.com/u/2381303?v=3","gravatar_id":"","url":"https://api.github.com/users/depombo","html_url":"https://github.com/depombo","followers_url":"https://api.github.com/users/depombo/followers","following_url":"https://api.github.com/users/depombo/following{/other_user}","gists_url":"https://api.github.com/users/depombo/gists{/gist_id}","starred_url":"https://api.github.com/users/depombo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/depombo/subscriptions","organizations_url":"https://api.github.com/users/depombo/orgs","repos_url":"https://api.github.com/users/depombo/repos","events_url":"https://api.github.com/users/depombo/events{/privacy}","received_events_url":"https://api.github.com/users/depombo/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-04T05:02:44Z","updated_at":"2015-08-05T06:56:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"135a948b1625e964e37ab8b9137ad70ea231b4a2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls/12/commits","review_comments_url":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls/12/comments","review_comment_url":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/kafka-spraynozzle/issues/12/comments","statuses_url":"https://api.github.com/repos/uber/kafka-spraynozzle/statuses/3595d3423c3bdfe0b3b35c5a8b9e7a1af3107b11","head":{"label":"uber:curator","ref":"curator","sha":"3595d3423c3bdfe0b3b35c5a8b9e7a1af3107b11","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":19298404,"name":"kafka-spraynozzle","full_name":"uber/kafka-spraynozzle","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/kafka-spraynozzle","description":"A nozzle to spray a kafka topic at an HTTP endpoint.","fork":false,"url":"https://api.github.com/repos/uber/kafka-spraynozzle","forks_url":"https://api.github.com/repos/uber/kafka-spraynozzle/forks","keys_url":"https://api.github.com/repos/uber/kafka-spraynozzle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/kafka-spraynozzle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/kafka-spraynozzle/teams","hooks_url":"https://api.github.com/repos/uber/kafka-spraynozzle/hooks","issue_events_url":"https://api.github.com/repos/uber/kafka-spraynozzle/issues/events{/number}","events_url":"https://api.github.com/repos/uber/kafka-spraynozzle/events","assignees_url":"https://api.github.com/repos/uber/kafka-spraynozzle/assignees{/user}","branches_url":"https://api.github.com/repos/uber/kafka-spraynozzle/branches{/branch}","tags_url":"https://api.github.com/repos/uber/kafka-spraynozzle/tags","blobs_url":"https://api.github.com/repos/uber/kafka-spraynozzle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/kafka-spraynozzle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/kafka-spraynozzle/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/kafka-spraynozzle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/kafka-spraynozzle/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/kafka-spraynozzle/languages","stargazers_url":"https://api.github.com/repos/uber/kafka-spraynozzle/stargazers","contributors_url":"https://api.github.com/repos/uber/kafka-spraynozzle/contributors","subscribers_url":"https://api.github.com/repos/uber/kafka-spraynozzle/subscribers","subscription_url":"https://api.github.com/repos/uber/kafka-spraynozzle/subscription","commits_url":"https://api.github.com/repos/uber/kafka-spraynozzle/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/kafka-spraynozzle/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/kafka-spraynozzle/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/kafka-spraynozzle/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/kafka-spraynozzle/contents/{+path}","compare_url":"https://api.github.com/repos/uber/kafka-spraynozzle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/kafka-spraynozzle/merges","archive_url":"https://api.github.com/repos/uber/kafka-spraynozzle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/kafka-spraynozzle/downloads","issues_url":"https://api.github.com/repos/uber/kafka-spraynozzle/issues{/number}","pulls_url":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/kafka-spraynozzle/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/kafka-spraynozzle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/kafka-spraynozzle/labels{/name}","releases_url":"https://api.github.com/repos/uber/kafka-spraynozzle/releases{/id}","created_at":"2014-04-30T02:26:36Z","updated_at":"2015-08-01T22:38:09Z","pushed_at":"2015-08-04T07:49:23Z","git_url":"git://github.com/uber/kafka-spraynozzle.git","ssh_url":"git@github.com:uber/kafka-spraynozzle.git","clone_url":"https://github.com/uber/kafka-spraynozzle.git","svn_url":"https://github.com/uber/kafka-spraynozzle","homepage":null,"size":512,"stargazers_count":19,"watchers_count":19,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":19,"default_branch":"master"}},"base":{"label":"uber:master","ref":"master","sha":"594293b69bd05f20b92b71f5abc51b227d60784e","user":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":19298404,"name":"kafka-spraynozzle","full_name":"uber/kafka-spraynozzle","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars.githubusercontent.com/u/538264?v=3","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/kafka-spraynozzle","description":"A nozzle to spray a kafka topic at an HTTP endpoint.","fork":false,"url":"https://api.github.com/repos/uber/kafka-spraynozzle","forks_url":"https://api.github.com/repos/uber/kafka-spraynozzle/forks","keys_url":"https://api.github.com/repos/uber/kafka-spraynozzle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/kafka-spraynozzle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/kafka-spraynozzle/teams","hooks_url":"https://api.github.com/repos/uber/kafka-spraynozzle/hooks","issue_events_url":"https://api.github.com/repos/uber/kafka-spraynozzle/issues/events{/number}","events_url":"https://api.github.com/repos/uber/kafka-spraynozzle/events","assignees_url":"https://api.github.com/repos/uber/kafka-spraynozzle/assignees{/user}","branches_url":"https://api.github.com/repos/uber/kafka-spraynozzle/branches{/branch}","tags_url":"https://api.github.com/repos/uber/kafka-spraynozzle/tags","blobs_url":"https://api.github.com/repos/uber/kafka-spraynozzle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/kafka-spraynozzle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/kafka-spraynozzle/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/kafka-spraynozzle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/kafka-spraynozzle/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/kafka-spraynozzle/languages","stargazers_url":"https://api.github.com/repos/uber/kafka-spraynozzle/stargazers","contributors_url":"https://api.github.com/repos/uber/kafka-spraynozzle/contributors","subscribers_url":"https://api.github.com/repos/uber/kafka-spraynozzle/subscribers","subscription_url":"https://api.github.com/repos/uber/kafka-spraynozzle/subscription","commits_url":"https://api.github.com/repos/uber/kafka-spraynozzle/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/kafka-spraynozzle/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/kafka-spraynozzle/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/kafka-spraynozzle/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/kafka-spraynozzle/contents/{+path}","compare_url":"https://api.github.com/repos/uber/kafka-spraynozzle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/kafka-spraynozzle/merges","archive_url":"https://api.github.com/repos/uber/kafka-spraynozzle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/kafka-spraynozzle/downloads","issues_url":"https://api.github.com/repos/uber/kafka-spraynozzle/issues{/number}","pulls_url":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/kafka-spraynozzle/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/kafka-spraynozzle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/kafka-spraynozzle/labels{/name}","releases_url":"https://api.github.com/repos/uber/kafka-spraynozzle/releases{/id}","created_at":"2014-04-30T02:26:36Z","updated_at":"2015-08-01T22:38:09Z","pushed_at":"2015-08-04T07:49:23Z","git_url":"git://github.com/uber/kafka-spraynozzle.git","ssh_url":"git@github.com:uber/kafka-spraynozzle.git","clone_url":"https://github.com/uber/kafka-spraynozzle.git","svn_url":"https://github.com/uber/kafka-spraynozzle","homepage":null,"size":512,"stargazers_count":19,"watchers_count":19,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls/12"},"html":{"href":"https://github.com/uber/kafka-spraynozzle/pull/12"},"issue":{"href":"https://api.github.com/repos/uber/kafka-spraynozzle/issues/12"},"comments":{"href":"https://api.github.com/repos/uber/kafka-spraynozzle/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/kafka-spraynozzle/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/uber/kafka-spraynozzle/statuses/3595d3423c3bdfe0b3b35c5a8b9e7a1af3107b11"}}}}