Class MetadataTableEncoder
java.lang.Object
org.apache.beam.sdk.io.gcp.bigtable.changestreams.encoder.MetadataTableEncoder
Helper methods that simplifies some conversion and extraction of metadata table content.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisRowLocked(Row row) Returns true if row is locked.static List<ChangeStreamContinuationToken> Return a list of initial token from a row.parseLockUuid(Row row) Returns the uuid from a row.parseTokenFromRow(Row row) Read the continuation token cell of a row from ReadRows.parseWatermarkFromRow(Row row) Read the watermark cell of a row from ReadRows.Return the timestamp (the time it was updated) of the watermark cell.
-
Constructor Details
-
MetadataTableEncoder
public MetadataTableEncoder()
-
-
Method Details
-
parseWatermarkFromRow
Read the watermark cell of a row from ReadRows.- Parameters:
row- row to extract the watermark from- Returns:
- the watermark of the row
-
parseWatermarkLastUpdatedFromRow
Return the timestamp (the time it was updated) of the watermark cell.- Parameters:
row- row to extract the timestamp from- Returns:
- the timestamp of the watermark cell.
-
parseTokenFromRow
Read the continuation token cell of a row from ReadRows.- Parameters:
row- to extract the token from- Returns:
- the token of the row
-
isRowLocked
Returns true if row is locked.- Parameters:
row- to evaluate if it's locked- Returns:
- true if row is locked. Otherwise, false.
-
parseLockUuid
Returns the uuid from a row.- Parameters:
row- to extract the uuid- Returns:
- the uuid of the row
-
parseInitialContinuationTokens
public static List<ChangeStreamContinuationToken> parseInitialContinuationTokens(Row row) throws InvalidProtocolBufferException Return a list of initial token from a row.- Parameters:
row- to extract the initial tokens- Returns:
- a list of tokens from the row
- Throws:
InvalidProtocolBufferException- when failed to parse tokens.
-