Class 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>>
    A PTransform that reads from Google Cloud Bigtable. See the class-level Javadoc on BigtableIO for more information.
    See Also:
    BigtableIO, Serialized Form
    • Constructor Detail

      • Read

        public Read()
    • 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.
        read options are configured directly on BigtableIO.read(). Use populateDisplayData(DisplayData.Builder) to view the current configurations.
        Returns the Google Cloud Bigtable instance being read from, and other parameters.
      • withTableId

        public BigtableIO.Read withTableId​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> tableId)
        Returns a new BigtableIO.Read that will read from the specified table.

        Does not modify this object.

      • withTableId

        public BigtableIO.Read withTableId​(java.lang.String tableId)
        Returns a new BigtableIO.Read that will read from the specified table.

        Does not modify this object.

      • withAppProfileId

        public BigtableIO.Read withAppProfileId​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> appProfileId)
        Returns a new BigtableIO.Read that will read using the specified app profile id.

        Does not modify this object.

      • withAppProfileId

        public BigtableIO.Read withAppProfileId​(java.lang.String appProfileId)
        Returns a new BigtableIO.Read that will read using the specified app profile id.

        Does not modify this object.

      • withRowFilter

        public BigtableIO.Read withRowFilter​(org.apache.beam.sdk.options.ValueProvider<com.google.bigtable.v2.RowFilter> filter)
        Returns a new BigtableIO.Read that 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 new BigtableIO.Read that will filter the rows read from Cloud Bigtable using the given row filter.

        Does not modify this object.

      • withMaxBufferElementCount

        public BigtableIO.Read withMaxBufferElementCount​(@Nullable java.lang.Integer maxBufferElementCount)
        Returns a new BigtableIO.Read that 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 new BigtableIO.Read that 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 new BigtableIO.Read that 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 new BigtableIO.Read that 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 new BigtableIO.Read that will use an official Bigtable emulator.

        This is used for testing.

      • withAttemptTimeout

        public BigtableIO.Read withAttemptTimeout​(org.joda.time.Duration timeout)
        Returns a new BigtableIO.Read with the attempt timeout. Attempt timeout controls the timeout for each remote call.

        Does not modify this object.

      • withOperationTimeout

        public BigtableIO.Read withOperationTimeout​(org.joda.time.Duration timeout)
        Returns a new BigtableIO.Read with 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

        public org.apache.beam.sdk.values.PCollection<com.google.bigtable.v2.Row> expand​(org.apache.beam.sdk.values.PBegin input)
        Specified by:
        expand in class org.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:
        validate in class org.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:
        populateDisplayData in interface org.apache.beam.sdk.transforms.display.HasDisplayData
        Overrides:
        populateDisplayData in class org.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:
        toString in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,​org.apache.beam.sdk.values.PCollection<com.google.bigtable.v2.Row>>