com.bigdata.resources
Class JoinIndexPartitionTask
java.lang.Object
com.bigdata.journal.AbstractTask<T>
com.bigdata.resources.AbstractResourceManagerTask<T>
com.bigdata.resources.AbstractPrepareTask<JoinResult>
com.bigdata.resources.JoinIndexPartitionTask
- All Implemented Interfaces:
- ITask<JoinResult>, Callable<JoinResult>
public class JoinIndexPartitionTask
- extends AbstractPrepareTask<JoinResult>
Task joins one or more index partitions and should be invoked when their is
strong evidence that the index partitions have shrunk enough to warrant their
being combined into a single index partition. The index partitions MUST be
partitions of the same scale-out index, MUST be siblings (their left and
right separators must cover a continuous interval), and MUST reside on the
same DataService.
The task reads from the lastCommitTime of the old journal and builds a single
BTree from the merged read of the source index partitions as of that
timestamp and returns a JoinResult. The task automatically submits,
and awaits the completion of, an JoinIndexPartitionTask.AtomicUpdateJoinIndexPartition,
which performs the atomic update of the view definitions on the live journal
and the MetadataIndex.
- Version:
- $Id: JoinIndexPartitionTask.java 3343 2010-07-29 14:55:40Z thompsonbry $
- Author:
- Bryan Thompson
|
Field Summary |
protected com.bigdata.resources.ViewMetadata[] |
vmd
|
| Fields inherited from class com.bigdata.journal.AbstractTask |
checkpointNanoTime, concurrencyManager, isReadWriteTx, nanoTime_assignedWorker, nanoTime_beginWork, nanoTime_finishedWork, nanoTime_submitTask, readOnly, taskCounters, timestamp, transactionManager, tx |
|
Method Summary |
protected void |
clearRefs()
Method is responsible for clearing the SoftReferences held by
ViewMetadata for the source view(s) on the old journal. |
protected JoinResult |
doTask()
FIXME Improve error handling for this task. |
| Methods inherited from class com.bigdata.journal.AbstractTask |
assertResource, assertRunning, assertUnisolated, call, clearLoggingContext, dropIndex, getCommitTime, getIndex, getJournal, getOnlyResource, getResource, getResourceManager, getTaskCounters, getTaskName, getTimestamp, isResource, registerIndex, setupLoggingContext, toString |
vmd
protected final com.bigdata.resources.ViewMetadata[] vmd
JoinIndexPartitionTask
protected JoinIndexPartitionTask(ResourceManager resourceManager,
long lastCommitTime,
String[] resources,
com.bigdata.resources.ViewMetadata[] vmd)
- Parameters:
resourceManager - lastCommitTime - resource - The names of the index partitions to be joined. These names
MUST be given in natural ordering of the left separator keys
for those index partitions.
clearRefs
protected void clearRefs()
- Description copied from class:
AbstractPrepareTask
- Method is responsible for clearing the
SoftReferences 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).
- Specified by:
clearRefs in class AbstractPrepareTask<JoinResult>
doTask
protected JoinResult doTask()
throws Exception
- FIXME Improve error handling for this task. See the build and split tasks
for examples.
- Specified by:
doTask in class AbstractTask<JoinResult>
- Returns:
- The object that will be returned by
AbstractTask.call() iff the
operation succeeds.
- Throws:
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-2011 SYSTAP, LLC. All Rights Reserved.