Class BigtableIO.Read
- java.lang.Object
-
- org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<com.google.bigtable.v2.Row>>
-
- org.apache.beam.sdk.io.gcp.bigtable.BigtableIO.Read
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.beam.sdk.transforms.display.HasDisplayData
- Enclosing class:
- BigtableIO
public abstract static class BigtableIO.Read extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<com.google.bigtable.v2.Row>>APTransformthat reads from Google Cloud Bigtable. See the class-level Javadoc onBigtableIOfor more information.- See Also:
BigtableIO, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Read()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.apache.beam.sdk.values.PCollection<com.google.bigtable.v2.Row>expand(org.apache.beam.sdk.values.PBegin input)@Nullable com.google.cloud.bigtable.config.BigtableOptionsgetBigtableOptions()Deprecated.will be replaced by bigtable options configurator.@Nullable java.lang.StringgetTableId()Returns the table being read from.voidpopulateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)java.lang.StringtoString()voidvalidate(org.apache.beam.sdk.options.PipelineOptions options)BigtableIO.ReadwithBigtableOptions(com.google.cloud.bigtable.config.BigtableOptions options)Deprecated.will be replaced by bigtable options configurator.BigtableIO.ReadwithBigtableOptions(com.google.cloud.bigtable.config.BigtableOptions.Builder optionsBuilder)Deprecated.will be replaced by bigtable options configurator.BigtableIO.ReadwithBigtableOptionsConfigurator(org.apache.beam.sdk.transforms.SerializableFunction<com.google.cloud.bigtable.config.BigtableOptions.Builder,com.google.cloud.bigtable.config.BigtableOptions.Builder> configurator)Returns a newBigtableIO.Readthat will read from the Cloud Bigtable instance with customized options provided by given configurator.BigtableIO.ReadwithEmulator(java.lang.String emulatorHost)Returns a newBigtableIO.Readthat will use an official Bigtable emulator.BigtableIO.ReadwithInstanceId(java.lang.String instanceId)Returns a newBigtableIO.Readthat will read from 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.ReadwithInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> instanceId)Returns a newBigtableIO.Readthat will read from 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.ReadwithKeyRange(org.apache.beam.sdk.io.range.ByteKeyRange keyRange)Returns a newBigtableIO.Readthat will read only rows in the specified range.BigtableIO.ReadwithKeyRanges(java.util.List<org.apache.beam.sdk.io.range.ByteKeyRange> keyRanges)Returns a newBigtableIO.Readthat will read only rows in the specified ranges.BigtableIO.ReadwithKeyRanges(org.apache.beam.sdk.options.ValueProvider<java.util.List<org.apache.beam.sdk.io.range.ByteKeyRange>> keyRanges)Returns a newBigtableIO.Readthat will read only rows in the specified ranges.BigtableIO.ReadwithMaxBufferElementCount(@Nullable java.lang.Integer maxBufferElementCount)Returns a newBigtableIO.Readthat will break up read requests into smaller batches.BigtableIO.ReadwithoutValidation()Disables validation that the table being read from exists.BigtableIO.ReadwithProjectId(java.lang.String projectId)Returns a newBigtableIO.Readthat will read from 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.ReadwithProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> projectId)Returns a newBigtableIO.Readthat will read from 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.ReadwithRowFilter(com.google.bigtable.v2.RowFilter filter)Returns a newBigtableIO.Readthat will filter the rows read from Cloud Bigtable using the given row filter.BigtableIO.ReadwithRowFilter(org.apache.beam.sdk.options.ValueProvider<com.google.bigtable.v2.RowFilter> filter)Returns a newBigtableIO.Readthat will filter the rows read from Cloud Bigtable using the given row filter.BigtableIO.ReadwithTableId(java.lang.String tableId)Returns a newBigtableIO.Readthat will read from the specified table.BigtableIO.ReadwithTableId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> tableId)Returns a newBigtableIO.Readthat will read from the specified table.
-
-
-
Method Detail
-
getTableId
public @Nullable java.lang.String getTableId()
Returns the table being read from.
-
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 read from, and other parameters.
-
withProjectId
public BigtableIO.Read withProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> projectId)
Returns a newBigtableIO.Readthat will read from 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.Read withProjectId(java.lang.String projectId)
Returns a newBigtableIO.Readthat will read from 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.Read withInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> instanceId)
Returns a newBigtableIO.Readthat will read from 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.Read withInstanceId(java.lang.String instanceId)
Returns a newBigtableIO.Readthat will read from 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.Read withTableId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> tableId)
Returns a newBigtableIO.Readthat will read from the specified table.Does not modify this object.
-
withTableId
public BigtableIO.Read withTableId(java.lang.String tableId)
Returns a newBigtableIO.Readthat will read from the specified table.Does not modify this object.
-
withBigtableOptions
@Deprecated public BigtableIO.Read 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.Readthat will read from the Cloud Bigtable instance indicated bywithProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String>), and using any other specified customizations.Does not modify this object.
-
withBigtableOptions
@Deprecated public BigtableIO.Read 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.Readthat will read from 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.Read.Does not modify this object.
-
withBigtableOptionsConfigurator
public BigtableIO.Read 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.Readthat 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.
-
withRowFilter
public BigtableIO.Read withRowFilter(org.apache.beam.sdk.options.ValueProvider<com.google.bigtable.v2.RowFilter> filter)
Returns a newBigtableIO.Readthat will filter the rows read from Cloud Bigtable using the given row filter.Does not modify this object.
-
withRowFilter
public BigtableIO.Read withRowFilter(com.google.bigtable.v2.RowFilter filter)
Returns a newBigtableIO.Readthat will filter the rows read from Cloud Bigtable using the given row filter.Does not modify this object.
-
withMaxBufferElementCount
@Experimental(SOURCE_SINK) public BigtableIO.Read withMaxBufferElementCount(@Nullable java.lang.Integer maxBufferElementCount)
Returns a newBigtableIO.Readthat will break up read requests into smaller batches. This function will switch the base BigtableIO.Reader class to using the SegmentReader. If null is passed, this behavior will be disabled and the stream reader will be used.Does not modify this object.
When we have a builder, we initialize the value. When they call the method then we override the value
-
withKeyRange
public BigtableIO.Read withKeyRange(org.apache.beam.sdk.io.range.ByteKeyRange keyRange)
Returns a newBigtableIO.Readthat will read only rows in the specified range.Does not modify this object.
-
withKeyRanges
public BigtableIO.Read withKeyRanges(org.apache.beam.sdk.options.ValueProvider<java.util.List<org.apache.beam.sdk.io.range.ByteKeyRange>> keyRanges)
Returns a newBigtableIO.Readthat will read only rows in the specified ranges. Ranges must not overlap.Does not modify this object.
-
withKeyRanges
public BigtableIO.Read withKeyRanges(java.util.List<org.apache.beam.sdk.io.range.ByteKeyRange> keyRanges)
Returns a newBigtableIO.Readthat will read only rows in the specified ranges. Ranges must not overlap.Does not modify this object.
-
withoutValidation
public BigtableIO.Read withoutValidation()
Disables validation that the table being read from exists.
-
withEmulator
public BigtableIO.Read withEmulator(java.lang.String emulatorHost)
Returns a newBigtableIO.Readthat will use an official Bigtable emulator.This is used for testing.
-
expand
public org.apache.beam.sdk.values.PCollection<com.google.bigtable.v2.Row> expand(org.apache.beam.sdk.values.PBegin input)
- Specified by:
expandin classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<com.google.bigtable.v2.Row>>
-
validate
public void validate(org.apache.beam.sdk.options.PipelineOptions options)
- Overrides:
validatein classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<com.google.bigtable.v2.Row>>
-
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.PBegin,org.apache.beam.sdk.values.PCollection<com.google.bigtable.v2.Row>>
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<com.google.bigtable.v2.Row>>
-
-