Test connection failed with bigtable 2.0.0

41 views
Skip to first unread message

Sushant Kaushik

unread,
Sep 12, 2023, 8:57:58 AM9/12/23
to Google Cloud Bigtable Discuss
Hi,
I've following code w

Configuration connConfig = BigtableConfiguration.configure(projectId, instanceId);
    connConfig = BigtableConfiguration.withCredentials(connConfig, credentials);

    //Set Max RetryMs in the Bigtable Config
    connConfig.set(
            BigtableOptionsFactory.MAX_ELAPSED_BACKOFF_MILLIS_KEY,
            Long.toString(retryTimeoutMs)
    );

    try {
      return BigtableConfiguration.connect(connConfig);
    } catch (IllegalStateException e) {
      throw new ConnectException(
              "Error with getting Connection To Google Cloud Bigtable:",
              e
      );
    }

But when i upgraded my bigtable to 2.0.0, above code failed with error:
exception received in the connect path exception is java.lang.IllegalStateException: Could not find an appropriate constructor for com.google.cloud.bigtable.hbase2_x.BigtableConnection
Can someone please help me with this.

Thank you,
Sushant
Reply all
Reply to author
Forward
0 new messages