Class BigtableTestClients
java.lang.Object
io.github.flink.gcp.connector.testutils.bigtable.BigtableTestClients
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 TypeMethodDescriptionstatic com.google.cloud.bigtable.admin.v2.BigtableTableAdminClientadminClient(org.testcontainers.containers.BigtableEmulatorContainer emulator, String project, String instance) Opens an admin client against the emulator.static com.google.cloud.bigtable.data.v2.BigtableDataClientdataClient(org.testcontainers.containers.BigtableEmulatorContainer emulator, String project, String instance) Opens a data client against the emulator.
-
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 containerproject- the project the tables are addressed underinstance- 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 containerproject- the project the rows are addressed underinstance- the instance the rows are addressed under- Returns:
- the client, which the caller closes
- Throws:
IOException- if the client cannot be created
-