public interface IMetadataManager
| Modifier and Type | Method and Description |
|---|---|
void |
abortTransaction(MetadataTransactionContext ctx)
Aborts a remote transaction running on the metadata node.
|
void |
acquireReadLatch() |
void |
acquireWriteLatch() |
void |
addAdapter(MetadataTransactionContext mdTxnCtx,
DatasourceAdapter adapter) |
void |
addCompactionPolicy(MetadataTransactionContext ctx,
CompactionPolicy policy) |
void |
addDataset(MetadataTransactionContext ctx,
Dataset dataset)
Inserts a new dataset into the metadata.
|
void |
addDatatype(MetadataTransactionContext ctx,
Datatype datatype)
Inserts a datatype.
|
void |
addDataverse(MetadataTransactionContext ctx,
Dataverse dataverse)
Inserts a new dataverse into the metadata.
|
void |
addExternalFile(MetadataTransactionContext mdTxnCtx,
ExternalFile externalFile) |
void |
addFeed(MetadataTransactionContext ctx,
Feed feed) |
void |
addFeedPolicy(MetadataTransactionContext ctx,
FeedPolicy policy) |
void |
addFunction(MetadataTransactionContext mdTxnCtx,
Function function) |
void |
addIndex(MetadataTransactionContext ctx,
Index index)
Inserts an index into the metadata.
|
void |
addLibrary(MetadataTransactionContext ctx,
Library library)
Adds a library, acquiring local locks on behalf of the given
transaction id.
|
void |
addNode(MetadataTransactionContext ctx,
Node node)
Inserts a node (machine).
|
void |
addNodegroup(MetadataTransactionContext ctx,
NodeGroup nodeGroup)
Inserts a node group.
|
MetadataTransactionContext |
beginTransaction()
Begins a transaction on the metadata node.
|
void |
cleanupTempDatasets()
Clean up temporary datasets that have not been active for a long time.
|
void |
commitTransaction(MetadataTransactionContext ctx)
Commits a remote transaction on the metadata node.
|
void |
dropAdapter(MetadataTransactionContext ctx,
String dataverseName,
String name) |
void |
dropDataset(MetadataTransactionContext ctx,
String dataverseName,
String datasetName)
Deletes the dataset with given name, and all it's associated indexes.
|
void |
dropDatasetExternalFiles(MetadataTransactionContext mdTxnCtx,
Dataset dataset) |
void |
dropDatatype(MetadataTransactionContext ctx,
String dataverseName,
String datatypeName)
Deletes the given datatype in given dataverse.
|
void |
dropDataverse(MetadataTransactionContext ctx,
String dataverseName)
Deletes the dataverse with given name, and all it's associated datasets,
indexes, and types.
|
void |
dropExternalFile(MetadataTransactionContext mdTxnCtx,
ExternalFile externalFile) |
void |
dropFeed(MetadataTransactionContext ctx,
String dataverse,
String feedName) |
void |
dropFunction(MetadataTransactionContext ctx,
FunctionSignature functionSignature) |
void |
dropIndex(MetadataTransactionContext ctx,
String dataverseName,
String datasetName,
String indexName)
Deletes the index with given name, in given dataverse and dataset.
|
void |
dropLibrary(MetadataTransactionContext ctx,
String dataverseName,
String libraryName)
Removes a library , acquiring local locks on behalf of the given
transaction id.
|
void |
dropNodegroup(MetadataTransactionContext ctx,
String nodeGroupName)
Deletes a node group.
|
DatasourceAdapter |
getAdapter(MetadataTransactionContext ctx,
String dataverseName,
String name) |
CompactionPolicy |
getCompactionPolicy(MetadataTransactionContext ctx,
String dataverse,
String policyName) |
Dataset |
getDataset(MetadataTransactionContext ctx,
String dataverseName,
String datasetName)
Retrieves a dataset within a given dataverse.
|
List<ExternalFile> |
getDatasetExternalFiles(MetadataTransactionContext mdTxnCtx,
Dataset dataset) |
List<Index> |
getDatasetIndexes(MetadataTransactionContext ctx,
String dataverseName,
String datasetName)
Retrieves all indexes of a dataset.
|
Datatype |
getDatatype(MetadataTransactionContext ctx,
String dataverseName,
String datatypeName)
Retrieves the datatype with given name in given dataverse.
|
Dataverse |
getDataverse(MetadataTransactionContext ctx,
String dataverseName)
Retrieves a dataverse with given name.
|
List<Dataset> |
getDataverseDatasets(MetadataTransactionContext ctx,
String dataverseName)
Retrieves all datasets belonging to the given dataverse.
|
List<Function> |
getDataverseFunctions(MetadataTransactionContext ctx,
String dataverseName) |
List<Library> |
getDataverseLibraries(MetadataTransactionContext ctx,
String dataverseName)
Retireve libraries installed in a given dataverse.
|
List<Dataverse> |
getDataverses(MetadataTransactionContext ctx)
Retrieves all dataverses
|
ExternalFile |
getExternalFile(MetadataTransactionContext mdTxnCtx,
String dataverseName,
String datasetName,
Integer fileNumber)
Get en external file
|
Feed |
getFeed(MetadataTransactionContext ctx,
String dataverse,
String feedName) |
FeedPolicy |
getFeedPolicy(MetadataTransactionContext ctx,
String dataverse,
String policyName) |
Function |
getFunction(MetadataTransactionContext ctx,
FunctionSignature functionSignature) |
Index |
getIndex(MetadataTransactionContext ctx,
String dataverseName,
String datasetName,
String indexName)
Retrieves the index with given name, in given dataverse and dataset.
|
Library |
getLibrary(MetadataTransactionContext ctx,
String dataverseName,
String libraryName) |
int |
getMostRecentDatasetId() |
NodeGroup |
getNodegroup(MetadataTransactionContext ctx,
String nodeGroupName)
Retrieves a node group.
|
void |
init()
Initializes the metadata manager, e.g., finds the remote metadata node.
|
void |
initializeDatasetIdFactory(MetadataTransactionContext ctx) |
void |
lock(MetadataTransactionContext ctx,
byte lockMode)
Locks the metadata in given mode.
|
void |
releaseReadLatch() |
void |
releaseWriteLatch() |
void |
unlock(MetadataTransactionContext ctx,
byte lockMode)
Releases all locks on the metadata held by the given transaction id.
|
void |
updateDataset(MetadataTransactionContext ctx,
Dataset dataset)
update an existing dataset in metadata.
|
void init()
throws RemoteException,
MetadataException
RemoteException - If an error occurred while contacting the proxy for finding
the metadata node.MetadataExceptionMetadataTransactionContext beginTransaction() throws ACIDException, RemoteException
ACIDExceptionRemoteExceptionvoid commitTransaction(MetadataTransactionContext ctx) throws ACIDException, RemoteException
ctx - MetadataTransactionContext of an active metadata transaction.ACIDExceptionRemoteExceptionvoid abortTransaction(MetadataTransactionContext ctx) throws ACIDException, RemoteException
ctx - MetadataTransactionContext of an active metadata transaction.ACIDExceptionRemoteExceptionvoid lock(MetadataTransactionContext ctx, byte lockMode) throws ACIDException, RemoteException
ctx - MetadataTransactionContext of an active metadata transaction.lockMode - Desired lockode.ACIDExceptionRemoteExceptionvoid unlock(MetadataTransactionContext ctx, byte lockMode) throws ACIDException, RemoteException
ctx - MetadataTransactionContext of an active metadata transaction.ACIDExceptionRemoteExceptionvoid addDataverse(MetadataTransactionContext ctx, Dataverse dataverse) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverse - Dataverse instance to be inserted.MetadataException - For example, if the dataverse already exists.List<Dataverse> getDataverses(MetadataTransactionContext ctx) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.MetadataExceptionDataverse getDataverse(MetadataTransactionContext ctx, String dataverseName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - Name of the dataverse to retrieve.MetadataException - For example, if the dataverse does not exist.List<Dataset> getDataverseDatasets(MetadataTransactionContext ctx, String dataverseName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - Name of the dataverse of which to find all datasets.MetadataException - For example, if the dataverse does not exist.void dropDataverse(MetadataTransactionContext ctx, String dataverseName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.MetadataException - For example, if the dataverse does not exist.void addDataset(MetadataTransactionContext ctx, Dataset dataset) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataset - Dataset instance to be inserted.MetadataException - For example, if the dataset already exists.Dataset getDataset(MetadataTransactionContext ctx, String dataverseName, String datasetName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - Dataverse name to look for the dataset.datasetName - Name of dataset to be retrieved.MetadataException - For example, if the dataset does not exist.List<Index> getDatasetIndexes(MetadataTransactionContext ctx, String dataverseName, String datasetName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - Name of dataverse which holds the given dataset.datasetName - Name of dataset for which to retrieve all indexes.MetadataException - For example, if the dataset and/or dataverse does not exist.void dropDataset(MetadataTransactionContext ctx, String dataverseName, String datasetName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - Name of dataverse which holds the given dataset.datasetName - Name of dataset to delete.MetadataException - For example, if the dataset and/or dataverse does not exist.void addIndex(MetadataTransactionContext ctx, Index index) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.index - Index instance to be inserted.MetadataException - For example, if the index already exists.Index getIndex(MetadataTransactionContext ctx, String dataverseName, String datasetName, String indexName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - Name of the datavers holding the given dataset.datasetName - Name of the dataset holding the index.MetadataException - For example, if the index does not exist.void dropIndex(MetadataTransactionContext ctx, String dataverseName, String datasetName, String indexName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - Name of the datavers holding the given dataset.datasetName - Name of the dataset holding the index.MetadataException - For example, if the index does not exist.void addDatatype(MetadataTransactionContext ctx, Datatype datatype) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.datatype - Datatype instance to be inserted.MetadataException - For example, if the datatype already exists.Datatype getDatatype(MetadataTransactionContext ctx, String dataverseName, String datatypeName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - Name of dataverse holding the datatype.datatypeName - Name of datatype to be retrieved.MetadataException - For example, if the datatype does not exist.void dropDatatype(MetadataTransactionContext ctx, String dataverseName, String datatypeName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - Name of dataverse holding the datatype.datatypeName - Name of datatype to be deleted.MetadataException - For example, if there are still datasets using the type to be
deleted.void addNodegroup(MetadataTransactionContext ctx, NodeGroup nodeGroup) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.nodeGroup - Node group instance to insert.MetadataException - For example, if the node group already exists.NodeGroup getNodegroup(MetadataTransactionContext ctx, String nodeGroupName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.nodeGroupName - Name of node group to be retrieved.MetadataException - For example, if the node group does not exist.void dropNodegroup(MetadataTransactionContext ctx, String nodeGroupName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.nodeGroupName - Name of node group to be deleted.MetadataException - For example, there are still datasets partitioned on the node
group to be deleted.void addNode(MetadataTransactionContext ctx, Node node) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.node - Node instance to be inserted.MetadataException - For example, if the node already exists.void addFunction(MetadataTransactionContext mdTxnCtx, Function function) throws MetadataException
mdTxnCtx - MetadataTransactionContext of an active metadata transaction.function - An instance of type Function that represents the function
being addedMetadataExceptionFunction getFunction(MetadataTransactionContext ctx, FunctionSignature functionSignature) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.functionSignature - the functions signature (unique to the function)MetadataExceptionvoid dropFunction(MetadataTransactionContext ctx, FunctionSignature functionSignature) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.functionSignature - the functions signature (unique to the function)MetadataExceptionvoid addAdapter(MetadataTransactionContext mdTxnCtx, DatasourceAdapter adapter) throws MetadataException
mdTxnCtx - MetadataTransactionContext of an active metadata transaction.function - An instance of type Adapter that represents the adapter being
addedMetadataExceptionDatasourceAdapter getAdapter(MetadataTransactionContext ctx, String dataverseName, String name) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - the dataverse associated with the adapter being searchedName - name of the adapterMetadataExceptionvoid dropAdapter(MetadataTransactionContext ctx, String dataverseName, String name) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - the dataverse associated with the adapter being droppedname - name of the adapterMetadataExceptionvoid addCompactionPolicy(MetadataTransactionContext ctx, CompactionPolicy policy) throws MetadataException
ctx - policy - MetadataExceptionCompactionPolicy getCompactionPolicy(MetadataTransactionContext ctx, String dataverse, String policyName) throws MetadataException
ctx - dataverse - policyName - MetadataExceptionList<Function> getDataverseFunctions(MetadataTransactionContext ctx, String dataverseName) throws MetadataException
ctx - dataverseName - MetadataExceptionvoid addFeed(MetadataTransactionContext ctx, Feed feed) throws MetadataException
ctx - feed - MetadataExceptionFeed getFeed(MetadataTransactionContext ctx, String dataverse, String feedName) throws MetadataException
ctx - dataverse - feedName - MetadataExceptionvoid dropFeed(MetadataTransactionContext ctx, String dataverse, String feedName) throws MetadataException
ctx - dataverse - feedName - MetadataExceptionvoid addFeedPolicy(MetadataTransactionContext ctx, FeedPolicy policy) throws MetadataException
ctx - policy - MetadataExceptionFeedPolicy getFeedPolicy(MetadataTransactionContext ctx, String dataverse, String policyName) throws MetadataException
ctx - dataverse - policyName - MetadataExceptionvoid initializeDatasetIdFactory(MetadataTransactionContext ctx) throws MetadataException
MetadataExceptionint getMostRecentDatasetId()
throws MetadataException
MetadataExceptionvoid acquireWriteLatch()
void releaseWriteLatch()
void acquireReadLatch()
void releaseReadLatch()
void dropLibrary(MetadataTransactionContext ctx, String dataverseName, String libraryName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - dataverse asociated with the adapter that is to be deleted.libraryName - Name of library to be deleted. MetadataException for example,
if the library does not exists.RemoteExceptionMetadataExceptionvoid addLibrary(MetadataTransactionContext ctx, Library library) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.library - Library to be addedMetadataException - for example, if the library is already added.RemoteExceptionLibrary getLibrary(MetadataTransactionContext ctx, String dataverseName, String libraryName) throws MetadataException, RemoteException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - dataverse asociated with the library that is to be retrieved.libraryName - name of the library that is to be retrievedMetadataExceptionRemoteExceptionList<Library> getDataverseLibraries(MetadataTransactionContext ctx, String dataverseName) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataverseName - dataverse asociated with the library that is to be retrieved.MetadataExceptionRemoteExceptionvoid addExternalFile(MetadataTransactionContext mdTxnCtx, ExternalFile externalFile) throws MetadataException
mdTxnCtx - MetadataTransactionContext of an active metadata transaction.externalFile - An instance of type ExternalFile that represents the external file being
addedMetadataExceptionList<ExternalFile> getDatasetExternalFiles(MetadataTransactionContext mdTxnCtx, Dataset dataset) throws MetadataException
mdTxnCtx - MetadataTransactionContext of an active metadata transaction.dataset - An instance of type Dataset that represents the "external" datasetMetadataExceptionvoid dropExternalFile(MetadataTransactionContext mdTxnCtx, ExternalFile externalFile) throws MetadataException
mdTxnCtx - MetadataTransactionContext of an active metadata transaction.externalFile - An instance of type ExternalFile that represents the external file being
droppedMetadataExceptionvoid dropDatasetExternalFiles(MetadataTransactionContext mdTxnCtx, Dataset dataset) throws MetadataException
mdTxnCtx - MetadataTransactionContext of an active metadata transaction.dataset - An instance of type dataset that owns the external files being
droppedMetadataExceptionExternalFile getExternalFile(MetadataTransactionContext mdTxnCtx, String dataverseName, String datasetName, Integer fileNumber) throws MetadataException
mdTxnCtx - dataverseName - datasetName - fileNumber - MetadataExceptionvoid updateDataset(MetadataTransactionContext ctx, Dataset dataset) throws MetadataException
ctx - MetadataTransactionContext of an active metadata transaction.dataset - Existing Dataset.MetadataException - For example, if the dataset already exists.void cleanupTempDatasets()
throws MetadataException
MetadataExceptionCopyright © 2016 The Apache Software Foundation. All rights reserved.