|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IMetadataService
A metadata service for a named index.
The metadata service maintains locator information for the data service instances responsible for each partition in the named index. Partitions are automatically split when they overflow (~200M) and joined when they underflow (~50M).
Note: methods on this interface MUST throw IOException in order to be
compatible with RMI.
| Method Summary | |
|---|---|
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). |
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. |
| Methods inherited from interface com.bigdata.service.IDataService |
|---|
dropIndex, forceOverflow, getAsynchronousOverflowCounter, getIndexMetadata, isOverflowActive, purgeOldResources, rangeIterator, readBlock, registerIndex, submit, submit |
| Methods inherited from interface com.bigdata.service.ITxCommitProtocol |
|---|
abort, prepare, setReleaseTime, singlePhaseCommit |
| Methods inherited from interface com.bigdata.service.IService |
|---|
destroy, getHostname, getServiceIface, getServiceName, getServiceUUID |
| Method Detail |
|---|
int nextPartitionId(String name)
throws IOException,
InterruptedException,
ExecutionException
name - The name of the scale-out index.
ExecutionException
InterruptedException
IOException
void splitIndexPartition(String name,
PartitionLocator oldLocator,
PartitionLocator[] newLocators)
throws IOException,
InterruptedException,
ExecutionException
MetadataIndex 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.
name - 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.
IOException
InterruptedException
ExecutionException
void joinIndexPartition(String name,
PartitionLocator[] oldLocators,
PartitionLocator newLocator)
throws IOException,
InterruptedException,
ExecutionException
MetadataIndex 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.
name - 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.
IOException
InterruptedException
ExecutionException
void moveIndexPartition(String name,
PartitionLocator oldLocator,
PartitionLocator newLocator)
throws IOException,
InterruptedException,
ExecutionException
MetadataIndex 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.
name - The name of the scale-out index.oldLocator - The partition locator for the source index partition.newLocator - The locator for the target index partition.
IOException
InterruptedException
ExecutionException
UUID registerScaleOutIndex(IndexMetadata metadata,
byte[][] separatorKeys,
UUID[] dataServices)
throws IOException,
InterruptedException,
ExecutionException
metadata - 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.dataServiceUUIDs - The array of data services onto which each partition defined
by a separator key will be mapped (optional). When given, the
#of entries in this array MUST agree with the #of entries in
the separatorKeys array and all entries must be non-null.
When not given, the index partitions will be auto-assigned to
the discovered data services.
IOException
InterruptedException
ExecutionException
void dropScaleOutIndex(String name)
throws IOException,
InterruptedException,
ExecutionException
name - The name of the scale-out index.
IOException
InterruptedException
ExecutionException
PartitionLocator get(String name,
long timestamp,
byte[] key)
throws InterruptedException,
ExecutionException,
IOException
null (exact match
on the separator key).
name - The name of the scale-out index.timestamp - key - The separator key (the first key that would go into that
partition).
null.
InterruptedException
ExecutionException
IOException
PartitionLocator find(String name,
long timestamp,
byte[] key)
throws InterruptedException,
ExecutionException,
IOException
name - The name of the scale-out index.timestamp - key - A key of interest for the scale-out index.
null if
there are no partitions defined.
InterruptedException
ExecutionException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||