private void loadTableSpaces(JSONObject json, boolean override) { JSONObject spaces = (JSONObject) json.get(KEY_SPACES); if (spaces != null) { for (Map.Entry<String, Object> entry : spaces.entrySet()) { JSONObject spaceDetail = (JSONObject) entry.getValue(); AddTableSpace( entry.getKey(), URI.create(spaceDetail.getAsString("uri")), Boolean.parseBoolean(spaceDetail.getAsString("default")), (JSONObject) spaceDetail.get(TABLESPACE_SPEC_CONFIGS_KEY), override); } } }
private void loadStorages(JSONObject json) { JSONObject spaces = (JSONObject) json.get(KEY_STORAGES); if (spaces != null) { Pair<String, Class<? extends Tablespace>> pair = null; for (Map.Entry<String, Object> entry : spaces.entrySet()) { try { pair = extractStorage(entry); } catch (ClassNotFoundException e) { LOG.warn(e); continue; } TABLE_SPACE_HANDLERS.put(pair.getFirst(), pair.getSecond()); } } }