com.bigdata.service
Class MetadataService.SplitIndexPartitionTask
java.lang.Object
com.bigdata.journal.AbstractTask
com.bigdata.service.MetadataService.SplitIndexPartitionTask
- All Implemented Interfaces:
- ITask, Callable
- Enclosing class:
- MetadataService
protected static class MetadataService.SplitIndexPartitionTask
- extends AbstractTask
Atomic operation removes the pre-existing entry for specified index
partition and replaces it with N new entries giving the locators for the
N new index partitions created when that index partition was split.
- Version:
- $Id: MetadataService.java 4523 2011-05-18 18:14:45Z thompsonbry $
- Author:
- Bryan Thompson
| Fields inherited from class com.bigdata.journal.AbstractTask |
checkpointNanoTime, concurrencyManager, DEBUG, INFO, isReadWriteTx, log, nanoTime_assignedWorker, nanoTime_beginWork, nanoTime_finishedWork, nanoTime_submitTask, readOnly, resourceManager, taskCounters, timestamp, transactionManager, tx |
|
Method Summary |
protected Object |
doTask()
Implement the task behavior here. |
| 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 |
oldLocator
protected final PartitionLocator oldLocator
newLocators
protected final PartitionLocator[] newLocators
MetadataService.SplitIndexPartitionTask
protected MetadataService.SplitIndexPartitionTask(IConcurrencyManager concurrencyManager,
String resource,
PartitionLocator oldLocator,
PartitionLocator[] newLocators)
- Parameters:
concurrencyManager - resource - oldLocator - newLocators -
doTask
protected Object doTask()
throws Exception
- Description copied from class:
AbstractTask
- Implement the task behavior here.
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 Future.cancel(boolean) with
false then the task will run to completion even though it
has been cancelled (but the Future will appear to have been
cancelled).
If you simply return rather than throwing an exception
then the WriteExecutorService will assume that your task
completed and your (partial) results will be made restart-safe at the
next commit!
- Specified by:
doTask in class AbstractTask
- 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.