use of org.apache.hive.service.rpc.thrift.TGetInfoReq in project hive by apache.
the class HiveDatabaseMetaData method getServerInfo.
private TGetInfoResp getServerInfo(TGetInfoType type) throws SQLException {
TGetInfoReq req = new TGetInfoReq(sessHandle, type);
TGetInfoResp resp;
try {
resp = client.GetInfo(req);
} catch (TException e) {
throw new SQLException(e.getMessage(), "08S01", e);
}
Utils.verifySuccess(resp.getStatus());
return resp;
}
use of org.apache.hive.service.rpc.thrift.TGetInfoReq in project hive by apache.
the class ThriftCLIServiceClient method getInfo.
/* (non-Javadoc)
* @see org.apache.hive.service.cli.ICLIService#getInfo(org.apache.hive.service.cli.SessionHandle, java.util.List)
*/
@Override
public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType infoType) throws HiveSQLException {
try {
// FIXME extract the right info type
TGetInfoReq req = new TGetInfoReq(sessionHandle.toTSessionHandle(), infoType.toTGetInfoType());
TGetInfoResp resp = cliService.GetInfo(req);
checkStatus(resp.getStatus());
return new GetInfoValue(resp.getInfoValue());
} catch (HiveSQLException e) {
throw e;
} catch (Exception e) {
throw new HiveSQLException(e);
}
}
Aggregations