@Internal public class MetadataTableAdminDao extends java.lang.Object
The metadata table will be used to keep the state of the entire Beam pipeline as well as splitting and merging partitions.
Each Beam pipeline will create its own metadata table.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CF_CONTINUATION_TOKEN |
static java.lang.String |
CF_INITIAL_TOKEN |
static java.lang.String |
CF_LOCK |
static java.lang.String |
CF_MISSING_PARTITIONS |
static java.lang.String |
CF_PARENT_LOW_WATERMARKS |
static java.lang.String |
CF_PARENT_PARTITIONS |
static java.lang.String |
CF_SHOULD_DELETE |
static java.lang.String |
CF_VERSION |
static java.lang.String |
CF_WATERMARK |
static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList<java.lang.String> |
COLUMN_FAMILIES |
static int |
CURRENT_METADATA_TABLE_VERSION |
static java.lang.String |
DEFAULT_METADATA_TABLE_NAME |
static com.google.protobuf.ByteString |
DETECT_NEW_PARTITION_SUFFIX |
static com.google.protobuf.ByteString |
NEW_PARTITION_PREFIX |
static java.lang.String |
QUALIFIER_DEFAULT |
static com.google.protobuf.ByteString |
STREAM_PARTITION_PREFIX |
Constructor and Description |
---|
MetadataTableAdminDao(com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient tableAdminClient,
com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminClient instanceAdminClient,
java.lang.String changeStreamName,
java.lang.String tableId) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUpPrefix()
Delete all the metadata rows starting with the change stream name prefix, except for detect new
partition row because it signals the existence of a pipeline with the change stream name.
|
boolean |
createMetadataTable()
Create the metadata table if it does not exist yet.
|
boolean |
doesMetadataTableExist() |
com.google.protobuf.ByteString |
getChangeStreamNamePrefix()
Return the prefix used to identify the rows belonging to this job.
|
java.lang.String |
getTableId()
Return the metadata table name.
|
boolean |
isAppProfileSingleClusterAndTransactional(java.lang.String appProfileId)
Verify the app profile is for single cluster routing with allow single-row transactions
enabled.
|
public static final java.lang.String DEFAULT_METADATA_TABLE_NAME
public static final java.lang.String CF_INITIAL_TOKEN
public static final java.lang.String CF_PARENT_PARTITIONS
public static final java.lang.String CF_PARENT_LOW_WATERMARKS
public static final java.lang.String CF_WATERMARK
public static final java.lang.String CF_CONTINUATION_TOKEN
public static final java.lang.String CF_LOCK
public static final java.lang.String CF_MISSING_PARTITIONS
public static final java.lang.String CF_VERSION
public static final java.lang.String CF_SHOULD_DELETE
public static final java.lang.String QUALIFIER_DEFAULT
public static final org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList<java.lang.String> COLUMN_FAMILIES
public static final com.google.protobuf.ByteString NEW_PARTITION_PREFIX
public static final com.google.protobuf.ByteString STREAM_PARTITION_PREFIX
public static final com.google.protobuf.ByteString DETECT_NEW_PARTITION_SUFFIX
public static final int CURRENT_METADATA_TABLE_VERSION
public MetadataTableAdminDao(com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient tableAdminClient, com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminClient instanceAdminClient, java.lang.String changeStreamName, java.lang.String tableId)
public com.google.protobuf.ByteString getChangeStreamNamePrefix()
public java.lang.String getTableId()
public boolean isAppProfileSingleClusterAndTransactional(java.lang.String appProfileId)
public boolean doesMetadataTableExist()
public boolean createMetadataTable()
public void cleanUpPrefix()