{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/122921443","pull_request_review_id":45074960,"id":122921443,"diff_hunk":"@@ -704,6 +707,43 @@ class MasterSuite extends SparkFunSuite\n   private def getState(master: Master): RecoveryState.Value = {\n     master.invokePrivate(_state())\n   }\n+\n+  test(\"Total cores is not divisible by cores per executor\") {","path":"core/src/test/scala/org/apache/spark/deploy/master/MasterSuite.scala","position":15,"original_position":15,"commit_id":"46f54ccba7f8a9185c8a9e0c89720f3de254f2ea","original_commit_id":"46f54ccba7f8a9185c8a9e0c89720f3de254f2ea","user":{"login":"jerryshao","id":850797,"avatar_url":"https://avatars1.githubusercontent.com/u/850797?v=3","gravatar_id":"","url":"https://api.github.com/users/jerryshao","html_url":"https://github.com/jerryshao","followers_url":"https://api.github.com/users/jerryshao/followers","following_url":"https://api.github.com/users/jerryshao/following{/other_user}","gists_url":"https://api.github.com/users/jerryshao/gists{/gist_id}","starred_url":"https://api.github.com/users/jerryshao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerryshao/subscriptions","organizations_url":"https://api.github.com/users/jerryshao/orgs","repos_url":"https://api.github.com/users/jerryshao/repos","events_url":"https://api.github.com/users/jerryshao/events{/privacy}","received_events_url":"https://api.github.com/users/jerryshao/received_events","type":"User","site_admin":false},"body":"IIUC I don't think this UT really reflects the code you changed in `Master`, even with the original code this two UTs should also be passed. I think you should test if the logics you changed is executed or not.","created_at":"2017-06-20T09:15:23Z","updated_at":"2017-06-20T09:18:10Z","html_url":"https://github.com/apache/spark/pull/18322#discussion_r122921443","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/18322","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/122921443"},"html":{"href":"https://github.com/apache/spark/pull/18322#discussion_r122921443"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/18322"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/18322","id":125964528,"html_url":"https://github.com/apache/spark/pull/18322","diff_url":"https://github.com/apache/spark/pull/18322.diff","patch_url":"https://github.com/apache/spark/pull/18322.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/18322","number":18322,"state":"open","locked":false,"title":"[SPARK-21115][Core]If the cores left is less than the coresPerExecutor,the cores left will not be allocated, so it should not to check in every schedule","user":{"login":"eatoncys","id":26834091,"avatar_url":"https://avatars0.githubusercontent.com/u/26834091?v=3","gravatar_id":"","url":"https://api.github.com/users/eatoncys","html_url":"https://github.com/eatoncys","followers_url":"https://api.github.com/users/eatoncys/followers","following_url":"https://api.github.com/users/eatoncys/following{/other_user}","gists_url":"https://api.github.com/users/eatoncys/gists{/gist_id}","starred_url":"https://api.github.com/users/eatoncys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eatoncys/subscriptions","organizations_url":"https://api.github.com/users/eatoncys/orgs","repos_url":"https://api.github.com/users/eatoncys/repos","events_url":"https://api.github.com/users/eatoncys/events{/privacy}","received_events_url":"https://api.github.com/users/eatoncys/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\nIf we start an app with the param --total-executor-cores=4 and spark.executor.cores=3, the cores left is always 1, so it will try to allocate executors in the function org.apache.spark.deploy.master.startExecutorsOnWorkers in every schedule.\r\nAnother question is, is it will be better to allocate another executor with 1 core for the cores left.\r\n\r\n\r\n\r\n## How was this patch tested?\r\nunit test\r\n\r\n\r\n","created_at":"2017-06-16T06:00:52Z","updated_at":"2017-06-20T09:18:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df6c176d87d4a99cd81af15f21f5a5dd33da4cab","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/18322/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/18322/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/18322/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/46f54ccba7f8a9185c8a9e0c89720f3de254f2ea","head":{"label":"eatoncys:leftcores","ref":"leftcores","sha":"46f54ccba7f8a9185c8a9e0c89720f3de254f2ea","user":{"login":"eatoncys","id":26834091,"avatar_url":"https://avatars0.githubusercontent.com/u/26834091?v=3","gravatar_id":"","url":"https://api.github.com/users/eatoncys","html_url":"https://github.com/eatoncys","followers_url":"https://api.github.com/users/eatoncys/followers","following_url":"https://api.github.com/users/eatoncys/following{/other_user}","gists_url":"https://api.github.com/users/eatoncys/gists{/gist_id}","starred_url":"https://api.github.com/users/eatoncys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eatoncys/subscriptions","organizations_url":"https://api.github.com/users/eatoncys/orgs","repos_url":"https://api.github.com/users/eatoncys/repos","events_url":"https://api.github.com/users/eatoncys/events{/privacy}","received_events_url":"https://api.github.com/users/eatoncys/received_events","type":"User","site_admin":false},"repo":{"id":86900066,"name":"spark","full_name":"eatoncys/spark","owner":{"login":"eatoncys","id":26834091,"avatar_url":"https://avatars0.githubusercontent.com/u/26834091?v=3","gravatar_id":"","url":"https://api.github.com/users/eatoncys","html_url":"https://github.com/eatoncys","followers_url":"https://api.github.com/users/eatoncys/followers","following_url":"https://api.github.com/users/eatoncys/following{/other_user}","gists_url":"https://api.github.com/users/eatoncys/gists{/gist_id}","starred_url":"https://api.github.com/users/eatoncys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eatoncys/subscriptions","organizations_url":"https://api.github.com/users/eatoncys/orgs","repos_url":"https://api.github.com/users/eatoncys/repos","events_url":"https://api.github.com/users/eatoncys/events{/privacy}","received_events_url":"https://api.github.com/users/eatoncys/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eatoncys/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/eatoncys/spark","forks_url":"https://api.github.com/repos/eatoncys/spark/forks","keys_url":"https://api.github.com/repos/eatoncys/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eatoncys/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eatoncys/spark/teams","hooks_url":"https://api.github.com/repos/eatoncys/spark/hooks","issue_events_url":"https://api.github.com/repos/eatoncys/spark/issues/events{/number}","events_url":"https://api.github.com/repos/eatoncys/spark/events","assignees_url":"https://api.github.com/repos/eatoncys/spark/assignees{/user}","branches_url":"https://api.github.com/repos/eatoncys/spark/branches{/branch}","tags_url":"https://api.github.com/repos/eatoncys/spark/tags","blobs_url":"https://api.github.com/repos/eatoncys/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eatoncys/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eatoncys/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/eatoncys/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eatoncys/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/eatoncys/spark/languages","stargazers_url":"https://api.github.com/repos/eatoncys/spark/stargazers","contributors_url":"https://api.github.com/repos/eatoncys/spark/contributors","subscribers_url":"https://api.github.com/repos/eatoncys/spark/subscribers","subscription_url":"https://api.github.com/repos/eatoncys/spark/subscription","commits_url":"https://api.github.com/repos/eatoncys/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/eatoncys/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/eatoncys/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/eatoncys/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/eatoncys/spark/contents/{+path}","compare_url":"https://api.github.com/repos/eatoncys/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eatoncys/spark/merges","archive_url":"https://api.github.com/repos/eatoncys/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eatoncys/spark/downloads","issues_url":"https://api.github.com/repos/eatoncys/spark/issues{/number}","pulls_url":"https://api.github.com/repos/eatoncys/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/eatoncys/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/eatoncys/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eatoncys/spark/labels{/name}","releases_url":"https://api.github.com/repos/eatoncys/spark/releases{/id}","deployments_url":"https://api.github.com/repos/eatoncys/spark/deployments","created_at":"2017-04-01T08:59:19Z","updated_at":"2017-04-01T08:59:46Z","pushed_at":"2017-06-19T07:39:45Z","git_url":"git://github.com/eatoncys/spark.git","ssh_url":"git@github.com:eatoncys/spark.git","clone_url":"https://github.com/eatoncys/spark.git","svn_url":"https://github.com/eatoncys/spark","homepage":null,"size":276051,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"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":"87ab0cec65b50584a627037b9d1b6fdecaee725c","user":{"login":"apache","id":47359,"avatar_url":"https://avatars3.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":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars3.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/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2017-06-20T07:51:44Z","pushed_at":"2017-06-20T09:17:44Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":277207,"stargazers_count":13233,"watchers_count":13233,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12475,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":430,"forks":12475,"open_issues":430,"watchers":13233,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/18322"},"html":{"href":"https://github.com/apache/spark/pull/18322"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/18322"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/18322/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/18322/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/18322/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/46f54ccba7f8a9185c8a9e0c89720f3de254f2ea"}}}}
{"actor":{"display_login":"jerryshao"}}