You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "zuston (via GitHub)" <gi...@apache.org> on 2023/12/28 11:23:46 UTC
Re: [PR] [#1119] improvement: Explicitly throw BUFFER_LIMIT_OF_HUGE_PARTITION instead of NO_BUFFER [incubator-uniffle]
zuston commented on code in PR #1393:
URL: https://github.com/apache/incubator-uniffle/pull/1393#discussion_r1437573400
##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -458,31 +459,37 @@ public long requireBuffer(
String appId, int shuffleId, List<Integer> partitionIds, int requireSize) {
ShuffleTaskInfo shuffleTaskInfo = shuffleTaskInfos.get(appId);
if (null == shuffleTaskInfo) {
- return RequireBufferStatusCode.NO_REGISTER.statusCode();
+ LOG.error("Find not registered app, appId: {}, shuffleId: {}", appId, shuffleId);
+ throw new NoRegisterException("Not Registered, appId: " + appId);
}
for (int partitionId : partitionIds) {
long partitionUsedDataSize = getPartitionDataSize(appId, shuffleId, partitionId);
if (shuffleBufferManager.limitHugePartition(
appId, shuffleId, partitionId, partitionUsedDataSize)) {
ShuffleServerMetrics.counterTotalRequireBufferFailedForHugePartition.inc();
- return RequireBufferStatusCode.NO_BUFFER.statusCode();
+ String errorMessage =
Review Comment:
Why not throwing the `NoBufferForHugePartitionException` ?
##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -458,31 +459,37 @@ public long requireBuffer(
String appId, int shuffleId, List<Integer> partitionIds, int requireSize) {
ShuffleTaskInfo shuffleTaskInfo = shuffleTaskInfos.get(appId);
if (null == shuffleTaskInfo) {
- return RequireBufferStatusCode.NO_REGISTER.statusCode();
+ LOG.error("Find not registered app, appId: {}, shuffleId: {}", appId, shuffleId);
Review Comment:
How about `no such app is registered. appId: {}, shuffleId: {}`
##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -458,31 +459,37 @@ public long requireBuffer(
String appId, int shuffleId, List<Integer> partitionIds, int requireSize) {
ShuffleTaskInfo shuffleTaskInfo = shuffleTaskInfos.get(appId);
if (null == shuffleTaskInfo) {
- return RequireBufferStatusCode.NO_REGISTER.statusCode();
+ LOG.error("Find not registered app, appId: {}, shuffleId: {}", appId, shuffleId);
+ throw new NoRegisterException("Not Registered, appId: " + appId);
}
for (int partitionId : partitionIds) {
long partitionUsedDataSize = getPartitionDataSize(appId, shuffleId, partitionId);
if (shuffleBufferManager.limitHugePartition(
appId, shuffleId, partitionId, partitionUsedDataSize)) {
ShuffleServerMetrics.counterTotalRequireBufferFailedForHugePartition.inc();
- return RequireBufferStatusCode.NO_BUFFER.statusCode();
+ String errorMessage =
+ String.format(
+ "No Buffer For Huge Partition, appId: %s, shuffleId: %s, partitionIds: %s, partitionUsedDataSize: %s",
Review Comment:
How about `Huge partition is limited to writing. appId: %s, shuffleId: %s, partitionIds: %s, partitionUsedDataSize: %s` ?
--
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