public class NoOpMetadataStore extends Object implements MetadataStore
MetadataStore used in memory mode.| Constructor and Description |
|---|
NoOpMetadataStore() |
| 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 |
public void setProperties(MetadataScope scope, Id.NamespacedId entityId, Map<String,String> properties)
MetadataStoreId.NamespacedId in the specified MetadataScope.setProperties in interface MetadataStorescope - the MetadataScope to add/update the properties inentityId - the Id.NamespacedId to add the properties toproperties - the properties to add/updatepublic void setProperties(MetadataScope scope, Id.NamespacedId entityId, Map<String,String> properties, Indexer indexer)
MetadataStoreId.NamespacedId in the specified MetadataScope.setProperties in interface MetadataStorescope - 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 indexespublic void addTags(MetadataScope scope, Id.NamespacedId entityId, String... tagsToAdd)
MetadataStoreId.NamespacedId in the specified MetadataScope.addTags in interface MetadataStorescope - the MetadataScope to add the tags inentityId - the Id.NamespacedId to add the tags totagsToAdd - the tags to addpublic Set<MetadataRecord> getMetadata(Id.NamespacedId entityId)
getMetadata in interface MetadataStoreMetadataRecord representing all the metadata (including properties and tags) for the
specified Id.NamespacedId in both MetadataScope.USER and MetadataScope.SYSTEM.public MetadataRecord getMetadata(MetadataScope scope, Id.NamespacedId entityId)
getMetadata in interface MetadataStoreMetadataRecord representing all the metadata (including properties and tags) for the specified
Id.NamespacedId in the specified MetadataScope.public Set<MetadataRecord> getMetadata(MetadataScope scope, Set<Id.NamespacedId> entityIds)
getMetadata in interface MetadataStoreMetadataRecords representing all the metadata (including properties and tags)
for the specified set of Id.NamespacedIds in the specified MetadataScope.public Map<String,String> getProperties(Id.NamespacedId entityId)
getProperties in interface MetadataStoreId.NamespacedId in both MetadataScope.USER and
MetadataScope.SYSTEMpublic Map<String,String> getProperties(MetadataScope scope, Id.NamespacedId entityId)
getProperties in interface MetadataStoreId.NamespacedId in the specified MetadataScopepublic Set<String> getTags(Id.NamespacedId entityId)
getTags in interface MetadataStoreId.NamespacedId in both MetadataScope.USER and
MetadataScope.SYSTEMpublic Set<String> getTags(MetadataScope scope, Id.NamespacedId entityId)
getTags in interface MetadataStoreId.NamespacedId in the specified MetadataScopepublic void removeMetadata(Id.NamespacedId entityId)
MetadataStoreId.NamespacedId in both
MetadataScope.USER and MetadataScope.SYSTEM.removeMetadata in interface MetadataStoreentityId - the Id.NamespacedId to remove all metadata forpublic void removeMetadata(MetadataScope scope, Id.NamespacedId entityId)
MetadataStoreId.NamespacedId in the specified
MetadataScope.removeMetadata in interface MetadataStorescope - the MetadataScopeentityId - the Id.NamespacedId to remove all metadata forpublic void removeProperties(MetadataScope scope, Id.NamespacedId entityId)
MetadataStoreId.NamespacedId in the specified MetadataScope.removeProperties in interface MetadataStorescope - the MetadataScopeentityId - the Id.NamespacedId to remove all properties forpublic void removeProperties(MetadataScope scope, Id.NamespacedId entityId, String... keys)
MetadataStoreId.NamespacedId in the specified MetadataScope.removeProperties in interface MetadataStorescope - the MetadataScopeentityId - the Id.NamespacedId to remove the specified keys forkeys - the keys to removepublic void removeTags(MetadataScope scope, Id.NamespacedId entityId)
MetadataStoreId.NamespacedId in the specified MetadataScope.removeTags in interface MetadataStorescope - the MetadataScopeentityId - the Id.NamespacedId to remove all tags forpublic void removeTags(MetadataScope scope, Id.NamespacedId entityId, String... tagsToRemove)
MetadataStoreId.NamespacedId in the specified MetadataScope.removeTags in interface MetadataStorescope - the MetadataScopeentityId - the Id.NamespacedId to remove the specified tags fortagsToRemove - the tags to removepublic Set<MetadataSearchResultRecord> searchMetadata(String namespaceId, String searchQuery)
MetadataStoreMetadataScope.USER and MetadataScope.SYSTEM.searchMetadata in interface MetadataStorepublic Set<MetadataSearchResultRecord> searchMetadata(MetadataScope scope, String namespaceId, String searchQuery)
MetadataStoreMetadataScope.searchMetadata in interface MetadataStorescope - 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]public Set<MetadataSearchResultRecord> searchMetadataOnType(String namespaceId, String searchQuery, MetadataSearchTargetType type)
MetadataStoreMetadataScope.USER and
MetadataScope.SYSTEM.searchMetadataOnType in interface MetadataStorenamespaceId - 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 topublic Set<MetadataSearchResultRecord> searchMetadataOnType(MetadataScope scope, String namespaceId, String searchQuery, MetadataSearchTargetType type)
MetadataStoreMetadataScope.searchMetadataOnType in interface MetadataStorescope - 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 topublic Set<MetadataRecord> getSnapshotBeforeTime(Set<Id.NamespacedId> entityIds, long timeMillis)
MetadataStoreMetadataScope.USER
and MetadataScope.SYSTEM.getSnapshotBeforeTime in interface MetadataStoreentityIds - entity idstimeMillis - time in millisecondspublic Set<MetadataRecord> getSnapshotBeforeTime(MetadataScope scope, Set<Id.NamespacedId> entityIds, long timeMillis)
MetadataStoreMetadataScope.getSnapshotBeforeTime in interface MetadataStorescope - the MetadataScope to get the snapshot inentityIds - entity idstimeMillis - time in millisecondspublic void upgrade()
MetadataStoreMetadataStoreupgrade in interface MetadataStoreCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.