{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/18990","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/18990/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/18990/comments","events_url":"https://api.github.com/repos/apache/spark/issues/18990/events","html_url":"https://github.com/apache/spark/pull/18990","id":251147077,"number":18990,"title":"[SPARK-21782][Core] Repartition creates skews when numPartitions is a power of 2","user":{"login":"megaserg","id":1047261,"avatar_url":"https://avatars2.githubusercontent.com/u/1047261?v=4","gravatar_id":"","url":"https://api.github.com/users/megaserg","html_url":"https://github.com/megaserg","followers_url":"https://api.github.com/users/megaserg/followers","following_url":"https://api.github.com/users/megaserg/following{/other_user}","gists_url":"https://api.github.com/users/megaserg/gists{/gist_id}","starred_url":"https://api.github.com/users/megaserg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megaserg/subscriptions","organizations_url":"https://api.github.com/users/megaserg/orgs","repos_url":"https://api.github.com/users/megaserg/repos","events_url":"https://api.github.com/users/megaserg/events{/privacy}","received_events_url":"https://api.github.com/users/megaserg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-18T05:58:00Z","updated_at":"2017-08-18T07:49:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/18990","html_url":"https://github.com/apache/spark/pull/18990","diff_url":"https://github.com/apache/spark/pull/18990.diff","patch_url":"https://github.com/apache/spark/pull/18990.patch"},"body":"## Problem\r\nWhen an RDD (particularly with a low item-per-partition ratio) is repartitioned to numPartitions = power of 2, the resulting partitions are very uneven-sized, due to using fixed seed to initialize PRNG, and using the PRNG only once. See details in https://issues.apache.org/jira/browse/SPARK-21782\r\n\r\n## What changes were proposed in this pull request?\r\nInstead of directly using `0, 1, 2,...` seeds to initialize `Random`, hash them with `scala.util.hashing.byteswap32()`.\r\n\r\n## How was this patch tested?\r\n`build/mvn -Dtest=none -DwildcardSuites=org.apache.spark.rdd.RDDSuite test`\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/323285228","html_url":"https://github.com/apache/spark/pull/18990#issuecomment-323285228","issue_url":"https://api.github.com/repos/apache/spark/issues/18990","id":323285228,"user":{"login":"megaserg","id":1047261,"avatar_url":"https://avatars2.githubusercontent.com/u/1047261?v=4","gravatar_id":"","url":"https://api.github.com/users/megaserg","html_url":"https://github.com/megaserg","followers_url":"https://api.github.com/users/megaserg/followers","following_url":"https://api.github.com/users/megaserg/following{/other_user}","gists_url":"https://api.github.com/users/megaserg/gists{/gist_id}","starred_url":"https://api.github.com/users/megaserg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megaserg/subscriptions","organizations_url":"https://api.github.com/users/megaserg/orgs","repos_url":"https://api.github.com/users/megaserg/repos","events_url":"https://api.github.com/users/megaserg/events{/privacy}","received_events_url":"https://api.github.com/users/megaserg/received_events","type":"User","site_admin":false},"created_at":"2017-08-18T07:49:53Z","updated_at":"2017-08-18T07:49:53Z","body":"Sorry, I edited the pull request body. The @srowen's comment above was referring to the initial version, where I proposed using default, non-deterministic constructor for `Random()`."}}
{"actor":{"display_login":"megaserg"}}