This is an automated email from the ASF dual-hosted git repository.
zhoubin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 0c6ec3a4d [MINOR] improvement(client): Detailed error message in
ShuffleWriteClientImpl (#2433)
0c6ec3a4d is described below
commit 0c6ec3a4da6a32bb04748b6698b58fa0da4c688b
Author: Andras Salamon <[email protected]>
AuthorDate: Tue Apr 8 05:02:37 2025 +0200
[MINOR] improvement(client): Detailed error message in
ShuffleWriteClientImpl (#2433)
### What changes were proposed in this pull request?
Improving error message in `ShuffleWriteClientImpl`
### Why are the changes needed?
`ShuffleWriteClientImpl` prints out this error message, which is not very
useful:
```
org.apache.uniffle.common.exception.RssException: getShuffleAssignments or
registerShuffle failed!
at
org.apache.uniffle.shuffle.manager.RssShuffleManagerBase.requestShuffleAssignment(RssShuffleManagerBase.java:1378)
at
org.apache.uniffle.shuffle.manager.RssShuffleManagerBase.requestShuffleAssignment(RssShuffleManagerBase.java:1390)
at
org.apache.spark.shuffle.RssShuffleManager.registerShuffle(RssShuffleManager.java:150)
at org.apache.spark.ShuffleDependency.<init>(Dependency.scala:93)
...
Caused by: org.apache.uniffle.common.exception.RssException: Error happened
when getShuffleAssignments with appId[local-1743762415951_1743762414837],
shuffleId[0], numMaps[2], partitionNumPe
rRange[1] to coordinator. Error message:
at
org.apache.uniffle.client.impl.ShuffleWriteClientImpl.getShuffleAssignments(ShuffleWriteClientImpl.java:708)
at
org.apache.uniffle.shuffle.manager.RssShuffleManagerBase.lambda$requestShuffleAssignment$9(RssShuffleManagerBase.java:1353)
at
org.apache.uniffle.common.util.RetryUtils.retryWithCondition(RetryUtils.java:81)
at
org.apache.uniffle.common.util.RetryUtils.retry(RetryUtils.java:61)
at
org.apache.uniffle.common.util.RetryUtils.retry(RetryUtils.java:32)
at
org.apache.uniffle.shuffle.manager.RssShuffleManagerBase.requestShuffleAssignment(RssShuffleManagerBase.java:1348)
... 78 more
```
with this fix, the error message is:
```
org.apache.uniffle.common.exception.RssException: getShuffleAssignments or
registerShuffle failed!
at
org.apache.uniffle.shuffle.manager.RssShuffleManagerBase.requestShuffleAssignment(RssShuffleManagerBase.java:1378)
at
org.apache.uniffle.shuffle.manager.RssShuffleManagerBase.requestShuffleAssignment(RssShuffleManagerBase.java:1390)
at
org.apache.spark.shuffle.RssShuffleManager.registerShuffle(RssShuffleManager.java:150)
at org.apache.spark.ShuffleDependency.<init>(Dependency.scala:93)
...
Caused by: org.apache.uniffle.common.exception.RssException: Error happened
when getShuffleAssignments with appId[local-1743773004981_1743773003965],
shuffleId[0], numMaps[2], partitionNumPe
rRange[1] to coordinator. Error message: getShuffleAssignments failed!
at
org.apache.uniffle.client.impl.ShuffleWriteClientImpl.getShuffleAssignments(ShuffleWriteClientImpl.java:708)
at
org.apache.uniffle.shuffle.manager.RssShuffleManagerBase.lambda$requestShuffleAssignment$9(RssShuffleManagerBase.java:1353)
at
org.apache.uniffle.common.util.RetryUtils.retryWithCondition(RetryUtils.java:81)
at
org.apache.uniffle.common.util.RetryUtils.retry(RetryUtils.java:61)
at
org.apache.uniffle.common.util.RetryUtils.retry(RetryUtils.java:32)
at
org.apache.uniffle.shuffle.manager.RssShuffleManagerBase.requestShuffleAssignment(RssShuffleManagerBase.java:1348)
... 78 more
Caused by: org.apache.uniffle.common.exception.RssException:
getShuffleAssignments failed!
at
org.apache.uniffle.client.impl.grpc.CoordinatorGrpcRetryableClient.getShuffleAssignments(CoordinatorGrpcRetryableClient.java:187)
at
org.apache.uniffle.client.impl.ShuffleWriteClientImpl.getShuffleAssignments(ShuffleWriteClientImpl.java:692)
... 83 more
Caused by: org.apache.uniffle.common.exception.RssException: There isn't
enough shuffle servers
at
org.apache.uniffle.client.impl.grpc.CoordinatorGrpcRetryableClient.lambda$getShuffleAssignments$4(CoordinatorGrpcRetryableClient.java:180)
at
org.apache.uniffle.common.util.RetryUtils.retryWithCondition(RetryUtils.java:81)
at
org.apache.uniffle.common.util.RetryUtils.retry(RetryUtils.java:61)
at
org.apache.uniffle.common.util.RetryUtils.retry(RetryUtils.java:32)
at
org.apache.uniffle.client.impl.grpc.CoordinatorGrpcRetryableClient.getShuffleAssignments(CoordinatorGrpcRetryableClient.java:162)
... 84 more
```
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
UTs
---
.../java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java
b/client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java
index 3d3bb925d..62f9fd753 100644
---
a/client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java
+++
b/client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java
@@ -703,9 +703,9 @@ public class ShuffleWriteClientImpl implements
ShuffleWriteClient {
+ partitionNumPerRange
+ "] to coordinator. "
+ "Error message: "
- + response.getMessage();
+ + e.getMessage();
LOG.error(msg);
- throw new RssException(msg);
+ throw new RssException(msg, e);
}
return new ShuffleAssignmentsInfo(