Class BigtableTestClients

java.lang.Object
io.github.flink.gcp.connector.testutils.bigtable.BigtableTestClients

@Internal public final class BigtableTestClients extends Object
Stock Bigtable clients pointed at an emulator container.

Harness-owned and deliberately unshaded: in the SQL module's smoke test these run beside the uber-jar's relocated copies, so that the two demonstrably coexist on one classpath — which is the property an uber-jar exists to provide and no jar-content assertion can show.

  • Method Summary

    Modifier and Type
    Method
    Description
    static com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient
    adminClient(org.testcontainers.containers.BigtableEmulatorContainer emulator, String project, String instance)
    Opens an admin client against the emulator.
    static com.google.cloud.bigtable.data.v2.BigtableDataClient
    dataClient(org.testcontainers.containers.BigtableEmulatorContainer emulator, String project, String instance)
    Opens a data client against the emulator.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • adminClient

      public static com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient adminClient(org.testcontainers.containers.BigtableEmulatorContainer emulator, String project, String instance) throws IOException
      Opens an admin client against the emulator.
      Parameters:
      emulator - the running container
      project - the project the tables are addressed under
      instance - the instance the tables are addressed under
      Returns:
      the client, which the caller closes
      Throws:
      IOException - if the client cannot be created
    • dataClient

      public static com.google.cloud.bigtable.data.v2.BigtableDataClient dataClient(org.testcontainers.containers.BigtableEmulatorContainer emulator, String project, String instance) throws IOException
      Opens a data client against the emulator.
      Parameters:
      emulator - the running container
      project - the project the rows are addressed under
      instance - the instance the rows are addressed under
      Returns:
      the client, which the caller closes
      Throws:
      IOException - if the client cannot be created