Jorge Lee created BEAM-6817:
-------------------------------
Summary: NoSuchMethodError when writing to BigTable
Key: BEAM-6817
URL: https://issues.apache.org/jira/browse/BEAM-6817
Project: Beam
Issue Type: Bug
Components: io-java-gcp
Affects Versions: 2.11.0, 2.10.0
Reporter: Jorge Lee
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
{code}
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)
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)