use of org.apache.hadoop.hive.metastore.model.MCatalog in project hive by apache.
the class ObjectStore method catToMCat.
private MCatalog catToMCat(Catalog cat) {
MCatalog mCat = new MCatalog();
mCat.setName(normalizeIdentifier(cat.getName()));
if (cat.isSetDescription()) {
mCat.setDescription(cat.getDescription());
}
mCat.setLocationUri(cat.getLocationUri());
mCat.setCreateTime(cat.getCreateTime());
return mCat;
}
use of org.apache.hadoop.hive.metastore.model.MCatalog in project hive by apache.
the class ObjectStore method getCatalog.
@Override
public Catalog getCatalog(String catalogName) throws NoSuchObjectException, MetaException {
LOG.debug("Fetching catalog {}", catalogName);
MCatalog mCat = getMCatalog(catalogName);
if (mCat == null) {
throw new NoSuchObjectException("No catalog " + catalogName);
}
return mCatToCat(mCat);
}
Aggregations