You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by GitBox <gi...@apache.org> on 2022/11/25 11:36:05 UTC

[GitHub] [incubator-uniffle] zuston opened a new pull request, #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

zuston opened a new pull request, #358:
URL: https://github.com/apache/incubator-uniffle/pull/358

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://github.com/apache/incubator-uniffle/blob/master/CONTRIBUTING.md
     2. Ensure you have added or run the appropriate tests for your PR
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]XXXX Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   Support getting memory data skip by upstream task ids
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   In current codebase, when the shuffle-server memory is large and 
   job is optimized by AQE skew rule, the multiple readers of the same 
   partition will get the shuffle data from the same shuffle-server. 
   
   To avoid reading unused localfile/HDFS data, the PR of #137 has 
   introduce the LOCAL_ORDER mechanism to filter the most of data. 
   
   But for the storage of MEMORY, it still suffer from this. So this PR is to avoid 
   reading unused data for one reader, by expectedTaskIds bitmap to
   filter.
   
   And this optimization is only enabled when AQE skew is applied.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   1. UTs


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1032490818


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -206,7 +206,7 @@ public Configuration getHadoopConf() {
         CreateShuffleReadClientRequest request = new CreateShuffleReadClientRequest(
             appId, shuffleId, partition, storageType, basePath, indexReadLimit, readBufferSize,
             1, partitionNum, partitionToExpectBlocks.get(partition), taskIdBitmap, shuffleServerInfoList,
-            hadoopConf, dataDistributionType);
+            hadoopConf, dataDistributionType, mapStartIndex, mapEndIndex);

Review Comment:
   You can see https://github.com/apache/incubator-uniffle/blob/2f3473381d5524aa15696eab3b1623dcb5ddf2b6/client/src/main/java/org/apache/uniffle/client/impl/ShuffleReadClientImpl.java#L106
   I believe that it will be useful for you.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
zuston commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033077892


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   `serializedTaskIdsBitmap` -> `serializedExpectedTaskIdsBitmap` ? 



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1034233328


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -119,6 +120,9 @@ public RssShuffleReader(
     this.partitionToShuffleServers = rssShuffleHandle.getPartitionToServers();
     this.rssConf = rssConf;
     this.dataDistributionType = dataDistributionType;
+    // This mechanism of expectedTaskIdsBitmap filter is to filter out the most of data.
+    // especially for AQE skew optimization
+    this.expectedTaskIdsBitmapFilterEnable = mapEndIndex == Integer.MAX_VALUE ? false : true;

Review Comment:
   Yes, I think it's more accurate.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033389732


##########
storage/src/main/java/org/apache/uniffle/storage/request/CreateShuffleReadHandlerRequest.java:
##########
@@ -175,4 +176,12 @@ public Roaring64NavigableMap getExpectTaskIds() {
   public void setExpectTaskIds(Roaring64NavigableMap expectTaskIds) {
     this.expectTaskIds = expectTaskIds;
   }
+
+  public boolean isExpectedTaskIdsBitmapFilter() {
+    return expectedTaskIdsBitmapFilter;
+  }
+
+  public void setExpectedTaskIdsBitmapFilter(boolean expectedTaskIdsBitmapFilter) {

Review Comment:
   `enableExpectedTaskIdsBitmapFilter()`,
   The default value of expectedTaskIdsBitmapFilter is false. If we want to set the value , we can call the method `enableExpectedTaskIdsBitmapFilter()`.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033392342


##########
storage/src/main/java/org/apache/uniffle/storage/request/CreateShuffleReadHandlerRequest.java:
##########
@@ -175,4 +176,12 @@ public Roaring64NavigableMap getExpectTaskIds() {
   public void setExpectTaskIds(Roaring64NavigableMap expectTaskIds) {
     this.expectTaskIds = expectTaskIds;
   }
+
+  public boolean isExpectedTaskIdsBitmapFilter() {

Review Comment:
   ` isExpectedTaskIdsBitmapFilter` -> `isExpectedTaskIdsBitmapFilterEnable`?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
zuston commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1034224129


##########
server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferManager.java:
##########
@@ -151,6 +152,19 @@ protected Entry<Range<Integer>, ShuffleBuffer> getShuffleBufferEntry(
   public ShuffleDataResult getShuffleData(
       String appId, int shuffleId, int partitionId, long blockId,
       int readBufferSize) {
+    return getShuffleData(
+        appId,
+        shuffleId,
+        partitionId,
+        blockId,
+        readBufferSize,
+        null

Review Comment:
   I think we'd better not. Because we rely on this to filter data, if it's empty, it means that all data should be filtered out.
   Using the `null` to indicate this is invalid is reasonable.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
zuston commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1034226695


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -119,6 +120,9 @@ public RssShuffleReader(
     this.partitionToShuffleServers = rssShuffleHandle.getPartitionToServers();
     this.rssConf = rssConf;
     this.dataDistributionType = dataDistributionType;
+    // This mechanism of expectedTaskIdsBitmap filter is to filter out the most of data.
+    // especially for AQE skew optimization
+    this.expectedTaskIdsBitmapFilterEnable = mapEndIndex == Integer.MAX_VALUE ? false : true;

Review Comment:
   So do we need to use the `startMapIndex==0` and `mapEndIndex==max_value` to judge?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
zuston commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033309475


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   Maybe this could be included in another PR, because I wont use the multiple replicas and lack some performance tests.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
zuston commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033085457


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -206,7 +206,7 @@ public Configuration getHadoopConf() {
         CreateShuffleReadClientRequest request = new CreateShuffleReadClientRequest(
             appId, shuffleId, partition, storageType, basePath, indexReadLimit, readBufferSize,
             1, partitionNum, partitionToExpectBlocks.get(partition), taskIdBitmap, shuffleServerInfoList,
-            hadoopConf, dataDistributionType);
+            hadoopConf, dataDistributionType, mapStartIndex, mapEndIndex);

Review Comment:
   This is not precise. 
   
   I think I will introduce a new param to decide whether to use the taskIdsBitmap, which will be specified by external invoker, like spark client. And in spark client, we could use the endMapIndex to analyze the stage is data skew. 



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#issuecomment-1328623119

   Should we give this pr a performance test?


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1032859657


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   > I wonder why we need excludeTaskIdsBitmap?
   
   For multi replicas, it may be better if we have excludeTaskIdsBitmap. This name is not good.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
xianjingfeng commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1032859929


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   But how do we know which tasks need to be excluded?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033079758


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -206,7 +206,7 @@ public Configuration getHadoopConf() {
         CreateShuffleReadClientRequest request = new CreateShuffleReadClientRequest(
             appId, shuffleId, partition, storageType, basePath, indexReadLimit, readBufferSize,
             1, partitionNum, partitionToExpectBlocks.get(partition), taskIdBitmap, shuffleServerInfoList,
-            hadoopConf, dataDistributionType);
+            hadoopConf, dataDistributionType, mapStartIndex, mapEndIndex);

Review Comment:
   This may be not correct enough.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
zuston commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033337635


##########
storage/src/main/java/org/apache/uniffle/storage/request/CreateShuffleReadHandlerRequest.java:
##########
@@ -175,4 +176,12 @@ public Roaring64NavigableMap getExpectTaskIds() {
   public void setExpectTaskIds(Roaring64NavigableMap expectTaskIds) {
     this.expectTaskIds = expectTaskIds;
   }
+
+  public boolean isExpectedTaskIdsBitmapFilter() {
+    return expectedTaskIdsBitmapFilter;
+  }
+
+  public void setExpectedTaskIdsBitmapFilter(boolean expectedTaskIdsBitmapFilter) {

Review Comment:
   Done



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033080269


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -206,7 +206,7 @@ public Configuration getHadoopConf() {
         CreateShuffleReadClientRequest request = new CreateShuffleReadClientRequest(
             appId, shuffleId, partition, storageType, basePath, indexReadLimit, readBufferSize,
             1, partitionNum, partitionToExpectBlocks.get(partition), taskIdBitmap, shuffleServerInfoList,
-            hadoopConf, dataDistributionType);
+            hadoopConf, dataDistributionType, mapStartIndex, mapEndIndex);

Review Comment:
   Just give you an idea. 



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
zuston commented on PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#issuecomment-1327367290

   I have proposed a draft implementation @jerqi @xianjingfeng If you have time, please take a look.


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
zuston commented on PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#issuecomment-1328815415

   > Should we give this pr a performance test?
   
   Performance test has been attached in description.


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033078107


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   ok.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#issuecomment-1328894851

   There are some conflicts with https://github.com/apache/incubator-uniffle/pull/276. I will merge https://github.com/apache/incubator-uniffle/pull/276 first. LGTM except some nits.


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033088836


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -206,7 +206,7 @@ public Configuration getHadoopConf() {
         CreateShuffleReadClientRequest request = new CreateShuffleReadClientRequest(
             appId, shuffleId, partition, storageType, basePath, indexReadLimit, readBufferSize,
             1, partitionNum, partitionToExpectBlocks.get(partition), taskIdBitmap, shuffleServerInfoList,
-            hadoopConf, dataDistributionType);
+            hadoopConf, dataDistributionType, mapStartIndex, mapEndIndex);

Review Comment:
   It's ok for me.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1032861097


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   > But how do we know which tasks need to be excluded?
   
   The tasks which we have processed.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
zuston commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1034237369


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -119,6 +120,9 @@ public RssShuffleReader(
     this.partitionToShuffleServers = rssShuffleHandle.getPartitionToServers();
     this.rssConf = rssConf;
     this.dataDistributionType = dataDistributionType;
+    // This mechanism of expectedTaskIdsBitmap filter is to filter out the most of data.
+    // especially for AQE skew optimization
+    this.expectedTaskIdsBitmapFilterEnable = mapEndIndex == Integer.MAX_VALUE ? false : true;

Review Comment:
   Updated. 



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
zuston commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033078652


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -206,7 +206,7 @@ public Configuration getHadoopConf() {
         CreateShuffleReadClientRequest request = new CreateShuffleReadClientRequest(
             appId, shuffleId, partition, storageType, basePath, indexReadLimit, readBufferSize,
             1, partitionNum, partitionToExpectBlocks.get(partition), taskIdBitmap, shuffleServerInfoList,
-            hadoopConf, dataDistributionType);
+            hadoopConf, dataDistributionType, mapStartIndex, mapEndIndex);

Review Comment:
   > I believe that it will be useful for you.
   
   Could you describe more why this is useful? 



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033392342


##########
storage/src/main/java/org/apache/uniffle/storage/request/CreateShuffleReadHandlerRequest.java:
##########
@@ -175,4 +176,12 @@ public Roaring64NavigableMap getExpectTaskIds() {
   public void setExpectTaskIds(Roaring64NavigableMap expectTaskIds) {
     this.expectTaskIds = expectTaskIds;
   }
+
+  public boolean isExpectedTaskIdsBitmapFilter() {

Review Comment:
   ` isExpectedTaskIdsBitmapFilter` -> `hasExpectedTaskIdsBitmapFilter`?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1032861097


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   > But how do we know which tasks need to be excluded?
   
   We have processed tasks.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033079364


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -206,7 +206,7 @@ public Configuration getHadoopConf() {
         CreateShuffleReadClientRequest request = new CreateShuffleReadClientRequest(
             appId, shuffleId, partition, storageType, basePath, indexReadLimit, readBufferSize,
             1, partitionNum, partitionToExpectBlocks.get(partition), taskIdBitmap, shuffleServerInfoList,
-            hadoopConf, dataDistributionType);
+            hadoopConf, dataDistributionType, mapStartIndex, mapEndIndex);

Review Comment:
   If taskBitmap can filter more than 50% Blocks, it means that there are skew data.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1032449779


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -206,7 +206,7 @@ public Configuration getHadoopConf() {
         CreateShuffleReadClientRequest request = new CreateShuffleReadClientRequest(
             appId, shuffleId, partition, storageType, basePath, indexReadLimit, readBufferSize,
             1, partitionNum, partitionToExpectBlocks.get(partition), taskIdBitmap, shuffleServerInfoList,
-            hadoopConf, dataDistributionType);
+            hadoopConf, dataDistributionType, mapStartIndex, mapEndIndex);

Review Comment:
   Could we avoid `mapStartIndex` and `mapEndIndex`? It's the concept of Spark.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1032862224


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   > real expectTaskIdsBitmap = expectTaskIdsBitmap - distinctTaskId(expectBlockId-processedBlockId)?
   
   Yes,  you're right. If expectTaskIdsBitmap is a little big, excludeTaskIdBitmap is also useful.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
xianjingfeng commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1032859505


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   I wonder why we need excludeTaskIdsBitmap?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033281496


##########
storage/src/main/java/org/apache/uniffle/storage/request/CreateShuffleReadHandlerRequest.java:
##########
@@ -175,4 +176,12 @@ public Roaring64NavigableMap getExpectTaskIds() {
   public void setExpectTaskIds(Roaring64NavigableMap expectTaskIds) {
     this.expectTaskIds = expectTaskIds;
   }
+
+  public boolean isExpectedTaskIdsBitmapFilter() {
+    return expectedTaskIdsBitmapFilter;
+  }
+
+  public void setExpectedTaskIdsBitmapFilter(boolean expectedTaskIdsBitmapFilter) {

Review Comment:
   `setExpectedTaskIdsBitmapFilter` -> `useExpectedTaskIdsBitmapFilter`?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi merged pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi merged PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1032861448


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   But you're right. Maybe expectTaskIdsBitmap is enough. But we should a better name here.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1032817078


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   Filter may be two kinds. expectTaskIdsBitmap, excludeTaskIdsBitmap.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033389732


##########
storage/src/main/java/org/apache/uniffle/storage/request/CreateShuffleReadHandlerRequest.java:
##########
@@ -175,4 +176,12 @@ public Roaring64NavigableMap getExpectTaskIds() {
   public void setExpectTaskIds(Roaring64NavigableMap expectTaskIds) {
     this.expectTaskIds = expectTaskIds;
   }
+
+  public boolean isExpectedTaskIdsBitmapFilter() {
+    return expectedTaskIdsBitmapFilter;
+  }
+
+  public void setExpectedTaskIdsBitmapFilter(boolean expectedTaskIdsBitmapFilter) {

Review Comment:
   `enableExpectedTaskIdsBitmapFilter()`,
   The default value of expectedTaskIdsBitmapFilter is false. If we want to set the value , we can call the method `enableExpectedTaskIdsBitmapFilter()`.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033389732


##########
storage/src/main/java/org/apache/uniffle/storage/request/CreateShuffleReadHandlerRequest.java:
##########
@@ -175,4 +176,12 @@ public Roaring64NavigableMap getExpectTaskIds() {
   public void setExpectTaskIds(Roaring64NavigableMap expectTaskIds) {
     this.expectTaskIds = expectTaskIds;
   }
+
+  public boolean isExpectedTaskIdsBitmapFilter() {
+    return expectedTaskIdsBitmapFilter;
+  }
+
+  public void setExpectedTaskIdsBitmapFilter(boolean expectedTaskIdsBitmapFilter) {

Review Comment:
   `useExpectedTaskIdsBitmapFilter()`,
   The default value of expectedTaskIdsBitmapFilter is false. If we want to set the value , we can call the method `useExpectedTaskIdsBitmapFilter()`.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033799653


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -119,6 +120,9 @@ public RssShuffleReader(
     this.partitionToShuffleServers = rssShuffleHandle.getPartitionToServers();
     this.rssConf = rssConf;
     this.dataDistributionType = dataDistributionType;
+    // This mechanism of expectedTaskIdsBitmap filter is to filter out the most of data.
+    // especially for AQE skew optimization
+    this.expectedTaskIdsBitmapFilterEnable = mapEndIndex == Integer.MAX_VALUE ? false : true;

Review Comment:
   If this is the last reduce partition, may the range of mapId be [n, Integer.MAX_VALUE]?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#issuecomment-1330151700

   cc @bin41215 Maybe you have interest about this pr.


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
zuston commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1032456497


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/reader/RssShuffleReader.java:
##########
@@ -206,7 +206,7 @@ public Configuration getHadoopConf() {
         CreateShuffleReadClientRequest request = new CreateShuffleReadClientRequest(
             appId, shuffleId, partition, storageType, basePath, indexReadLimit, readBufferSize,
             1, partitionNum, partitionToExpectBlocks.get(partition), taskIdBitmap, shuffleServerInfoList,
-            hadoopConf, dataDistributionType);
+            hadoopConf, dataDistributionType, mapStartIndex, mapEndIndex);

Review Comment:
   Got it. 



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
xianjingfeng commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1032861694


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   real expectTaskIdsBitmap = expectTaskIdsBitmap - distinctTaskId(expectBlockId-processedBlockId)?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1034232732


##########
server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferManager.java:
##########
@@ -151,6 +152,19 @@ protected Entry<Range<Integer>, ShuffleBuffer> getShuffleBufferEntry(
   public ShuffleDataResult getShuffleData(
       String appId, int shuffleId, int partitionId, long blockId,
       int readBufferSize) {
+    return getShuffleData(
+        appId,
+        shuffleId,
+        partitionId,
+        blockId,
+        readBufferSize,
+        null

Review Comment:
   Ok, make sense.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033394876


##########
server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferManager.java:
##########
@@ -151,6 +152,19 @@ protected Entry<Range<Integer>, ShuffleBuffer> getShuffleBufferEntry(
   public ShuffleDataResult getShuffleData(
       String appId, int shuffleId, int partitionId, long blockId,
       int readBufferSize) {
+    return getShuffleData(
+        appId,
+        shuffleId,
+        partitionId,
+        blockId,
+        readBufferSize,
+        null

Review Comment:
   Could we pass an empty collection? 



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033390493


##########
storage/src/main/java/org/apache/uniffle/storage/request/CreateShuffleReadHandlerRequest.java:
##########
@@ -175,4 +176,12 @@ public Roaring64NavigableMap getExpectTaskIds() {
   public void setExpectTaskIds(Roaring64NavigableMap expectTaskIds) {
     this.expectTaskIds = expectTaskIds;
   }
+
+  public boolean isExpectedTaskIdsBitmapFilter() {

Review Comment:
   `isExpectedTaskIdsBitmapFilter` -> `enableExpectedTaskIdsBitmapFilter`.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#issuecomment-1329991939

   @xianjingfeng Do you have another suggestion?


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] codecov-commenter commented on pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#issuecomment-1328629062

   # [Codecov](https://codecov.io/gh/apache/incubator-uniffle/pull/358?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#358](https://codecov.io/gh/apache/incubator-uniffle/pull/358?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9dfb96a) into [master](https://codecov.io/gh/apache/incubator-uniffle/commit/e127253c44e4a89f93d22a6999274f442cfb0c1c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e127253) will **decrease** coverage by `0.67%`.
   > The diff coverage is `26.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master     #358      +/-   ##
   ============================================
   - Coverage     58.40%   57.72%   -0.68%     
   + Complexity     1565     1368     -197     
   ============================================
     Files           193      172      -21     
     Lines         10787     9074    -1713     
     Branches        943      800     -143     
   ============================================
   - Hits           6300     5238    -1062     
   + Misses         4115     3506     -609     
   + Partials        372      330      -42     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-uniffle/pull/358?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...e/uniffle/client/factory/ShuffleClientFactory.java](https://codecov.io/gh/apache/incubator-uniffle/pull/358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL2NsaWVudC9mYWN0b3J5L1NodWZmbGVDbGllbnRGYWN0b3J5LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...client/request/CreateShuffleReadClientRequest.java](https://codecov.io/gh/apache/incubator-uniffle/pull/358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL2NsaWVudC9yZXF1ZXN0L0NyZWF0ZVNodWZmbGVSZWFkQ2xpZW50UmVxdWVzdC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...pache/uniffle/server/ShuffleServerGrpcService.java](https://codecov.io/gh/apache/incubator-uniffle/pull/358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL3NlcnZlci9TaHVmZmxlU2VydmVyR3JwY1NlcnZpY2UuamF2YQ==) | `0.81% <0.00%> (-0.02%)` | :arrow_down: |
   | [...uniffle/storage/factory/ShuffleHandlerFactory.java](https://codecov.io/gh/apache/incubator-uniffle/pull/358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmFnZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdW5pZmZsZS9zdG9yYWdlL2ZhY3RvcnkvU2h1ZmZsZUhhbmRsZXJGYWN0b3J5LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [.../storage/handler/impl/MemoryClientReadHandler.java](https://codecov.io/gh/apache/incubator-uniffle/pull/358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmFnZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdW5pZmZsZS9zdG9yYWdlL2hhbmRsZXIvaW1wbC9NZW1vcnlDbGllbnRSZWFkSGFuZGxlci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...ge/handler/impl/MemoryQuorumClientReadHandler.java](https://codecov.io/gh/apache/incubator-uniffle/pull/358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmFnZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdW5pZmZsZS9zdG9yYWdlL2hhbmRsZXIvaW1wbC9NZW1vcnlRdW9ydW1DbGllbnRSZWFkSGFuZGxlci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...orage/request/CreateShuffleReadHandlerRequest.java](https://codecov.io/gh/apache/incubator-uniffle/pull/358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmFnZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvdW5pZmZsZS9zdG9yYWdlL3JlcXVlc3QvQ3JlYXRlU2h1ZmZsZVJlYWRIYW5kbGVyUmVxdWVzdC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...che/uniffle/client/impl/ShuffleReadClientImpl.java](https://codecov.io/gh/apache/incubator-uniffle/pull/358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL2NsaWVudC9pbXBsL1NodWZmbGVSZWFkQ2xpZW50SW1wbC5qYXZh) | `90.19% <100.00%> (+0.09%)` | :arrow_up: |
   | [.../org/apache/uniffle/server/ShuffleTaskManager.java](https://codecov.io/gh/apache/incubator-uniffle/pull/358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL3NlcnZlci9TaHVmZmxlVGFza01hbmFnZXIuamF2YQ==) | `77.22% <100.00%> (-0.02%)` | :arrow_down: |
   | [...rg/apache/uniffle/server/buffer/ShuffleBuffer.java](https://codecov.io/gh/apache/incubator-uniffle/pull/358/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL3NlcnZlci9idWZmZXIvU2h1ZmZsZUJ1ZmZlci5qYXZh) | `93.33% <100.00%> (+0.28%)` | :arrow_up: |
   | ... and [36 more](https://codecov.io/gh/apache/incubator-uniffle/pull/358/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #358: [Improvement][AQE] Support getting memory data skip by upstream task ids

Posted by GitBox <gi...@apache.org>.
xianjingfeng commented on code in PR #358:
URL: https://github.com/apache/incubator-uniffle/pull/358#discussion_r1033221167


##########
proto/src/main/proto/Rss.proto:
##########
@@ -92,6 +92,7 @@ message GetMemoryShuffleDataRequest {
   int64 lastBlockId = 4;
   int32 readBufferSize = 5;
   int64 timestamp = 6;
+  optional bytes serializedTaskIdsBitmap = 7;

Review Comment:
   How about expectTaskIdsBitmap = distinctTaskId(expectBlockId-processedBlockId)? 



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org