use of org.apache.hadoop.hbase.thrift2.generated.TIOError in project hbase by apache.
the class ThriftHBaseServiceHandler method disableTable.
@Override
public void disableTable(TTableName tableName) throws TIOError, TException {
try {
TableName table = tableNameFromThrift(tableName);
connectionCache.getAdmin().disableTable(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 getSlowLogResponses.
@Override
public List<TOnlineLogRecord> getSlowLogResponses(Set<TServerName> tServerNames, TLogQueryFilter tLogQueryFilter) throws TIOError, TException {
try {
Set<ServerName> serverNames = ThriftUtilities.getServerNamesFromThrift(tServerNames);
LogQueryFilter logQueryFilter = ThriftUtilities.getSlowLogQueryFromThrift(tLogQueryFilter);
List<OnlineLogRecord> onlineLogRecords = connectionCache.getAdmin().getSlowLogResponses(serverNames, logQueryFilter);
return ThriftUtilities.getSlowLogRecordsFromHBase(onlineLogRecords);
} catch (IOException e) {
throw getTIOError(e);
}
}
use of org.apache.hadoop.hbase.thrift2.generated.TIOError in project hbase by apache.
the class ThriftHBaseServiceHandler method modifyTable.
@Override
public void modifyTable(TTableDescriptor desc) throws TIOError, TException {
try {
TableDescriptor descriptor = tableDescriptorFromThrift(desc);
connectionCache.getAdmin().modifyTable(descriptor);
} catch (IOException e) {
throw getTIOError(e);
}
}
use of org.apache.hadoop.hbase.thrift2.generated.TIOError in project hbase by apache.
the class ThriftHBaseServiceHandler method getTableDescriptor.
@Override
public TTableDescriptor getTableDescriptor(TTableName table) throws TIOError, TException {
try {
TableName tableName = ThriftUtilities.tableNameFromThrift(table);
TableDescriptor tableDescriptor = connectionCache.getAdmin().getDescriptor(tableName);
return tableDescriptorFromHBase(tableDescriptor);
} catch (IOException e) {
throw getTIOError(e);
}
}
use of org.apache.hadoop.hbase.thrift2.generated.TIOError in project hbase by apache.
the class ThriftHBaseServiceHandler method getTableNamesByPattern.
@Override
public List<TTableName> getTableNamesByPattern(String regex, boolean includeSysTables) throws TIOError, TException {
try {
Pattern pattern = (regex == null ? null : Pattern.compile(regex));
TableName[] tableNames = connectionCache.getAdmin().listTableNames(pattern, includeSysTables);
return tableNamesFromHBase(tableNames);
} catch (IOException e) {
throw getTIOError(e);
}
}
Aggregations