This is an automated email from the ASF dual-hosted git repository.
zuston pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 589d54adc [MINOR] docs: Improve comment on blockId structure (#1492)
589d54adc is described below
commit 589d54adcad00fd859cb0974326312a30047f275
Author: Enrico Minack <[email protected]>
AuthorDate: Tue Jan 30 10:38:07 2024 +0100
[MINOR] docs: Improve comment on blockId structure (#1492)
### What changes were proposed in this pull request?
Improves the wording on blockId structure.
### Why are the changes needed?
I found the existing comment ambiguous and had to carefully look into the
code.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Only changes in comments.
---
.../main/java/org/apache/uniffle/client/util/ClientUtils.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git
a/client/src/main/java/org/apache/uniffle/client/util/ClientUtils.java
b/client/src/main/java/org/apache/uniffle/client/util/ClientUtils.java
index 780446694..b3330c85a 100644
--- a/client/src/main/java/org/apache/uniffle/client/util/ClientUtils.java
+++ b/client/src/main/java/org/apache/uniffle/client/util/ClientUtils.java
@@ -34,10 +34,11 @@ import org.apache.uniffle.storage.util.StorageType;
public class ClientUtils {
- // BlockId is long and composed of partitionId, executorId and AtomicInteger.
- // AtomicInteger is first 19 bit, max value is 2^19 - 1
- // partitionId is next 24 bit, max value is 2^24 - 1
- // taskAttemptId is rest of 20 bit, max value is 2^20 - 1
+ // BlockId is positive long (63 bits) composed of partitionId, taskAttemptId
and AtomicInteger.
+ // AtomicInteger is highest 18 bits, max value is 2^18 - 1
+ // partitionId is middle 24 bits, max value is 2^24 - 1
+ // taskAttemptId is lowest 21 bits, max value is 2^21 - 1
+ // Values of partitionId, taskAttemptId and AtomicInteger are always
positive.
public static Long getBlockId(long partitionId, long taskAttemptId, long
atomicInt) {
if (atomicInt < 0 || atomicInt > Constants.MAX_SEQUENCE_NO) {
throw new IllegalArgumentException(