{"action":"created","comment":{"url":"https://api.github.com/repos/mesosphere/hdfs/pulls/comments/27333719","id":27333719,"diff_hunk":"@@ -464,15 +470,23 @@ private boolean tryToLaunchNameNode(SchedulerDriver driver, Offer offer) {\n     } else if (deadNameNodes.contains(offer.getHostname())) {\n       launch = true;\n     }\n-    if (launch) {\n-      return launchNode(\n-          driver,\n-          offer,\n-          HDFSConstants.NAME_NODE_ID,\n-          Arrays.asList(HDFSConstants.NAME_NODE_ID, HDFSConstants.ZKFC_NODE_ID),\n-          HDFSConstants.NAME_NODE_EXECUTOR_ID);\n+    if (!launch) {\n+      return false;\n     }\n-    return false;\n+\n+    String nameNodeTaskName = getNextTaskName(HDFSConstants.NAME_NODE_ID);\n+    if (nameNodeTaskName.isEmpty()) return false;","path":"src/main/java/org/apache/mesos/hdfs/Scheduler.java","position":130,"original_position":130,"commit_id":"de8cc0b16345070df59358ab8a48daaa1b2467b6","original_commit_id":"de8cc0b16345070df59358ab8a48daaa1b2467b6","user":{"login":"elingg","id":8423887,"avatar_url":"https://avatars.githubusercontent.com/u/8423887?v=3","gravatar_id":"","url":"https://api.github.com/users/elingg","html_url":"https://github.com/elingg","followers_url":"https://api.github.com/users/elingg/followers","following_url":"https://api.github.com/users/elingg/following{/other_user}","gists_url":"https://api.github.com/users/elingg/gists{/gist_id}","starred_url":"https://api.github.com/users/elingg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elingg/subscriptions","organizations_url":"https://api.github.com/users/elingg/orgs","repos_url":"https://api.github.com/users/elingg/repos","events_url":"https://api.github.com/users/elingg/events{/privacy}","received_events_url":"https://api.github.com/users/elingg/received_events","type":"User","site_admin":false},"body":"To be consistent with our style here, we need to use brackets and put return false on the next line. We want to keep our style consistent throughout the project ideally.","created_at":"2015-03-27T21:51:46Z","updated_at":"2015-03-27T21:51:46Z","html_url":"https://github.com/mesosphere/hdfs/pull/113#discussion_r27333719","pull_request_url":"https://api.github.com/repos/mesosphere/hdfs/pulls/113","_links":{"self":{"href":"https://api.github.com/repos/mesosphere/hdfs/pulls/comments/27333719"},"html":{"href":"https://github.com/mesosphere/hdfs/pull/113#discussion_r27333719"},"pull_request":{"href":"https://api.github.com/repos/mesosphere/hdfs/pulls/113"}}},"pull_request":{"url":"https://api.github.com/repos/mesosphere/hdfs/pulls/113","id":32125020,"html_url":"https://github.com/mesosphere/hdfs/pull/113","diff_url":"https://github.com/mesosphere/hdfs/pull/113.diff","patch_url":"https://github.com/mesosphere/hdfs/pull/113.patch","issue_url":"https://api.github.com/repos/mesosphere/hdfs/issues/113","number":113,"state":"open","locked":false,"title":"Process builder","user":{"login":"abhay-agarwal","id":673671,"avatar_url":"https://avatars.githubusercontent.com/u/673671?v=3","gravatar_id":"","url":"https://api.github.com/users/abhay-agarwal","html_url":"https://github.com/abhay-agarwal","followers_url":"https://api.github.com/users/abhay-agarwal/followers","following_url":"https://api.github.com/users/abhay-agarwal/following{/other_user}","gists_url":"https://api.github.com/users/abhay-agarwal/gists{/gist_id}","starred_url":"https://api.github.com/users/abhay-agarwal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhay-agarwal/subscriptions","organizations_url":"https://api.github.com/users/abhay-agarwal/orgs","repos_url":"https://api.github.com/users/abhay-agarwal/repos","events_url":"https://api.github.com/users/abhay-agarwal/events{/privacy}","received_events_url":"https://api.github.com/users/abhay-agarwal/received_events","type":"User","site_admin":false},"body":"Adding ProcessBuilder commands instead of Runtime commands and fixing bug that created extra ExecutorInfo","created_at":"2015-03-27T16:54:58Z","updated_at":"2015-03-27T21:51:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5590dbee18f3f7d060264f4790916a4d9b0e17d0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mesosphere/hdfs/pulls/113/commits","review_comments_url":"https://api.github.com/repos/mesosphere/hdfs/pulls/113/comments","review_comment_url":"https://api.github.com/repos/mesosphere/hdfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesosphere/hdfs/issues/113/comments","statuses_url":"https://api.github.com/repos/mesosphere/hdfs/statuses/de8cc0b16345070df59358ab8a48daaa1b2467b6","head":{"label":"mesosphere:process-builder","ref":"process-builder","sha":"de8cc0b16345070df59358ab8a48daaa1b2467b6","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":25594400,"name":"hdfs","full_name":"mesosphere/hdfs","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/hdfs","description":"HA HDFS on Apache Mesos  ~~~  aka 'Super Available' HDFS","fork":true,"url":"https://api.github.com/repos/mesosphere/hdfs","forks_url":"https://api.github.com/repos/mesosphere/hdfs/forks","keys_url":"https://api.github.com/repos/mesosphere/hdfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/hdfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/hdfs/teams","hooks_url":"https://api.github.com/repos/mesosphere/hdfs/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/hdfs/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/hdfs/events","assignees_url":"https://api.github.com/repos/mesosphere/hdfs/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/hdfs/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/hdfs/tags","blobs_url":"https://api.github.com/repos/mesosphere/hdfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/hdfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/hdfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/hdfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/hdfs/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/hdfs/languages","stargazers_url":"https://api.github.com/repos/mesosphere/hdfs/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/hdfs/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/hdfs/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/hdfs/subscription","commits_url":"https://api.github.com/repos/mesosphere/hdfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/hdfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/hdfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/hdfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/hdfs/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/hdfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/hdfs/merges","archive_url":"https://api.github.com/repos/mesosphere/hdfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/hdfs/downloads","issues_url":"https://api.github.com/repos/mesosphere/hdfs/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/hdfs/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/hdfs/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/hdfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/hdfs/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/hdfs/releases{/id}","created_at":"2014-10-22T17:21:52Z","updated_at":"2015-03-27T01:40:45Z","pushed_at":"2015-03-27T21:41:14Z","git_url":"git://github.com/mesosphere/hdfs.git","ssh_url":"git@github.com:mesosphere/hdfs.git","clone_url":"https://github.com/mesosphere/hdfs.git","svn_url":"https://github.com/mesosphere/hdfs","homepage":"","size":2413,"stargazers_count":50,"watchers_count":50,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":35,"forks":10,"open_issues":35,"watchers":50,"default_branch":"master"}},"base":{"label":"mesosphere:master","ref":"master","sha":"8c3378f5c8a67194e81cb3901c386205aa0d792b","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":25594400,"name":"hdfs","full_name":"mesosphere/hdfs","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/hdfs","description":"HA HDFS on Apache Mesos  ~~~  aka 'Super Available' HDFS","fork":true,"url":"https://api.github.com/repos/mesosphere/hdfs","forks_url":"https://api.github.com/repos/mesosphere/hdfs/forks","keys_url":"https://api.github.com/repos/mesosphere/hdfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/hdfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/hdfs/teams","hooks_url":"https://api.github.com/repos/mesosphere/hdfs/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/hdfs/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/hdfs/events","assignees_url":"https://api.github.com/repos/mesosphere/hdfs/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/hdfs/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/hdfs/tags","blobs_url":"https://api.github.com/repos/mesosphere/hdfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/hdfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/hdfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/hdfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/hdfs/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/hdfs/languages","stargazers_url":"https://api.github.com/repos/mesosphere/hdfs/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/hdfs/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/hdfs/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/hdfs/subscription","commits_url":"https://api.github.com/repos/mesosphere/hdfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/hdfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/hdfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/hdfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/hdfs/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/hdfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/hdfs/merges","archive_url":"https://api.github.com/repos/mesosphere/hdfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/hdfs/downloads","issues_url":"https://api.github.com/repos/mesosphere/hdfs/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/hdfs/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/hdfs/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/hdfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/hdfs/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/hdfs/releases{/id}","created_at":"2014-10-22T17:21:52Z","updated_at":"2015-03-27T01:40:45Z","pushed_at":"2015-03-27T21:41:14Z","git_url":"git://github.com/mesosphere/hdfs.git","ssh_url":"git@github.com:mesosphere/hdfs.git","clone_url":"https://github.com/mesosphere/hdfs.git","svn_url":"https://github.com/mesosphere/hdfs","homepage":"","size":2413,"stargazers_count":50,"watchers_count":50,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":35,"forks":10,"open_issues":35,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesosphere/hdfs/pulls/113"},"html":{"href":"https://github.com/mesosphere/hdfs/pull/113"},"issue":{"href":"https://api.github.com/repos/mesosphere/hdfs/issues/113"},"comments":{"href":"https://api.github.com/repos/mesosphere/hdfs/issues/113/comments"},"review_comments":{"href":"https://api.github.com/repos/mesosphere/hdfs/pulls/113/comments"},"review_comment":{"href":"https://api.github.com/repos/mesosphere/hdfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesosphere/hdfs/pulls/113/commits"},"statuses":{"href":"https://api.github.com/repos/mesosphere/hdfs/statuses/de8cc0b16345070df59358ab8a48daaa1b2467b6"}}}}