use of org.apache.hadoop.hive.metastore.api.CreationMetadata in project hive by apache.
the class ObjectStore method convertToCreationMetadata.
private CreationMetadata convertToCreationMetadata(MCreationMetadata s) throws MetaException {
if (s == null) {
return null;
}
Set<String> tablesUsed = new HashSet<>();
for (MTable mtbl : s.getTables()) {
tablesUsed.add(Warehouse.getQualifiedName(mtbl.getDatabase().getName(), mtbl.getTableName()));
}
CreationMetadata r = new CreationMetadata(s.getDbName(), s.getTblName(), tablesUsed);
if (s.getTxnList() != null) {
r.setValidTxnList(s.getTxnList());
}
return r;
}
Aggregations