Package oracle.kv
Class BulkWriteOptions
java.lang.Object
oracle.kv.table.WriteOptions
oracle.kv.BulkWriteOptions
- All Implemented Interfaces:
Cloneable
BulkWriteOptions is used to configure bulk write operations.
The default values, documented in the setter methods, should be a good
choice for a wide range of conditions. If you should wish to fine tune the
bulk load operation further, you can use these values as a starting point
for a benchmark using your own application data and actual hardware.
- Since:
- 4.0
-
Constructor Summary
ConstructorDescriptionCreate aBulkWriteOptions
with default values.BulkWriteOptions
(BulkWriteOptions options) BulkWriteOptions
(Durability durability, long timeout, TimeUnit timeoutUnit) The options used to configure the bulk put operation. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the percentage of Runtime.maxMemory() that can be used for the operation.int
Returns the max number of bytes of records in a single bulk put request.int
The maximum number of threads that can concurrently write a batch of entries to a single shard in the store.int
Returns the maximum number of streams that can be read concurrently.void
setBulkHeapPercent
(int bulkHeapPercent) The percentage of Runtime.maxMemory() that can be used for the operation.void
setMaxRequestSize
(int maxRequestSize) The max request size is used to limit the total number of bytes of records in a single bulk put request.void
setPerShardParallelism
(int perShardParallelism) Sets the maximum number of threads that can concurrently write it's batch of entries to a single shard in the store.void
setStreamParallelism
(int streamParallelism) Sets the maximum number of streams that can be read concurrently.Methods inherited from class oracle.kv.table.WriteOptions
clone, getDurability, getIdentityCacheSize, getTimeout, getTimeoutUnit, getUpdateTTL, setDurability, setIdentityCacheSize, setTimeout, setUpdateTTL, toString
-
Constructor Details
-
BulkWriteOptions
The options used to configure the bulk put operation.- Parameters:
durability
- the durability to be used by the underlying write operations that make up the bulk put.timeout
- the timeout associated with the underlying write operations that make up the bulk put.timeoutUnit
- the units associated with the timeout
-
BulkWriteOptions
-
BulkWriteOptions
public BulkWriteOptions()Create aBulkWriteOptions
with default values.
-
-
Method Details
-
getBulkHeapPercent
public int getBulkHeapPercent()Returns the percentage of Runtime.maxMemory() that can be used for the operation. -
setBulkHeapPercent
public void setBulkHeapPercent(int bulkHeapPercent) The percentage of Runtime.maxMemory() that can be used for the operation. This heap is used to assemble batches of entries associated with specific shards and partitions.The default is 40%.
-
getMaxRequestSize
public int getMaxRequestSize()Returns the max number of bytes of records in a single bulk put request. -
setMaxRequestSize
public void setMaxRequestSize(int maxRequestSize) The max request size is used to limit the total number of bytes of records in a single bulk put request.The default is 512K.
-
getPerShardParallelism
public int getPerShardParallelism()The maximum number of threads that can concurrently write a batch of entries to a single shard in the store. -
setPerShardParallelism
public void setPerShardParallelism(int perShardParallelism) Sets the maximum number of threads that can concurrently write it's batch of entries to a single shard in the store.The default value is 3 and allows for overlapping the reading of the next batch with processing of the current batch at a server node. Higher capacity networks and and storage nodes can allow for higher parallelism.
-
getStreamParallelism
public int getStreamParallelism()Returns the maximum number of streams that can be read concurrently. Each stream is read by a dedicated thread from a thread pool. This setting determines the size of the thread pool used for reading streams. -
setStreamParallelism
public void setStreamParallelism(int streamParallelism) Sets the maximum number of streams that can be read concurrently. Each stream is read by a dedicated thread from a thread pool. This setting determines the size of the thread pool used for reading streams.The default parallelism is 1. For streams with high overheads, say because the I/O device underlying the stream is slow and there are different I/O devices underlying each stream, a higher value would be appropriate.
-