BigtableOptionsFactory (Cloud Bigtable HBase Client for Java 1.12.0 API)

com.google.cloud.bigtable.hbase

Class BigtableOptionsFactory



  • public class BigtableOptionsFactory
    extends Object
    Static methods to convert an instance of Configuration to a BigtableOptions instance.
    Version:
    $Id: $Id
    Author:
    sduskis
    • Field Detail

      • LOG

        protected static final Logger LOG
        Constant LOG
      • BIGTABLE_PORT_KEY

        public static final String BIGTABLE_PORT_KEY
        Constant BIGTABLE_PORT_KEY="google.bigtable.endpoint.port"
        See Also:
        Constant Field Values
      • BIGTABLE_ADMIN_HOST_KEY

        public static final String BIGTABLE_ADMIN_HOST_KEY
        Constant BIGTABLE_ADMIN_HOST_KEY="google.bigtable.admin.endpoint.host"
        See Also:
        Constant Field Values
      • BIGTABLE_HOST_KEY

        public static final String BIGTABLE_HOST_KEY
        Constant BIGTABLE_HOST_KEY="google.bigtable.endpoint.host"
        See Also:
        Constant Field Values
      • BIGTABLE_EMULATOR_HOST_KEY

        public static final String BIGTABLE_EMULATOR_HOST_KEY
        Constant BIGTABLE_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
        Constant PROJECT_ID_KEY="google.bigtable.project.id"
        See Also:
        Constant Field Values
      • INSTANCE_ID_KEY

        public static final String INSTANCE_ID_KEY
        Constant INSTANCE_ID_KEY="google.bigtable.instance.id"
        See Also:
        Constant Field Values
      • APP_PROFILE_ID_KEY

        public static final String APP_PROFILE_ID_KEY
        Constant APP_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
        Constant BIGTABLE_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
        Constant BIGTABLE_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
        Constant CUSTOM_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
        Constant BIGTABLE_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
        Constant BIGTABLE_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. See Status.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
        Constant BIGTABLE_USE_BULK_API="google.bigtable.use.bulk.api"
        See Also:
        Constant Field Values
      • BIGTABLE_USE_BATCH

        public static final String BIGTABLE_USE_BATCH
        Constant BIGTABLE_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
        Constant BIGTABLE_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
        Constant BIGTABLE_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
        Constant BIGTABLE_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
        Constant MAX_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
        Constant BIGTABLE_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
        Constant BIGTABLE_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_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
    • Constructor Detail

      • BigtableOptionsFactory

        public BigtableOptionsFactory()
    • Method Detail

      • fromConfiguration

        public static BigtableOptions fromConfiguration(org.apache.hadoop.conf.Configuration configuration)
                                                 throws IOException
        fromConfiguration.
        Parameters:
        configuration - a Configuration object.
        Returns:
        a BigtableOptions object.
        Throws:
        IOException - if any.