/** * Returns the database path. */ public static Path getDbPath(Hive hive, Warehouse wh, String dbName) throws MetaException, HiveException { return wh.getDatabasePath(hive.getDatabase(dbName)); }
public Path getDefaultTablePath(Database db, String tableName, boolean isExternal) throws MetaException { Path dbPath = null; if (isExternal && hasExternalWarehouseRoot()) { dbPath = getDefaultExternalDatabasePath(db.getName()); } else { dbPath = getDatabasePath(db); } return getDnsPath( new Path(dbPath, MetaStoreUtils.encodeTableName(tableName.toLowerCase()))); }
protected Path getDbLocation(Database db) throws HiveException { try { initWh(); String location = db.getLocationUri(); if (location == null) { return wh.getDefaultDatabasePath(db.getName()); } else { return wh.getDnsPath(wh.getDatabasePath(db)); } } catch (MetaException ex) { throw hiveException(ex); } }
protected Path getDbLocation(Database db) throws HiveException { try { initWh(); String location = db.getLocationUri(); if (location == null) { return wh.getDefaultDatabasePath(db.getName()); } else { return wh.getDnsPath(wh.getDatabasePath(db)); } } catch (MetaException ex) { throw hiveException(ex); } }
try { Hive db = Hive.get(); Path dbPath = new Warehouse(conf).getDatabasePath(db.getDatabase(dbName)); FileSystem fs = dbPath.getFileSystem(conf); if (perms != null) {
Path databasePath = wh.getDnsPath(wh.getDatabasePath(db));
Path databasePath = constructRenamedPath(wh.getDatabasePath(db), srcPath); destPath = new Path(databasePath, newTblName); destFs = wh.getFs(destPath);
destTableDb = names[0]; location = wh.getDatabasePath(db.getDatabase(destTableDb)); } catch (MetaException e) { throw new SemanticException(e);
destTableDb = names[0]; location = wh.getDatabasePath(db.getDatabase(destTableDb)); } catch (MetaException e) { throw new SemanticException(e);
TEST_DB1_NAME, db.getName()); assertEquals("location of the returned db is different from that of inserted db", warehouse.getDatabasePath(db).toString(), db.getLocationUri()); assertEquals(db.getOwnerName(), SecurityUtils.getUser()); assertEquals(db.getOwnerType(), PrincipalType.USER); TEST_DB2_NAME, db2.getName()); assertEquals("location of the returned db is different from that of inserted db", warehouse.getDatabasePath(db2).toString(), db2.getLocationUri());
public Path getTablePath(Database db, String tableName) throws MetaException { return getDnsPath(new Path(getDatabasePath(db), tableName.toLowerCase())); }
public Path getTablePath(Database db, String tableName) throws MetaException { return getDnsPath(new Path(getDatabasePath(db), tableName.toLowerCase())); }
public Path getTablePath(Database db, String tableName) throws MetaException { return getDnsPath(new Path(getDatabasePath(db), tableName.toLowerCase())); }
public Path getDefaultTablePath(Database db, String tableName, boolean isExternal) throws MetaException { Path dbPath = null; if (isExternal && hasExternalWarehouseRoot()) { dbPath = getDefaultExternalDatabasePath(db.getName()); } else { dbPath = getDatabasePath(db); } return getDnsPath( new Path(dbPath, MetaStoreUtils.encodeTableName(tableName.toLowerCase()))); }
try { Hive db = Hive.get(); Path dbPath = new Warehouse(conf).getDatabasePath(db.getDatabase(dbName)); FileSystem fs = dbPath.getFileSystem(conf); if (perms != null) {
try { Hive db = Hive.get(); Path dbPath = new Warehouse(conf).getDatabasePath(db.getDatabase(dbName)); FileSystem fs = dbPath.getFileSystem(conf); if (perms != null) {
try { Hive db = Hive.get(); Path dbPath = new Warehouse(conf).getDatabasePath(db.getDatabase(dbName)); FileSystem fs = dbPath.getFileSystem(conf); if (perms != null) {
try { Hive db = Hive.get(); Path dbPath = new Warehouse(conf).getDatabasePath(db.getDatabase(dbName)); FileSystem fs = dbPath.getFileSystem(conf); if (perms != null) {
protected Path getDbLocation(Database db) throws HiveException { try { initWh(); String location = db.getLocationUri(); if (location == null) { return wh.getDefaultDatabasePath(db.getName()); } else { return wh.getDnsPath(wh.getDatabasePath(db)); } } catch (MetaException ex) { throw hiveException(ex); } }
Path databasePath = wh.getDnsPath(wh.getDatabasePath(db));