use of org.apache.hive.service.rpc.thrift.TGetTableTypesReq in project hive by apache.
the class HiveDatabaseMetaData method getTableTypes.
public ResultSet getTableTypes() throws SQLException {
TGetTableTypesResp tableTypeResp;
try {
tableTypeResp = client.GetTableTypes(new TGetTableTypesReq(sessHandle));
} catch (TException e) {
throw new SQLException(e.getMessage(), "08S01", e);
}
Utils.verifySuccess(tableTypeResp.getStatus());
return new HiveQueryResultSet.Builder(connection).setClient(client).setSessionHandle(sessHandle).setStmtHandle(tableTypeResp.getOperationHandle()).build();
}
use of org.apache.hive.service.rpc.thrift.TGetTableTypesReq in project hive by apache.
the class ThriftCLIServiceClient method getTableTypes.
/* (non-Javadoc)
* @see org.apache.hive.service.cli.ICLIService#getTableTypes(org.apache.hive.service.cli.SessionHandle)
*/
@Override
public OperationHandle getTableTypes(SessionHandle sessionHandle) throws HiveSQLException {
try {
TGetTableTypesReq req = new TGetTableTypesReq(sessionHandle.toTSessionHandle());
TGetTableTypesResp resp = cliService.GetTableTypes(req);
checkStatus(resp.getStatus());
TProtocolVersion protocol = sessionHandle.getProtocolVersion();
return new OperationHandle(resp.getOperationHandle(), protocol);
} catch (HiveSQLException e) {
throw e;
} catch (Exception e) {
throw new HiveSQLException(e);
}
}
Aggregations