Class BigtableIO.Write
- java.lang.Object
-
- org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>>,org.apache.beam.sdk.values.PDone>
-
- org.apache.beam.sdk.io.gcp.bigtable.BigtableIO.Write
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.beam.sdk.transforms.display.HasDisplayData
- Enclosing class:
- BigtableIO
public abstract static class BigtableIO.Write extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>>,org.apache.beam.sdk.values.PDone>APTransformthat writes to Google Cloud Bigtable. See the class-level Javadoc onBigtableIOfor more information.- See Also:
BigtableIO, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Write()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.apache.beam.sdk.values.PDoneexpand(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>> input)@Nullable com.google.cloud.bigtable.config.BigtableOptionsgetBigtableOptions()Deprecated.will be replaced by bigtable options configurator.voidpopulateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)java.lang.StringtoString()voidvalidate(org.apache.beam.sdk.options.PipelineOptions options)BigtableIO.WritewithBigtableOptions(com.google.cloud.bigtable.config.BigtableOptions options)Deprecated.will be replaced by bigtable options configurator.BigtableIO.WritewithBigtableOptions(com.google.cloud.bigtable.config.BigtableOptions.Builder optionsBuilder)Deprecated.will be replaced by bigtable options configurator.BigtableIO.WritewithBigtableOptionsConfigurator(org.apache.beam.sdk.transforms.SerializableFunction<com.google.cloud.bigtable.config.BigtableOptions.Builder,com.google.cloud.bigtable.config.BigtableOptions.Builder> configurator)Returns a newBigtableIO.Writethat will read from the Cloud Bigtable instance with customized options provided by given configurator.BigtableIO.WritewithEmulator(java.lang.String emulatorHost)Returns a newBigtableIO.Writethat will use an official Bigtable emulator.BigtableIO.WritewithInstanceId(java.lang.String instanceId)Returns a newBigtableIO.Writethat will write into the Cloud Bigtable instance indicated by given parameter, requireswithProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)to be called to determine the project.BigtableIO.WritewithInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> instanceId)Returns a newBigtableIO.Writethat will write into the Cloud Bigtable instance indicated by given parameter, requireswithProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)to be called to determine the project.BigtableIO.WritewithoutValidation()Disables validation that the table being written to exists.BigtableIO.WritewithProjectId(java.lang.String projectId)Returns a newBigtableIO.Writethat will write into the Cloud Bigtable project indicated by given parameter, requireswithInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)to be called to determine the instance.BigtableIO.WritewithProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> projectId)Returns a newBigtableIO.Writethat will write into the Cloud Bigtable project indicated by given parameter, requireswithInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)to be called to determine the instance.BigtableIO.WritewithTableId(java.lang.String tableId)Returns a newBigtableIO.Writethat will write to the specified table.BigtableIO.WritewithTableId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> tableId)Returns a newBigtableIO.Writethat will write to the specified table.BigtableIO.WriteWithResultswithWriteResults()Returns aBigtableIO.WriteWithResultsthat will emit aBigtableWriteResultfor each batch of rows written.
-
-
-
Method Detail
-
getBigtableOptions
@Deprecated public @Nullable com.google.cloud.bigtable.config.BigtableOptions getBigtableOptions()
Deprecated.will be replaced by bigtable options configurator.Returns the Google Cloud Bigtable instance being written to, and other parameters.
-
withProjectId
public BigtableIO.Write withProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> projectId)
Returns a newBigtableIO.Writethat will write into the Cloud Bigtable project indicated by given parameter, requireswithInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)to be called to determine the instance.Does not modify this object.
-
withProjectId
public BigtableIO.Write withProjectId(java.lang.String projectId)
Returns a newBigtableIO.Writethat will write into the Cloud Bigtable project indicated by given parameter, requireswithInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)to be called to determine the instance.Does not modify this object.
-
withInstanceId
public BigtableIO.Write withInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> instanceId)
Returns a newBigtableIO.Writethat will write into the Cloud Bigtable instance indicated by given parameter, requireswithProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)to be called to determine the project.Does not modify this object.
-
withInstanceId
public BigtableIO.Write withInstanceId(java.lang.String instanceId)
Returns a newBigtableIO.Writethat will write into the Cloud Bigtable instance indicated by given parameter, requireswithProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)to be called to determine the project.Does not modify this object.
-
withTableId
public BigtableIO.Write withTableId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> tableId)
Returns a newBigtableIO.Writethat will write to the specified table.Does not modify this object.
-
withTableId
public BigtableIO.Write withTableId(java.lang.String tableId)
Returns a newBigtableIO.Writethat will write to the specified table.Does not modify this object.
-
withBigtableOptions
@Deprecated public BigtableIO.Write withBigtableOptions(com.google.cloud.bigtable.config.BigtableOptions options)
Deprecated.will be replaced by bigtable options configurator.WARNING: Should be used only to specify additional parameters for connection to the Cloud Bigtable, instanceId and projectId should be provided overwithInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)andwithProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)respectively.Returns a new
BigtableIO.Writethat will write to the Cloud Bigtable instance indicated by the given options, and using any other specified customizations.Does not modify this object.
-
withBigtableOptions
@Deprecated public BigtableIO.Write withBigtableOptions(com.google.cloud.bigtable.config.BigtableOptions.Builder optionsBuilder)
Deprecated.will be replaced by bigtable options configurator.WARNING: Should be used only to specify additional parameters for connection to the Cloud Bigtable, instanceId and projectId should be provided overwithInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)andwithProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)respectively.Returns a new
BigtableIO.Writethat will write to the Cloud Bigtable instance indicated by the given options, and using any other specified customizations.Clones the given
BigtableOptionsbuilder so that any further changes will have no effect on the returnedBigtableIO.Write.Does not modify this object.
-
withBigtableOptionsConfigurator
public BigtableIO.Write withBigtableOptionsConfigurator(org.apache.beam.sdk.transforms.SerializableFunction<com.google.cloud.bigtable.config.BigtableOptions.Builder,com.google.cloud.bigtable.config.BigtableOptions.Builder> configurator)
Returns a newBigtableIO.Writethat will read from the Cloud Bigtable instance with customized options provided by given configurator.WARNING: instanceId and projectId should not be provided here and should be provided over
withProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>)andwithInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>).Does not modify this object.
-
withoutValidation
public BigtableIO.Write withoutValidation()
Disables validation that the table being written to exists.
-
withEmulator
public BigtableIO.Write withEmulator(java.lang.String emulatorHost)
Returns a newBigtableIO.Writethat will use an official Bigtable emulator.This is used for testing.
-
withWriteResults
public BigtableIO.WriteWithResults withWriteResults()
Returns aBigtableIO.WriteWithResultsthat will emit aBigtableWriteResultfor each batch of rows written.
-
expand
public org.apache.beam.sdk.values.PDone expand(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>> input)
- Specified by:
expandin classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>>,org.apache.beam.sdk.values.PDone>
-
validate
public void validate(org.apache.beam.sdk.options.PipelineOptions options)
- Overrides:
validatein classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>>,org.apache.beam.sdk.values.PDone>
-
populateDisplayData
public void populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
- Specified by:
populateDisplayDatain interfaceorg.apache.beam.sdk.transforms.display.HasDisplayData- Overrides:
populateDisplayDatain classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>>,org.apache.beam.sdk.values.PDone>
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<com.google.protobuf.ByteString,java.lang.Iterable<com.google.bigtable.v2.Mutation>>>,org.apache.beam.sdk.values.PDone>
-
-