SteNicholas commented on code in PR #2820:
URL: https://github.com/apache/celeborn/pull/2820#discussion_r1816391869


##########
worker/src/main/java/org/apache/celeborn/service/deploy/worker/storage/CreditStreamManager.java:
##########
@@ -158,11 +171,55 @@ private void addCredit(MapPartitionData mapPartitionData, 
int numCredit, long st
     }
   }
 
+  private void notifyRequiredSegment(
+      MapPartitionData mapPartitionData, int requiredSegmentId, long streamId, 
int subPartitionId) {
+    logger.debug(
+        "Receive RequiredSegment from client, streamId: {}, requiredSegmentId: 
{}, subPartitionId: {}",
+        streamId,
+        requiredSegmentId,
+        subPartitionId);
+    try {
+      if (mapPartitionData != null) {
+        checkState(mapPartitionData instanceof SegmentMapPartitionData);

Review Comment:
   Should this use `checkState`  to check whether `mapPartitionData instanceof 
SegmentMapPartitionData`? IMO, we could just move the check in if condition.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to