Skip to content

Commit

Permalink
[CELEBORN-1190][FOLLOWUP] Fix WARNING of error prone
Browse files Browse the repository at this point in the history
  • Loading branch information
SteNicholas committed Nov 7, 2024
1 parent 443fc32 commit 5f896c4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1910,6 +1910,7 @@ public TransportClientFactory getDataClientFactory() {
return dataClientFactory;
}

@Override
public void excludeFailedFetchLocation(String hostAndFetchPort, Exception e) {
if (pushReplicateEnabled
&& fetchExcludeWorkerOnFailureEnabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.LongAdder;

import scala.Tuple2;
Expand Down Expand Up @@ -316,23 +315,6 @@ private boolean isExcluded(PartitionLocation location) {
}
}

private boolean isCriticalCause(Exception e) {
boolean rpcTimeout =
e instanceof IOException
&& e.getCause() != null
&& e.getCause() instanceof TimeoutException;
boolean connectException =
e instanceof CelebornIOException
&& e.getMessage() != null
&& (e.getMessage().startsWith("Connecting to")
|| e.getMessage().startsWith("Failed to"));
boolean fetchChunkTimeout =
e instanceof CelebornIOException
&& e.getCause() != null
&& e.getCause() instanceof IOException;
return connectException || rpcTimeout || fetchChunkTimeout;
}

private PartitionReader createReaderWithRetry(
PartitionLocation location, PbStreamHandler pbStreamHandler) throws IOException {
Exception lastException = null;
Expand Down

0 comments on commit 5f896c4

Please sign in to comment.