Package oracle.kv

Class BulkWriteOptions

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class BulkWriteOptions
    extends WriteOptions
    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 Detail

      • BulkWriteOptions

        public BulkWriteOptions​(Durability durability,
                                long timeout,
                                java.util.concurrent.TimeUnit timeoutUnit)
        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

        public BulkWriteOptions()
        Create a BulkWriteOptions with default values.
    • Method Detail

      • 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.