apache / apache/beam

NoSuchMethodError when writing to BigTable

Open
#19,455 0 comments 0 reactions 0 assignees View on GitHub
bug gcp io java P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

In short, Beam is invoked and deprecated and removed function from Guava in its BigTable code. The method `Futures.addCallback(future, callback)` has been removed since guava-26.0.

This is the guava commit that effectively removes the method https://github.com/google/guava/commit/87d87f5cac5a540d46a6382683722ead7b72d1b3#diff-5c3f56c125a86c8adde4e8754f104468. The deprecation notice is there since guava 22.0

Beam is calling this method here https://github.com/apache/beam/blob/release-2.11.0/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableServiceImpl.java#L230

The PR in https://issues.apache.org/jira/browse/BEAM-4948 contains a possible fix, but it looks like it never got merged back.

The bottom of a Dataflow stacktrace looks like
```

Caused by: java.lang.NoSuchMethodError: com.google.common.util.concurrent.Futures.addCallback(Lcom/google/common/util/concurrent/ListenableFuture;Lcom/google/common/util/concurrent/FutureCallback;)V
at
org.apache.beam.sdk.io.gcp.bigtable.BigtableServiceImpl$BigtableWriterImpl.writeRecord(BigtableServiceImpl.java:230)
at
org.apache.beam.sdk.io.gcp.bigtable.BigtableIO$Write$BigtableWriterFn.processElement(BigtableIO.java:709)

```

Imported from Jira [BEAM-6817](https://issues.apache.org/jira/browse/BEAM-6817). Original Jira may contain additional context.
Reported by: jrglee.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.