{"action":"created","comment":{"url":"https://api.github.com/repos/apache/storm/pulls/comments/78029793","id":78029793,"diff_hunk":"@@ -0,0 +1,142 @@\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+ * <p/>\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ * <p/>\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 org.apache.storm.scheduler.blacklist.strategies;\n+\n+import org.apache.storm.scheduler.*;\n+import org.apache.storm.scheduler.blacklist.CircularBuffer;\n+import org.apache.storm.scheduler.blacklist.reporters.IReporter;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import java.util.*;\n+\n+public class DefaultBlacklistStrategy implements IBlacklistStrategy {\n+\n+    private static Logger LOG = LoggerFactory.getLogger(DefaultBlacklistStrategy.class);\n+\n+    private IReporter _reporter;\n+\n+    private int _toleranceTime;\n+    private int _toleranceCount;\n+    private int _resumeTime;\n+    private int _nimbusMonitorFreqSecs;\n+\n+    private TreeMap<String, Integer> blacklist;\n+\n+    @Override\n+    public void prepare(IReporter reporter, int toleranceTime, int toleranceCount, int resumeTime, int nimbusMonitorFreqSecs) {\n+        _reporter = reporter;\n+\n+        _toleranceTime = toleranceTime;\n+        _toleranceCount = toleranceCount;\n+        _resumeTime = resumeTime;\n+        _nimbusMonitorFreqSecs = nimbusMonitorFreqSecs;\n+        blacklist = new TreeMap<>();\n+    }\n+\n+    @Override\n+    public Set<String> getBlacklist(CircularBuffer<HashMap<String, Set<Integer>>> toleranceBuffer, Cluster cluster, Topologies topologies) {","path":"storm-core/src/jvm/org/apache/storm/scheduler/blacklist/strategies/DefaultBlacklistStrategy.java","position":53,"original_position":53,"commit_id":"a59900425cee76db3231e2711c4232bc6e6cc27c","original_commit_id":"a59900425cee76db3231e2711c4232bc6e6cc27c","user":{"login":"knusbaum","id":1819836,"avatar_url":"https://avatars.githubusercontent.com/u/1819836?v=3","gravatar_id":"","url":"https://api.github.com/users/knusbaum","html_url":"https://github.com/knusbaum","followers_url":"https://api.github.com/users/knusbaum/followers","following_url":"https://api.github.com/users/knusbaum/following{/other_user}","gists_url":"https://api.github.com/users/knusbaum/gists{/gist_id}","starred_url":"https://api.github.com/users/knusbaum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knusbaum/subscriptions","organizations_url":"https://api.github.com/users/knusbaum/orgs","repos_url":"https://api.github.com/users/knusbaum/repos","events_url":"https://api.github.com/users/knusbaum/events{/privacy}","received_events_url":"https://api.github.com/users/knusbaum/received_events","type":"User","site_admin":false},"body":"The only thing that's ever actually used in `toleranceBuffer` here (except for logging it) is the key of the hashmap. It looks like `toleranceBuffer` should really be a `List<String>` called `supervisorsWithFailures` or something like that. Currently, both the type and the name are misleading.","created_at":"2016-09-08T15:28:13Z","updated_at":"2016-09-08T15:28:13Z","html_url":"https://github.com/apache/storm/pull/1674#discussion_r78029793","pull_request_url":"https://api.github.com/repos/apache/storm/pulls/1674","_links":{"self":{"href":"https://api.github.com/repos/apache/storm/pulls/comments/78029793"},"html":{"href":"https://github.com/apache/storm/pull/1674#discussion_r78029793"},"pull_request":{"href":"https://api.github.com/repos/apache/storm/pulls/1674"}}},"pull_request":{"url":"https://api.github.com/repos/apache/storm/pulls/1674","id":84088697,"html_url":"https://github.com/apache/storm/pull/1674","diff_url":"https://github.com/apache/storm/pull/1674.diff","patch_url":"https://github.com/apache/storm/pull/1674.patch","issue_url":"https://api.github.com/repos/apache/storm/issues/1674","number":1674,"state":"open","locked":false,"title":"STORM-2083: Blacklist scheduler","user":{"login":"nilday","id":3797285,"avatar_url":"https://avatars.githubusercontent.com/u/3797285?v=3","gravatar_id":"","url":"https://api.github.com/users/nilday","html_url":"https://github.com/nilday","followers_url":"https://api.github.com/users/nilday/followers","following_url":"https://api.github.com/users/nilday/following{/other_user}","gists_url":"https://api.github.com/users/nilday/gists{/gist_id}","starred_url":"https://api.github.com/users/nilday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilday/subscriptions","organizations_url":"https://api.github.com/users/nilday/orgs","repos_url":"https://api.github.com/users/nilday/repos","events_url":"https://api.github.com/users/nilday/events{/privacy}","received_events_url":"https://api.github.com/users/nilday/received_events","type":"User","site_admin":false},"body":"A resolve of [STORM-2083](https://issues.apache.org/jira/browse/STORM-2083)","created_at":"2016-09-06T09:28:44Z","updated_at":"2016-09-08T15:28:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b7821beb1d72423528d24716377bff1f8fb3a5f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/storm/pulls/1674/commits","review_comments_url":"https://api.github.com/repos/apache/storm/pulls/1674/comments","review_comment_url":"https://api.github.com/repos/apache/storm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/storm/issues/1674/comments","statuses_url":"https://api.github.com/repos/apache/storm/statuses/a59900425cee76db3231e2711c4232bc6e6cc27c","head":{"label":"nilday:blacklist-scheduler","ref":"blacklist-scheduler","sha":"a59900425cee76db3231e2711c4232bc6e6cc27c","user":{"login":"nilday","id":3797285,"avatar_url":"https://avatars.githubusercontent.com/u/3797285?v=3","gravatar_id":"","url":"https://api.github.com/users/nilday","html_url":"https://github.com/nilday","followers_url":"https://api.github.com/users/nilday/followers","following_url":"https://api.github.com/users/nilday/following{/other_user}","gists_url":"https://api.github.com/users/nilday/gists{/gist_id}","starred_url":"https://api.github.com/users/nilday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilday/subscriptions","organizations_url":"https://api.github.com/users/nilday/orgs","repos_url":"https://api.github.com/users/nilday/repos","events_url":"https://api.github.com/users/nilday/events{/privacy}","received_events_url":"https://api.github.com/users/nilday/received_events","type":"User","site_admin":false},"repo":{"id":63833622,"name":"storm","full_name":"nilday/storm","owner":{"login":"nilday","id":3797285,"avatar_url":"https://avatars.githubusercontent.com/u/3797285?v=3","gravatar_id":"","url":"https://api.github.com/users/nilday","html_url":"https://github.com/nilday","followers_url":"https://api.github.com/users/nilday/followers","following_url":"https://api.github.com/users/nilday/following{/other_user}","gists_url":"https://api.github.com/users/nilday/gists{/gist_id}","starred_url":"https://api.github.com/users/nilday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilday/subscriptions","organizations_url":"https://api.github.com/users/nilday/orgs","repos_url":"https://api.github.com/users/nilday/repos","events_url":"https://api.github.com/users/nilday/events{/privacy}","received_events_url":"https://api.github.com/users/nilday/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nilday/storm","description":"Mirror of Apache Storm","fork":true,"url":"https://api.github.com/repos/nilday/storm","forks_url":"https://api.github.com/repos/nilday/storm/forks","keys_url":"https://api.github.com/repos/nilday/storm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nilday/storm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nilday/storm/teams","hooks_url":"https://api.github.com/repos/nilday/storm/hooks","issue_events_url":"https://api.github.com/repos/nilday/storm/issues/events{/number}","events_url":"https://api.github.com/repos/nilday/storm/events","assignees_url":"https://api.github.com/repos/nilday/storm/assignees{/user}","branches_url":"https://api.github.com/repos/nilday/storm/branches{/branch}","tags_url":"https://api.github.com/repos/nilday/storm/tags","blobs_url":"https://api.github.com/repos/nilday/storm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nilday/storm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nilday/storm/git/refs{/sha}","trees_url":"https://api.github.com/repos/nilday/storm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nilday/storm/statuses/{sha}","languages_url":"https://api.github.com/repos/nilday/storm/languages","stargazers_url":"https://api.github.com/repos/nilday/storm/stargazers","contributors_url":"https://api.github.com/repos/nilday/storm/contributors","subscribers_url":"https://api.github.com/repos/nilday/storm/subscribers","subscription_url":"https://api.github.com/repos/nilday/storm/subscription","commits_url":"https://api.github.com/repos/nilday/storm/commits{/sha}","git_commits_url":"https://api.github.com/repos/nilday/storm/git/commits{/sha}","comments_url":"https://api.github.com/repos/nilday/storm/comments{/number}","issue_comment_url":"https://api.github.com/repos/nilday/storm/issues/comments{/number}","contents_url":"https://api.github.com/repos/nilday/storm/contents/{+path}","compare_url":"https://api.github.com/repos/nilday/storm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nilday/storm/merges","archive_url":"https://api.github.com/repos/nilday/storm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nilday/storm/downloads","issues_url":"https://api.github.com/repos/nilday/storm/issues{/number}","pulls_url":"https://api.github.com/repos/nilday/storm/pulls{/number}","milestones_url":"https://api.github.com/repos/nilday/storm/milestones{/number}","notifications_url":"https://api.github.com/repos/nilday/storm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nilday/storm/labels{/name}","releases_url":"https://api.github.com/repos/nilday/storm/releases{/id}","deployments_url":"https://api.github.com/repos/nilday/storm/deployments","created_at":"2016-07-21T03:23:49Z","updated_at":"2016-07-21T03:23:54Z","pushed_at":"2016-09-06T09:25:48Z","git_url":"git://github.com/nilday/storm.git","ssh_url":"git@github.com:nilday/storm.git","clone_url":"https://github.com/nilday/storm.git","svn_url":"https://github.com/nilday/storm","homepage":null,"size":158994,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:1.0.x-branch","ref":"1.0.x-branch","sha":"7f5650148ebbf21ba07026e40c849bf66a19d8bd","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":14135470,"name":"storm","full_name":"apache/storm","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/storm","description":"Mirror of Apache Storm","fork":false,"url":"https://api.github.com/repos/apache/storm","forks_url":"https://api.github.com/repos/apache/storm/forks","keys_url":"https://api.github.com/repos/apache/storm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/storm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/storm/teams","hooks_url":"https://api.github.com/repos/apache/storm/hooks","issue_events_url":"https://api.github.com/repos/apache/storm/issues/events{/number}","events_url":"https://api.github.com/repos/apache/storm/events","assignees_url":"https://api.github.com/repos/apache/storm/assignees{/user}","branches_url":"https://api.github.com/repos/apache/storm/branches{/branch}","tags_url":"https://api.github.com/repos/apache/storm/tags","blobs_url":"https://api.github.com/repos/apache/storm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/storm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/storm/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/storm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/storm/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/storm/languages","stargazers_url":"https://api.github.com/repos/apache/storm/stargazers","contributors_url":"https://api.github.com/repos/apache/storm/contributors","subscribers_url":"https://api.github.com/repos/apache/storm/subscribers","subscription_url":"https://api.github.com/repos/apache/storm/subscription","commits_url":"https://api.github.com/repos/apache/storm/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/storm/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/storm/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/storm/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/storm/contents/{+path}","compare_url":"https://api.github.com/repos/apache/storm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/storm/merges","archive_url":"https://api.github.com/repos/apache/storm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/storm/downloads","issues_url":"https://api.github.com/repos/apache/storm/issues{/number}","pulls_url":"https://api.github.com/repos/apache/storm/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/storm/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/storm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/storm/labels{/name}","releases_url":"https://api.github.com/repos/apache/storm/releases{/id}","deployments_url":"https://api.github.com/repos/apache/storm/deployments","created_at":"2013-11-05T08:00:14Z","updated_at":"2016-09-08T14:04:41Z","pushed_at":"2016-09-07T08:29:14Z","git_url":"git://github.com/apache/storm.git","ssh_url":"git@github.com:apache/storm.git","clone_url":"https://github.com/apache/storm.git","svn_url":"https://github.com/apache/storm","homepage":null,"size":174131,"stargazers_count":3517,"watchers_count":3517,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2603,"mirror_url":"git://git.apache.org/storm.git","open_issues_count":138,"forks":2603,"open_issues":138,"watchers":3517,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/storm/pulls/1674"},"html":{"href":"https://github.com/apache/storm/pull/1674"},"issue":{"href":"https://api.github.com/repos/apache/storm/issues/1674"},"comments":{"href":"https://api.github.com/repos/apache/storm/issues/1674/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/storm/pulls/1674/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/storm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/storm/pulls/1674/commits"},"statuses":{"href":"https://api.github.com/repos/apache/storm/statuses/a59900425cee76db3231e2711c4232bc6e6cc27c"}}}}
{"actor":{"display_login":"knusbaum"}}