com.google.cloud.bigtable.beam
Class CloudBigtableScanConfiguration
- java.lang.Object
-
- com.google.cloud.bigtable.beam.CloudBigtableConfiguration
-
- com.google.cloud.bigtable.beam.CloudBigtableTableConfiguration
-
- com.google.cloud.bigtable.beam.CloudBigtableScanConfiguration
-
- All Implemented Interfaces:
- Serializable
public class CloudBigtableScanConfiguration extends CloudBigtableTableConfiguration
This class defines configuration that a Cloud Bigtable client needs to connect to a user's Cloud Bigtable instance; a table to connect to in the instance; and a filter on the table in the form of aScan
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
CloudBigtableScanConfiguration.Builder
Builds aCloudBigtableScanConfiguration
.
-
Field Summary
Fields Modifier and Type Field and Description protected static String
PLACEHOLDER_APP_PROFILE_ID
protected static String
PLACEHOLDER_INSTANCE_ID
protected static String
PLACEHOLDER_PROJECT_ID
protected static String
PLACEHOLDER_TABLE_ID
-
Fields inherited from class com.google.cloud.bigtable.beam.CloudBigtableTableConfiguration
tableId
-
Fields inherited from class com.google.cloud.bigtable.beam.CloudBigtableConfiguration
VALUE_UNAVAILABLE
-
-
Constructor Summary
Constructors Modifier Constructor and Description protected
CloudBigtableScanConfiguration(ValueProvider<String> projectId, ValueProvider<String> instanceId, ValueProvider<String> tableId, ValueProvider<com.google.bigtable.repackaged.com.google.bigtable.v2.ReadRowsRequest> request, Map<String,ValueProvider<String>> additionalConfiguration)
Creates aCloudBigtableScanConfiguration
using the specified project ID, instance ID, table ID,Scan
and additional connection configuration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
copyConfig(CloudBigtableScanConfiguration.Builder builder)
boolean
equals(Object obj)
Compares this configuration with the specified object.static CloudBigtableScanConfiguration
fromConfig(CloudBigtableTableConfiguration config, Scan scan)
Converts aCloudBigtableTableConfiguration
object to aCloudBigtableScanConfiguration
that will perform the specifiedScan
on the table.com.google.bigtable.repackaged.com.google.bigtable.v2.ReadRowsRequest
getRequest()
Gets theScan
used to filter the table.byte[]
getStartRow()
byte[]
getStopRow()
void
populateDisplayData(DisplayData.Builder builder)
CloudBigtableScanConfiguration.Builder
toBuilder()
Creates a newCloudBigtableConfiguration.Builder
object containing the existing configuration.ByteKeyRange
toByteKeyRange()
Creates aByteKeyRange
representing the start and stop keys for this instance.-
Methods inherited from class com.google.cloud.bigtable.beam.CloudBigtableTableConfiguration
copyConfig, getTableId, validate
-
Methods inherited from class com.google.cloud.bigtable.beam.CloudBigtableConfiguration
areParametersAccessible, checkNotNullOrEmpty, copyConfig, getAppProfileId, getConfiguration, getDisplayValue, getInstanceId, getProjectId, toBigtableOptions, toHBaseConfig
-
-
-
-
Field Detail
-
PLACEHOLDER_TABLE_ID
protected static final String PLACEHOLDER_TABLE_ID
- See Also:
- Constant Field Values
-
PLACEHOLDER_PROJECT_ID
protected static final String PLACEHOLDER_PROJECT_ID
- See Also:
- Constant Field Values
-
PLACEHOLDER_INSTANCE_ID
protected static final String PLACEHOLDER_INSTANCE_ID
- See Also:
- Constant Field Values
-
PLACEHOLDER_APP_PROFILE_ID
protected static final String PLACEHOLDER_APP_PROFILE_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CloudBigtableScanConfiguration
protected CloudBigtableScanConfiguration(ValueProvider<String> projectId, ValueProvider<String> instanceId, ValueProvider<String> tableId, ValueProvider<com.google.bigtable.repackaged.com.google.bigtable.v2.ReadRowsRequest> request, Map<String,ValueProvider<String>> additionalConfiguration)
Creates aCloudBigtableScanConfiguration
using the specified project ID, instance ID, table ID,Scan
and additional connection configuration.- Parameters:
projectId
- The project ID for the instance.instanceId
- The instance ID.tableId
- The table to connect to in the instance.request
- TheReadRowsRequest
that will be used to filter the table.additionalConfiguration
- AMap
with additional connection configuration.
-
-
Method Detail
-
fromConfig
public static CloudBigtableScanConfiguration fromConfig(CloudBigtableTableConfiguration config, Scan scan)
Converts aCloudBigtableTableConfiguration
object to aCloudBigtableScanConfiguration
that will perform the specifiedScan
on the table.- Parameters:
config
- TheCloudBigtableTableConfiguration
object.scan
- TheScan
to add to the configuration.- Returns:
- The new
CloudBigtableScanConfiguration
.
-
getRequest
public com.google.bigtable.repackaged.com.google.bigtable.v2.ReadRowsRequest getRequest()
Gets theScan
used to filter the table.- Returns:
- The
Scan
.
-
getStartRow
public byte[] getStartRow()
- Returns:
- The start row for this configuration.
-
getStopRow
public byte[] getStopRow()
- Returns:
- The stop row for this configuration.
-
equals
public boolean equals(Object obj)
Description copied from class:CloudBigtableConfiguration
Compares this configuration with the specified object.- Overrides:
equals
in classCloudBigtableTableConfiguration
- Parameters:
obj
- The object to compare this configuration against.- Returns:
true
if the given object has the same configuration,false
otherwise.
-
toBuilder
public CloudBigtableScanConfiguration.Builder toBuilder()
Description copied from class:CloudBigtableConfiguration
Creates a newCloudBigtableConfiguration.Builder
object containing the existing configuration.- Overrides:
toBuilder
in classCloudBigtableTableConfiguration
- Returns:
- A new
CloudBigtableConfiguration.Builder
.
-
copyConfig
public void copyConfig(CloudBigtableScanConfiguration.Builder builder)
-
toByteKeyRange
public ByteKeyRange toByteKeyRange()
Creates aByteKeyRange
representing the start and stop keys for this instance.- Returns:
- A
ByteKeyRange
.
-
populateDisplayData
public void populateDisplayData(DisplayData.Builder builder)
- Overrides:
populateDisplayData
in classCloudBigtableTableConfiguration
-
-