Skip to content

Commit

Permalink
chore: clean up stale dep refs (#4256)
Browse files Browse the repository at this point in the history
* chore: clean up stale dep refs

Change-Id: Ie3bbb33df4b14e7a4326b147c324dc6a0fddd2d5

* format

Change-Id: I15af77d9dd2e093d53ee8173ac53a339fd389c0c

* a couple more missing bits

Change-Id: I896864e031fa3b582094caac34c34f4163bba1d3
  • Loading branch information
igorbernstein2 authored Nov 29, 2023
1 parent 26173b3 commit 0d9ec40
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ limitations under the License.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>add-source</id>
Expand Down
2 changes: 1 addition & 1 deletion bigtable-hbase-1.x-parent/bigtable-hbase-1.x-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ limitations under the License.
Bigtable/HBase Mirroring Client conforming to HBase API 1.x. Uses hbase-client and shades all dependencies.
</description>

<properties>
<!-- define a property that can be ignored by renovate -->
<hbase1-hadoop-slf4j.version>1.6.1</hbase1-hadoop-slf4j.version>
</properties>

<dependencies>
<!-- Environment deps first -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ limitations under the License.
Bigtable/HBase Mirroring Client conforming to HBase API 2.x. Uses hbase-client and shades all dependencies.
</description>

<properties>
<!-- define a property that can be ignored by renovate -->
<hbase2-hadoop-slf4j.version>1.7.30</hbase2-hadoop-slf4j.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.hbase</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,15 @@ limitations under the License.
<groupId>com.google.api</groupId>
<artifactId>api-common</artifactId>
<version>1.10.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>

<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-compat-qual</artifactId>
<version>2.5.5</version>
<scope>provided</scope>
</dependency>

<!-- deps to be shaded -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
import org.apache.hadoop.hbase.shaded.com.google.protobuf.Message;
import org.apache.hadoop.hbase.shaded.com.google.protobuf.Service;
import org.apache.hadoop.hbase.util.Bytes;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;

/**
* Table which mirrors every two mutations to two underlying tables.
Expand All @@ -96,7 +95,7 @@ public class MirroringTable implements Table {
private static final Predicate<Object> resultIsFaultyPredicate =
new Predicate<Object>() {
@Override
public boolean apply(@NullableDecl Object o) {
public boolean apply(Object o) {
return o == null || o instanceof Throwable;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package com.google.cloud.bigtable.mirroring.core;

import com.google.common.util.concurrent.FutureCallback;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;

/**
* Write operations do not perform verification, only report failed writes. For this reason callback
Expand All @@ -26,7 +25,7 @@
public abstract class WriteOperationFutureCallback<T> implements FutureCallback<T> {

@Override
public final void onSuccess(@NullableDecl T t) {}
public final void onSuccess(T t) {}

public abstract void onFailure(Throwable throwable);
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import org.apache.hadoop.hbase.client.Mutation;
import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException;
import org.apache.hadoop.hbase.client.Row;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;

/**
* {@link MirroringBufferedMutator} implementation that performs writes to primary and secondary
Expand Down Expand Up @@ -204,7 +203,7 @@ public void run() {
this.mirroringTracer.spanFactory.wrapWithCurrentSpan(
new FutureCallback<Void>() {
@Override
public void onSuccess(@NullableDecl Void aVoid) {
public void onSuccess(Void aVoid) {
flushFinished.run();
}

Expand All @@ -225,7 +224,7 @@ public void onFailure(Throwable throwable) {
this.mirroringTracer.spanFactory.wrapWithCurrentSpan(
new FutureCallback<Void>() {
@Override
public void onSuccess(@NullableDecl Void aVoid) {
public void onSuccess(Void aVoid) {
flushFinished.run();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import org.apache.hadoop.hbase.client.Mutation;
import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException;
import org.apache.hadoop.hbase.client.Row;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;

/**
* {@link MirroringBufferedMutator} implementation that performs mutations on secondary database
Expand Down Expand Up @@ -249,7 +248,7 @@ protected FlushFutures scheduleFlushScoped(
this.mirroringTracer.spanFactory.wrapWithCurrentSpan(
new FutureCallback<Void>() {
@Override
public void onSuccess(@NullableDecl Void aVoid) {
public void onSuccess(Void aVoid) {
primaryFlushErrorsReported.set(null);
performSecondaryFlush(
dataToFlush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import org.apache.hadoop.hbase.client.Row;
import org.apache.hadoop.hbase.client.RowMutations;
import org.apache.hadoop.hbase.client.Table;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;

public class BatchHelpers {
public static FutureCallback<Void> createBatchVerificationCallback(
Expand All @@ -55,7 +54,7 @@ public static FutureCallback<Void> createBatchVerificationCallback(
final MirroringTracer mirroringTracer) {
return new FutureCallback<Void>() {
@Override
public void onSuccess(@NullableDecl Void t) {
public void onSuccess(Void t) {
// Batch is successful - all results are correct.
List<? extends Row> secondaryOperations =
failedAndSuccessfulPrimaryOperations.successfulOperations;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import org.apache.hadoop.hbase.client.Row;
import org.apache.hadoop.hbase.client.Table;
import org.apache.hadoop.hbase.client.coprocessor.Batch.Callback;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;

/**
* Helper class that handles logic related to mirroring {@link Table#batch(List, Object[])}
Expand Down Expand Up @@ -310,7 +309,7 @@ private ListenableFuture<BatchData> scheduleSecondaryWriteBatchOperations(
FutureCallback<Void> verificationCallback =
new FutureCallback<Void>() {
@Override
public void onSuccess(@NullableDecl Void aVoid) {
public void onSuccess(Void aVoid) {
verificationFuture.onSuccess(aVoid);
}

Expand Down Expand Up @@ -426,7 +425,7 @@ public ListenableFuture<Void> get() {
FutureCallback<Void> verification =
new FutureCallback<Void>() {
@Override
public void onSuccess(@NullableDecl Void result) {}
public void onSuccess(Void result) {}

@Override
public void onFailure(Throwable throwable) {
Expand All @@ -438,9 +437,8 @@ public void onFailure(Throwable throwable) {
// handler.
Function<Throwable, Void> flowControlReservationErrorConsumer =
new Function<Throwable, Void>() {
@NullableDecl
@Override
public Void apply(@NullableDecl Throwable throwable) {
public Void apply(Throwable throwable) {
flowControllerException[0] = throwable;
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.google.common.util.concurrent.SettableFuture;
import io.opencensus.common.Scope;
import java.util.concurrent.ExecutionException;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;

/**
* Static helper methods used for scheduling secondary database requests and results verification.
Expand Down Expand Up @@ -101,7 +100,7 @@ FutureCallback<? super T> wrapCallbackWithReleasingReservationAndCompletingFutur
return mirroringTracer.spanFactory.wrapWithCurrentSpan(
new FutureCallback<T>() {
@Override
public void onSuccess(@NullableDecl T t) {
public void onSuccess(T t) {
try {
Log.trace("starting verification %s", t);
callback.onSuccess(t);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import java.io.IOException;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;

/**
* Used to create named spans for tracing (using {@link #tracer}) and recording metrics related to
Expand Down Expand Up @@ -74,7 +73,7 @@ public <T> FutureCallback<? super T> wrapWithCurrentSpan(final FutureCallback<T>
final Span span = getCurrentSpan();
return new FutureCallback<T>() {
@Override
public void onSuccess(@NullableDecl T t) {
public void onSuccess(T t) {
try (Scope scope = spanAsScope(span)) {
callback.onSuccess(t);
}
Expand Down Expand Up @@ -152,7 +151,7 @@ public <T> T wrapSecondaryOperation(
public <T> FutureCallback<T> wrapReadVerificationCallback(final FutureCallback<T> callback) {
return new FutureCallback<T>() {
@Override
public void onSuccess(@NullableDecl T t) {
public void onSuccess(T t) {
try (Scope scope = MirroringSpanFactory.this.verificationScope()) {
callback.onSuccess(t);
}
Expand All @@ -175,7 +174,7 @@ public <T> FutureCallback<T> wrapWriteOperationCallback(
// it.
return new FutureCallback<T>() {
@Override
public void onSuccess(@NullableDecl T t) {
public void onSuccess(T t) {
mirroringTracer.metricsRecorder.recordSecondaryWriteErrors(operation, 0);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.Scan;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;

@InternalApi("For internal usage only")
public class VerificationContinuationFactory {
Expand All @@ -43,7 +42,7 @@ public MismatchDetector getMismatchDetector() {
public FutureCallback<Boolean> exists(final Get request, final boolean expectation) {
return new FutureCallback<Boolean>() {
@Override
public void onSuccess(@NullableDecl Boolean secondary) {
public void onSuccess(Boolean secondary) {
Log.trace("verification onSuccess exists(Get)");
VerificationContinuationFactory.this.mismatchDetector.exists(
request, expectation, secondary);
Expand All @@ -60,7 +59,7 @@ public void onFailure(Throwable throwable) {
public FutureCallback<boolean[]> existsAll(final List<Get> request, final boolean[] expectation) {
return new FutureCallback<boolean[]>() {
@Override
public void onSuccess(@NullableDecl boolean[] secondary) {
public void onSuccess(boolean[] secondary) {
Log.trace("verification onSuccess existsAll(List<Get>)");
VerificationContinuationFactory.this.mismatchDetector.existsAll(
request, expectation, secondary);
Expand All @@ -77,7 +76,7 @@ public void onFailure(Throwable throwable) {
public FutureCallback<Result> get(final Get request, final Result expectation) {
return new FutureCallback<Result>() {
@Override
public void onSuccess(@NullableDecl Result secondary) {
public void onSuccess(Result secondary) {
Log.trace("verification onSuccess get(Get)");
VerificationContinuationFactory.this.mismatchDetector.get(request, expectation, secondary);
}
Expand All @@ -93,7 +92,7 @@ public void onFailure(Throwable throwable) {
public FutureCallback<Result[]> get(final List<Get> request, final Result[] expectation) {
return new FutureCallback<Result[]>() {
@Override
public void onSuccess(@NullableDecl Result[] secondary) {
public void onSuccess(Result[] secondary) {
Log.trace("verification onSuccess get(List<Get>)");
VerificationContinuationFactory.this.mismatchDetector.get(request, expectation, secondary);
}
Expand Down Expand Up @@ -122,7 +121,7 @@ public FutureCallback<Void> scannerNext(
final MismatchDetector.ScannerResultVerifier unmatched) {
return new FutureCallback<Void>() {
@Override
public void onSuccess(@NullableDecl Void ignored) {
public void onSuccess(Void ignored) {
synchronized (verificationLock) {
AsyncScannerVerificationPayload results = resultQueue.remove();
Log.trace("verification onSuccess scannerNext(Scan, int)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
import java.util.concurrent.TimeoutException;
import org.apache.hadoop.hbase.client.ResultScanner;
import org.apache.hadoop.hbase.client.Scan;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
import org.junit.Before;
import org.junit.Test;
import org.junit.function.ThrowingRunnable;
Expand Down Expand Up @@ -279,8 +278,7 @@ private FutureCallback<AsyncScannerVerificationPayload> addContextToListCallback
final List<ScannerRequestContext> list) {
return new FutureCallback<AsyncScannerVerificationPayload>() {
@Override
public void onSuccess(
@NullableDecl AsyncScannerVerificationPayload asyncScannerVerificationPayload) {
public void onSuccess(AsyncScannerVerificationPayload asyncScannerVerificationPayload) {
list.add(asyncScannerVerificationPayload.context);
}

Expand Down
25 changes: 6 additions & 19 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@
"^junit:junit",
"^com.google.truth:truth",
"^org.mockito:mockito-core",
"^org.objenesis:objenesis"
"^org.objenesis:objenesis",
"^truth.version",
"^junit.version",
"^hamcrest.version",
"^mockito.version"
],
"semanticCommitType": "test",
"semanticCommitScope": "deps"
Expand All @@ -72,24 +76,6 @@
],
"groupName": "jackson dependencies"
},
{
// pin to beam deps
"packagePatterns": ["^beam-slf4j.version"],
"enabled": false
},
{
// pin to hbase deps
"packagePatterns": [
"^hbase.-hadoop-slf4j.version",
"^hbase.-mapreduce-slfj.version"
],
"enabled": false
},
{
// pin to bigtable version
"packagePatterns": ["^grpc-conscrypt.version"],
"enabled": false
},
{
// pinned to avoid internal deps conflict between beam-sdks-java-core & beam-model-pipeline
"packagePatterns": ["^error_prone_annotations"],
Expand All @@ -107,6 +93,7 @@
"^com.google.cloud:google-cloud-bigtable",
"^com.google.cloud:google-cloud-bigtable-emulator-core",
"^com.google.cloud:google-cloud-bigtable-emulator",
"^com.google.cloud:google-cloud-shared-config",
],
"groupName": "google-cloud-bigtable dependencies"
}
Expand Down

0 comments on commit 0d9ec40

Please sign in to comment.