{"action":"created","comment":{"url":"https://api.github.com/repos/twitter/heron/pulls/comments/153695853","pull_request_review_id":79738925,"id":153695853,"diff_hunk":"@@ -111,29 +113,43 @@ public void removeContainers(Set<PackingPlan.ContainerPlan> containersToRemove)\n   }\n \n   @Override\n-  public void addContainers(Integer count) {\n+  public Set<Integer> addContainers(Integer count) {\n     //aurora job add <cluster>/<role>/<env>/<name>/<instance_id> <count>\n     //clone instance 0\n     List<String> auroraCmd = new ArrayList<>(Arrays.asList(\n-        \"aurora\", \"job\", \"add\", \"--wait-until\", \"RUNNING\", jobSpec + \"/0\", count.toString()));\n-\n-    if (isVerbose) {\n-      auroraCmd.add(\"--verbose\");\n-    }\n+        \"aurora\", \"job\", \"add\", \"--wait-until\", \"RUNNING\",\n+        jobSpec + \"/0\", count.toString(), \"--verbose\"));\n \n     LOG.info(String.format(\"Requesting %s new aurora containers %s\", count, auroraCmd));\n-    if (!runProcess(auroraCmd)) {\n+    StringBuilder stderr = new StringBuilder();\n+    if (!runProcess(auroraCmd, null, stderr)) {\n       throw new RuntimeException(\"Failed to create \" + count + \" new aurora instances\");\n     }\n+\n+    if (stderr.length() <= 0) { // no container was added","path":"heron/schedulers/src/java/com/twitter/heron/scheduler/aurora/AuroraCLIController.java","position":37,"original_position":37,"commit_id":"c1af1b4c23084c39852060e72af7b5a6fe64f97c","original_commit_id":"c1af1b4c23084c39852060e72af7b5a6fe64f97c","user":{"login":"maosongfu","id":3028698,"avatar_url":"https://avatars2.githubusercontent.com/u/3028698?v=4","gravatar_id":"","url":"https://api.github.com/users/maosongfu","html_url":"https://github.com/maosongfu","followers_url":"https://api.github.com/users/maosongfu/followers","following_url":"https://api.github.com/users/maosongfu/following{/other_user}","gists_url":"https://api.github.com/users/maosongfu/gists{/gist_id}","starred_url":"https://api.github.com/users/maosongfu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maosongfu/subscriptions","organizations_url":"https://api.github.com/users/maosongfu/orgs","repos_url":"https://api.github.com/users/maosongfu/repos","events_url":"https://api.github.com/users/maosongfu/events{/privacy}","received_events_url":"https://api.github.com/users/maosongfu/received_events","type":"User","site_admin":false},"body":"If we need to add containers, and `stderr.length() <= 0`, should we consider it as an error and throw an exception?","created_at":"2017-11-29T05:19:15Z","updated_at":"2017-11-29T05:25:29Z","html_url":"https://github.com/twitter/heron/pull/2582#discussion_r153695853","pull_request_url":"https://api.github.com/repos/twitter/heron/pulls/2582","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/twitter/heron/pulls/comments/153695853"},"html":{"href":"https://github.com/twitter/heron/pull/2582#discussion_r153695853"},"pull_request":{"href":"https://api.github.com/repos/twitter/heron/pulls/2582"}}},"pull_request":{"url":"https://api.github.com/repos/twitter/heron/pulls/2582","id":154272401,"html_url":"https://github.com/twitter/heron/pull/2582","diff_url":"https://github.com/twitter/heron/pull/2582.diff","patch_url":"https://github.com/twitter/heron/pull/2582.patch","issue_url":"https://api.github.com/repos/twitter/heron/issues/2582","number":2582,"state":"open","locked":false,"title":"[work in progress] fix mismatch container id between packing alg and aurora","user":{"login":"huijunw","id":23125934,"avatar_url":"https://avatars3.githubusercontent.com/u/23125934?v=4","gravatar_id":"","url":"https://api.github.com/users/huijunw","html_url":"https://github.com/huijunw","followers_url":"https://api.github.com/users/huijunw/followers","following_url":"https://api.github.com/users/huijunw/following{/other_user}","gists_url":"https://api.github.com/users/huijunw/gists{/gist_id}","starred_url":"https://api.github.com/users/huijunw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huijunw/subscriptions","organizations_url":"https://api.github.com/users/huijunw/orgs","repos_url":"https://api.github.com/users/huijunw/repos","events_url":"https://api.github.com/users/huijunw/events{/privacy}","received_events_url":"https://api.github.com/users/huijunw/received_events","type":"User","site_admin":false},"body":"1, Currently, Heron has the issues ....\r\nWe found the mismatch container id between packing algorithm and aurora during `heron update`\r\n\r\n2, This pull request does ....\r\nThe PR updates the packing plan container id with aurora container id after 'aurora allocates container' and before 'update packing plan in zk'.\r\nThis PR changes spi/IScalable interface addContainers().\r\n\r\n3, With this fix, Heron could ....\r\nIScalable. addContainers() returns the new container id. Heron can re-map the real container id from Aurora to packing plan.\r\n\r\n4, Test has done .....\r\ntest done in Aurora datacenter.\r\ntestcase: in-consecutive container id test case.\r\ntestcase: append container, append after in-consecutive id container\r\ntestcase: remove container at the end and in the middle of id range\r\n","created_at":"2017-11-22T23:01:39Z","updated_at":"2017-11-29T05:25:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e14b4aeaa21c7f3fcdf0e27e8f06f4d395a9073f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"srkukarni","id":2530234,"avatar_url":"https://avatars0.githubusercontent.com/u/2530234?v=4","gravatar_id":"","url":"https://api.github.com/users/srkukarni","html_url":"https://github.com/srkukarni","followers_url":"https://api.github.com/users/srkukarni/followers","following_url":"https://api.github.com/users/srkukarni/following{/other_user}","gists_url":"https://api.github.com/users/srkukarni/gists{/gist_id}","starred_url":"https://api.github.com/users/srkukarni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srkukarni/subscriptions","organizations_url":"https://api.github.com/users/srkukarni/orgs","repos_url":"https://api.github.com/users/srkukarni/repos","events_url":"https://api.github.com/users/srkukarni/events{/privacy}","received_events_url":"https://api.github.com/users/srkukarni/received_events","type":"User","site_admin":false},{"login":"ashvina","id":10034060,"avatar_url":"https://avatars1.githubusercontent.com/u/10034060?v=4","gravatar_id":"","url":"https://api.github.com/users/ashvina","html_url":"https://github.com/ashvina","followers_url":"https://api.github.com/users/ashvina/followers","following_url":"https://api.github.com/users/ashvina/following{/other_user}","gists_url":"https://api.github.com/users/ashvina/gists{/gist_id}","starred_url":"https://api.github.com/users/ashvina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashvina/subscriptions","organizations_url":"https://api.github.com/users/ashvina/orgs","repos_url":"https://api.github.com/users/ashvina/repos","events_url":"https://api.github.com/users/ashvina/events{/privacy}","received_events_url":"https://api.github.com/users/ashvina/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/twitter/heron/pulls/2582/commits","review_comments_url":"https://api.github.com/repos/twitter/heron/pulls/2582/comments","review_comment_url":"https://api.github.com/repos/twitter/heron/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twitter/heron/issues/2582/comments","statuses_url":"https://api.github.com/repos/twitter/heron/statuses/c1af1b4c23084c39852060e72af7b5a6fe64f97c","head":{"label":"twitter:huijunw/fixpackingauroramapping","ref":"huijunw/fixpackingauroramapping","sha":"c1af1b4c23084c39852060e72af7b5a6fe64f97c","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars1.githubusercontent.com/u/50278?v=4","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":43158694,"name":"heron","full_name":"twitter/heron","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars1.githubusercontent.com/u/50278?v=4","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/heron","description":"Heron is a realtime, distributed, fault-tolerant stream processing engine from Twitter","fork":false,"url":"https://api.github.com/repos/twitter/heron","forks_url":"https://api.github.com/repos/twitter/heron/forks","keys_url":"https://api.github.com/repos/twitter/heron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/heron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/heron/teams","hooks_url":"https://api.github.com/repos/twitter/heron/hooks","issue_events_url":"https://api.github.com/repos/twitter/heron/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/heron/events","assignees_url":"https://api.github.com/repos/twitter/heron/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/heron/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/heron/tags","blobs_url":"https://api.github.com/repos/twitter/heron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/heron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/heron/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/heron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/heron/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/heron/languages","stargazers_url":"https://api.github.com/repos/twitter/heron/stargazers","contributors_url":"https://api.github.com/repos/twitter/heron/contributors","subscribers_url":"https://api.github.com/repos/twitter/heron/subscribers","subscription_url":"https://api.github.com/repos/twitter/heron/subscription","commits_url":"https://api.github.com/repos/twitter/heron/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/heron/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/heron/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/heron/issues/comments{/number}","contents_url":"https://api.github.com/repos/twitter/heron/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/heron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/heron/merges","archive_url":"https://api.github.com/repos/twitter/heron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/heron/downloads","issues_url":"https://api.github.com/repos/twitter/heron/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/heron/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/heron/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/heron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/heron/labels{/name}","releases_url":"https://api.github.com/repos/twitter/heron/releases{/id}","deployments_url":"https://api.github.com/repos/twitter/heron/deployments","created_at":"2015-09-25T16:09:24Z","updated_at":"2017-11-28T07:23:38Z","pushed_at":"2017-11-28T23:56:18Z","git_url":"git://github.com/twitter/heron.git","ssh_url":"git@github.com:twitter/heron.git","clone_url":"https://github.com/twitter/heron.git","svn_url":"https://github.com/twitter/heron","homepage":"http://heronstreaming.io","size":197671,"stargazers_count":2988,"watchers_count":2988,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":546,"mirror_url":null,"archived":false,"open_issues_count":327,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":546,"open_issues":327,"watchers":2988,"default_branch":"master"}},"base":{"label":"twitter:master","ref":"master","sha":"28478557d50718725491c2b6a631dea1dc56f485","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars1.githubusercontent.com/u/50278?v=4","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":43158694,"name":"heron","full_name":"twitter/heron","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars1.githubusercontent.com/u/50278?v=4","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/heron","description":"Heron is a realtime, distributed, fault-tolerant stream processing engine from Twitter","fork":false,"url":"https://api.github.com/repos/twitter/heron","forks_url":"https://api.github.com/repos/twitter/heron/forks","keys_url":"https://api.github.com/repos/twitter/heron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/heron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/heron/teams","hooks_url":"https://api.github.com/repos/twitter/heron/hooks","issue_events_url":"https://api.github.com/repos/twitter/heron/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/heron/events","assignees_url":"https://api.github.com/repos/twitter/heron/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/heron/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/heron/tags","blobs_url":"https://api.github.com/repos/twitter/heron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/heron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/heron/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/heron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/heron/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/heron/languages","stargazers_url":"https://api.github.com/repos/twitter/heron/stargazers","contributors_url":"https://api.github.com/repos/twitter/heron/contributors","subscribers_url":"https://api.github.com/repos/twitter/heron/subscribers","subscription_url":"https://api.github.com/repos/twitter/heron/subscription","commits_url":"https://api.github.com/repos/twitter/heron/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/heron/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/heron/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/heron/issues/comments{/number}","contents_url":"https://api.github.com/repos/twitter/heron/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/heron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/heron/merges","archive_url":"https://api.github.com/repos/twitter/heron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/heron/downloads","issues_url":"https://api.github.com/repos/twitter/heron/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/heron/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/heron/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/heron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/heron/labels{/name}","releases_url":"https://api.github.com/repos/twitter/heron/releases{/id}","deployments_url":"https://api.github.com/repos/twitter/heron/deployments","created_at":"2015-09-25T16:09:24Z","updated_at":"2017-11-28T07:23:38Z","pushed_at":"2017-11-28T23:56:18Z","git_url":"git://github.com/twitter/heron.git","ssh_url":"git@github.com:twitter/heron.git","clone_url":"https://github.com/twitter/heron.git","svn_url":"https://github.com/twitter/heron","homepage":"http://heronstreaming.io","size":197671,"stargazers_count":2988,"watchers_count":2988,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":546,"mirror_url":null,"archived":false,"open_issues_count":327,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":546,"open_issues":327,"watchers":2988,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twitter/heron/pulls/2582"},"html":{"href":"https://github.com/twitter/heron/pull/2582"},"issue":{"href":"https://api.github.com/repos/twitter/heron/issues/2582"},"comments":{"href":"https://api.github.com/repos/twitter/heron/issues/2582/comments"},"review_comments":{"href":"https://api.github.com/repos/twitter/heron/pulls/2582/comments"},"review_comment":{"href":"https://api.github.com/repos/twitter/heron/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twitter/heron/pulls/2582/commits"},"statuses":{"href":"https://api.github.com/repos/twitter/heron/statuses/c1af1b4c23084c39852060e72af7b5a6fe64f97c"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"maosongfu"}}