Class TableCreateOptions
- All Implemented Interfaces:
Serializable
CreateDisposition.CREATE_IF_NEEDED: its
column families, their value types and optional garbage-collection rules.
Unlike the Pub/Sub sink's topic settings, this object is required beside
CREATE_IF_NEEDED rather than additive: a topic can meaningfully be created with defaults, but a
Bigtable table's schema is its column families, which the sink cannot guess — a table created
without them rejects every mutation and is a table someone has to fix later. Combining options
with CreateDisposition.CREATE_NEVER is rejected at build(), and so is
CREATE_IF_NEEDED without options.
Add-only, per family. Missing declared families are added with their types and rules.
Options containing aggregate types require every existing declared type to match and inspect them
before a destination first receives data, requiring bigtable.tables.get. Raw-only options
retain name-only reconciliation of existing families. An existing family's garbage-collection
rule is neither compared nor updated. A family declared without a rule keeps Bigtable's default
of collecting nothing; see GcRule for why that choice matters for an at-least-once sink.
Validation stops at what would otherwise fail obscurely (a blank name, an empty family set); Bigtable's own name grammar and limits are left to the service, whose rejection names the field and the limit. Instances are immutable and serializable.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic TableCreateOptions.Builderbuilder()Creates a newTableCreateOptions.Builder.booleanReturns the column families to create, in declaration order, each mapped to its garbage-collection rule or tonullfor none.Returns the value type of every declared family, in declaration order.inthashCode()toString()
-
Method Details
-
builder
Creates a newTableCreateOptions.Builder.- Returns:
- a new builder
-
getColumnFamilies
Returns the column families to create, in declaration order, each mapped to its garbage-collection rule or tonullfor none. -
getColumnFamilyTypes
Returns the value type of every declared family, in declaration order. Families restored from job graphs predating typed creation are raw.- Returns:
- an immutable family-to-type map
-
equals
-
hashCode
public int hashCode() -
toString
-