{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-reef/pulls/comments/37507844","id":37507844,"diff_hunk":"@@ -231,9 +285,20 @@ public Identifier getNetworkConnectionServiceId() {\n \n   @Override\n   public void close() throws Exception {\n-    LOG.log(Level.FINE, \"Shutting down\");\n-    this.nameServiceRegisteringStage.close();\n-    this.nameServiceUnregisteringStage.close();\n-    this.transport.close();\n+    if (isClosed.compareAndSet(false , true)) {\n+      LOG.log(Level.FINE, \"Shutting down\");\n+      this.nameServiceRegisteringStage.close();\n+      this.nameServiceUnregisteringStage.close();","path":"lang/java/reef-io/src/main/java/org/apache/reef/io/network/impl/NetworkConnectionServiceImpl.java","position":138,"original_position":138,"commit_id":"9dcb42dec4a8ca0a124b034ca95141f1ea4d8147","original_commit_id":"9dcb42dec4a8ca0a124b034ca95141f1ea4d8147","user":{"login":"dafrista","id":1514239,"avatar_url":"https://avatars.githubusercontent.com/u/1514239?v=3","gravatar_id":"","url":"https://api.github.com/users/dafrista","html_url":"https://github.com/dafrista","followers_url":"https://api.github.com/users/dafrista/followers","following_url":"https://api.github.com/users/dafrista/following{/other_user}","gists_url":"https://api.github.com/users/dafrista/gists{/gist_id}","starred_url":"https://api.github.com/users/dafrista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dafrista/subscriptions","organizations_url":"https://api.github.com/users/dafrista/orgs","repos_url":"https://api.github.com/users/dafrista/repos","events_url":"https://api.github.com/users/dafrista/events{/privacy}","received_events_url":"https://api.github.com/users/dafrista/received_events","type":"User","site_admin":false},"body":"We are closing the stage here, then using it below in `unregisterAllConnectionFactories()`. The order should be reversed.","created_at":"2015-08-20T08:54:20Z","updated_at":"2015-08-20T08:54:20Z","html_url":"https://github.com/apache/incubator-reef/pull/389#discussion_r37507844","pull_request_url":"https://api.github.com/repos/apache/incubator-reef/pulls/389","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-reef/pulls/comments/37507844"},"html":{"href":"https://github.com/apache/incubator-reef/pull/389#discussion_r37507844"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-reef/pulls/389"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-reef/pulls/389","id":42895912,"html_url":"https://github.com/apache/incubator-reef/pull/389","diff_url":"https://github.com/apache/incubator-reef/pull/389.diff","patch_url":"https://github.com/apache/incubator-reef/pull/389.patch","issue_url":"https://api.github.com/repos/apache/incubator-reef/issues/389","number":389,"state":"open","locked":false,"title":"[REEF-610] Make NetworkConnectionService be able to register multiple identifiers.","user":{"login":"gwsshs22","id":4763030,"avatar_url":"https://avatars.githubusercontent.com/u/4763030?v=3","gravatar_id":"","url":"https://api.github.com/users/gwsshs22","html_url":"https://github.com/gwsshs22","followers_url":"https://api.github.com/users/gwsshs22/followers","following_url":"https://api.github.com/users/gwsshs22/following{/other_user}","gists_url":"https://api.github.com/users/gwsshs22/gists{/gist_id}","starred_url":"https://api.github.com/users/gwsshs22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwsshs22/subscriptions","organizations_url":"https://api.github.com/users/gwsshs22/orgs","repos_url":"https://api.github.com/users/gwsshs22/repos","events_url":"https://api.github.com/users/gwsshs22/events{/privacy}","received_events_url":"https://api.github.com/users/gwsshs22/received_events","type":"User","site_admin":false},"body":"This addressed the issue by\r\n * Deprecated registerId/unregisterId/getNetworkConnectionServiceId methods of NCS.\r\n * Deprecated [Unbind|Bind]NetworkConnectionServiceFromTask classes.\r\n * Changed tests not to use deprecated methods.\r\n * Made each NetworkConnectionFacory has own end point identifier.","created_at":"2015-08-20T06:34:35Z","updated_at":"2015-08-20T08:54:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"333c1f5105e2bed30e5b9ba62620d975d3e26011","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-reef/pulls/389/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-reef/pulls/389/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-reef/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-reef/issues/389/comments","statuses_url":"https://api.github.com/repos/apache/incubator-reef/statuses/9dcb42dec4a8ca0a124b034ca95141f1ea4d8147","head":{"label":"gwsshs22:REEF-610","ref":"REEF-610","sha":"9dcb42dec4a8ca0a124b034ca95141f1ea4d8147","user":{"login":"gwsshs22","id":4763030,"avatar_url":"https://avatars.githubusercontent.com/u/4763030?v=3","gravatar_id":"","url":"https://api.github.com/users/gwsshs22","html_url":"https://github.com/gwsshs22","followers_url":"https://api.github.com/users/gwsshs22/followers","following_url":"https://api.github.com/users/gwsshs22/following{/other_user}","gists_url":"https://api.github.com/users/gwsshs22/gists{/gist_id}","starred_url":"https://api.github.com/users/gwsshs22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwsshs22/subscriptions","organizations_url":"https://api.github.com/users/gwsshs22/orgs","repos_url":"https://api.github.com/users/gwsshs22/repos","events_url":"https://api.github.com/users/gwsshs22/events{/privacy}","received_events_url":"https://api.github.com/users/gwsshs22/received_events","type":"User","site_admin":false},"repo":{"id":39988274,"name":"incubator-reef","full_name":"gwsshs22/incubator-reef","owner":{"login":"gwsshs22","id":4763030,"avatar_url":"https://avatars.githubusercontent.com/u/4763030?v=3","gravatar_id":"","url":"https://api.github.com/users/gwsshs22","html_url":"https://github.com/gwsshs22","followers_url":"https://api.github.com/users/gwsshs22/followers","following_url":"https://api.github.com/users/gwsshs22/following{/other_user}","gists_url":"https://api.github.com/users/gwsshs22/gists{/gist_id}","starred_url":"https://api.github.com/users/gwsshs22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwsshs22/subscriptions","organizations_url":"https://api.github.com/users/gwsshs22/orgs","repos_url":"https://api.github.com/users/gwsshs22/repos","events_url":"https://api.github.com/users/gwsshs22/events{/privacy}","received_events_url":"https://api.github.com/users/gwsshs22/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gwsshs22/incubator-reef","description":"Mirror of Apache REEF (Incubating)","fork":true,"url":"https://api.github.com/repos/gwsshs22/incubator-reef","forks_url":"https://api.github.com/repos/gwsshs22/incubator-reef/forks","keys_url":"https://api.github.com/repos/gwsshs22/incubator-reef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gwsshs22/incubator-reef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gwsshs22/incubator-reef/teams","hooks_url":"https://api.github.com/repos/gwsshs22/incubator-reef/hooks","issue_events_url":"https://api.github.com/repos/gwsshs22/incubator-reef/issues/events{/number}","events_url":"https://api.github.com/repos/gwsshs22/incubator-reef/events","assignees_url":"https://api.github.com/repos/gwsshs22/incubator-reef/assignees{/user}","branches_url":"https://api.github.com/repos/gwsshs22/incubator-reef/branches{/branch}","tags_url":"https://api.github.com/repos/gwsshs22/incubator-reef/tags","blobs_url":"https://api.github.com/repos/gwsshs22/incubator-reef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gwsshs22/incubator-reef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gwsshs22/incubator-reef/git/refs{/sha}","trees_url":"https://api.github.com/repos/gwsshs22/incubator-reef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gwsshs22/incubator-reef/statuses/{sha}","languages_url":"https://api.github.com/repos/gwsshs22/incubator-reef/languages","stargazers_url":"https://api.github.com/repos/gwsshs22/incubator-reef/stargazers","contributors_url":"https://api.github.com/repos/gwsshs22/incubator-reef/contributors","subscribers_url":"https://api.github.com/repos/gwsshs22/incubator-reef/subscribers","subscription_url":"https://api.github.com/repos/gwsshs22/incubator-reef/subscription","commits_url":"https://api.github.com/repos/gwsshs22/incubator-reef/commits{/sha}","git_commits_url":"https://api.github.com/repos/gwsshs22/incubator-reef/git/commits{/sha}","comments_url":"https://api.github.com/repos/gwsshs22/incubator-reef/comments{/number}","issue_comment_url":"https://api.github.com/repos/gwsshs22/incubator-reef/issues/comments{/number}","contents_url":"https://api.github.com/repos/gwsshs22/incubator-reef/contents/{+path}","compare_url":"https://api.github.com/repos/gwsshs22/incubator-reef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gwsshs22/incubator-reef/merges","archive_url":"https://api.github.com/repos/gwsshs22/incubator-reef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gwsshs22/incubator-reef/downloads","issues_url":"https://api.github.com/repos/gwsshs22/incubator-reef/issues{/number}","pulls_url":"https://api.github.com/repos/gwsshs22/incubator-reef/pulls{/number}","milestones_url":"https://api.github.com/repos/gwsshs22/incubator-reef/milestones{/number}","notifications_url":"https://api.github.com/repos/gwsshs22/incubator-reef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gwsshs22/incubator-reef/labels{/name}","releases_url":"https://api.github.com/repos/gwsshs22/incubator-reef/releases{/id}","created_at":"2015-07-31T05:27:17Z","updated_at":"2015-07-31T05:27:23Z","pushed_at":"2015-08-20T07:49:41Z","git_url":"git://github.com/gwsshs22/incubator-reef.git","ssh_url":"git@github.com:gwsshs22/incubator-reef.git","clone_url":"https://github.com/gwsshs22/incubator-reef.git","svn_url":"https://github.com/gwsshs22/incubator-reef","homepage":null,"size":30688,"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:master","ref":"master","sha":"2a453f64a278d68ea0b578be4beb618c6e6410fb","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":25623941,"name":"incubator-reef","full_name":"apache/incubator-reef","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/incubator-reef","description":"Mirror of Apache REEF (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-reef","forks_url":"https://api.github.com/repos/apache/incubator-reef/forks","keys_url":"https://api.github.com/repos/apache/incubator-reef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-reef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-reef/teams","hooks_url":"https://api.github.com/repos/apache/incubator-reef/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-reef/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-reef/events","assignees_url":"https://api.github.com/repos/apache/incubator-reef/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-reef/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-reef/tags","blobs_url":"https://api.github.com/repos/apache/incubator-reef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-reef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-reef/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-reef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-reef/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-reef/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-reef/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-reef/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-reef/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-reef/subscription","commits_url":"https://api.github.com/repos/apache/incubator-reef/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-reef/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-reef/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-reef/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-reef/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-reef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-reef/merges","archive_url":"https://api.github.com/repos/apache/incubator-reef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-reef/downloads","issues_url":"https://api.github.com/repos/apache/incubator-reef/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-reef/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-reef/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-reef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-reef/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-reef/releases{/id}","created_at":"2014-10-23T07:00:10Z","updated_at":"2015-08-04T17:05:33Z","pushed_at":"2015-08-20T06:34:35Z","git_url":"git://github.com/apache/incubator-reef.git","ssh_url":"git@github.com:apache/incubator-reef.git","clone_url":"https://github.com/apache/incubator-reef.git","svn_url":"https://github.com/apache/incubator-reef","homepage":null,"size":43223,"stargazers_count":24,"watchers_count":24,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":33,"mirror_url":"git://git.apache.org/incubator-reef.git","open_issues_count":7,"forks":33,"open_issues":7,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-reef/pulls/389"},"html":{"href":"https://github.com/apache/incubator-reef/pull/389"},"issue":{"href":"https://api.github.com/repos/apache/incubator-reef/issues/389"},"comments":{"href":"https://api.github.com/repos/apache/incubator-reef/issues/389/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-reef/pulls/389/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-reef/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-reef/pulls/389/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-reef/statuses/9dcb42dec4a8ca0a124b034ca95141f1ea4d8147"}}}}