public abstract class MetadataService extends DataService implements IMetadataService
| Modifier and Type | Class and Description |
|---|---|
static class |
MetadataService.DropScaleOutIndexTask
Drops a scale-out index.
|
protected static class |
MetadataService.JoinIndexPartitionTask
Updates the
MetadataIndex to reflect the join of 2 or more index
partitions. |
protected static class |
MetadataService.MoveIndexPartitionTask
Updates the
MetadataIndex to reflect the move of an index
partition. |
protected static class |
MetadataService.NextPartitionIdTask
Task assigns the next partition identifier for a registered scale-out
index in a restart-safe manner.
|
static interface |
MetadataService.Options
Options for the
MetadataService. |
protected static class |
MetadataService.RegisterScaleOutIndexTask
Registers a metadata index for a named scale-out index and statically
partition the index using the given separator keys and data services.
|
protected static class |
MetadataService.SplitIndexPartitionTask
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.
|
DataService.DataServiceFederationDelegate, DataService.DataServiceTransactionManager, DataService.GetIndexMetadataTask, DataService.IDataServiceCounters, DataService.RangeIteratorTask, DataService.ReadBlockCounters| Modifier and Type | Field and Description |
|---|---|
protected static String |
ERR_DELETE_MARKERS
Error message when a request is made to register a scale-out index but
delete markers are not enabled for that index.
|
static String |
METADATA_INDEX_NAMESPACE
The namespace for the metadata indices.
|
log| Modifier | Constructor and Description |
|---|---|
protected |
MetadataService(Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
dropScaleOutIndex(String name)
Drop the named scale-out index.
|
PartitionLocator |
find(String name,
long timestamp,
byte[] key)
Find and return the partition spanning the given key.
|
PartitionLocator |
get(String name,
long timestamp,
byte[] key)
The partition with that separator key or
null (exact match
on the separator key). |
static String |
getMetadataIndexName(String name)
Return the name of the metadata index.
|
void |
joinIndexPartition(String name,
PartitionLocator[] oldLocators,
PartitionLocator newLocator)
Updates the
MetadataIndex for the named scale-out index to
reflect the join of N index partitions (which must be siblings) into a
single index partition. |
void |
moveIndexPartition(String name,
PartitionLocator oldLocator,
PartitionLocator newLocator)
Updates the
MetadataIndex for the named scale-out index to
reflect the move of an index partition from one data service to another. |
int |
nextPartitionId(String name)
Return the next unique partition identifier to be assigned to the named
scale-out index.
|
UUID |
registerScaleOutIndex(IndexMetadata metadata,
byte[][] separatorKeys,
UUID[] dataServices)
Register and statically partition a scale-out index.
|
void |
splitIndexPartition(String name,
PartitionLocator oldLocator,
PartitionLocator[] newLocators)
Updates the
MetadataIndex for the named scale-out index to
reflect the split of an index partition into N new index partitions. |
MetadataService |
start()
Starts the
DataService. |
Future<? extends Object> |
submit(Callable<? extends Object> task)
Note: You SHOULD NOT be running arbitrary tasks on a
MetadataService. |
abort, destroy, dropIndex, forceOverflow, getAsynchronousOverflowCounter, getConcurrencyManager, getHTTPDURLFile, getIndexMetadata, getIndexPartitionName, getLocalTransactionManager, getProperties, getQueryEngine, getResourceManager, getServiceIface, getSession, isOpen, isOverflowActive, newResourceManager, prepare, purgeOldResources, rangeIterator, readBlock, registerIndex, setReleaseTime, shutdown, shutdownNow, singlePhaseCommit, submitclearLoggingContext, getFederation, getHostname, getServiceName, getServiceUUID, setServiceUUID, setupLoggingContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdropIndex, forceOverflow, getAsynchronousOverflowCounter, getIndexMetadata, getQueryEngine, isOverflowActive, purgeOldResources, rangeIterator, readBlock, registerIndex, submitabort, prepare, setReleaseTime, singlePhaseCommitdestroy, getHostname, getServiceIface, getServiceName, getServiceUUIDprotected static final String ERR_DELETE_MARKERS
public static final String METADATA_INDEX_NAMESPACE
protected MetadataService(Properties properties)
properties - public static String getMetadataIndexName(String name)
name - The name of the scale-out index.MetadataIndex that is used
to manage the partitions in the named scale-out index.DataService.getIndexPartitionName(String, int)public MetadataService start()
DataServiceDataService.start in class DataServicepublic Future<? extends Object> submit(Callable<? extends Object> task)
MetadataService. They are specialized for the index partition
locator information and SHOULD NOT be overloaded for other purposes.submit in interface IDataServicesubmit in interface IRemoteExecutorsubmit in class DataServiceFuture for that task.ExecutionExceptionInterruptedExceptionAbstractDistributedFederation.getProxy(Future)public int nextPartitionId(String name) throws IOException, InterruptedException, ExecutionException
IMetadataServicenextPartitionId in interface IMetadataServicename - The name of the scale-out index.InterruptedExceptionExecutionExceptionIOExceptionpublic PartitionLocator get(String name, long timestamp, byte[] key) throws InterruptedException, ExecutionException, IOException
IMetadataServicenull (exact match
on the separator key).get in interface IMetadataServicename - The name of the scale-out index.key - The separator key (the first key that would go into that
partition).null.InterruptedExceptionExecutionExceptionIOExceptionpublic PartitionLocator find(String name, long timestamp, byte[] key) throws InterruptedException, ExecutionException, IOException
IMetadataServicefind in interface IMetadataServicename - The name of the scale-out index.key - A key of interest for the scale-out index.null if
there are no partitions defined.InterruptedExceptionExecutionExceptionIOExceptionpublic void splitIndexPartition(String name, PartitionLocator oldLocator, PartitionLocator[] newLocators) throws IOException, InterruptedException, ExecutionException
IMetadataServiceMetadataIndex for the named scale-out index to
reflect the split of an index partition into N new index partitions. The
old index partition locator is removed from the MetadataIndex and
the new index partition locators are inserted in a single atomic
operation.splitIndexPartition in interface IMetadataServicename - The name of the scale-out index.oldLocator - The partition locator that is being split.newLocators - The locator information for the new index partitions that were
created by the split of the old index partition.IOExceptionInterruptedExceptionExecutionExceptionpublic void joinIndexPartition(String name, PartitionLocator[] oldLocators, PartitionLocator newLocator) throws IOException, InterruptedException, ExecutionException
IMetadataServiceMetadataIndex for the named scale-out index to
reflect the join of N index partitions (which must be siblings) into a
single index partition. The old index partition locators are removed from
the MetadataIndex and the new index partition locator is inserted
in a single atomic operation.joinIndexPartition in interface IMetadataServicename - The name of the scale-out index.oldLocators - The partition locators for the index partitions that were
joined.newLocator - The locator for the new index partition created by that join.IOExceptionInterruptedExceptionExecutionExceptionpublic void moveIndexPartition(String name, PartitionLocator oldLocator, PartitionLocator newLocator) throws IOException, InterruptedException, ExecutionException
IMetadataServiceMetadataIndex for the named scale-out index to
reflect the move of an index partition from one data service to another.
The old index partition locator is removed from the MetadataIndex
and the new index partition locator is inserted in a single atomic
operation.moveIndexPartition in interface IMetadataServicename - The name of the scale-out index.oldLocator - The partition locator for the source index partition.newLocator - The locator for the target index partition.IOExceptionInterruptedExceptionExecutionExceptionpublic UUID registerScaleOutIndex(IndexMetadata metadata, byte[][] separatorKeys, UUID[] dataServices) throws IOException, InterruptedException, ExecutionException
IMetadataServiceregisterScaleOutIndex in interface IMetadataServicemetadata - The metadata template describing the scale-out index,
including the name to be assigned to that index.separatorKeys - The array of separator keys. Each separator key is interpreted
as an unsigned byte[]. The first entry MUST be an
empty byte[]. The entries MUST be in sorted order.IOExceptionInterruptedExceptionExecutionExceptionpublic void dropScaleOutIndex(String name) throws IOException, InterruptedException, ExecutionException
IMetadataServicedropScaleOutIndex in interface IMetadataServicename - The name of the scale-out index.IOExceptionInterruptedExceptionExecutionExceptionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.