@Override public List<String> getAllDatabases(String catName) throws MetaException { if (!sharedCache.isDatabaseCachePrewarmed() || (canUseEvents && rawStore.isActiveTransaction())) { return rawStore.getAllDatabases(catName); } return sharedCache.listCachedDatabases(catName); }
for (String catName : catalogsToCache) { try { List<String> dbNames = rawStore.getAllDatabases(catName); LOG.info("Number of databases to prewarm in catalog {}: {}", catName, dbNames.size()); for (String dbName : dbNames) {
try { for (String catName : catalogsToCache(rawStore)) { List<String> dbNames = rawStore.getAllDatabases(catName);
private static void dropAllStoreObjects(RawStore store) throws MetaException, InvalidObjectException, InvalidInputException { try { Deadline.registerIfNot(100000); Deadline.startTimer("getPartition"); List<String> dbs = store.getAllDatabases(DEFAULT_CATALOG_NAME); for (int i = 0; i < dbs.size(); i++) { String db = dbs.get(i); List<String> tbls = store.getAllTables(DEFAULT_CATALOG_NAME, db); for (String tbl : tbls) { List<Partition> parts = store.getPartitions(DEFAULT_CATALOG_NAME, db, tbl, 100); for (Partition part : parts) { store.dropPartition(DEFAULT_CATALOG_NAME, db, tbl, part.getValues()); } store.dropTable(DEFAULT_CATALOG_NAME, db, tbl); } store.dropDatabase(DEFAULT_CATALOG_NAME, db); } } catch (NoSuchObjectException e) { } }
@Override public List<String> get_databases(final String pattern) throws MetaException { startFunction("get_databases", ": " + pattern); String[] parsedDbNamed = parseDbName(pattern, conf); List<String> ret = null; Exception ex = null; try { if (parsedDbNamed[DB_NAME] == null) { ret = getMS().getAllDatabases(parsedDbNamed[CAT_NAME]); ret = FilterUtils.filterDbNamesIfEnabled(isServerFilterEnabled, filterHook, ret); } else { ret = getMS().getDatabases(parsedDbNamed[CAT_NAME], parsedDbNamed[DB_NAME]); ret = FilterUtils.filterDbNamesIfEnabled(isServerFilterEnabled, filterHook, ret); } } catch (MetaException e) { ex = e; throw e; } catch (Exception e) { ex = e; throw newMetaException(e); } finally { endFunction("get_databases", ret != null, ex); } return ret; }
List<String> dbs = store.getAllDatabases(catName); for (String db : dbs) { List<String> tbls = store.getAllTables(DEFAULT_CATALOG_NAME, db);
@Override List<String> run(RawStore ms) throws Exception { return ms.getAllDatabases(); } });
@Override public List<String> getAllDatabases(String catName) throws MetaException { if (!sharedCache.isDatabaseCachePrewarmed()) { return rawStore.getAllDatabases(catName); } return sharedCache.listCachedDatabases(catName); }
public List<String> get_all_databases() throws MetaException { startFunction("get_all_databases"); List<String> ret = null; Exception ex = null; try { ret = getMS().getAllDatabases(); } catch (Exception e) { ex = e; if (e instanceof MetaException) { throw (MetaException) e; } else { MetaException me = new MetaException(e.toString()); me.initCause(e); throw me; } } finally { endFunction("get_all_databases", ret != null, ex); } return ret; }
@Override public List<String> get_all_databases() throws MetaException { startFunction("get_all_databases"); List<String> ret = null; Exception ex = null; try { ret = getMS().getAllDatabases(); } catch (Exception e) { ex = e; if (e instanceof MetaException) { throw (MetaException) e; } else { throw newMetaException(e); } } finally { endFunction("get_all_databases", ret != null, ex); } return ret; }
@Override public List<String> get_all_databases() throws MetaException { startFunction("get_all_databases"); List<String> ret = null; Exception ex = null; try { ret = getMS().getAllDatabases(); } catch (Exception e) { ex = e; if (e instanceof MetaException) { throw (MetaException) e; } else { throw newMetaException(e); } } finally { endFunction("get_all_databases", ret != null, ex); } return ret; }
for (String catName : catalogsToCache) { try { List<String> dbNames = rawStore.getAllDatabases(catName); LOG.info("Number of databases to prewarm in catalog {}: {}", catName, dbNames.size()); for (String dbName : dbNames) {
try { for (String catName : catalogsToCache(rawStore)) { List<String> dbNames = rawStore.getAllDatabases(catName);
@Override public List<String> get_databases(final String pattern) throws MetaException { startFunction("get_databases", ": " + pattern); String[] parsedDbNamed = parseDbName(pattern, conf); List<String> ret = null; Exception ex = null; try { if (parsedDbNamed[DB_NAME] == null) { ret = getMS().getAllDatabases(parsedDbNamed[CAT_NAME]); } else { ret = getMS().getDatabases(parsedDbNamed[CAT_NAME], parsedDbNamed[DB_NAME]); } } catch (Exception e) { ex = e; if (e instanceof MetaException) { throw (MetaException) e; } else { throw newMetaException(e); } } finally { endFunction("get_databases", ret != null, ex); } return ret; }