{"action":"created","comment":{"url":"https://api.github.com/repos/codice/ddf/pulls/comments/100362628","pull_request_review_id":21068903,"id":100362628,"diff_hunk":"@@ -96,41 +94,36 @@ public void run() {\n      * Checks if the specified source is available, updating the internally maintained map of\n      * sources and their status. Lock ensures only one status thread is running per source.\n      *\n-     * @param source\n-     *            the source to check if it is available\n+     * @param source the source to check if it is available\n      */\n     private void checkStatus(final Source source) {\n \n         if (pool == null) {\n             pool = Executors.newCachedThreadPool();\n \n         }\n-        final Runnable statusRunner = new Runnable() {\n-\n-            public void run() {\n-\n-                final CachedSource cachedSource = cachedSources.get(source);\n-                if (cachedSource != null) {\n-                    Lock sourceStatusThreadLock = sourceStatusThreadLocks.get(source);\n-\n-                    if (sourceStatusThreadLock.tryLock()) {\n-                        LOGGER.debug(\"Acquired lock for Source [{}] with id [{}]\",\n+        final Runnable statusRunner = () -> {\n+            final CachedSource cachedSource = cachedSources.get(getSourceKey(source));\n+            if (cachedSource != null) {\n+                Lock sourceStatusThreadLock = sourceStatusThreadLocks.get(cachedSource);\n+\n+                if (sourceStatusThreadLock.tryLock()) {\n+                    LOGGER.debug(\"Acquired lock for Source [{}] with id [{}]\",\n+                            source,\n+                            source.getId());\n+\n+                    try {\n+                        cachedSource.checkStatus();\n+                    } finally {\n+                        // release the lock acquired initially\n+                        sourceStatusThreadLock.unlock();\n+                        LOGGER.debug(\"Released lock for Source [{}] with id [{}]\",\n                                 source,\n                                 source.getId());\n-\n-                        try {\n-                            cachedSource.checkStatus();\n-                        } finally {\n-                            // release the lock acquired initially\n-                            sourceStatusThreadLock.unlock();\n-                            LOGGER.debug(\"Released lock for Source [{}] with id [{}]\",\n-                                    source,\n-                                    source.getId());\n-                        }\n-                    } else {\n-                        LOGGER.debug(\"Unable to get lock for Source [{}] with id [{}].\"\n-                                + \"  A status thread is already running.\", source, source.getId());\n                     }\n+                } else {","path":"catalog/core/catalog-core-api-impl/src/main/java/ddf/catalog/util/impl/SourcePollerRunner.java","position":113,"original_position":113,"commit_id":"af14e8abd354ba17f9c156fdec4f63f042bad75e","original_commit_id":"af14e8abd354ba17f9c156fdec4f63f042bad75e","user":{"login":"stustison","id":4391679,"avatar_url":"https://avatars.githubusercontent.com/u/4391679?v=3","gravatar_id":"","url":"https://api.github.com/users/stustison","html_url":"https://github.com/stustison","followers_url":"https://api.github.com/users/stustison/followers","following_url":"https://api.github.com/users/stustison/following{/other_user}","gists_url":"https://api.github.com/users/stustison/gists{/gist_id}","starred_url":"https://api.github.com/users/stustison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stustison/subscriptions","organizations_url":"https://api.github.com/users/stustison/orgs","repos_url":"https://api.github.com/users/stustison/repos","events_url":"https://api.github.com/users/stustison/events{/privacy}","received_events_url":"https://api.github.com/users/stustison/received_events","type":"User","site_admin":false},"body":"Fixed.","created_at":"2017-02-09T17:30:24Z","updated_at":"2017-02-09T17:30:24Z","html_url":"https://github.com/codice/ddf/pull/1665#discussion_r100362628","pull_request_url":"https://api.github.com/repos/codice/ddf/pulls/1665","_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments/100362628"},"html":{"href":"https://github.com/codice/ddf/pull/1665#discussion_r100362628"},"pull_request":{"href":"https://api.github.com/repos/codice/ddf/pulls/1665"}}},"pull_request":{"url":"https://api.github.com/repos/codice/ddf/pulls/1665","id":105450268,"html_url":"https://github.com/codice/ddf/pull/1665","diff_url":"https://github.com/codice/ddf/pull/1665.diff","patch_url":"https://github.com/codice/ddf/pull/1665.patch","issue_url":"https://api.github.com/repos/codice/ddf/issues/1665","number":1665,"state":"open","locked":false,"title":"DDF-2788, DDF-2789","user":{"login":"stustison","id":4391679,"avatar_url":"https://avatars.githubusercontent.com/u/4391679?v=3","gravatar_id":"","url":"https://api.github.com/users/stustison","html_url":"https://github.com/stustison","followers_url":"https://api.github.com/users/stustison/followers","following_url":"https://api.github.com/users/stustison/following{/other_user}","gists_url":"https://api.github.com/users/stustison/gists{/gist_id}","starred_url":"https://api.github.com/users/stustison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stustison/subscriptions","organizations_url":"https://api.github.com/users/stustison/orgs","repos_url":"https://api.github.com/users/stustison/repos","events_url":"https://api.github.com/users/stustison/events{/privacy}","received_events_url":"https://api.github.com/users/stustison/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n#### Who is reviewing it (please choose AT LEAST two reviewers that need to approve the PR before it can get merged)?\r\n@brendan-hofmann \r\n#### Select at least one member from relevant component team(s) from below (at least one component team member needs to approve the PR).\r\n#### Choose 2 committers to review/merge the PR (please choose ONLY two committers from below, delete the rest).\r\n@coyotesqrl\r\n@pklinef\r\n@stustison\r\n#### How should this be tested? (List steps with links to updated documentation)\r\n#### Any background context you want to provide?\r\n#### What are the relevant tickets?\r\n[](https://codice.atlassian.net/browse/)\r\n#### Screenshots (if appropriate)\r\n#### Checklist:\r\n- [ ] Documentation Updated\r\n- [ ] Change Log Updated\r\n- [ ] Update / Add Unit Tests\r\n- [ ] Update / Add Integration Tests\r\n","created_at":"2017-02-09T15:32:05Z","updated_at":"2017-02-09T17:30:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"771bd3289daa377fd2ac2613bf37a14946d5d6c3","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/codice/ddf/milestones/7","html_url":"https://github.com/codice/ddf/milestone/7","labels_url":"https://api.github.com/repos/codice/ddf/milestones/7/labels","id":2237993,"number":7,"title":"2.10","description":"","creator":{"login":"shaundmorris","id":4359166,"avatar_url":"https://avatars.githubusercontent.com/u/4359166?v=3","gravatar_id":"","url":"https://api.github.com/users/shaundmorris","html_url":"https://github.com/shaundmorris","followers_url":"https://api.github.com/users/shaundmorris/followers","following_url":"https://api.github.com/users/shaundmorris/following{/other_user}","gists_url":"https://api.github.com/users/shaundmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/shaundmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaundmorris/subscriptions","organizations_url":"https://api.github.com/users/shaundmorris/orgs","repos_url":"https://api.github.com/users/shaundmorris/repos","events_url":"https://api.github.com/users/shaundmorris/events{/privacy}","received_events_url":"https://api.github.com/users/shaundmorris/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":36,"state":"open","created_at":"2017-01-09T17:45:51Z","updated_at":"2017-02-09T16:34:28Z","due_on":"2017-02-08T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/codice/ddf/pulls/1665/commits","review_comments_url":"https://api.github.com/repos/codice/ddf/pulls/1665/comments","review_comment_url":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codice/ddf/issues/1665/comments","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/af14e8abd354ba17f9c156fdec4f63f042bad75e","head":{"label":"stustison:ddf2788","ref":"ddf2788","sha":"af14e8abd354ba17f9c156fdec4f63f042bad75e","user":{"login":"stustison","id":4391679,"avatar_url":"https://avatars.githubusercontent.com/u/4391679?v=3","gravatar_id":"","url":"https://api.github.com/users/stustison","html_url":"https://github.com/stustison","followers_url":"https://api.github.com/users/stustison/followers","following_url":"https://api.github.com/users/stustison/following{/other_user}","gists_url":"https://api.github.com/users/stustison/gists{/gist_id}","starred_url":"https://api.github.com/users/stustison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stustison/subscriptions","organizations_url":"https://api.github.com/users/stustison/orgs","repos_url":"https://api.github.com/users/stustison/repos","events_url":"https://api.github.com/users/stustison/events{/privacy}","received_events_url":"https://api.github.com/users/stustison/received_events","type":"User","site_admin":false},"repo":{"id":34327919,"name":"ddf","full_name":"stustison/ddf","owner":{"login":"stustison","id":4391679,"avatar_url":"https://avatars.githubusercontent.com/u/4391679?v=3","gravatar_id":"","url":"https://api.github.com/users/stustison","html_url":"https://github.com/stustison","followers_url":"https://api.github.com/users/stustison/followers","following_url":"https://api.github.com/users/stustison/following{/other_user}","gists_url":"https://api.github.com/users/stustison/gists{/gist_id}","starred_url":"https://api.github.com/users/stustison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stustison/subscriptions","organizations_url":"https://api.github.com/users/stustison/orgs","repos_url":"https://api.github.com/users/stustison/repos","events_url":"https://api.github.com/users/stustison/events{/privacy}","received_events_url":"https://api.github.com/users/stustison/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stustison/ddf","description":"The Distributed Data Framework - Distribution, SDK, and Test","fork":true,"url":"https://api.github.com/repos/stustison/ddf","forks_url":"https://api.github.com/repos/stustison/ddf/forks","keys_url":"https://api.github.com/repos/stustison/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stustison/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stustison/ddf/teams","hooks_url":"https://api.github.com/repos/stustison/ddf/hooks","issue_events_url":"https://api.github.com/repos/stustison/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/stustison/ddf/events","assignees_url":"https://api.github.com/repos/stustison/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/stustison/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/stustison/ddf/tags","blobs_url":"https://api.github.com/repos/stustison/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stustison/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stustison/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/stustison/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stustison/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/stustison/ddf/languages","stargazers_url":"https://api.github.com/repos/stustison/ddf/stargazers","contributors_url":"https://api.github.com/repos/stustison/ddf/contributors","subscribers_url":"https://api.github.com/repos/stustison/ddf/subscribers","subscription_url":"https://api.github.com/repos/stustison/ddf/subscription","commits_url":"https://api.github.com/repos/stustison/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/stustison/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/stustison/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/stustison/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/stustison/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/stustison/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stustison/ddf/merges","archive_url":"https://api.github.com/repos/stustison/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stustison/ddf/downloads","issues_url":"https://api.github.com/repos/stustison/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/stustison/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/stustison/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/stustison/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stustison/ddf/labels{/name}","releases_url":"https://api.github.com/repos/stustison/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/stustison/ddf/deployments","created_at":"2015-04-21T13:14:31Z","updated_at":"2015-04-21T13:14:32Z","pushed_at":"2017-02-09T15:30:41Z","git_url":"git://github.com/stustison/ddf.git","ssh_url":"git@github.com:stustison/ddf.git","clone_url":"https://github.com/stustison/ddf.git","svn_url":"https://github.com/stustison/ddf","homepage":"","size":152902,"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":"codice:master","ref":"master","sha":"1ab27badf54f40b72c496c198232e9a13655dac5","user":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"repo":{"id":15173563,"name":"ddf","full_name":"codice/ddf","owner":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codice/ddf","description":"Distributed Data Framework - an open source, modular integration framework.","fork":false,"url":"https://api.github.com/repos/codice/ddf","forks_url":"https://api.github.com/repos/codice/ddf/forks","keys_url":"https://api.github.com/repos/codice/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codice/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codice/ddf/teams","hooks_url":"https://api.github.com/repos/codice/ddf/hooks","issue_events_url":"https://api.github.com/repos/codice/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/codice/ddf/events","assignees_url":"https://api.github.com/repos/codice/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/codice/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/codice/ddf/tags","blobs_url":"https://api.github.com/repos/codice/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codice/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codice/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/codice/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/codice/ddf/languages","stargazers_url":"https://api.github.com/repos/codice/ddf/stargazers","contributors_url":"https://api.github.com/repos/codice/ddf/contributors","subscribers_url":"https://api.github.com/repos/codice/ddf/subscribers","subscription_url":"https://api.github.com/repos/codice/ddf/subscription","commits_url":"https://api.github.com/repos/codice/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/codice/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/codice/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/codice/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/codice/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/codice/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codice/ddf/merges","archive_url":"https://api.github.com/repos/codice/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codice/ddf/downloads","issues_url":"https://api.github.com/repos/codice/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/codice/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/codice/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/codice/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codice/ddf/labels{/name}","releases_url":"https://api.github.com/repos/codice/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/codice/ddf/deployments","created_at":"2013-12-13T20:38:28Z","updated_at":"2017-02-02T17:55:24Z","pushed_at":"2017-02-09T17:25:13Z","git_url":"git://github.com/codice/ddf.git","ssh_url":"git@github.com:codice/ddf.git","clone_url":"https://github.com/codice/ddf.git","svn_url":"https://github.com/codice/ddf","homepage":"http://ddf.codice.org","size":298824,"stargazers_count":56,"watchers_count":56,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":102,"mirror_url":null,"open_issues_count":20,"forks":102,"open_issues":20,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/1665"},"html":{"href":"https://github.com/codice/ddf/pull/1665"},"issue":{"href":"https://api.github.com/repos/codice/ddf/issues/1665"},"comments":{"href":"https://api.github.com/repos/codice/ddf/issues/1665/comments"},"review_comments":{"href":"https://api.github.com/repos/codice/ddf/pulls/1665/comments"},"review_comment":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codice/ddf/pulls/1665/commits"},"statuses":{"href":"https://api.github.com/repos/codice/ddf/statuses/af14e8abd354ba17f9c156fdec4f63f042bad75e"}}}}
{"actor":{"display_login":"stustison"}}