public abstract class AbstractResourceManagerTask<T> extends AbstractTask<T>
ResourceManager
. These tasks are designed with a historical read
that handles history up to some specified commitTime and the submits an
ITx.UNISOLATED
task that brings things up to date and coordinates an
atomic update between the IDataService
(s) and the
IMetadataService
. You SHOULD be able to run any task at any time as
long as overflow is disabled while these tasks are running (this is a
pre-condition for all of these tasks).
FIXME There is a potential failure point once we notify the metadata service
of the change in the index partitions since this is done before the task has
actually committed its changes on the live journal. If the commit on the
journal fails then the metadata index will now reference index partitions
which do not exist (or do not have all their data) on the live journal. A
full transaction might be one way to close this gap. The opportunity for
failure could be significantly reduced by checkpointing all indices before we
RMI the MDS.AbstractTask.DelegateTask<T>, AbstractTask.InnerReadWriteTxServiceCallable<T>, AbstractTask.InnerWriteServiceCallable<T>, AbstractTask.ResubmitException
Modifier and Type | Field and Description |
---|---|
protected static boolean |
DEBUG
True iff the
log level is DEBUG or less. |
protected static boolean |
INFO
True iff the
log level is INFO or less. |
protected static org.apache.log4j.Logger |
log
Note: Logger shadows
AbstractTask.log . |
protected ResourceManager |
resourceManager |
checkpointNanoTime, concurrencyManager, isReadWriteTx, nanoTime_assignedWorker, nanoTime_beginWork, nanoTime_finishedWork, nanoTime_submitTask, readOnly, taskCounters, timestamp, transactionManager, tx
Constructor and Description |
---|
AbstractResourceManagerTask(ResourceManager resourceManager,
long timestamp,
String resource) |
AbstractResourceManagerTask(ResourceManager resourceManager,
long timestamp,
String[] resource) |
Modifier and Type | Method and Description |
---|---|
static String |
toString(String label,
Object[] a)
Pretty print a resource metadata array or other array of objects with
long string representations by framing the output to have one line
for each element of the array.
|
assertResource, assertRunning, assertUnisolated, call, clearLoggingContext, doTask, dropIndex, getCommitTime, getIndex, getJournal, getOnlyResource, getResource, getResourceManager, getTaskCounters, getTaskName, getTimestamp, isResource, registerIndex, setupLoggingContext, toString
protected static final org.apache.log4j.Logger log
AbstractTask.log
.protected static final boolean INFO
log
level is INFO or less.protected static final boolean DEBUG
log
level is DEBUG or less.protected final ResourceManager resourceManager
public AbstractResourceManagerTask(ResourceManager resourceManager, long timestamp, String resource)
resourceManager
- timestamp
- resource
- public AbstractResourceManagerTask(ResourceManager resourceManager, long timestamp, String[] resource)
resourceManager
- timestamp
- resource
- public static String toString(String label, Object[] a)
label
- A label.a
- The array.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.