public class HBaseQueueAdmin extends AbstractQueueAdmin
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_PREFIX_BYTES
HBase table property for the number of bytes as the prefix of the queue entry row key.
|
protected HBaseTableUtil |
tableUtil |
unqualifiedTableNamePrefix| Modifier | Constructor and Description |
|---|---|
|
HBaseQueueAdmin(Configuration hConf,
CConfiguration cConf,
LocationFactory locationFactory,
HBaseTableUtil tableUtil,
DatasetFramework datasetFramework,
co.cask.tephra.TransactionExecutorFactory txExecutorFactory) |
protected |
HBaseQueueAdmin(Configuration hConf,
CConfiguration cConf,
LocationFactory locationFactory,
HBaseTableUtil tableUtil,
DatasetFramework datasetFramework,
co.cask.tephra.TransactionExecutorFactory txExecutorFactory,
QueueConstants.QueueType type) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAllForFlow(Id.Flow flowId)
Clears all queues for a flow, for example if the flow is upgraded and old.
|
void |
create(QueueName queueName)
Creates queue if doesn't exist.
|
void |
create(QueueName queueName,
Properties properties)
Creates queue if doesn't exist.
|
boolean |
doTruncateTable(QueueName queueName)
This determines whether truncating a queue is supported (by truncating the queue's table).
|
void |
dropAllForFlow(Id.Flow flowId)
Deletes all queues for a flow, for example if the flow is deleted.
|
void |
dropAllInNamespace(Id.Namespace namespaceId)
Deletes all queues in a namespace
|
boolean |
exists(QueueName queueName) |
static TableId |
getConfigTableId(QueueName queueName) |
static TableId |
getConfigTableId(String namespace) |
HBaseConsumerStateStore |
getConsumerStateStore(QueueName queueName) |
protected List<? extends Class<? extends org.apache.hadoop.hbase.Coprocessor>> |
getCoprocessors() |
TableId |
getDataTableId(Id.Flow flowId) |
TableId |
getDataTableId(Id.Flow flowId,
QueueConstants.QueueType queueType) |
TableId |
getDataTableId(QueueName queueName)
This determines the actual TableId from the table name prefix and the name of the queue.
|
TableId |
getDataTableId(QueueName queueName,
QueueConstants.QueueType queueType) |
protected org.apache.hadoop.hbase.client.HBaseAdmin |
getHBaseAdmin() |
QueueConfigurer |
getQueueConfigurer(QueueName queueName)
Returns a
QueueConfigurer for configuring the queue. |
void |
truncate(QueueName queueName)
Wipes out queue data.
|
void |
upgrade()
Performs upgrade action for all queues.
|
getApplicationName, getFlowNamepublic static final String PROPERTY_PREFIX_BYTES
protected final HBaseTableUtil tableUtil
@Inject public HBaseQueueAdmin(Configuration hConf, CConfiguration cConf, LocationFactory locationFactory, HBaseTableUtil tableUtil, DatasetFramework datasetFramework, co.cask.tephra.TransactionExecutorFactory txExecutorFactory)
protected HBaseQueueAdmin(Configuration hConf, CConfiguration cConf, LocationFactory locationFactory, HBaseTableUtil tableUtil, DatasetFramework datasetFramework, co.cask.tephra.TransactionExecutorFactory txExecutorFactory, QueueConstants.QueueType type)
protected final org.apache.hadoop.hbase.client.HBaseAdmin getHBaseAdmin() throws IOException
IOExceptionpublic boolean doTruncateTable(QueueName queueName)
public boolean exists(QueueName queueName) throws Exception
queueName - Name of the queueException - if check failspublic void create(QueueName queueName) throws IOException
QueueAdminqueueName - Name of the queueIOExceptionpublic void create(QueueName queueName, Properties properties) throws IOException
QueueAdminqueueName - Name of the queueproperties - additional propertiesIOExceptionpublic void truncate(QueueName queueName) throws Exception
QueueAdminqueueName - Name of the queueException - if cleanup failspublic void clearAllForFlow(Id.Flow flowId) throws Exception
QueueAdminExceptionpublic QueueConfigurer getQueueConfigurer(QueueName queueName) throws Exception
QueueAdminQueueConfigurer for configuring the queue.Exceptionpublic void dropAllForFlow(Id.Flow flowId) throws Exception
QueueAdminExceptionpublic void upgrade()
throws Exception
QueueAdminExceptionpublic HBaseConsumerStateStore getConsumerStateStore(QueueName queueName) throws Exception
Exceptionprotected List<? extends Class<? extends org.apache.hadoop.hbase.Coprocessor>> getCoprocessors()
HTablepublic void dropAllInNamespace(Id.Namespace namespaceId) throws Exception
QueueAdminnamespaceId - the namespace to delete flows inExceptionpublic TableId getDataTableId(Id.Flow flowId)
getDataTableId in class AbstractQueueAdminpublic TableId getDataTableId(QueueName queueName)
AbstractQueueAdmingetDataTableId in class AbstractQueueAdminqueueName - The name of the queue.public TableId getDataTableId(QueueName queueName, QueueConstants.QueueType queueType)
public TableId getDataTableId(Id.Flow flowId, QueueConstants.QueueType queueType)
Copyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.