public class SplitTailTask extends AbstractPrepareTask
The split point is choosen by locating the right-most non-leaf node. The key range which would enter that node is placed within the new right-sibling index partition. The rest of the key range is placed within the new left-sibling index partition.
The tail split operation is extremely fast since it only redefines the index partitions. However, it require RMI to the metadata index to do that and therefore should not be done during synchronous overflow in order to reduce the possibility for errors during that operation.
The right-sibling of tail split is a prime candidate for a move since there is an expectation that it will continue to be hot for writes. Therefore the caller has an opportunity when specifying a tail split to also specify that the new right-sibling index partition will be moved onto a caller specified data service.
DEBUG, INFO, log, resourceManager
|Constructor and Description|
|Modifier and Type||Method and Description|
Method is responsible for clearing the
Implement the task behavior here.
assertResource, assertRunning, assertUnisolated, call, clearLoggingContext, dropIndex, getCommitTime, getIndex, getJournal, getOnlyResource, getResource, getResourceManager, getTaskCounters, getTaskName, getTimestamp, isResource, registerIndex, setupLoggingContext, toString
public SplitTailTask(com.bigdata.resources.ViewMetadata vmd, UUID moveTarget)
moveTarget- When non-
nullthe new right-sibling (the tail) will be moved to the specified data service after the split.
protected void clearRefs()
SoftReferences held by
ViewMetadatafor the source view(s) on the old journal.
Note: This method MUST be invoked in order to permit those references to be cleared more eagerly than the end of the entire asynchronous overflow operation (which is when the task references would themselves go out of scope and become available for GC).
Note: Long-running implementations MUST periodically test
Thread.interrupted() and MUST throw an exception, such as
InterruptedException, if they are interrupted. This behavior
allows tasks to be canceled in a timely manner.
If you ignore or fail to test
Thread.interrupted() then your task
CAN NOT be aborted. If it is
false then the task will run to completion even though it
has been cancelled (but the
Future will appear to have been
If you simply
return rather than throwing an exception
WriteExecutorService will assume that your task
completed and your (partial) results will be made restart-safe at the
AbstractTask.call()iff the operation succeeds.
Exception- The exception that will be thrown by
AbstractTask.call()iff the operation fails.
InterruptedException- This exception SHOULD be thrown if
Thread.interrupted()becomes true during execution.
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.