{"action":"created","comment":{"url":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments/93715527","pull_request_review_id":14249319,"id":93715527,"diff_hunk":"@@ -397,6 +410,39 @@ private void launchWorkerContainer(Container container) {\n     }\n   }\n \n+  /**\n+   * Checks if an Alluxio master node is already running\n+   * or not on the master address given.\n+   *\n+   * @return true if master exists, false otherwise\n+   */\n+  private boolean masterExists() {\n+\n+    String webPort = Configuration.get(PropertyKey.MASTER_WEB_PORT);\n+\n+    try {\n+      URL myURL = new URL(\"http://\" + mMasterAddress + \":\" + webPort + Constants.REST_API_PREFIX + \"/master/version\");\n+      LOG.debug(\"Checking for master at: \" + myURL.toString());\n+      HttpURLConnection connection = (HttpURLConnection) myURL.openConnection();\n+      connection.setRequestMethod(HttpMethod.GET);\n+      int resCode = connection.getResponseCode();\n+      LOG.debug(\"Response code from master was: \" + Integer.toString(resCode));\n+\n+      if (resCode == HttpURLConnection.HTTP_OK) {\n+        connection.disconnect();\n+        return true;\n+      } else {\n+        connection.disconnect();\n+      }\n+    } catch (MalformedURLException e) {\n+      LOG.error(\"Malformed URL in attempt to check if master is running already\", e);\n+    } catch (IOException e) {\n+      LOG.debug(\"Unable to open connection to master in attempt to check if already running\", e);","path":"integration/yarn/src/main/java/alluxio/yarn/ApplicationMaster.java","position":73,"original_position":73,"commit_id":"e42c993a53309467833cf48884ef160689ba87e1","original_commit_id":"e42c993a53309467833cf48884ef160689ba87e1","user":{"login":"yupeng9","id":13425258,"avatar_url":"https://avatars.githubusercontent.com/u/13425258?v=3","gravatar_id":"","url":"https://api.github.com/users/yupeng9","html_url":"https://github.com/yupeng9","followers_url":"https://api.github.com/users/yupeng9/followers","following_url":"https://api.github.com/users/yupeng9/following{/other_user}","gists_url":"https://api.github.com/users/yupeng9/gists{/gist_id}","starred_url":"https://api.github.com/users/yupeng9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yupeng9/subscriptions","organizations_url":"https://api.github.com/users/yupeng9/orgs","repos_url":"https://api.github.com/users/yupeng9/repos","events_url":"https://api.github.com/users/yupeng9/events{/privacy}","received_events_url":"https://api.github.com/users/yupeng9/received_events","type":"User","site_admin":false},"body":"Shall this be `LOG.error`, too?","created_at":"2016-12-22T23:52:58Z","updated_at":"2016-12-22T23:54:53Z","html_url":"https://github.com/Alluxio/alluxio/pull/4451#discussion_r93715527","pull_request_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/4451","_links":{"self":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments/93715527"},"html":{"href":"https://github.com/Alluxio/alluxio/pull/4451#discussion_r93715527"},"pull_request":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/4451"}}},"pull_request":{"url":"https://api.github.com/repos/Alluxio/alluxio/pulls/4451","id":98262871,"html_url":"https://github.com/Alluxio/alluxio/pull/4451","diff_url":"https://github.com/Alluxio/alluxio/pull/4451.diff","patch_url":"https://github.com/Alluxio/alluxio/pull/4451.patch","issue_url":"https://api.github.com/repos/Alluxio/alluxio/issues/4451","number":4451,"state":"open","locked":false,"title":"[ALLUXIO-2452] Added support for starting a Master node outside of Yarn","user":{"login":"maxirus","id":1676208,"avatar_url":"https://avatars.githubusercontent.com/u/1676208?v=3","gravatar_id":"","url":"https://api.github.com/users/maxirus","html_url":"https://github.com/maxirus","followers_url":"https://api.github.com/users/maxirus/followers","following_url":"https://api.github.com/users/maxirus/following{/other_user}","gists_url":"https://api.github.com/users/maxirus/gists{/gist_id}","starred_url":"https://api.github.com/users/maxirus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxirus/subscriptions","organizations_url":"https://api.github.com/users/maxirus/orgs","repos_url":"https://api.github.com/users/maxirus/repos","events_url":"https://api.github.com/users/maxirus/events{/privacy}","received_events_url":"https://api.github.com/users/maxirus/received_events","type":"User","site_admin":false},"body":"Adding support for starting a Master node outside of Yarn while keeping Worker nodes in Yarn. This update allows the ApplicationMaster to detect if a Master node is running on the given Alluxio Master Hostname and then skips provisioning one in Yarn if one is running.\r\n\r\nThis is useful for EMR users as it allows them to run Alluxio Master on the EMR Master Instance and then utilize all the Core Instances for Worker nodes.\r\n\r\nJIRA Link: https://alluxio.atlassian.net/browse/ALLUXIO-2452","created_at":"2016-12-16T01:17:18Z","updated_at":"2016-12-22T23:54:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff76b3c366f84884528a87b51db62e22c5f97795","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/4451/commits","review_comments_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/4451/comments","review_comment_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Alluxio/alluxio/issues/4451/comments","statuses_url":"https://api.github.com/repos/Alluxio/alluxio/statuses/e42c993a53309467833cf48884ef160689ba87e1","head":{"label":"maxirus:master","ref":"master","sha":"e42c993a53309467833cf48884ef160689ba87e1","user":{"login":"maxirus","id":1676208,"avatar_url":"https://avatars.githubusercontent.com/u/1676208?v=3","gravatar_id":"","url":"https://api.github.com/users/maxirus","html_url":"https://github.com/maxirus","followers_url":"https://api.github.com/users/maxirus/followers","following_url":"https://api.github.com/users/maxirus/following{/other_user}","gists_url":"https://api.github.com/users/maxirus/gists{/gist_id}","starred_url":"https://api.github.com/users/maxirus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxirus/subscriptions","organizations_url":"https://api.github.com/users/maxirus/orgs","repos_url":"https://api.github.com/users/maxirus/repos","events_url":"https://api.github.com/users/maxirus/events{/privacy}","received_events_url":"https://api.github.com/users/maxirus/received_events","type":"User","site_admin":false},"repo":{"id":75204899,"name":"alluxio","full_name":"maxirus/alluxio","owner":{"login":"maxirus","id":1676208,"avatar_url":"https://avatars.githubusercontent.com/u/1676208?v=3","gravatar_id":"","url":"https://api.github.com/users/maxirus","html_url":"https://github.com/maxirus","followers_url":"https://api.github.com/users/maxirus/followers","following_url":"https://api.github.com/users/maxirus/following{/other_user}","gists_url":"https://api.github.com/users/maxirus/gists{/gist_id}","starred_url":"https://api.github.com/users/maxirus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxirus/subscriptions","organizations_url":"https://api.github.com/users/maxirus/orgs","repos_url":"https://api.github.com/users/maxirus/repos","events_url":"https://api.github.com/users/maxirus/events{/privacy}","received_events_url":"https://api.github.com/users/maxirus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maxirus/alluxio","description":"Alluxio, formerly Tachyon, A Virtual Distributed Storage at Memory Speed","fork":true,"url":"https://api.github.com/repos/maxirus/alluxio","forks_url":"https://api.github.com/repos/maxirus/alluxio/forks","keys_url":"https://api.github.com/repos/maxirus/alluxio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maxirus/alluxio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maxirus/alluxio/teams","hooks_url":"https://api.github.com/repos/maxirus/alluxio/hooks","issue_events_url":"https://api.github.com/repos/maxirus/alluxio/issues/events{/number}","events_url":"https://api.github.com/repos/maxirus/alluxio/events","assignees_url":"https://api.github.com/repos/maxirus/alluxio/assignees{/user}","branches_url":"https://api.github.com/repos/maxirus/alluxio/branches{/branch}","tags_url":"https://api.github.com/repos/maxirus/alluxio/tags","blobs_url":"https://api.github.com/repos/maxirus/alluxio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maxirus/alluxio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maxirus/alluxio/git/refs{/sha}","trees_url":"https://api.github.com/repos/maxirus/alluxio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maxirus/alluxio/statuses/{sha}","languages_url":"https://api.github.com/repos/maxirus/alluxio/languages","stargazers_url":"https://api.github.com/repos/maxirus/alluxio/stargazers","contributors_url":"https://api.github.com/repos/maxirus/alluxio/contributors","subscribers_url":"https://api.github.com/repos/maxirus/alluxio/subscribers","subscription_url":"https://api.github.com/repos/maxirus/alluxio/subscription","commits_url":"https://api.github.com/repos/maxirus/alluxio/commits{/sha}","git_commits_url":"https://api.github.com/repos/maxirus/alluxio/git/commits{/sha}","comments_url":"https://api.github.com/repos/maxirus/alluxio/comments{/number}","issue_comment_url":"https://api.github.com/repos/maxirus/alluxio/issues/comments{/number}","contents_url":"https://api.github.com/repos/maxirus/alluxio/contents/{+path}","compare_url":"https://api.github.com/repos/maxirus/alluxio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maxirus/alluxio/merges","archive_url":"https://api.github.com/repos/maxirus/alluxio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maxirus/alluxio/downloads","issues_url":"https://api.github.com/repos/maxirus/alluxio/issues{/number}","pulls_url":"https://api.github.com/repos/maxirus/alluxio/pulls{/number}","milestones_url":"https://api.github.com/repos/maxirus/alluxio/milestones{/number}","notifications_url":"https://api.github.com/repos/maxirus/alluxio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maxirus/alluxio/labels{/name}","releases_url":"https://api.github.com/repos/maxirus/alluxio/releases{/id}","deployments_url":"https://api.github.com/repos/maxirus/alluxio/deployments","created_at":"2016-11-30T16:22:22Z","updated_at":"2016-11-30T16:22:28Z","pushed_at":"2016-12-22T02:35:32Z","git_url":"git://github.com/maxirus/alluxio.git","ssh_url":"git@github.com:maxirus/alluxio.git","clone_url":"https://github.com/maxirus/alluxio.git","svn_url":"https://github.com/maxirus/alluxio","homepage":"http://www.alluxio.org/","size":63915,"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":"Alluxio:master","ref":"master","sha":"85818866b26b48139e036340103031d1a55f04bc","user":{"login":"Alluxio","id":16203694,"avatar_url":"https://avatars.githubusercontent.com/u/16203694?v=3","gravatar_id":"","url":"https://api.github.com/users/Alluxio","html_url":"https://github.com/Alluxio","followers_url":"https://api.github.com/users/Alluxio/followers","following_url":"https://api.github.com/users/Alluxio/following{/other_user}","gists_url":"https://api.github.com/users/Alluxio/gists{/gist_id}","starred_url":"https://api.github.com/users/Alluxio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alluxio/subscriptions","organizations_url":"https://api.github.com/users/Alluxio/orgs","repos_url":"https://api.github.com/users/Alluxio/repos","events_url":"https://api.github.com/users/Alluxio/events{/privacy}","received_events_url":"https://api.github.com/users/Alluxio/received_events","type":"Organization","site_admin":false},"repo":{"id":7276954,"name":"alluxio","full_name":"Alluxio/alluxio","owner":{"login":"Alluxio","id":16203694,"avatar_url":"https://avatars.githubusercontent.com/u/16203694?v=3","gravatar_id":"","url":"https://api.github.com/users/Alluxio","html_url":"https://github.com/Alluxio","followers_url":"https://api.github.com/users/Alluxio/followers","following_url":"https://api.github.com/users/Alluxio/following{/other_user}","gists_url":"https://api.github.com/users/Alluxio/gists{/gist_id}","starred_url":"https://api.github.com/users/Alluxio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alluxio/subscriptions","organizations_url":"https://api.github.com/users/Alluxio/orgs","repos_url":"https://api.github.com/users/Alluxio/repos","events_url":"https://api.github.com/users/Alluxio/events{/privacy}","received_events_url":"https://api.github.com/users/Alluxio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Alluxio/alluxio","description":"Alluxio, formerly Tachyon, A Virtual Distributed Storage at Memory Speed","fork":false,"url":"https://api.github.com/repos/Alluxio/alluxio","forks_url":"https://api.github.com/repos/Alluxio/alluxio/forks","keys_url":"https://api.github.com/repos/Alluxio/alluxio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alluxio/alluxio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alluxio/alluxio/teams","hooks_url":"https://api.github.com/repos/Alluxio/alluxio/hooks","issue_events_url":"https://api.github.com/repos/Alluxio/alluxio/issues/events{/number}","events_url":"https://api.github.com/repos/Alluxio/alluxio/events","assignees_url":"https://api.github.com/repos/Alluxio/alluxio/assignees{/user}","branches_url":"https://api.github.com/repos/Alluxio/alluxio/branches{/branch}","tags_url":"https://api.github.com/repos/Alluxio/alluxio/tags","blobs_url":"https://api.github.com/repos/Alluxio/alluxio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alluxio/alluxio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alluxio/alluxio/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alluxio/alluxio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alluxio/alluxio/statuses/{sha}","languages_url":"https://api.github.com/repos/Alluxio/alluxio/languages","stargazers_url":"https://api.github.com/repos/Alluxio/alluxio/stargazers","contributors_url":"https://api.github.com/repos/Alluxio/alluxio/contributors","subscribers_url":"https://api.github.com/repos/Alluxio/alluxio/subscribers","subscription_url":"https://api.github.com/repos/Alluxio/alluxio/subscription","commits_url":"https://api.github.com/repos/Alluxio/alluxio/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alluxio/alluxio/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alluxio/alluxio/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alluxio/alluxio/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alluxio/alluxio/contents/{+path}","compare_url":"https://api.github.com/repos/Alluxio/alluxio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alluxio/alluxio/merges","archive_url":"https://api.github.com/repos/Alluxio/alluxio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alluxio/alluxio/downloads","issues_url":"https://api.github.com/repos/Alluxio/alluxio/issues{/number}","pulls_url":"https://api.github.com/repos/Alluxio/alluxio/pulls{/number}","milestones_url":"https://api.github.com/repos/Alluxio/alluxio/milestones{/number}","notifications_url":"https://api.github.com/repos/Alluxio/alluxio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alluxio/alluxio/labels{/name}","releases_url":"https://api.github.com/repos/Alluxio/alluxio/releases{/id}","deployments_url":"https://api.github.com/repos/Alluxio/alluxio/deployments","created_at":"2012-12-21T17:43:46Z","updated_at":"2016-12-22T14:31:40Z","pushed_at":"2016-12-22T23:52:53Z","git_url":"git://github.com/Alluxio/alluxio.git","ssh_url":"git@github.com:Alluxio/alluxio.git","clone_url":"https://github.com/Alluxio/alluxio.git","svn_url":"https://github.com/Alluxio/alluxio","homepage":"http://www.alluxio.org/","size":64286,"stargazers_count":2772,"watchers_count":2772,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1259,"mirror_url":null,"open_issues_count":20,"forks":1259,"open_issues":20,"watchers":2772,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/4451"},"html":{"href":"https://github.com/Alluxio/alluxio/pull/4451"},"issue":{"href":"https://api.github.com/repos/Alluxio/alluxio/issues/4451"},"comments":{"href":"https://api.github.com/repos/Alluxio/alluxio/issues/4451/comments"},"review_comments":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/4451/comments"},"review_comment":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/4451/commits"},"statuses":{"href":"https://api.github.com/repos/Alluxio/alluxio/statuses/e42c993a53309467833cf48884ef160689ba87e1"}}}}
{"actor":{"display_login":"yupeng9"}}