public class CompactingMergeTask extends AbstractPrepareTask<BuildResult>
IndexSegment
from the fused view of an index partition
as of some historical timestamp and then atomically updates the view (aka a
compacting merge).
Note: This task may be used after IResourceManager.overflow()
in
order to produce a compact view of the index as of the lastCommitTime
on the old journal.
Note: As its last action, this task submits a
CompactingMergeTask.AtomicUpdateCompactingMergeTask
which replaces the view with one
defined by the current BTree
on the journal and the newly built
IndexSegment
.
Note: If the task fails, then the generated IndexSegment
will be
deleted.
Modifier and Type | Class and Description |
---|---|
protected static class |
CompactingMergeTask.AtomicUpdateCompactingMergeTask
The source view is pre-overflow (the last writes are on the old journal)
while the current view is post-overflow (reflects writes made since
overflow).
|
AbstractTask.DelegateTask<T>, AbstractTask.InnerReadWriteTxServiceCallable<T>, AbstractTask.InnerWriteServiceCallable<T>, AbstractTask.ResubmitException
Modifier and Type | Field and Description |
---|---|
protected com.bigdata.resources.ViewMetadata |
vmd |
DEBUG, INFO, log, resourceManager
checkpointNanoTime, concurrencyManager, isReadWriteTx, nanoTime_assignedWorker, nanoTime_beginWork, nanoTime_finishedWork, nanoTime_submitTask, readOnly, taskCounters, timestamp, transactionManager, tx
Constructor and Description |
---|
CompactingMergeTask(com.bigdata.resources.ViewMetadata vmd) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearRefs()
Method is responsible for clearing the
SoftReference s held by
ViewMetadata for the source view(s) on the old journal. |
protected BuildResult |
doTask()
Build an
IndexSegment from the compacting merge of an index
partition. |
protected boolean |
shouldMove(ILoadBalancerService loadBalancerService)
Figure out if this data service is considered to be highly utilized, in
which case the DS should shed some index partitions.
|
toString
assertResource, assertRunning, assertUnisolated, call, clearLoggingContext, dropIndex, getCommitTime, getIndex, getJournal, getOnlyResource, getResource, getResourceManager, getTaskCounters, getTaskName, getTimestamp, isResource, registerIndex, setupLoggingContext, toString
public CompactingMergeTask(com.bigdata.resources.ViewMetadata vmd)
vmd
- The ViewMetadata
for the index partition.protected void clearRefs()
AbstractPrepareTask
SoftReference
s held by
ViewMetadata
for 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).
clearRefs
in class AbstractPrepareTask<BuildResult>
protected BuildResult doTask() throws Exception
IndexSegment
from the compacting merge of an index
partition.doTask
in class AbstractTask<BuildResult>
BuildResult
.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.protected boolean shouldMove(ILoadBalancerService loadBalancerService)
Note: We consult the load balancer service on this since it is able to put the load of this service into perspective by also considering the load on the other services in the federation.
loadBalancerService
- The load balancer.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.