{"action":"created","comment":{"url":"https://api.github.com/repos/mesos/storm/pulls/comments/66650632","id":66650632,"diff_hunk":"@@ -0,0 +1,61 @@\n+/**\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ * or more contributor license agreements.  See the NOTICE file\n+ * distributed with this work for additional information\n+ * regarding copyright ownership.  The ASF licenses this file\n+ * to you under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance\n+ * with the License.  You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package storm.mesos.resources;\n+\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+public enum ResourceType {\n+  CPU(\"cpus\"),\n+  MEM(\"mem\"),\n+  PORTS(\"ports\"),\n+  DISK(\"disk\");\n+\n+  private final String resourceType;\n+  private static final Logger LOG = LoggerFactory.getLogger(ResourceType.class);\n+\n+  private static final Map<String, ResourceType> map = new HashMap<>(ResourceType.values().length);","path":"storm/src/main/storm/mesos/resources/ResourceType.java","position":35,"original_position":35,"commit_id":"fa3bba33aab4ca31c327ad3bca8f58e82b62ad5d","original_commit_id":"fa3bba33aab4ca31c327ad3bca8f58e82b62ad5d","user":{"login":"JessicaLHartog","id":2814367,"avatar_url":"https://avatars.githubusercontent.com/u/2814367?v=3","gravatar_id":"","url":"https://api.github.com/users/JessicaLHartog","html_url":"https://github.com/JessicaLHartog","followers_url":"https://api.github.com/users/JessicaLHartog/followers","following_url":"https://api.github.com/users/JessicaLHartog/following{/other_user}","gists_url":"https://api.github.com/users/JessicaLHartog/gists{/gist_id}","starred_url":"https://api.github.com/users/JessicaLHartog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JessicaLHartog/subscriptions","organizations_url":"https://api.github.com/users/JessicaLHartog/orgs","repos_url":"https://api.github.com/users/JessicaLHartog/repos","events_url":"https://api.github.com/users/JessicaLHartog/events{/privacy}","received_events_url":"https://api.github.com/users/JessicaLHartog/received_events","type":"User","site_admin":false},"body":"Can we rename `map` to `availableResourceTypes`?","created_at":"2016-06-10T17:27:45Z","updated_at":"2016-06-10T17:27:45Z","html_url":"https://github.com/mesos/storm/pull/146#discussion_r66650632","pull_request_url":"https://api.github.com/repos/mesos/storm/pulls/146","_links":{"self":{"href":"https://api.github.com/repos/mesos/storm/pulls/comments/66650632"},"html":{"href":"https://github.com/mesos/storm/pull/146#discussion_r66650632"},"pull_request":{"href":"https://api.github.com/repos/mesos/storm/pulls/146"}}},"pull_request":{"url":"https://api.github.com/repos/mesos/storm/pulls/146","id":72780840,"html_url":"https://github.com/mesos/storm/pull/146","diff_url":"https://github.com/mesos/storm/pull/146.diff","patch_url":"https://github.com/mesos/storm/pull/146.patch","issue_url":"https://api.github.com/repos/mesos/storm/issues/146","number":146,"state":"open","locked":false,"title":"Schedule And Launch workers on consolidated offers","user":{"login":"dsKarthick","id":1086011,"avatar_url":"https://avatars.githubusercontent.com/u/1086011?v=3","gravatar_id":"","url":"https://api.github.com/users/dsKarthick","html_url":"https://github.com/dsKarthick","followers_url":"https://api.github.com/users/dsKarthick/followers","following_url":"https://api.github.com/users/dsKarthick/following{/other_user}","gists_url":"https://api.github.com/users/dsKarthick/gists{/gist_id}","starred_url":"https://api.github.com/users/dsKarthick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsKarthick/subscriptions","organizations_url":"https://api.github.com/users/dsKarthick/orgs","repos_url":"https://api.github.com/users/dsKarthick/repos","events_url":"https://api.github.com/users/dsKarthick/events{/privacy}","received_events_url":"https://api.github.com/users/dsKarthick/received_events","type":"User","site_admin":false},"body":"@brndnmtthws @DarinJ @erikdw @JessicaLHartog Please 👀 \r\n\r\nBetter version of https://github.com/mesos/storm/pull/111. \r\n\r\nAdresses following problems:\r\n* Offers get too fragmented. So even though there are enough resources, because they are fragmented across multiple offers, they are not useful\r\n* Some times, offer that is available at the time of allSlotsAvailableForScheduling gets removed from the rotating map before the storm-core invokes schedule to actually schedule the offers. This leads to a race-condition where some of the n workers take a long time to launch.\r\n","created_at":"2016-06-06T21:26:26Z","updated_at":"2016-06-10T17:27:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99a78ff93a6cd948b70770a7fe532cfb1a58f218","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mesos/storm/pulls/146/commits","review_comments_url":"https://api.github.com/repos/mesos/storm/pulls/146/comments","review_comment_url":"https://api.github.com/repos/mesos/storm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesos/storm/issues/146/comments","statuses_url":"https://api.github.com/repos/mesos/storm/statuses/fa3bba33aab4ca31c327ad3bca8f58e82b62ad5d","head":{"label":"dsKarthick:schedule_workers_on_consolidated_offers","ref":"schedule_workers_on_consolidated_offers","sha":"fa3bba33aab4ca31c327ad3bca8f58e82b62ad5d","user":{"login":"dsKarthick","id":1086011,"avatar_url":"https://avatars.githubusercontent.com/u/1086011?v=3","gravatar_id":"","url":"https://api.github.com/users/dsKarthick","html_url":"https://github.com/dsKarthick","followers_url":"https://api.github.com/users/dsKarthick/followers","following_url":"https://api.github.com/users/dsKarthick/following{/other_user}","gists_url":"https://api.github.com/users/dsKarthick/gists{/gist_id}","starred_url":"https://api.github.com/users/dsKarthick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsKarthick/subscriptions","organizations_url":"https://api.github.com/users/dsKarthick/orgs","repos_url":"https://api.github.com/users/dsKarthick/repos","events_url":"https://api.github.com/users/dsKarthick/events{/privacy}","received_events_url":"https://api.github.com/users/dsKarthick/received_events","type":"User","site_admin":false},"repo":{"id":47895430,"name":"storm-mesos","full_name":"dsKarthick/storm-mesos","owner":{"login":"dsKarthick","id":1086011,"avatar_url":"https://avatars.githubusercontent.com/u/1086011?v=3","gravatar_id":"","url":"https://api.github.com/users/dsKarthick","html_url":"https://github.com/dsKarthick","followers_url":"https://api.github.com/users/dsKarthick/followers","following_url":"https://api.github.com/users/dsKarthick/following{/other_user}","gists_url":"https://api.github.com/users/dsKarthick/gists{/gist_id}","starred_url":"https://api.github.com/users/dsKarthick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsKarthick/subscriptions","organizations_url":"https://api.github.com/users/dsKarthick/orgs","repos_url":"https://api.github.com/users/dsKarthick/repos","events_url":"https://api.github.com/users/dsKarthick/events{/privacy}","received_events_url":"https://api.github.com/users/dsKarthick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dsKarthick/storm-mesos","description":"Storm on Mesos!","fork":true,"url":"https://api.github.com/repos/dsKarthick/storm-mesos","forks_url":"https://api.github.com/repos/dsKarthick/storm-mesos/forks","keys_url":"https://api.github.com/repos/dsKarthick/storm-mesos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dsKarthick/storm-mesos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dsKarthick/storm-mesos/teams","hooks_url":"https://api.github.com/repos/dsKarthick/storm-mesos/hooks","issue_events_url":"https://api.github.com/repos/dsKarthick/storm-mesos/issues/events{/number}","events_url":"https://api.github.com/repos/dsKarthick/storm-mesos/events","assignees_url":"https://api.github.com/repos/dsKarthick/storm-mesos/assignees{/user}","branches_url":"https://api.github.com/repos/dsKarthick/storm-mesos/branches{/branch}","tags_url":"https://api.github.com/repos/dsKarthick/storm-mesos/tags","blobs_url":"https://api.github.com/repos/dsKarthick/storm-mesos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dsKarthick/storm-mesos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dsKarthick/storm-mesos/git/refs{/sha}","trees_url":"https://api.github.com/repos/dsKarthick/storm-mesos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dsKarthick/storm-mesos/statuses/{sha}","languages_url":"https://api.github.com/repos/dsKarthick/storm-mesos/languages","stargazers_url":"https://api.github.com/repos/dsKarthick/storm-mesos/stargazers","contributors_url":"https://api.github.com/repos/dsKarthick/storm-mesos/contributors","subscribers_url":"https://api.github.com/repos/dsKarthick/storm-mesos/subscribers","subscription_url":"https://api.github.com/repos/dsKarthick/storm-mesos/subscription","commits_url":"https://api.github.com/repos/dsKarthick/storm-mesos/commits{/sha}","git_commits_url":"https://api.github.com/repos/dsKarthick/storm-mesos/git/commits{/sha}","comments_url":"https://api.github.com/repos/dsKarthick/storm-mesos/comments{/number}","issue_comment_url":"https://api.github.com/repos/dsKarthick/storm-mesos/issues/comments{/number}","contents_url":"https://api.github.com/repos/dsKarthick/storm-mesos/contents/{+path}","compare_url":"https://api.github.com/repos/dsKarthick/storm-mesos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dsKarthick/storm-mesos/merges","archive_url":"https://api.github.com/repos/dsKarthick/storm-mesos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dsKarthick/storm-mesos/downloads","issues_url":"https://api.github.com/repos/dsKarthick/storm-mesos/issues{/number}","pulls_url":"https://api.github.com/repos/dsKarthick/storm-mesos/pulls{/number}","milestones_url":"https://api.github.com/repos/dsKarthick/storm-mesos/milestones{/number}","notifications_url":"https://api.github.com/repos/dsKarthick/storm-mesos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dsKarthick/storm-mesos/labels{/name}","releases_url":"https://api.github.com/repos/dsKarthick/storm-mesos/releases{/id}","deployments_url":"https://api.github.com/repos/dsKarthick/storm-mesos/deployments","created_at":"2015-12-12T21:35:05Z","updated_at":"2016-05-31T20:28:44Z","pushed_at":"2016-06-06T22:09:37Z","git_url":"git://github.com/dsKarthick/storm-mesos.git","ssh_url":"git@github.com:dsKarthick/storm-mesos.git","clone_url":"https://github.com/dsKarthick/storm-mesos.git","svn_url":"https://github.com/dsKarthick/storm-mesos","homepage":null,"size":394,"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":"mesos:master","ref":"master","sha":"2f75e5139ce80bafb6f92c9f6b70381c083d3ebd","user":{"login":"mesos","id":229272,"avatar_url":"https://avatars.githubusercontent.com/u/229272?v=3","gravatar_id":"","url":"https://api.github.com/users/mesos","html_url":"https://github.com/mesos","followers_url":"https://api.github.com/users/mesos/followers","following_url":"https://api.github.com/users/mesos/following{/other_user}","gists_url":"https://api.github.com/users/mesos/gists{/gist_id}","starred_url":"https://api.github.com/users/mesos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesos/subscriptions","organizations_url":"https://api.github.com/users/mesos/orgs","repos_url":"https://api.github.com/users/mesos/repos","events_url":"https://api.github.com/users/mesos/events{/privacy}","received_events_url":"https://api.github.com/users/mesos/received_events","type":"Organization","site_admin":false},"repo":{"id":21285858,"name":"storm","full_name":"mesos/storm","owner":{"login":"mesos","id":229272,"avatar_url":"https://avatars.githubusercontent.com/u/229272?v=3","gravatar_id":"","url":"https://api.github.com/users/mesos","html_url":"https://github.com/mesos","followers_url":"https://api.github.com/users/mesos/followers","following_url":"https://api.github.com/users/mesos/following{/other_user}","gists_url":"https://api.github.com/users/mesos/gists{/gist_id}","starred_url":"https://api.github.com/users/mesos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesos/subscriptions","organizations_url":"https://api.github.com/users/mesos/orgs","repos_url":"https://api.github.com/users/mesos/repos","events_url":"https://api.github.com/users/mesos/events{/privacy}","received_events_url":"https://api.github.com/users/mesos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesos/storm","description":"Storm on Mesos!","fork":false,"url":"https://api.github.com/repos/mesos/storm","forks_url":"https://api.github.com/repos/mesos/storm/forks","keys_url":"https://api.github.com/repos/mesos/storm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesos/storm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesos/storm/teams","hooks_url":"https://api.github.com/repos/mesos/storm/hooks","issue_events_url":"https://api.github.com/repos/mesos/storm/issues/events{/number}","events_url":"https://api.github.com/repos/mesos/storm/events","assignees_url":"https://api.github.com/repos/mesos/storm/assignees{/user}","branches_url":"https://api.github.com/repos/mesos/storm/branches{/branch}","tags_url":"https://api.github.com/repos/mesos/storm/tags","blobs_url":"https://api.github.com/repos/mesos/storm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesos/storm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesos/storm/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesos/storm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesos/storm/statuses/{sha}","languages_url":"https://api.github.com/repos/mesos/storm/languages","stargazers_url":"https://api.github.com/repos/mesos/storm/stargazers","contributors_url":"https://api.github.com/repos/mesos/storm/contributors","subscribers_url":"https://api.github.com/repos/mesos/storm/subscribers","subscription_url":"https://api.github.com/repos/mesos/storm/subscription","commits_url":"https://api.github.com/repos/mesos/storm/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesos/storm/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesos/storm/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesos/storm/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesos/storm/contents/{+path}","compare_url":"https://api.github.com/repos/mesos/storm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesos/storm/merges","archive_url":"https://api.github.com/repos/mesos/storm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesos/storm/downloads","issues_url":"https://api.github.com/repos/mesos/storm/issues{/number}","pulls_url":"https://api.github.com/repos/mesos/storm/pulls{/number}","milestones_url":"https://api.github.com/repos/mesos/storm/milestones{/number}","notifications_url":"https://api.github.com/repos/mesos/storm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesos/storm/labels{/name}","releases_url":"https://api.github.com/repos/mesos/storm/releases{/id}","deployments_url":"https://api.github.com/repos/mesos/storm/deployments","created_at":"2014-06-27T18:51:37Z","updated_at":"2016-06-08T15:36:42Z","pushed_at":"2016-06-08T20:00:54Z","git_url":"git://github.com/mesos/storm.git","ssh_url":"git@github.com:mesos/storm.git","clone_url":"https://github.com/mesos/storm.git","svn_url":"https://github.com/mesos/storm","homepage":null,"size":567,"stargazers_count":98,"watchers_count":98,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":15,"forks":52,"open_issues":15,"watchers":98,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesos/storm/pulls/146"},"html":{"href":"https://github.com/mesos/storm/pull/146"},"issue":{"href":"https://api.github.com/repos/mesos/storm/issues/146"},"comments":{"href":"https://api.github.com/repos/mesos/storm/issues/146/comments"},"review_comments":{"href":"https://api.github.com/repos/mesos/storm/pulls/146/comments"},"review_comment":{"href":"https://api.github.com/repos/mesos/storm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesos/storm/pulls/146/commits"},"statuses":{"href":"https://api.github.com/repos/mesos/storm/statuses/fa3bba33aab4ca31c327ad3bca8f58e82b62ad5d"}}}}
{"actor":{"display_login":"JessicaLHartog"}}