Class BigtableIO.Read
- All Implemented Interfaces:
Serializable,HasDisplayData
- Enclosing class:
BigtableIO
PTransform that reads from Google Cloud Bigtable. See the class-level Javadoc on
BigtableIO for more information.- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPCollection<com.google.bigtable.v2.Row> Override this method to specify how thisPTransformshould be expanded on the givenInputT.Deprecated.read options are configured directly on BigtableIO.read().Returns the table being read from.voidpopulateDisplayData(DisplayData.Builder builder) Register display data for the given transform or component.final StringtoString()voidvalidate(PipelineOptions options) Called before running the Pipeline to verify this transform is fully and correctly specified.withAppProfileId(String appProfileId) Returns a newBigtableIO.Readthat will read using the specified app profile id.withAppProfileId(ValueProvider<String> appProfileId) Returns a newBigtableIO.Readthat will read using the specified app profile id.withAttemptTimeout(Duration timeout) Returns a newBigtableIO.Readwith the attempt timeout.withBigtableOptions(BigtableOptions options) Deprecated.please set the configurations directly: BigtableIO.read().withProjectId(projectId).withInstanceId(instanceId).withTableId(tableId) and set credentials inPipelineOptions.withBigtableOptions(BigtableOptions.Builder optionsBuilder) Deprecated.please set the configurations directly: BigtableIO.read().withProjectId(projectId).withInstanceId(instanceId).withTableId(tableId) and set credentials inPipelineOptions.withBigtableOptionsConfigurator(SerializableFunction<BigtableOptions.Builder, BigtableOptions.Builder> configurator) Deprecated.please set the configurations directly: BigtableIO.read().withProjectId(projectId).withInstanceId(instanceId).withTableId(tableId) and set credentials inPipelineOptions.withEmulator(String emulatorHost) Returns a newBigtableIO.Readthat will use an official Bigtable emulator.withInstanceId(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.withInstanceId(ValueProvider<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.withKeyRange(ByteKeyRange keyRange) Returns a newBigtableIO.Readthat will read only rows in the specified range.withKeyRanges(List<ByteKeyRange> keyRanges) Returns a newBigtableIO.Readthat will read only rows in the specified ranges.withKeyRanges(ValueProvider<List<ByteKeyRange>> keyRanges) Returns a newBigtableIO.Readthat will read only rows in the specified ranges.withMaxBufferElementCount(@Nullable Integer maxBufferElementCount) Returns a newBigtableIO.Readthat will break up read requests into smaller batches.withOperationTimeout(Duration timeout) Returns a newBigtableIO.Readwith the operation timeout.Disables validation that the table being read from exists.withProjectId(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.withProjectId(ValueProvider<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.withRowFilter(com.google.bigtable.v2.RowFilter filter) Returns a newBigtableIO.Readthat will filter the rows read from Cloud Bigtable using the given row filter.withRowFilter(ValueProvider<com.google.bigtable.v2.RowFilter> filter) Returns a newBigtableIO.Readthat will filter the rows read from Cloud Bigtable using the given row filter.withTableId(String tableId) Returns a newBigtableIO.Readthat will read from the specified table.withTableId(ValueProvider<String> tableId) Returns a newBigtableIO.Readthat will read from the specified table.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, setDisplayData, setResourceHints, validate
-
Constructor Details
-
Read
public Read()
-
-
Method Details
-
getTableId
Returns the table being read from. -
getBigtableOptions
Deprecated.read options are configured directly on BigtableIO.read(). UsepopulateDisplayData(DisplayData.Builder)to view the current configurations.Returns the Google Cloud Bigtable instance being read from, and other parameters. -
withProjectId
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
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
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
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
Returns a newBigtableIO.Readthat will read from the specified table.Does not modify this object.
-
withTableId
Returns a newBigtableIO.Readthat will read from the specified table.Does not modify this object.
-
withAppProfileId
Returns a newBigtableIO.Readthat will read using the specified app profile id.Does not modify this object.
-
withAppProfileId
Returns a newBigtableIO.Readthat will read using the specified app profile id.Does not modify this object.
-
withBigtableOptions
Deprecated.please set the configurations directly: BigtableIO.read().withProjectId(projectId).withInstanceId(instanceId).withTableId(tableId) and set credentials inPipelineOptions.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.please set the configurations directly: BigtableIO.read().withProjectId(projectId).withInstanceId(instanceId).withTableId(tableId) and set credentials inPipelineOptions.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
@Deprecated public BigtableIO.Read withBigtableOptionsConfigurator(SerializableFunction<BigtableOptions.Builder, BigtableOptions.Builder> configurator) Deprecated.please set the configurations directly: BigtableIO.read().withProjectId(projectId).withInstanceId(instanceId).withTableId(tableId) and set credentials inPipelineOptions.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
Returns a newBigtableIO.Readthat will filter the rows read from Cloud Bigtable using the given row filter.Does not modify this object.
-
withRowFilter
Returns a newBigtableIO.Readthat will filter the rows read from Cloud Bigtable using the given row filter.Does not modify this object.
-
withMaxBufferElementCount
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
Returns a newBigtableIO.Readthat will read only rows in the specified range.Does not modify this object.
-
withKeyRanges
Returns a newBigtableIO.Readthat will read only rows in the specified ranges. Ranges must not overlap.Does not modify this object.
-
withKeyRanges
Returns a newBigtableIO.Readthat will read only rows in the specified ranges. Ranges must not overlap.Does not modify this object.
-
withoutValidation
Disables validation that the table being read from exists. -
withEmulator
Returns a newBigtableIO.Readthat will use an official Bigtable emulator.This is used for testing.
-
withAttemptTimeout
Returns a newBigtableIO.Readwith the attempt timeout. Attempt timeout controls the timeout for each remote call.Does not modify this object.
-
withOperationTimeout
Returns a newBigtableIO.Readwith the operation timeout. Operation timeout has ultimate control over how long the logic should keep trying the remote call until it gives up completely.Does not modify this object.
-
expand
Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expandin classPTransform<PBegin,PCollection<com.google.bigtable.v2.Row>>
-
validate
Description copied from class:PTransformCalled before running the Pipeline to verify this transform is fully and correctly specified.By default, does nothing.
- Overrides:
validatein classPTransform<PBegin,PCollection<com.google.bigtable.v2.Row>>
-
populateDisplayData
Description copied from class:PTransformRegister display data for the given transform or component.populateDisplayData(DisplayData.Builder)is invoked by Pipeline runners to collect display data viaDisplayData.from(HasDisplayData). Implementations may callsuper.populateDisplayData(builder)in order to register display data in the current namespace, but should otherwise usesubcomponent.populateDisplayData(builder)to use the namespace of the subcomponent.By default, does not register any display data. Implementors may override this method to provide their own display data.
- Specified by:
populateDisplayDatain interfaceHasDisplayData- Overrides:
populateDisplayDatain classPTransform<PBegin,PCollection<com.google.bigtable.v2.Row>> - Parameters:
builder- The builder to populate with display data.- See Also:
-
toString
- Overrides:
toStringin classPTransform<PBegin,PCollection<com.google.bigtable.v2.Row>>
-