public final class HBaseMetadataTable extends Object implements MetadataTable
MetadataTable.| Modifier and Type | Field and Description |
|---|---|
static byte[] |
COL |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
createTopic(TopicMetadata topicMetadata)
Create a topic with properties.
|
void |
deleteTopic(co.cask.cdap.proto.id.TopicId topicId)
Delete a topic.
|
TopicMetadata |
getMetadata(co.cask.cdap.proto.id.TopicId topicId)
Fetch the metadata of the
TopicId. |
List<co.cask.cdap.proto.id.TopicId> |
listTopics()
List all topics in the messaging system.
|
List<co.cask.cdap.proto.id.TopicId> |
listTopics(co.cask.cdap.proto.id.NamespaceId namespaceId)
List all the topics in a namespace.
|
void |
updateTopic(TopicMetadata topicMetadata)
Updates the topic properties.
|
public TopicMetadata getMetadata(co.cask.cdap.proto.id.TopicId topicId) throws IOException, co.cask.cdap.api.messaging.TopicNotFoundException
MetadataTableTopicId.getMetadata in interface MetadataTabletopicId - message topicTopicIdIOException - if failed to retrieve metadataco.cask.cdap.api.messaging.TopicNotFoundException - if the topic doesn't existpublic void createTopic(TopicMetadata topicMetadata) throws co.cask.cdap.api.messaging.TopicAlreadyExistsException, IOException
MetadataTablecreateTopic in interface MetadataTabletopicMetadata - metadata of the topicco.cask.cdap.api.messaging.TopicAlreadyExistsException - if the topic already existIOException - if failed to create topicpublic void updateTopic(TopicMetadata topicMetadata) throws co.cask.cdap.api.messaging.TopicNotFoundException, IOException
MetadataTableupdateTopic in interface MetadataTabletopicMetadata - metadata of the topic.co.cask.cdap.api.messaging.TopicNotFoundException - if the topic doesn't existIOException - if failed to update metadatapublic void deleteTopic(co.cask.cdap.proto.id.TopicId topicId)
throws co.cask.cdap.api.messaging.TopicNotFoundException,
IOException
MetadataTabledeleteTopic in interface MetadataTabletopicId - message topicco.cask.cdap.api.messaging.TopicNotFoundException - if the topic doesn't existIOException - if failed to delete the topicpublic List<co.cask.cdap.proto.id.TopicId> listTopics(co.cask.cdap.proto.id.NamespaceId namespaceId) throws IOException
MetadataTablelistTopics in interface MetadataTablenamespaceId - namespaceList of topics in that namespaceIOException - if failed to retrieve topicspublic List<co.cask.cdap.proto.id.TopicId> listTopics() throws IOException
MetadataTablelistTopics in interface MetadataTableList of all topics.IOException - if failed to retrieve topicspublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.