public class AsynchronousIndexWriteConfiguration extends Object implements Externalizable
Constructor and Description |
---|
AsynchronousIndexWriteConfiguration()
De-serialization ctor
|
AsynchronousIndexWriteConfiguration(int masterQueueCapacity,
int masterChunkSize,
long masterChunkTimeoutNanos,
long sinkIdleTimeoutNanos,
long sinkPollTimeoutNanos,
int sinkQueueCapacity,
int sinkChunkSize,
long sinkChunkTimeoutNanos) |
Modifier and Type | Method and Description |
---|---|
int |
getMasterChunkSize()
The desired size of the chunks that the master will process.
|
long |
getMasterChunkTimeoutNanos()
The time in nanoseconds that the master will combine smaller chunks so
that it can satisfy the desired masterChunkSize.
|
int |
getMasterQueueCapacity()
The capacity of the queue on which the application writes.
|
int |
getSinkChunkSize()
The desired size of the chunks written that will be written by the
sink . |
long |
getSinkChunkTimeoutNanos()
The maximum amount of time in nanoseconds that a sink will combine
smaller chunks so that it can satisfy the desired sinkChunkSize.
|
long |
getSinkIdleTimeoutNanos()
The time in nanoseconds after which an idle sink will be closed.
|
long |
getSinkPollTimeoutNanos()
The time in nanoseconds that the
sink will wait
inside of the IAsynchronousIterator when it polls the iterator
for a chunk. |
int |
getSinkQueueCapacity()
The capacity of the internal queue for the per-sink output buffer.
|
void |
readExternal(ObjectInput in) |
void |
setMasterChunkSize(int masterChunkSize) |
void |
setMasterChunkTimeoutNanos(long masterChunkTimeoutNanos) |
void |
setMasterQueueCapacity(int masterQueueCapacity) |
void |
setSinkChunkSize(int sinkChunkSize) |
void |
setSinkChunkTimeoutNanos(long sinkChunkTimeoutNanos) |
void |
setSinkIdleTimeoutNanos(long sinkIdleTimeoutNanos) |
void |
setSinkPollTimeoutNanos(long sinkPollTimeoutNanos) |
void |
setSinkQueueCapacity(int sinkQueueCapacity) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public AsynchronousIndexWriteConfiguration()
public AsynchronousIndexWriteConfiguration(int masterQueueCapacity, int masterChunkSize, long masterChunkTimeoutNanos, long sinkIdleTimeoutNanos, long sinkPollTimeoutNanos, int sinkQueueCapacity, int sinkChunkSize, long sinkChunkTimeoutNanos)
masterQueueCapacity
- The capacity of the queue on which the application writes.
Chunks are drained from this queue by the
AbstractTaskMaster
, broken into splits, and each split
is written onto the AbstractSubtask
sink handling
writes for the associated index partition.masterChunkSize
- The desired size of the chunks that the master will process.masterChunkTimeoutNanos
- The time in nanoseconds that the master will combine smaller
chunks so that it can satisfy the desired
masterChunkSize.sinkIdleTimeoutNanos
- The time in nanoseconds after which an idle sink will be
closed. Any buffered writes are flushed when the sink is
closed. The idle timeout is reset (a) if a chunk is available
to be drained by the sink; or (b) if a chunk is drained from
the sink. If no chunks become available the the sink will
eventually decide that it is idle, will flush any buffered
writes, and will close itself.
If the idle timeout is LT the
getSinkChunkTimeoutNanos()
then a sink will remain
open as long as new chunks appear and are combined within idle
timeout, otherwise the sink will decide that it is idle and
will flush its last chunk and close itself. If this is
Long.MAX_VALUE
then the sink will identify itself as
idle and will only be closed if the master is closed or the
sink has received a StaleLocatorException
for the
index partition on which the sink is writing.
sinkPollTimeoutNanos
- The time in nanoseconds that the sink
will wait inside of the IAsynchronousIterator
when it
polls the iterator for a chunk. This value should be
relatively small so that the sink remains responsible rather
than blocking inside of the IAsynchronousIterator
for
long periods of time.sinkQueueCapacity
- The capacity of the internal queue for the per-sink output
buffer.sinkChunkSize
- The desired size of the chunks written that will be written by
the sink
.sinkChunkTimeoutNanos
- The maximum amount of time in nanoseconds that a sink will
combine smaller chunks so that it can satisify the desired
sinkChunkSize.public int getMasterQueueCapacity()
AbstractTaskMaster
, broken into
splits, and each split is written onto the AbstractSubtask
sink
handling writes for the associated index partition.public void setMasterQueueCapacity(int masterQueueCapacity)
public int getMasterChunkSize()
public void setMasterChunkSize(int masterChunkSize)
public long getMasterChunkTimeoutNanos()
public void setMasterChunkTimeoutNanos(long masterChunkTimeoutNanos)
public long getSinkIdleTimeoutNanos()
If the idle timeout is LT the getSinkChunkTimeoutNanos()
then a
sink will remain open as long as new chunks appear and are combined
within idle timeout, otherwise the sink will decide that it is idle and
will flush its last chunk and close itself. If the idle timeout is
Long.MAX_VALUE
then the sink will identify itself as idle and
will only be closed if the master is closed or the sink has received a
StaleLocatorException
for the index partition on which the sink
is writing.
public void setSinkIdleTimeoutNanos(long sinkIdleTimeoutNanos)
public long getSinkPollTimeoutNanos()
sink
will wait
inside of the IAsynchronousIterator
when it polls the iterator
for a chunk. This value should be relatively small so that the sink
remains responsible rather than blocking inside of the
IAsynchronousIterator
for long periods of time.public void setSinkPollTimeoutNanos(long sinkPollTimeoutNanos)
public int getSinkQueueCapacity()
public void setSinkQueueCapacity(int sinkQueueCapacity)
public int getSinkChunkSize()
sink
.public void setSinkChunkSize(int sinkChunkSize)
public long getSinkChunkTimeoutNanos()
public void setSinkChunkTimeoutNanos(long sinkChunkTimeoutNanos)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.