com.google.cloud.bigtable.hbase
Class BigtableOptionsFactory
- java.lang.Object
-
- com.google.cloud.bigtable.hbase.BigtableOptionsFactory
-
public class BigtableOptionsFactory extends Object
Static methods to convert an instance ofConfiguration
to aBigtableOptions
instance.- Version:
- $Id: $Id
- Author:
- sduskis
-
-
Field Summary
Fields Modifier and Type Field and Description static String
ADDITIONAL_RETRY_CODES
Key to set to a comma separated list of grpc codes to retry.static String
ALLOW_NO_TIMESTAMP_RETRIES_KEY
By default, the hbase client will set the timestamp on the client side before sending a Put if it's not set already.static String
APP_PROFILE_ID_KEY
ConstantAPP_PROFILE_ID_KEY="google.bigtable.app_profile.id"
static String
BIGTABLE_ADMIN_HOST_KEY
ConstantBIGTABLE_ADMIN_HOST_KEY="google.bigtable.admin.endpoint.host"
static String
BIGTABLE_ASYNC_MUTATOR_COUNT_KEY
The number of asynchronous workers to use for buffered mutator operations.static String
BIGTABLE_BUFFERED_MUTATOR_ENABLE_THROTTLING
Turn on a feature that will reduce the likelihood of BufferedMutator overloading a Cloud Bigtable cluster.static String
BIGTABLE_BUFFERED_MUTATOR_MAX_MEMORY_KEY
The maximum amount of memory to be used for asynchronous buffered mutator RPCs.static String
BIGTABLE_BUFFERED_MUTATOR_THROTTLING_THRESHOLD_MILLIS
Tweak the throttlingstatic String
BIGTABLE_BULK_AUTOFLUSH_MS_KEY
ConstantBIGTABLE_BULK_AUTOFLUSH_MS_KEY="google.bigtable.bulk.autoflush.ms"
static String
BIGTABLE_BULK_MAX_REQUEST_SIZE_BYTES
ConstantBIGTABLE_BULK_MAX_REQUEST_SIZE_BYTES="google.bigtable.bulk.max.request.size.b"{trunked}
static String
BIGTABLE_BULK_MAX_ROW_KEY_COUNT
ConstantBIGTABLE_BULK_MAX_ROW_KEY_COUNT="google.bigtable.bulk.max.row.key.count"
static String
BIGTABLE_DATA_CHANNEL_COUNT_KEY
The number of grpc channels to open for asynchronous processing such as puts.static String
BIGTABLE_EMULATOR_HOST_KEY
ConstantBIGTABLE_HOST_KEY="google.bigtable.emulator.endpoint.host"
.static String
BIGTABLE_HOST_KEY
ConstantBIGTABLE_HOST_KEY="google.bigtable.endpoint.host"
static String
BIGTABLE_LONG_RPC_TIMEOUT_MS_KEY
Deprecated.Please useBIGTABLE_MUTATE_RPC_TIMEOUT_MS_KEY
orBIGTABLE_READ_RPC_TIMEOUT_MS_KEY
based on long operation.static String
BIGTABLE_MUTATE_RPC_TIMEOUT_MS_KEY
If timeouts are set, how many milliseconds should pass before a DEADLINE_EXCEEDED for a long mutation.static String
BIGTABLE_NAMESPACE_WARNING_KEY
Allow namespace methods to be no-opsstatic boolean
BIGTABLE_NULL_CREDENTIAL_ENABLE_DEFAULT
ConstantBIGTABLE_NULL_CREDENTIAL_ENABLE_DEFAULT=false
static String
BIGTABLE_NULL_CREDENTIAL_ENABLE_KEY
Key to allow unit tests to proceed with an invalid credential configuration.static String
BIGTABLE_PORT_KEY
ConstantBIGTABLE_PORT_KEY="google.bigtable.endpoint.port"
static String
BIGTABLE_READ_RPC_TIMEOUT_MS_KEY
If timeouts are set, how many milliseconds should pass before a DEADLINE_EXCEEDED for a long read.static String
BIGTABLE_RPC_TIMEOUT_MS_KEY
If timeouts are set, how many milliseconds should pass before a DEADLINE_EXCEEDED? Currently, this feature is experimental.static String
BIGTABLE_SERVICE_ACCOUNT_EMAIL_KEY
Key to set when using P12 keyfile authentication.static String
BIGTABLE_SERVICE_ACCOUNT_JSON_KEYFILE_LOCATION_KEY
Key to set to a location where a json security credentials file can be found.static String
BIGTABLE_SERVICE_ACCOUNT_JSON_VALUE_KEY
Key to set to a json security credentials string.static String
BIGTABLE_SERVICE_ACCOUNT_P12_KEYFILE_LOCATION_KEY
Key to set to a location where a P12 keyfile can be found that corresponds to the provided service account email address.static String
BIGTABLE_SNAPSHOT_CLUSTER_ID_KEY
ConstantBIGTABLE_SNAPSHOT_CLUSTER_ID_KEY="google.bigtable.snapshot.cluster.id"
static String
BIGTABLE_SNAPSHOT_DEFAULT_TTL_SECS_KEY
ConstantBIGTABLE_SNAPSHOT_DEFAULT_TTL_SECS_KEY="google.bigtable.snapshot.default.ttl.secs"
static String
BIGTABLE_USE_BATCH
ConstantBIGTABLE_USE_BATCH="google.bigtable.use.batch"
static String
BIGTABLE_USE_BULK_API
ConstantBIGTABLE_USE_BULK_API="google.bigtable.use.bulk.api"
static String
BIGTABLE_USE_CACHED_DATA_CHANNEL_POOL
ConstantBIGTABLE_USE_CACHED_DATA_CHANNEL_POOL="google.bigtable.use.cached.data.channel.pool"
static String
BIGTABLE_USE_GCJ_CLIENT
A flag to decide which implementation to use for data & admin operationstatic String
BIGTABLE_USE_PLAINTEXT_NEGOTIATION
ConstantBIGTABLE_USE_PLAINTEXT_NEGOTIATION="google.bigtable.use.plaintext.negotiation"
static boolean
BIGTABLE_USE_SERVICE_ACCOUNTS_DEFAULT
ConstantBIGTABLE_USE_SERVICE_ACCOUNTS_DEFAULT=true
static String
BIGTABLE_USE_SERVICE_ACCOUNTS_KEY
Key to set to enable service accounts to be used, either metadata server-based or P12-based.static String
BIGTABLE_USE_TIMEOUTS_KEY
Should timeouts be used? Currently, this feature is experimental.static String
CUSTOM_USER_AGENT_KEY
ConstantCUSTOM_USER_AGENT_KEY="google.bigtable.custom.user.agent"
static String
ENABLE_GRPC_RETRIES_KEY
Key to set to a boolean flag indicating whether or not grpc retries should be enabled.static String
ENABLE_GRPC_RETRY_DEADLINEEXCEEDED_KEY
Key to set to a boolean flag indicating whether or not to retry grpc call on deadline exceeded.static String
INITIAL_ELAPSED_BACKOFF_MILLIS_KEY
Key to set the initial amount of time to wait for retries, given a backoff policy on errors.static String
INSTANCE_ID_KEY
ConstantINSTANCE_ID_KEY="google.bigtable.instance.id"
protected static Logger
LOG
ConstantLOG
static String
MAX_ELAPSED_BACKOFF_MILLIS_KEY
Key to set the maximum amount of time to wait for retries, given a backoff policy on errors.static String
MAX_INFLIGHT_RPCS_KEY
ConstantMAX_INFLIGHT_RPCS_KEY="google.bigtable.buffered.mutator.max.in"{trunked}
static String
MAX_SCAN_TIMEOUT_RETRIES
Key to set the number of time to retry after a scan timeoutstatic String
PROJECT_ID_KEY
ConstantPROJECT_ID_KEY="google.bigtable.project.id"
static String
READ_BUFFER_SIZE
Key to set the maximum number of messages to buffer when scanning.static String
READ_PARTIAL_ROW_TIMEOUT_MS
Key to set the amount of time to wait when reading a partial row.
-
Constructor Summary
Constructors Constructor and Description BigtableOptionsFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static BigtableOptions
fromConfiguration(org.apache.hadoop.conf.Configuration configuration)
fromConfiguration.
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
ConstantLOG
-
BIGTABLE_PORT_KEY
public static final String BIGTABLE_PORT_KEY
ConstantBIGTABLE_PORT_KEY="google.bigtable.endpoint.port"
- See Also:
- Constant Field Values
-
BIGTABLE_ADMIN_HOST_KEY
public static final String BIGTABLE_ADMIN_HOST_KEY
ConstantBIGTABLE_ADMIN_HOST_KEY="google.bigtable.admin.endpoint.host"
- See Also:
- Constant Field Values
-
BIGTABLE_HOST_KEY
public static final String BIGTABLE_HOST_KEY
ConstantBIGTABLE_HOST_KEY="google.bigtable.endpoint.host"
- See Also:
- Constant Field Values
-
BIGTABLE_EMULATOR_HOST_KEY
public static final String BIGTABLE_EMULATOR_HOST_KEY
ConstantBIGTABLE_HOST_KEY="google.bigtable.emulator.endpoint.host"
. Values should be of format: `host:port`- See Also:
- Constant Field Values
-
PROJECT_ID_KEY
public static final String PROJECT_ID_KEY
ConstantPROJECT_ID_KEY="google.bigtable.project.id"
- See Also:
- Constant Field Values
-
INSTANCE_ID_KEY
public static final String INSTANCE_ID_KEY
ConstantINSTANCE_ID_KEY="google.bigtable.instance.id"
- See Also:
- Constant Field Values
-
APP_PROFILE_ID_KEY
public static final String APP_PROFILE_ID_KEY
ConstantAPP_PROFILE_ID_KEY="google.bigtable.app_profile.id"
- See Also:
- Constant Field Values
-
BIGTABLE_SNAPSHOT_CLUSTER_ID_KEY
public static final String BIGTABLE_SNAPSHOT_CLUSTER_ID_KEY
ConstantBIGTABLE_SNAPSHOT_CLUSTER_ID_KEY="google.bigtable.snapshot.cluster.id"
- See Also:
- Constant Field Values
-
BIGTABLE_SNAPSHOT_DEFAULT_TTL_SECS_KEY
public static final String BIGTABLE_SNAPSHOT_DEFAULT_TTL_SECS_KEY
ConstantBIGTABLE_SNAPSHOT_DEFAULT_TTL_SECS_KEY="google.bigtable.snapshot.default.ttl.secs"
- See Also:
- Constant Field Values
-
CUSTOM_USER_AGENT_KEY
public static final String CUSTOM_USER_AGENT_KEY
ConstantCUSTOM_USER_AGENT_KEY="google.bigtable.custom.user.agent"
- See Also:
- Constant Field Values
-
BIGTABLE_USE_SERVICE_ACCOUNTS_KEY
public static final String BIGTABLE_USE_SERVICE_ACCOUNTS_KEY
Key to set to enable service accounts to be used, either metadata server-based or P12-based. Defaults to enabled.- See Also:
- Constant Field Values
-
BIGTABLE_USE_SERVICE_ACCOUNTS_DEFAULT
public static final boolean BIGTABLE_USE_SERVICE_ACCOUNTS_DEFAULT
ConstantBIGTABLE_USE_SERVICE_ACCOUNTS_DEFAULT=true
- See Also:
- Constant Field Values
-
BIGTABLE_NULL_CREDENTIAL_ENABLE_KEY
public static final String BIGTABLE_NULL_CREDENTIAL_ENABLE_KEY
Key to allow unit tests to proceed with an invalid credential configuration.- See Also:
- Constant Field Values
-
BIGTABLE_NULL_CREDENTIAL_ENABLE_DEFAULT
public static final boolean BIGTABLE_NULL_CREDENTIAL_ENABLE_DEFAULT
ConstantBIGTABLE_NULL_CREDENTIAL_ENABLE_DEFAULT=false
- See Also:
- Constant Field Values
-
BIGTABLE_SERVICE_ACCOUNT_EMAIL_KEY
public static final String BIGTABLE_SERVICE_ACCOUNT_EMAIL_KEY
Key to set when using P12 keyfile authentication. The value should be the service account email address as displayed. If this value is not set and using service accounts is enabled, a metadata server account will be used.- See Also:
- Constant Field Values
-
BIGTABLE_SERVICE_ACCOUNT_P12_KEYFILE_LOCATION_KEY
public static final String BIGTABLE_SERVICE_ACCOUNT_P12_KEYFILE_LOCATION_KEY
Key to set to a location where a P12 keyfile can be found that corresponds to the provided service account email address.- See Also:
- Constant Field Values
-
BIGTABLE_SERVICE_ACCOUNT_JSON_KEYFILE_LOCATION_KEY
public static final String BIGTABLE_SERVICE_ACCOUNT_JSON_KEYFILE_LOCATION_KEY
Key to set to a location where a json security credentials file can be found.- See Also:
- Constant Field Values
-
BIGTABLE_SERVICE_ACCOUNT_JSON_VALUE_KEY
public static final String BIGTABLE_SERVICE_ACCOUNT_JSON_VALUE_KEY
Key to set to a json security credentials string.- See Also:
- Constant Field Values
-
ENABLE_GRPC_RETRIES_KEY
public static final String ENABLE_GRPC_RETRIES_KEY
Key to set to a boolean flag indicating whether or not grpc retries should be enabled. The default is to enable retries on failed idempotent operations.- See Also:
- Constant Field Values
-
ALLOW_NO_TIMESTAMP_RETRIES_KEY
public static final String ALLOW_NO_TIMESTAMP_RETRIES_KEY
By default, the hbase client will set the timestamp on the client side before sending a Put if it's not set already. That's done to ensure that only a single cell is written for the put if retries occur. Retries aren't common, and writing multiple cells isn't a problem in many cases. Sometimes, setting the server timestamp is beneficial. If you want the server-side time stamp, set this to true.- See Also:
- Constant Field Values
-
ADDITIONAL_RETRY_CODES
public static final String ADDITIONAL_RETRY_CODES
Key to set to a comma separated list of grpc codes to retry. SeeStatus.Code
for more information.- See Also:
- Constant Field Values
-
ENABLE_GRPC_RETRY_DEADLINEEXCEEDED_KEY
public static final String ENABLE_GRPC_RETRY_DEADLINEEXCEEDED_KEY
Key to set to a boolean flag indicating whether or not to retry grpc call on deadline exceeded. This flag is used only when grpc retries is enabled.- See Also:
- Constant Field Values
-
INITIAL_ELAPSED_BACKOFF_MILLIS_KEY
public static final String INITIAL_ELAPSED_BACKOFF_MILLIS_KEY
Key to set the initial amount of time to wait for retries, given a backoff policy on errors. This flag is used only when grpc retries is enabled.- See Also:
- Constant Field Values
-
MAX_ELAPSED_BACKOFF_MILLIS_KEY
public static final String MAX_ELAPSED_BACKOFF_MILLIS_KEY
Key to set the maximum amount of time to wait for retries, given a backoff policy on errors. This flag is used only when grpc retries is enabled.- See Also:
- Constant Field Values
-
READ_PARTIAL_ROW_TIMEOUT_MS
public static final String READ_PARTIAL_ROW_TIMEOUT_MS
Key to set the amount of time to wait when reading a partial row.- See Also:
- Constant Field Values
-
MAX_SCAN_TIMEOUT_RETRIES
public static final String MAX_SCAN_TIMEOUT_RETRIES
Key to set the number of time to retry after a scan timeout- See Also:
- Constant Field Values
-
READ_BUFFER_SIZE
public static final String READ_BUFFER_SIZE
Key to set the maximum number of messages to buffer when scanning.- See Also:
- Constant Field Values
-
BIGTABLE_DATA_CHANNEL_COUNT_KEY
public static final String BIGTABLE_DATA_CHANNEL_COUNT_KEY
The number of grpc channels to open for asynchronous processing such as puts.- See Also:
- Constant Field Values
-
BIGTABLE_USE_BULK_API
public static final String BIGTABLE_USE_BULK_API
ConstantBIGTABLE_USE_BULK_API="google.bigtable.use.bulk.api"
- See Also:
- Constant Field Values
-
BIGTABLE_USE_BATCH
public static final String BIGTABLE_USE_BATCH
ConstantBIGTABLE_USE_BATCH="google.bigtable.use.batch"
- See Also:
- Constant Field Values
-
BIGTABLE_BULK_MAX_REQUEST_SIZE_BYTES
public static final String BIGTABLE_BULK_MAX_REQUEST_SIZE_BYTES
ConstantBIGTABLE_BULK_MAX_REQUEST_SIZE_BYTES="google.bigtable.bulk.max.request.size.b"{trunked}
- See Also:
- Constant Field Values
-
BIGTABLE_BULK_MAX_ROW_KEY_COUNT
public static final String BIGTABLE_BULK_MAX_ROW_KEY_COUNT
ConstantBIGTABLE_BULK_MAX_ROW_KEY_COUNT="google.bigtable.bulk.max.row.key.count"
- See Also:
- Constant Field Values
-
BIGTABLE_BULK_AUTOFLUSH_MS_KEY
public static final String BIGTABLE_BULK_AUTOFLUSH_MS_KEY
ConstantBIGTABLE_BULK_AUTOFLUSH_MS_KEY="google.bigtable.bulk.autoflush.ms"
- See Also:
- Constant Field Values
-
MAX_INFLIGHT_RPCS_KEY
public static final String MAX_INFLIGHT_RPCS_KEY
ConstantMAX_INFLIGHT_RPCS_KEY="google.bigtable.buffered.mutator.max.in"{trunked}
- See Also:
- Constant Field Values
-
BIGTABLE_BUFFERED_MUTATOR_MAX_MEMORY_KEY
public static final String BIGTABLE_BUFFERED_MUTATOR_MAX_MEMORY_KEY
The maximum amount of memory to be used for asynchronous buffered mutator RPCs.- See Also:
- Constant Field Values
-
BIGTABLE_BUFFERED_MUTATOR_ENABLE_THROTTLING
public static final String BIGTABLE_BUFFERED_MUTATOR_ENABLE_THROTTLING
Turn on a feature that will reduce the likelihood of BufferedMutator overloading a Cloud Bigtable cluster.- See Also:
- Constant Field Values
-
BIGTABLE_BUFFERED_MUTATOR_THROTTLING_THRESHOLD_MILLIS
public static final String BIGTABLE_BUFFERED_MUTATOR_THROTTLING_THRESHOLD_MILLIS
Tweak the throttling- See Also:
- Constant Field Values
-
BIGTABLE_USE_PLAINTEXT_NEGOTIATION
public static final String BIGTABLE_USE_PLAINTEXT_NEGOTIATION
ConstantBIGTABLE_USE_PLAINTEXT_NEGOTIATION="google.bigtable.use.plaintext.negotiation"
- See Also:
- Constant Field Values
-
BIGTABLE_USE_CACHED_DATA_CHANNEL_POOL
public static final String BIGTABLE_USE_CACHED_DATA_CHANNEL_POOL
ConstantBIGTABLE_USE_CACHED_DATA_CHANNEL_POOL="google.bigtable.use.cached.data.channel.pool"
- See Also:
- Constant Field Values
-
BIGTABLE_ASYNC_MUTATOR_COUNT_KEY
public static final String BIGTABLE_ASYNC_MUTATOR_COUNT_KEY
The number of asynchronous workers to use for buffered mutator operations.- See Also:
- Constant Field Values
-
BIGTABLE_USE_TIMEOUTS_KEY
public static final String BIGTABLE_USE_TIMEOUTS_KEY
Should timeouts be used? Currently, this feature is experimental.- See Also:
- Constant Field Values
-
BIGTABLE_RPC_TIMEOUT_MS_KEY
public static final String BIGTABLE_RPC_TIMEOUT_MS_KEY
If timeouts are set, how many milliseconds should pass before a DEADLINE_EXCEEDED? Currently, this feature is experimental.- See Also:
- Constant Field Values
-
BIGTABLE_LONG_RPC_TIMEOUT_MS_KEY
@Deprecated public static final String BIGTABLE_LONG_RPC_TIMEOUT_MS_KEY
Deprecated. Please useBIGTABLE_MUTATE_RPC_TIMEOUT_MS_KEY
orBIGTABLE_READ_RPC_TIMEOUT_MS_KEY
based on long operation.If timeouts are set, how many milliseconds should pass before a DEADLINE_EXCEEDED for a long read? Currently, this feature is experimental.- See Also:
- Constant Field Values
-
BIGTABLE_MUTATE_RPC_TIMEOUT_MS_KEY
public static final String BIGTABLE_MUTATE_RPC_TIMEOUT_MS_KEY
If timeouts are set, how many milliseconds should pass before a DEADLINE_EXCEEDED for a long mutation. Currently, this feature is experimental.- See Also:
- Constant Field Values
-
BIGTABLE_READ_RPC_TIMEOUT_MS_KEY
public static final String BIGTABLE_READ_RPC_TIMEOUT_MS_KEY
If timeouts are set, how many milliseconds should pass before a DEADLINE_EXCEEDED for a long read. Currently, this feature is experimental.- See Also:
- Constant Field Values
-
BIGTABLE_NAMESPACE_WARNING_KEY
public static final String BIGTABLE_NAMESPACE_WARNING_KEY
Allow namespace methods to be no-ops- See Also:
- Constant Field Values
-
BIGTABLE_USE_GCJ_CLIENT
public static final String BIGTABLE_USE_GCJ_CLIENT
A flag to decide which implementation to use for data & admin operation- See Also:
- Constant Field Values
-
-
Method Detail
-
fromConfiguration
public static BigtableOptions fromConfiguration(org.apache.hadoop.conf.Configuration configuration) throws IOException
fromConfiguration.- Parameters:
configuration
- aConfiguration
object.- Returns:
- a
BigtableOptions
object. - Throws:
IOException
- if any.
-
-