Skip to content

Commit

Permalink
rename ApiException
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf committed Dec 19, 2023
1 parent cf00661 commit 06b3a18
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion google-cloud-bigtable/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@
<artifactId>grpc-alts</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Runtime dependencies for credentials -->
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
</dependency><!-- Runtime dependencies for credentials -->
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.google.bigtable.v2.MutateRowsResponse.Entry;
import com.google.cloud.bigtable.data.v2.models.MutateRowsException;
import com.google.cloud.bigtable.data.v2.models.MutateRowsException.FailedMutation;
import com.google.cloud.bigtable.gaxx.retrying.ApiExceptions;
import com.google.cloud.bigtable.gaxx.retrying.NonCancellableFuture;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
Expand Down Expand Up @@ -235,8 +236,7 @@ private void handleAttemptError(Throwable rpcError) {
FailedMutation failedMutation = FailedMutation.create(origIndex, entryError);
allFailures.add(failedMutation);

if (!com.google.cloud.bigtable.gaxx.retrying.ApiException.isRetryable2(
failedMutation.getError())
if (!ApiExceptions.isRetryable2(failedMutation.getError())
&& !failedMutation.getError().isRetryable()) {
permanentFailures.add(failedMutation);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

// TODO: move this to gax later
@InternalApi
public class ApiException {
public class ApiExceptions {

private ApiException() {}
private ApiExceptions() {}

// TODO: this should replace the existing ApiException#isRetryable() method,
// but that cant be done in bigtable, so this lives here for now.
Expand Down

0 comments on commit 06b3a18

Please sign in to comment.