use of org.apache.hadoop.hbase.thrift2.generated.TIOError in project hbase by apache.
the class ThriftHBaseServiceHandler method deleteColumnFamily.
@Override
public void deleteColumnFamily(TTableName tableName, ByteBuffer column) throws TIOError, TException {
try {
TableName table = tableNameFromThrift(tableName);
connectionCache.getAdmin().deleteColumnFamily(table, column.array());
} catch (IOException e) {
throw getTIOError(e);
}
}
use of org.apache.hadoop.hbase.thrift2.generated.TIOError in project hbase by apache.
the class ThriftHBaseServiceHandler method truncateTable.
@Override
public void truncateTable(TTableName tableName, boolean preserveSplits) throws TIOError, TException {
try {
TableName table = tableNameFromThrift(tableName);
connectionCache.getAdmin().truncateTable(table, preserveSplits);
} catch (IOException e) {
throw getTIOError(e);
}
}
use of org.apache.hadoop.hbase.thrift2.generated.TIOError in project hbase by apache.
the class ThriftHBaseServiceHandler method deleteTable.
@Override
public void deleteTable(TTableName tableName) throws TIOError, TException {
try {
TableName table = tableNameFromThrift(tableName);
connectionCache.getAdmin().deleteTable(table);
} catch (IOException e) {
throw getTIOError(e);
}
}
use of org.apache.hadoop.hbase.thrift2.generated.TIOError in project hbase by apache.
the class ThriftHBaseServiceHandler method addColumnFamily.
@Override
public void addColumnFamily(TTableName tableName, TColumnFamilyDescriptor column) throws TIOError, TException {
try {
TableName table = tableNameFromThrift(tableName);
ColumnFamilyDescriptor columnFamilyDescriptor = columnFamilyDescriptorFromThrift(column);
connectionCache.getAdmin().addColumnFamily(table, columnFamilyDescriptor);
} catch (IOException e) {
throw getTIOError(e);
}
}
use of org.apache.hadoop.hbase.thrift2.generated.TIOError in project hbase by apache.
the class ThriftHBaseServiceHandler method getTableDescriptorsByPattern.
@Override
public List<TTableDescriptor> getTableDescriptorsByPattern(String regex, boolean includeSysTables) throws TIOError, TException {
try {
Pattern pattern = (regex == null ? null : Pattern.compile(regex));
List<TableDescriptor> tableDescriptors = connectionCache.getAdmin().listTableDescriptors(pattern, includeSysTables);
return tableDescriptorsFromHBase(tableDescriptors);
} catch (IOException e) {
throw getTIOError(e);
}
}
Aggregations