{"action":"created","comment":{"url":"https://api.github.com/repos/billonahill/heron/pulls/comments/74808340","id":74808340,"diff_hunk":"@@ -245,6 +249,45 @@ public boolean onUpdate(Scheduler.UpdateTopologyRequest request) {\n     return true;\n   }\n \n+  @Override\n+  public void addContainers(Integer count) {\n+    int activeContainerCount = processToContainer.size();\n+\n+    for (int i = 0; i < count; i++) {\n+      // if number of active container is 2, then there is 1 TMaster container (id=0) and 1 worker\n+      // (id = 1). Then the next container to be added will have id = 2, same as current container\n+      // count\n+      startExecutor(activeContainerCount + i);\n+    }\n+  }\n+\n+  @Override\n+  public void removeContainers(Integer existingContainerCount, Integer count) {\n+    LOG.log(Level.INFO, \"Kill {0} of {1} containers\", new Object[] {count, existingContainerCount});\n+\n+    if (existingContainerCount != processToContainer.size()) {\n+      LOG.log(Level.SEVERE, \"Container count mismatch: expected {0} != active {1}\",\n+          new Object[]{existingContainerCount, processToContainer.size()});\n+      throw new RuntimeException(\"Container count mismatch\");\n+    }\n+\n+    Map<Integer, Process> containerToProcessMap = new HashMap<>();\n+    for (Map.Entry<Process, Integer> entry : processToContainer.entrySet()) {","path":"heron/schedulers/src/java/com/twitter/heron/scheduler/local/LocalScheduler.java","position":63,"original_position":63,"commit_id":"5c0388f26df7d22a974fe22c062a24354b9b97a3","original_commit_id":"5c0388f26df7d22a974fe22c062a24354b9b97a3","user":{"login":"billonahill","id":23758,"avatar_url":"https://avatars.githubusercontent.com/u/23758?v=3","gravatar_id":"","url":"https://api.github.com/users/billonahill","html_url":"https://github.com/billonahill","followers_url":"https://api.github.com/users/billonahill/followers","following_url":"https://api.github.com/users/billonahill/following{/other_user}","gists_url":"https://api.github.com/users/billonahill/gists{/gist_id}","starred_url":"https://api.github.com/users/billonahill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billonahill/subscriptions","organizations_url":"https://api.github.com/users/billonahill/orgs","repos_url":"https://api.github.com/users/billonahill/repos","events_url":"https://api.github.com/users/billonahill/events{/privacy}","received_events_url":"https://api.github.com/users/billonahill/received_events","type":"User","site_admin":false},"body":"Ahh yes, I see that now. :) Yes a comment would help clarify.","created_at":"2016-08-15T18:25:13Z","updated_at":"2016-08-15T18:25:13Z","html_url":"https://github.com/billonahill/heron/pull/2#discussion_r74808340","pull_request_url":"https://api.github.com/repos/billonahill/heron/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/billonahill/heron/pulls/comments/74808340"},"html":{"href":"https://github.com/billonahill/heron/pull/2#discussion_r74808340"},"pull_request":{"href":"https://api.github.com/repos/billonahill/heron/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/billonahill/heron/pulls/2","id":81200602,"html_url":"https://github.com/billonahill/heron/pull/2","diff_url":"https://github.com/billonahill/heron/pull/2.diff","patch_url":"https://github.com/billonahill/heron/pull/2.patch","issue_url":"https://api.github.com/repos/billonahill/heron/issues/2","number":2,"state":"open","locked":false,"title":"Make Local Scheduler scalable","user":{"login":"ashvina","id":10034060,"avatar_url":"https://avatars.githubusercontent.com/u/10034060?v=3","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},"body":"Ability to add and remove containers in local scheduler. This will simplify testing testing scalable packing strategies","created_at":"2016-08-13T00:28:48Z","updated_at":"2016-08-15T18:25:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c449555dd120609533e4ee911940e8971c2e98b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/billonahill/heron/pulls/2/commits","review_comments_url":"https://api.github.com/repos/billonahill/heron/pulls/2/comments","review_comment_url":"https://api.github.com/repos/billonahill/heron/pulls/comments{/number}","comments_url":"https://api.github.com/repos/billonahill/heron/issues/2/comments","statuses_url":"https://api.github.com/repos/billonahill/heron/statuses/5c0388f26df7d22a974fe22c062a24354b9b97a3","head":{"label":"ashvina:scalableLocalScheduler","ref":"scalableLocalScheduler","sha":"5c0388f26df7d22a974fe22c062a24354b9b97a3","user":{"login":"ashvina","id":10034060,"avatar_url":"https://avatars.githubusercontent.com/u/10034060?v=3","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},"repo":{"id":60634271,"name":"heron","full_name":"ashvina/heron","owner":{"login":"ashvina","id":10034060,"avatar_url":"https://avatars.githubusercontent.com/u/10034060?v=3","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},"private":false,"html_url":"https://github.com/ashvina/heron","description":"Heron is a realtime, distributed, fault-tolerant stream processing engine from Twitter","fork":true,"url":"https://api.github.com/repos/ashvina/heron","forks_url":"https://api.github.com/repos/ashvina/heron/forks","keys_url":"https://api.github.com/repos/ashvina/heron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ashvina/heron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ashvina/heron/teams","hooks_url":"https://api.github.com/repos/ashvina/heron/hooks","issue_events_url":"https://api.github.com/repos/ashvina/heron/issues/events{/number}","events_url":"https://api.github.com/repos/ashvina/heron/events","assignees_url":"https://api.github.com/repos/ashvina/heron/assignees{/user}","branches_url":"https://api.github.com/repos/ashvina/heron/branches{/branch}","tags_url":"https://api.github.com/repos/ashvina/heron/tags","blobs_url":"https://api.github.com/repos/ashvina/heron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ashvina/heron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ashvina/heron/git/refs{/sha}","trees_url":"https://api.github.com/repos/ashvina/heron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ashvina/heron/statuses/{sha}","languages_url":"https://api.github.com/repos/ashvina/heron/languages","stargazers_url":"https://api.github.com/repos/ashvina/heron/stargazers","contributors_url":"https://api.github.com/repos/ashvina/heron/contributors","subscribers_url":"https://api.github.com/repos/ashvina/heron/subscribers","subscription_url":"https://api.github.com/repos/ashvina/heron/subscription","commits_url":"https://api.github.com/repos/ashvina/heron/commits{/sha}","git_commits_url":"https://api.github.com/repos/ashvina/heron/git/commits{/sha}","comments_url":"https://api.github.com/repos/ashvina/heron/comments{/number}","issue_comment_url":"https://api.github.com/repos/ashvina/heron/issues/comments{/number}","contents_url":"https://api.github.com/repos/ashvina/heron/contents/{+path}","compare_url":"https://api.github.com/repos/ashvina/heron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ashvina/heron/merges","archive_url":"https://api.github.com/repos/ashvina/heron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ashvina/heron/downloads","issues_url":"https://api.github.com/repos/ashvina/heron/issues{/number}","pulls_url":"https://api.github.com/repos/ashvina/heron/pulls{/number}","milestones_url":"https://api.github.com/repos/ashvina/heron/milestones{/number}","notifications_url":"https://api.github.com/repos/ashvina/heron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ashvina/heron/labels{/name}","releases_url":"https://api.github.com/repos/ashvina/heron/releases{/id}","deployments_url":"https://api.github.com/repos/ashvina/heron/deployments","created_at":"2016-06-07T17:50:36Z","updated_at":"2016-07-04T07:10:30Z","pushed_at":"2016-08-13T00:24:44Z","git_url":"git://github.com/ashvina/heron.git","ssh_url":"git@github.com:ashvina/heron.git","clone_url":"https://github.com/ashvina/heron.git","svn_url":"https://github.com/ashvina/heron","homepage":"http://heronstreaming.io","size":112485,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"billonahill:billg/scaling_proto","ref":"billg/scaling_proto","sha":"1b509f9c322db6ad2311c9887974c5b90790ce59","user":{"login":"billonahill","id":23758,"avatar_url":"https://avatars.githubusercontent.com/u/23758?v=3","gravatar_id":"","url":"https://api.github.com/users/billonahill","html_url":"https://github.com/billonahill","followers_url":"https://api.github.com/users/billonahill/followers","following_url":"https://api.github.com/users/billonahill/following{/other_user}","gists_url":"https://api.github.com/users/billonahill/gists{/gist_id}","starred_url":"https://api.github.com/users/billonahill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billonahill/subscriptions","organizations_url":"https://api.github.com/users/billonahill/orgs","repos_url":"https://api.github.com/users/billonahill/repos","events_url":"https://api.github.com/users/billonahill/events{/privacy}","received_events_url":"https://api.github.com/users/billonahill/received_events","type":"User","site_admin":false},"repo":{"id":59679434,"name":"heron","full_name":"billonahill/heron","owner":{"login":"billonahill","id":23758,"avatar_url":"https://avatars.githubusercontent.com/u/23758?v=3","gravatar_id":"","url":"https://api.github.com/users/billonahill","html_url":"https://github.com/billonahill","followers_url":"https://api.github.com/users/billonahill/followers","following_url":"https://api.github.com/users/billonahill/following{/other_user}","gists_url":"https://api.github.com/users/billonahill/gists{/gist_id}","starred_url":"https://api.github.com/users/billonahill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billonahill/subscriptions","organizations_url":"https://api.github.com/users/billonahill/orgs","repos_url":"https://api.github.com/users/billonahill/repos","events_url":"https://api.github.com/users/billonahill/events{/privacy}","received_events_url":"https://api.github.com/users/billonahill/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/billonahill/heron","description":"Heron is a realtime, distributed, fault-tolerant stream processing engine from Twitter","fork":true,"url":"https://api.github.com/repos/billonahill/heron","forks_url":"https://api.github.com/repos/billonahill/heron/forks","keys_url":"https://api.github.com/repos/billonahill/heron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/billonahill/heron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/billonahill/heron/teams","hooks_url":"https://api.github.com/repos/billonahill/heron/hooks","issue_events_url":"https://api.github.com/repos/billonahill/heron/issues/events{/number}","events_url":"https://api.github.com/repos/billonahill/heron/events","assignees_url":"https://api.github.com/repos/billonahill/heron/assignees{/user}","branches_url":"https://api.github.com/repos/billonahill/heron/branches{/branch}","tags_url":"https://api.github.com/repos/billonahill/heron/tags","blobs_url":"https://api.github.com/repos/billonahill/heron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/billonahill/heron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/billonahill/heron/git/refs{/sha}","trees_url":"https://api.github.com/repos/billonahill/heron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/billonahill/heron/statuses/{sha}","languages_url":"https://api.github.com/repos/billonahill/heron/languages","stargazers_url":"https://api.github.com/repos/billonahill/heron/stargazers","contributors_url":"https://api.github.com/repos/billonahill/heron/contributors","subscribers_url":"https://api.github.com/repos/billonahill/heron/subscribers","subscription_url":"https://api.github.com/repos/billonahill/heron/subscription","commits_url":"https://api.github.com/repos/billonahill/heron/commits{/sha}","git_commits_url":"https://api.github.com/repos/billonahill/heron/git/commits{/sha}","comments_url":"https://api.github.com/repos/billonahill/heron/comments{/number}","issue_comment_url":"https://api.github.com/repos/billonahill/heron/issues/comments{/number}","contents_url":"https://api.github.com/repos/billonahill/heron/contents/{+path}","compare_url":"https://api.github.com/repos/billonahill/heron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/billonahill/heron/merges","archive_url":"https://api.github.com/repos/billonahill/heron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/billonahill/heron/downloads","issues_url":"https://api.github.com/repos/billonahill/heron/issues{/number}","pulls_url":"https://api.github.com/repos/billonahill/heron/pulls{/number}","milestones_url":"https://api.github.com/repos/billonahill/heron/milestones{/number}","notifications_url":"https://api.github.com/repos/billonahill/heron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/billonahill/heron/labels{/name}","releases_url":"https://api.github.com/repos/billonahill/heron/releases{/id}","deployments_url":"https://api.github.com/repos/billonahill/heron/deployments","created_at":"2016-05-25T16:27:20Z","updated_at":"2016-05-25T16:31:33Z","pushed_at":"2016-08-15T18:16:08Z","git_url":"git://github.com/billonahill/heron.git","ssh_url":"git@github.com:billonahill/heron.git","clone_url":"https://github.com/billonahill/heron.git","svn_url":"https://github.com/billonahill/heron","homepage":"http://heronstreaming.io","size":112808,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/billonahill/heron/pulls/2"},"html":{"href":"https://github.com/billonahill/heron/pull/2"},"issue":{"href":"https://api.github.com/repos/billonahill/heron/issues/2"},"comments":{"href":"https://api.github.com/repos/billonahill/heron/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/billonahill/heron/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/billonahill/heron/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/billonahill/heron/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/billonahill/heron/statuses/5c0388f26df7d22a974fe22c062a24354b9b97a3"}}}}
{"actor":{"display_login":"billonahill"}}