public SiteConfiguration(URL accumuloPropsLocation, Map<String,String> overrides) { config = createMap(accumuloPropsLocation, overrides); ConfigSanityCheck.validate(config.entrySet()); }
@Override public NamespaceConfiguration getNamespaceConfiguration(Namespace.ID namespaceId) { NamespaceConfiguration conf; // can't hold the lock during the construction and validation of the config, // which may result in creating multiple objects for the same id, but that's ok. synchronized (namespaceConfigs) { conf = namespaceConfigs.get(instanceID).get(namespaceId); } if (conf == null) { // changed - include instance in constructor call conf = new NamespaceConfiguration(namespaceId, context, getSystemConfiguration()); conf.setZooCacheFactory(zcf); ConfigSanityCheck.validate(conf); synchronized (namespaceConfigs) { namespaceConfigs.get(instanceID).put(namespaceId, conf); } } return conf; }
public NamespaceConfiguration getNamespaceConfigurationForTable(Table.ID tableId) { NamespaceConfiguration conf; synchronized (tableParentConfigs) { conf = tableParentConfigs.get(instanceID).get(tableId); } // can't hold the lock during the construction and validation of the config, // which may result in creating multiple objects for the same id, but that's ok. if (conf == null) { Namespace.ID namespaceId; try { namespaceId = Tables.getNamespaceId(context, tableId); } catch (TableNotFoundException e) { throw new RuntimeException(e); } conf = new NamespaceConfiguration(namespaceId, context, getSystemConfiguration()); ConfigSanityCheck.validate(conf); synchronized (tableParentConfigs) { tableParentConfigs.get(instanceID).put(tableId, conf); } } return conf; }
ConfigSanityCheck.validate(conf); synchronized (tableConfigs) { Map<Table.ID,TableConfiguration> configs = tableConfigs.get(instanceID);
/** * Gets an instance of this class. A new instance is only created on the first call. * * @throws RuntimeException * if the configuration is invalid */ synchronized public static SiteConfiguration getInstance() { if (instance == null) { instance = new SiteConfiguration(); ConfigSanityCheck.validate(instance); } return instance; }
public static TableConfiguration getTableConfiguration(Instance instance, String tableId) { checkPermissions(); synchronized (tableInstances) { TableConfiguration conf = tableInstances.get(tableId); if (conf == null) { conf = new TableConfiguration(instance.getInstanceID(), tableId, getSystemConfiguration(instance)); ConfigSanityCheck.validate(conf); tableInstances.put(tableId, conf); } return conf; } }
@Override public NamespaceConfiguration getNamespaceConfiguration(String namespaceId) { checkPermissions(); NamespaceConfiguration conf; // can't hold the lock during the construction and validation of the config, // which may result in creating multiple objects for the same id, but that's ok. synchronized (namespaceConfigs) { conf = namespaceConfigs.get(instanceID).get(namespaceId); } if (conf == null) { // changed - include instance in constructor call conf = new NamespaceConfiguration(namespaceId, instance, getConfiguration()); conf.setZooCacheFactory(zcf); ConfigSanityCheck.validate(conf); synchronized (namespaceConfigs) { namespaceConfigs.get(instanceID).put(namespaceId, conf); } } return conf; }
public NamespaceConfiguration getNamespaceConfigurationForTable(String tableId) { checkPermissions(); NamespaceConfiguration conf; synchronized (tableParentConfigs) { conf = tableParentConfigs.get(instanceID).get(tableId); } // can't hold the lock during the construction and validation of the config, // which may result in creating multiple objects for the same id, but that's ok. if (conf == null) { String namespaceId; try { namespaceId = Tables.getNamespaceId(instance, tableId); } catch (TableNotFoundException e) { throw new RuntimeException(e); } conf = new NamespaceConfiguration(namespaceId, instance, getConfiguration()); ConfigSanityCheck.validate(conf); synchronized (tableParentConfigs) { tableParentConfigs.get(instanceID).put(tableId, conf); } } return conf; }
ConfigSanityCheck.validate(conf); synchronized (tableConfigs) { Map<String,TableConfiguration> configs = tableConfigs.get(instanceID);