public interface MetadataStore
MetadataDataset for both system and user metadata.
Operations supported for a specified Id.NamespacedId:
| Modifier and Type | Method and Description |
|---|---|
void |
addTags(MetadataScope scope,
Id.NamespacedId entityId,
String... tagsToAdd)
Adds tags for the specified
Id.NamespacedId in the specified MetadataScope. |
Set<MetadataRecord> |
getMetadata(Id.NamespacedId entityId) |
MetadataRecord |
getMetadata(MetadataScope scope,
Id.NamespacedId entityId) |
Set<MetadataRecord> |
getMetadata(MetadataScope scope,
Set<Id.NamespacedId> entityIds) |
Map<String,String> |
getProperties(Id.NamespacedId entityId) |
Map<String,String> |
getProperties(MetadataScope scope,
Id.NamespacedId entityId) |
Set<MetadataRecord> |
getSnapshotBeforeTime(MetadataScope scope,
Set<Id.NamespacedId> entityIds,
long timeMillis)
Returns the snapshot of the metadata for entities on or before the given time in the specified
MetadataScope. |
Set<MetadataRecord> |
getSnapshotBeforeTime(Set<Id.NamespacedId> entityIds,
long timeMillis)
Returns the snapshot of the metadata for entities on or before the given time in both
MetadataScope.USER
and MetadataScope.SYSTEM. |
Set<String> |
getTags(Id.NamespacedId entityId) |
Set<String> |
getTags(MetadataScope scope,
Id.NamespacedId entityId) |
void |
removeMetadata(Id.NamespacedId entityId)
Removes all metadata (including properties and tags) for the specified
Id.NamespacedId in both
MetadataScope.USER and MetadataScope.SYSTEM. |
void |
removeMetadata(MetadataScope scope,
Id.NamespacedId entityId)
Removes all metadata (including properties and tags) for the specified
Id.NamespacedId in the specified
MetadataScope. |
void |
removeProperties(MetadataScope scope,
Id.NamespacedId entityId)
Removes all properties for the specified
Id.NamespacedId in the specified MetadataScope. |
void |
removeProperties(MetadataScope scope,
Id.NamespacedId entityId,
String... keys)
Removes the specified properties of the
Id.NamespacedId in the specified MetadataScope. |
void |
removeTags(MetadataScope scope,
Id.NamespacedId entityId)
Removes tags of the
Id.NamespacedId in the specified MetadataScope. |
void |
removeTags(MetadataScope scope,
Id.NamespacedId entityId,
String... tagsToRemove)
Removes the specified tags from the
Id.NamespacedId in the specified MetadataScope. |
Set<MetadataSearchResultRecord> |
searchMetadata(MetadataScope scope,
String namespaceId,
String searchQuery)
Search the Metadata Dataset in the specified
MetadataScope. |
Set<MetadataSearchResultRecord> |
searchMetadata(String namespaceId,
String searchQuery)
Search the Metadata Dataset in both
MetadataScope.USER and MetadataScope.SYSTEM. |
Set<MetadataSearchResultRecord> |
searchMetadataOnType(MetadataScope scope,
String namespaceId,
String searchQuery,
MetadataSearchTargetType type)
Search the Metadata Dataset for the specified target type in the specified
MetadataScope. |
Set<MetadataSearchResultRecord> |
searchMetadataOnType(String namespaceId,
String searchQuery,
MetadataSearchTargetType type)
Search the Metadata Dataset for the specified target type in both
MetadataScope.USER and
MetadataScope.SYSTEM. |
void |
setProperties(MetadataScope scope,
Id.NamespacedId entityId,
Map<String,String> properties)
Adds/updates properties for the specified
Id.NamespacedId in the specified MetadataScope. |
void |
setProperties(MetadataScope scope,
Id.NamespacedId entityId,
Map<String,String> properties,
Indexer indexer)
Adds/updates properties for the specified
Id.NamespacedId in the specified MetadataScope. |
void |
upgrade()
Upgrades the
MetadataStore |
void setProperties(MetadataScope scope, Id.NamespacedId entityId, Map<String,String> properties)
Id.NamespacedId in the specified MetadataScope.scope - the MetadataScope to add/update the properties inentityId - the Id.NamespacedId to add the properties toproperties - the properties to add/updatevoid setProperties(MetadataScope scope, Id.NamespacedId entityId, Map<String,String> properties, @Nullable Indexer indexer)
Id.NamespacedId in the specified MetadataScope.scope - the MetadataScope to add/update the properties inentityId - the Id.NamespacedId to add the properties toproperties - the properties to add/updateindexer - Indexer to use for creating indexesvoid addTags(MetadataScope scope, Id.NamespacedId entityId, String... tagsToAdd)
Id.NamespacedId in the specified MetadataScope.scope - the MetadataScope to add the tags inentityId - the Id.NamespacedId to add the tags totagsToAdd - the tags to addSet<MetadataRecord> getMetadata(Id.NamespacedId entityId)
MetadataRecord representing all the metadata (including properties and tags) for the
specified Id.NamespacedId in both MetadataScope.USER and MetadataScope.SYSTEM.MetadataRecord getMetadata(MetadataScope scope, Id.NamespacedId entityId)
MetadataRecord representing all the metadata (including properties and tags) for the specified
Id.NamespacedId in the specified MetadataScope.Set<MetadataRecord> getMetadata(MetadataScope scope, Set<Id.NamespacedId> entityIds)
MetadataRecords representing all the metadata (including properties and tags)
for the specified set of Id.NamespacedIds in the specified MetadataScope.Map<String,String> getProperties(Id.NamespacedId entityId)
Id.NamespacedId in both MetadataScope.USER and
MetadataScope.SYSTEMMap<String,String> getProperties(MetadataScope scope, Id.NamespacedId entityId)
Id.NamespacedId in the specified MetadataScopeSet<String> getTags(Id.NamespacedId entityId)
Id.NamespacedId in both MetadataScope.USER and
MetadataScope.SYSTEMSet<String> getTags(MetadataScope scope, Id.NamespacedId entityId)
Id.NamespacedId in the specified MetadataScopevoid removeMetadata(Id.NamespacedId entityId)
Id.NamespacedId in both
MetadataScope.USER and MetadataScope.SYSTEM.entityId - the Id.NamespacedId to remove all metadata forvoid removeMetadata(MetadataScope scope, Id.NamespacedId entityId)
Id.NamespacedId in the specified
MetadataScope.scope - the MetadataScopeentityId - the Id.NamespacedId to remove all metadata forvoid removeProperties(MetadataScope scope, Id.NamespacedId entityId)
Id.NamespacedId in the specified MetadataScope.scope - the MetadataScopeentityId - the Id.NamespacedId to remove all properties forvoid removeProperties(MetadataScope scope, Id.NamespacedId entityId, String... keys)
Id.NamespacedId in the specified MetadataScope.scope - the MetadataScopeentityId - the Id.NamespacedId to remove the specified keys forkeys - the keys to removevoid removeTags(MetadataScope scope, Id.NamespacedId entityId)
Id.NamespacedId in the specified MetadataScope.scope - the MetadataScopeentityId - the Id.NamespacedId to remove all tags forvoid removeTags(MetadataScope scope, Id.NamespacedId entityId, String... tagsToRemove)
Id.NamespacedId in the specified MetadataScope.scope - the MetadataScopeentityId - the Id.NamespacedId to remove the specified tags fortagsToRemove - the tags to removeSet<MetadataSearchResultRecord> searchMetadata(String namespaceId, String searchQuery)
MetadataScope.USER and MetadataScope.SYSTEM.Set<MetadataSearchResultRecord> searchMetadata(MetadataScope scope, String namespaceId, String searchQuery)
MetadataScope.scope - the MetadataScope to restrict the search tonamespaceId - the namespace to search insearchQuery - the search query, which could be of two forms: [key]:[value] or just [value]Set<MetadataSearchResultRecord> searchMetadataOnType(String namespaceId, String searchQuery, MetadataSearchTargetType type)
MetadataScope.USER and
MetadataScope.SYSTEM.namespaceId - the namespace to search insearchQuery - the search query, which could be of two forms: [key]:[value] or just [value]type - the MetadataSearchTargetType to restrict the search toSet<MetadataSearchResultRecord> searchMetadataOnType(MetadataScope scope, String namespaceId, String searchQuery, MetadataSearchTargetType type)
MetadataScope.scope - the MetadataScope to restrict the search tonamespaceId - the namespace to search insearchQuery - the search query, which could be of two forms: [key]:[value] or just [value]type - the MetadataSearchTargetType to restrict the search toSet<MetadataRecord> getSnapshotBeforeTime(Set<Id.NamespacedId> entityIds, long timeMillis)
MetadataScope.USER
and MetadataScope.SYSTEM.entityIds - entity idstimeMillis - time in millisecondsSet<MetadataRecord> getSnapshotBeforeTime(MetadataScope scope, Set<Id.NamespacedId> entityIds, long timeMillis)
MetadataScope.scope - the MetadataScope to get the snapshot inentityIds - entity idstimeMillis - time in millisecondsvoid upgrade()
MetadataStoreCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.