You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "loukey-lj (via GitHub)" <gi...@apache.org> on 2023/02/01 07:40:04 UTC

[GitHub] [hudi] loukey-lj opened a new pull request, #7815: [HUDI-5671] BucketIndexPartitioner partition algorithm skew

loukey-lj opened a new pull request, #7815:
URL: https://github.com/apache/hudi/pull/7815

   ### Change Logs
   
   The online job runs for 13 days and finds that there are subtasks but no data processing, as shown in the figure below, this job uses the update time as the partition, uses the bucket index, the number of buckets is 128, and the write parallelism is 128. The key is uniform because the file size of each bucket is not much different from the storage point of view. After positioning, there is a skew in the shuffle algorithm.
   
   ![image](https://issues.apache.org/jira/secure/attachment/13054969/13054969_image-2023-02-01-14-45-33-116.png)
   
   
   Potential disadvantages of algorithmic tilt:
     1. The memory usage is uneven, some nodes may have high pressure on the JVM, and TM nodes are prone to timeout
     2. It may cause the checkpoint to time out, because the data will be flushed to hdfs during the snapshot state. If the skew is serious, it will cause some nodes to take too long and cause timeout.
   
   current algorithm:
   ![image](https://issues.apache.org/jira/secure/attachment/13054968/13054968_image-2023-02-01-14-50-29-703.png)
   
   
   Algorithm flaws:
     1. curBucket ∈ [0, numBuckets -1]
     2. For the number of globalHash values in the same partition <= numBuckets number, globalHash is divergent, and mod(globalHash, numPartitions) is easy to conflict
     3. When numBuckets is relatively large, shuffleIndex is prone to conflicts, resulting in skew
   
   Algorithm optimization:
   
   ![image](https://issues.apache.org/jira/secure/attachment/13054967/13054967_image-2023-02-01-15-00-14-889.png)
   
   
   kb = key % b; kb ∈ [0, b-1] pw = pt % w;
   
   pw ∈ [0, w-1] shuffleIndex = (pw + kb) % w 
   
   shuffleIndex ∈ [0, w-1] 
   
    
   
   In fact, it is to calculate a pw according to the partition first. Pw can be understood as a slot Wn allocated to the partition. Different partitions have a slot.
   Then move b slots back on the basis of this slot as the writing of data for this partition
   
   ![image](https://issues.apache.org/jira/secure/attachment/13054966/13054966_image-2023-02-01-15-05-15-491.png)
   
   
   
   ### Impact
   
   NA
   
   ### Risk level (write none, low medium or high below)
   
   NA
   
   ### Documentation Update
   
   NA
   
   - _The config description must be updated if new configs are added or the default value of the configs are changed_
   - _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
     ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make
     changes to the website._
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] danny0405 merged pull request #7815: [HUDI-5671] BucketIndexPartitioner partition algorithm skew

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 merged PR #7815:
URL: https://github.com/apache/hudi/pull/7815


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] hudi-bot commented on pull request #7815: [HUDI-5671] BucketIndexPartitioner partition algorithm skew

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #7815:
URL: https://github.com/apache/hudi/pull/7815#issuecomment-1411639566

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "5714428503600345e2b39fd1734547a1fdd60181",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=14840",
       "triggerID" : "5714428503600345e2b39fd1734547a1fdd60181",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 5714428503600345e2b39fd1734547a1fdd60181 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=14840) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] hudi-bot commented on pull request #7815: [HUDI-5671] BucketIndexPartitioner partition algorithm skew

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #7815:
URL: https://github.com/apache/hudi/pull/7815#issuecomment-1411868427

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "5714428503600345e2b39fd1734547a1fdd60181",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=14840",
       "triggerID" : "5714428503600345e2b39fd1734547a1fdd60181",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 5714428503600345e2b39fd1734547a1fdd60181 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=14840) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [hudi] hudi-bot commented on pull request #7815: [HUDI-5671] BucketIndexPartitioner partition algorithm skew

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #7815:
URL: https://github.com/apache/hudi/pull/7815#issuecomment-1411630077

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "5714428503600345e2b39fd1734547a1fdd60181",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "5714428503600345e2b39fd1734547a1fdd60181",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 5714428503600345e2b39fd1734547a1fdd60181 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org