{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/19832","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/19832/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/19832/comments","events_url":"https://api.github.com/repos/apache/spark/issues/19832/events","html_url":"https://github.com/apache/spark/pull/19832","id":277347454,"node_id":"MDExOlB1bGxSZXF1ZXN0MTU1MDQzMzg0","number":19832,"title":"[SPARK-22628][CORE]Some situations，  the assignment of executors on workers is not what we expected when `spark.deploy.spreadOut=true`.","user":{"login":"10110346","id":24688163,"node_id":"MDQ6VXNlcjI0Njg4MTYz","avatar_url":"https://avatars2.githubusercontent.com/u/24688163?v=4","gravatar_id":"","url":"https://api.github.com/users/10110346","html_url":"https://github.com/10110346","followers_url":"https://api.github.com/users/10110346/followers","following_url":"https://api.github.com/users/10110346/following{/other_user}","gists_url":"https://api.github.com/users/10110346/gists{/gist_id}","starred_url":"https://api.github.com/users/10110346/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/10110346/subscriptions","organizations_url":"https://api.github.com/users/10110346/orgs","repos_url":"https://api.github.com/users/10110346/repos","events_url":"https://api.github.com/users/10110346/events{/privacy}","received_events_url":"https://api.github.com/users/10110346/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-11-28T11:18:08Z","updated_at":"2018-10-22T08:21:59Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/19832","html_url":"https://github.com/apache/spark/pull/19832","diff_url":"https://github.com/apache/spark/pull/19832.diff","patch_url":"https://github.com/apache/spark/pull/19832.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nFor example, cluster has 3 workers(workA, workB, workC), workA has 1 core left, workB has 1 core left, workC has no cores left.\r\nUser requests 3 executors (spark.cores.max = 3, spark.executor.cores = 1), obviously, workA will be assigned one executor ,and workB will be assigned one executor.\r\nAfter a moment,if some apps release cores, and workB has 3 core left, workC has 2 core left, we should assign one executor on workC,not workB.\r\nEspecially for dynamic executors allocation in standalone mode, this problem is more serious.\r\n\r\nThis PR reorders by another key for `usableWorkers` to  solve this problem.\r\n\r\n\r\n## How was this patch tested?\r\nManual test\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/431770371","html_url":"https://github.com/apache/spark/pull/19832#issuecomment-431770371","issue_url":"https://api.github.com/repos/apache/spark/issues/19832","id":431770371,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTc3MDM3MQ==","user":{"login":"AmplabJenkins","id":4031291,"node_id":"MDQ6VXNlcjQwMzEyOTE=","avatar_url":"https://avatars3.githubusercontent.com/u/4031291?v=4","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T08:21:59Z","updated_at":"2018-10-22T08:21:59Z","author_association":"NONE","body":"Merged build finished. Test PASSed."}}
{"actor":{"display_login":"AmplabJenkins"}}