com.bigdata.resources
Class IncrementalBuildTask.AtomicUpdateIncrementalBuildTask
java.lang.Object
com.bigdata.journal.AbstractTask<T>
com.bigdata.resources.AbstractResourceManagerTask<T>
com.bigdata.resources.AbstractAtomicUpdateTask<IResourceMetadata[]>
com.bigdata.resources.IncrementalBuildTask.AtomicUpdateIncrementalBuildTask
- All Implemented Interfaces:
- ITask<IResourceMetadata[]>, Callable<IResourceMetadata[]>
- Enclosing class:
- IncrementalBuildTask
protected static class IncrementalBuildTask.AtomicUpdateIncrementalBuildTask
- extends AbstractAtomicUpdateTask<IResourceMetadata[]>
The source is an IndexSegment that was built from the mutable
BTree associated with the lastCommitTime on old journal of some
index partition. What we are doing is replacing the role of that
BTree on the closed out journal with the IndexSegment.
Note that the IndexSegment contains the same data as the
BTree as of the lastCommitTime. The new view (as defined by this
task) will be selected when the desired view is GTE the lastCommitTime.
The old view will be used whenever the desired view is LT the
lastCommitTime.
journal A
view={A,...}
---- sync overflow begins ----
create journal B
view={B,A,...}
Begin incremental build of segment from A (just the BTree state as identified by the lastCommitTime)
---- sync overflow ends ----
... build continues ...
... writes against view={B,A,...} are written on B.
... index segment S0 complete (based on A).
...
atomic update task runs: view={B,S0,...}
... writes continue.
- Version:
- $Id: IncrementalBuildTask.java 3343 2010-07-29 14:55:40Z thompsonbry $
- Author:
- Bryan Thompson
| Fields inherited from class com.bigdata.journal.AbstractTask |
checkpointNanoTime, concurrencyManager, isReadWriteTx, nanoTime_assignedWorker, nanoTime_beginWork, nanoTime_finishedWork, nanoTime_submitTask, readOnly, taskCounters, timestamp, transactionManager, tx |
| 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 |
indexUUID
protected final UUID indexUUID
- The expected UUID of the scale-out index.
buildResult
protected final BuildResult buildResult
IncrementalBuildTask.AtomicUpdateIncrementalBuildTask
public IncrementalBuildTask.AtomicUpdateIncrementalBuildTask(ResourceManager resourceManager,
IConcurrencyManager concurrencyManager,
String resource,
UUID indexUUID,
BuildResult buildResult,
Event parentEvent)
- Parameters:
resourceManager - concurrencyManager - resource - buildResult -
doTask
protected IResourceMetadata[] doTask()
throws Exception
Atomic update.
- Specified by:
doTask in class AbstractTask<IResourceMetadata[]>
- Returns:
- The ordered array of resources that define the post-condition
view.
- 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.