Skip to content

Commit 94e211c

Browse files
authored
[MINOR] Eliminate the usage of the shaded Guava Sets class (#2432)
### What changes were proposed in this pull request? Replacing shaded guava's `Sets` class usage with `HashSet` ### Why are the changes needed? Hadoop can throw this error if the classpath is not correctly set: ``` org.apache.uniffle.client.impl.ShuffleWriteClientImpl: Unexpected exceptions occurred while sending shuffle data java.util.concurrent.CompletionException: java.lang.NoClassDefFoundError: org/apache/hbase/thirdparty/org/glassfish/jersey/internal/guava/Sets at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ``` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? UTs.
1 parent 650d1c7 commit 94e211c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcNettyClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.apache.uniffle.client.impl.grpc;
1919

2020
import java.util.ArrayList;
21+
import java.util.HashSet;
2122
import java.util.List;
2223
import java.util.Map;
2324
import java.util.Set;
@@ -26,7 +27,6 @@
2627

2728
import com.google.common.annotations.VisibleForTesting;
2829
import org.apache.commons.lang3.tuple.Pair;
29-
import org.apache.hbase.thirdparty.org.glassfish.jersey.internal.guava.Sets;
3030
import org.slf4j.Logger;
3131
import org.slf4j.LoggerFactory;
3232

@@ -142,7 +142,7 @@ public RssSendShuffleDataResponse sendShuffleData(RssSendShuffleDataRequest requ
142142
int stageAttemptNumber = request.getStageAttemptNumber();
143143
boolean isSuccessful = true;
144144
AtomicReference<StatusCode> failedStatusCode = new AtomicReference<>(StatusCode.INTERNAL_ERROR);
145-
Set<Integer> needSplitPartitionIds = Sets.newHashSet();
145+
Set<Integer> needSplitPartitionIds = new HashSet<>();
146146
for (Map.Entry<Integer, Map<Integer, List<ShuffleBlockInfo>>> stb :
147147
shuffleIdToBlocks.entrySet()) {
148148
int shuffleId = stb.getKey();

0 commit comments

Comments
 (0)