com.google.cloud.bigtable.config
Class BulkOptions
- java.lang.Object
-
- com.google.cloud.bigtable.config.BulkOptions
-
- All Implemented Interfaces:
- Serializable, Cloneable
public class BulkOptions extends Object implements Serializable, Cloneable
An immutable class providing access to bulk related configuration options for Bigtable.- Version:
- $Id: $Id
- Author:
- sduskis
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
BulkOptions.Builder
A mutable builder for BigtableConnectionOptions.
-
Field Summary
Fields Modifier and Type Field and Description static int
BIGTABLE_ASYNC_MUTATOR_COUNT_DEFAULT
ConstantBIGTABLE_ASYNC_MUTATOR_COUNT_DEFAULT=2
static long
BIGTABLE_BULK_AUTOFLUSH_MS_DEFAULT
The maximum amount of time a row will be buffered for.static boolean
BIGTABLE_BULK_ENABLE_THROTTLE_REBALANCE_DEFAULT
Whether or not to enable a mechanism that reduces the likelihood that aBulkMutation
intensive application will overload a cluster.static long
BIGTABLE_BULK_MAX_REQUEST_SIZE_BYTES_DEFAULT
This describes the maximum size a bulk mutation RPC should be before sending it to the server and starting the next bulk call.static int
BIGTABLE_BULK_MAX_ROW_KEY_COUNT_DEFAULT
This describes the maximum number of individual MutateRowsRequest.Entry objects to bundle in a single bulk mutation RPC before sending it to the server and starting the next bulk call.static int
BIGTABLE_BULK_THROTTLE_TARGET_MS_DEFAULT
The target RPC response time for a MutateRows request.static int
BIGTABLE_MAX_INFLIGHT_RPCS_PER_CHANNEL_DEFAULT
Default rpc count per channel.static long
BIGTABLE_MAX_MEMORY_DEFAULT
This is the maximum accumulated size of uncompleted requests that we allow before throttling.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static BulkOptions.Builder
builder()
protected BulkOptions
clone()
boolean
equals(Object obj)
int
getAsyncMutatorCount()
Getter for the fieldasyncMutatorCount
.long
getAutoflushMs()
Getter for the fieldautoflushMs
.long
getBulkMaxRequestSize()
Getter for the fieldbulkMaxRequestSize
.int
getBulkMaxRowKeyCount()
Getter for the fieldbulkMaxRowKeyCount
.int
getBulkMutationRpcTargetMs()
ifisEnableBulkMutationThrottling()
, then bulk mutation RPC latency will be compared against this value.int
getMaxInflightRpcs()
Getter for the fieldmaxInflightRpcs
.long
getMaxMemory()
Getter for the fieldmaxMemory
.boolean
isEnableBulkMutationThrottling()
Is an experimental feature of throttling bulk mutation RPCs turned on?BulkOptions.Builder
toBuilder()
toBuilder.String
toString()
boolean
useBulkApi()
useBulkApi.
-
-
-
Field Detail
-
BIGTABLE_ASYNC_MUTATOR_COUNT_DEFAULT
public static final int BIGTABLE_ASYNC_MUTATOR_COUNT_DEFAULT
ConstantBIGTABLE_ASYNC_MUTATOR_COUNT_DEFAULT=2
- See Also:
- Constant Field Values
-
BIGTABLE_BULK_MAX_REQUEST_SIZE_BYTES_DEFAULT
public static final long BIGTABLE_BULK_MAX_REQUEST_SIZE_BYTES_DEFAULT
This describes the maximum size a bulk mutation RPC should be before sending it to the server and starting the next bulk call. Defaults to 1 MB.- See Also:
- Constant Field Values
-
BIGTABLE_BULK_MAX_ROW_KEY_COUNT_DEFAULT
public static final int BIGTABLE_BULK_MAX_ROW_KEY_COUNT_DEFAULT
This describes the maximum number of individual MutateRowsRequest.Entry objects to bundle in a single bulk mutation RPC before sending it to the server and starting the next bulk call. The server has a maximum of 100,000 total mutations.- See Also:
- Constant Field Values
-
BIGTABLE_BULK_ENABLE_THROTTLE_REBALANCE_DEFAULT
public static final boolean BIGTABLE_BULK_ENABLE_THROTTLE_REBALANCE_DEFAULT
Whether or not to enable a mechanism that reduces the likelihood that aBulkMutation
intensive application will overload a cluster.- See Also:
- Constant Field Values
-
BIGTABLE_BULK_THROTTLE_TARGET_MS_DEFAULT
public static final int BIGTABLE_BULK_THROTTLE_TARGET_MS_DEFAULT
The target RPC response time for a MutateRows request. This value is meaningful if bulk mutation throttling is enabled. 100 ms. is a generally ok latency for MutateRows RPCs, but it could go higher (for example 300 ms) for less latency sensitive applications that need more throughput, or lower (10 ms) for latency sensitive applications.- See Also:
- Constant Field Values
-
BIGTABLE_BULK_AUTOFLUSH_MS_DEFAULT
public static long BIGTABLE_BULK_AUTOFLUSH_MS_DEFAULT
The maximum amount of time a row will be buffered for. By default 0: indefinitely.
-
BIGTABLE_MAX_INFLIGHT_RPCS_PER_CHANNEL_DEFAULT
public static final int BIGTABLE_MAX_INFLIGHT_RPCS_PER_CHANNEL_DEFAULT
Default rpc count per channel.- See Also:
- Constant Field Values
-
BIGTABLE_MAX_MEMORY_DEFAULT
public static final long BIGTABLE_MAX_MEMORY_DEFAULT
This is the maximum accumulated size of uncompleted requests that we allow before throttling. Default to 10% of available memory with a max of 1GB.
-
-
Method Detail
-
builder
public static BulkOptions.Builder builder()
-
getAsyncMutatorCount
public int getAsyncMutatorCount()
Getter for the fieldasyncMutatorCount
.- Returns:
- a int.
-
useBulkApi
public boolean useBulkApi()
useBulkApi.- Returns:
- a boolean.
-
getBulkMaxRowKeyCount
public int getBulkMaxRowKeyCount()
Getter for the fieldbulkMaxRowKeyCount
.- Returns:
- a int.
-
getBulkMaxRequestSize
public long getBulkMaxRequestSize()
Getter for the fieldbulkMaxRequestSize
.- Returns:
- a long.
-
getAutoflushMs
public long getAutoflushMs()
Getter for the fieldautoflushMs
.- Returns:
- a long
-
getMaxInflightRpcs
public int getMaxInflightRpcs()
Getter for the fieldmaxInflightRpcs
.- Returns:
- a int.
-
getMaxMemory
public long getMaxMemory()
Getter for the fieldmaxMemory
.- Returns:
- a long.
-
isEnableBulkMutationThrottling
public boolean isEnableBulkMutationThrottling()
Is an experimental feature of throttling bulk mutation RPCs turned on?- Returns:
- a boolean
-
getBulkMutationRpcTargetMs
public int getBulkMutationRpcTargetMs()
ifisEnableBulkMutationThrottling()
, then bulk mutation RPC latency will be compared against this value. If the RPC latency is higher, then some throttling will be applied.- Returns:
- the number of milliseconds that is an appropriate amount of time for a bulk mutation RPC.
-
toBuilder
public BulkOptions.Builder toBuilder()
toBuilder.- Returns:
- a
BulkOptions.Builder
object.
-
clone
protected BulkOptions clone()
-
-