Search in sources :

Example 41 with TableNotFoundException

use of org.apache.hadoop.hbase.TableNotFoundException in project cdap by caskdata.

the class HBaseTableFactory method enableTable.

private void enableTable(HBaseDDLExecutor ddlExecutor, TableId tableId) throws IOException {
    try {
        TableName tableName = HTableNameConverter.toTableName(cConf.get(Constants.Dataset.TABLE_PREFIX), tableId);
        ddlExecutor.enableTableIfDisabled(tableName.getNamespaceAsString(), tableName.getQualifierAsString());
        LOG.debug("TMS Table {} has been enabled.", tableName);
    } catch (TableNotFoundException ex) {
        LOG.debug("TMS Table {} was not found. Skipping enable.", tableId, ex);
    } catch (TableNotDisabledException ex) {
        LOG.debug("TMS Table {} was already in enabled state.", tableId, ex);
    }
}
Also used : TableNotDisabledException(org.apache.hadoop.hbase.TableNotDisabledException) TableName(org.apache.hadoop.hbase.TableName) TableNotFoundException(org.apache.hadoop.hbase.TableNotFoundException)

Aggregations

TableNotFoundException (org.apache.hadoop.hbase.TableNotFoundException)41 IOException (java.io.IOException)19 TableName (org.apache.hadoop.hbase.TableName)14 TableNotEnabledException (org.apache.hadoop.hbase.TableNotEnabledException)8 Test (org.junit.Test)8 HRegionInfo (org.apache.hadoop.hbase.HRegionInfo)7 HTableDescriptor (org.apache.hadoop.hbase.HTableDescriptor)7 ServerName (org.apache.hadoop.hbase.ServerName)6 ArrayList (java.util.ArrayList)5 HColumnDescriptor (org.apache.hadoop.hbase.HColumnDescriptor)5 Connection (org.apache.hadoop.hbase.client.Connection)5 Table (org.apache.hadoop.hbase.client.Table)5 Path (org.apache.hadoop.fs.Path)4 DoNotRetryIOException (org.apache.hadoop.hbase.DoNotRetryIOException)4 TableNotDisabledException (org.apache.hadoop.hbase.TableNotDisabledException)4 RegionLocator (org.apache.hadoop.hbase.client.RegionLocator)4 InterruptedIOException (java.io.InterruptedIOException)3 LinkedList (java.util.LinkedList)3 List (java.util.List)3 Map (java.util.Map)3