private static Collection<String> catalogsToCache(RawStore rs) throws MetaException { Collection<String> confValue = MetastoreConf.getStringCollection(rs.getConf(), ConfVars.CATALOGS_TO_CACHE); if (confValue == null || confValue.isEmpty() || (confValue.size() == 1 && confValue.contains(""))) { return rs.getCatalogs(); } else { return confValue; } }
@Override public List<String> getCatalogs() throws MetaException { // in case of event based cache update, cache will not be updated for catalog. if (!sharedCache.isCatalogCachePrewarmed() || canUseEvents) { return rawStore.getCatalogs(); } return sharedCache.listCachedCatalogs(); }
@Override public GetCatalogsResponse get_catalogs() throws MetaException { startFunction("get_catalogs"); List<String> ret = null; Exception ex = null; try { ret = getMS().getCatalogs(); } catch (MetaException e) { ex = e; throw e; } finally { endFunction("get_catalog", ret != null, ex); } return new GetCatalogsResponse(ret == null ? Collections.emptyList() : ret); }
store.dropFunction(DEFAULT_CATALOG_NAME, func.getDbName(), func.getFunctionName()); for (String catName : store.getCatalogs()) { List<String> dbs = store.getAllDatabases(catName); for (String db : dbs) {
private static Collection<String> catalogsToCache(RawStore rs) throws MetaException { Collection<String> confValue = MetastoreConf.getStringCollection(rs.getConf(), ConfVars.CATALOGS_TO_CACHE); if (confValue == null || confValue.isEmpty() || (confValue.size() == 1 && confValue.contains(""))) { return rs.getCatalogs(); } else { return confValue; } }
@Override public List<String> getCatalogs() throws MetaException { if (!sharedCache.isCatalogCachePrewarmed()) { return rawStore.getCatalogs(); } return sharedCache.listCachedCatalogs(); }
@Override public GetCatalogsResponse get_catalogs() throws MetaException { startFunction("get_catalogs"); List<String> ret = null; Exception ex = null; try { ret = getMS().getCatalogs(); } catch (MetaException e) { ex = e; throw e; } finally { endFunction("get_catalog", ret != null, ex); } return new GetCatalogsResponse(ret == null ? Collections.emptyList() : ret); }