use of org.apache.hadoop.hive.metastore.api.GetPartitionResponse in project hive by apache.
the class Hive method getPartition.
public org.apache.hadoop.hive.metastore.api.Partition getPartition(Table t, String dbName, String tableName, List<String> params) throws HiveException {
try {
GetPartitionRequest req = new GetPartitionRequest();
req.setDbName(dbName);
req.setTblName(tableName);
req.setPartVals(params);
if (AcidUtils.isTransactionalTable(t)) {
ValidWriteIdList validWriteIdList = getValidWriteIdList(dbName, tableName);
req.setValidWriteIdList(validWriteIdList != null ? validWriteIdList.toString() : null);
req.setId(t.getTTable().getId());
}
GetPartitionResponse res = getMSC().getPartitionRequest(req);
return res.getPartition();
} catch (Exception e) {
LOG.error("Failed getPartition", e);
throw new HiveException(e);
}
}
use of org.apache.hadoop.hive.metastore.api.GetPartitionResponse in project hive by apache.
the class TestHiveMetaStoreClient method getPartitionRequest.
public GetPartitionResponse getPartitionRequest(GetPartitionRequest req) throws NoSuchObjectException, MetaException, TException {
assertNotNull(req.getId());
assertNotNull(req.getValidWriteIdList());
GetPartitionResponse res = new GetPartitionResponse();
return res;
}
Aggregations