Package org.apache.accumulo.core.conf

Examples of org.apache.accumulo.core.conf.DefaultConfiguration


  private static final Value ONE = new Value("1".getBytes());

  static void bulkLoadLots(Logger log, State state, Value value) throws Exception {
    final Path dir = new Path("/tmp", "bulk_" + UUID.randomUUID().toString());
    final Path fail = new Path(dir.toString() + "_fail");
    final DefaultConfiguration defaultConfiguration = AccumuloConfiguration.getDefaultConfiguration();
    final Random rand = (Random) state.get("rand");
    final FileSystem fs = (FileSystem) state.get("fs");
    fs.mkdirs(fail);
    final int parts = rand.nextInt(10) + 1;
   
View Full Code Here


  }
 
  private static void exportConfig(Connector conn, String tableID, ZipOutputStream zipOut, DataOutputStream dataOut) throws AccumuloException,
      AccumuloSecurityException, TableNotFoundException, IOException {
   
    DefaultConfiguration defaultConfig = AccumuloConfiguration.getDefaultConfiguration();
    Map<String,String> siteConfig = conn.instanceOperations().getSiteConfiguration();
    Map<String,String> systemConfig = conn.instanceOperations().getSystemConfiguration();
   
    TableConfiguration tableConfig = ServerConfiguration.getTableConfiguration(conn.getInstance(), tableID);
   
    OutputStreamWriter osw = new OutputStreamWriter(dataOut, Constants.UTF8);
   
    // only put props that are different than defaults and higher level configurations
    zipOut.putNextEntry(new ZipEntry(Constants.EXPORT_TABLE_CONFIG_FILE));
    for (Entry<String,String> prop : tableConfig) {
      if (prop.getKey().startsWith(Property.TABLE_PREFIX.getKey())) {
        Property key = Property.getPropertyByKey(prop.getKey());
       
        if (key == null || !defaultConfig.get(key).equals(prop.getValue())) {
          if (!prop.getValue().equals(siteConfig.get(prop.getKey())) && !prop.getValue().equals(systemConfig.get(prop.getKey()))) {
            osw.append(prop.getKey() + "=" + prop.getValue() + "\n");
          }
        }
      }
View Full Code Here

    Connector conn = inst.getConnector("root", new PasswordToken(secret));

    String table = "foo";
    conn.tableOperations().create(table);

    final DefaultConfiguration defaultConf = AccumuloConfiguration.getDefaultConfiguration();

    // Cache invalidates 25% of the time
    int randomMax = 4;
    // Number of threads
    int numThreads = 2;
View Full Code Here

  }
 
  private static void exportConfig(Connector conn, String tableID, ZipOutputStream zipOut, DataOutputStream dataOut) throws AccumuloException,
      AccumuloSecurityException, TableNotFoundException, IOException {
   
    DefaultConfiguration defaultConfig = AccumuloConfiguration.getDefaultConfiguration();
    Map<String,String> siteConfig = conn.instanceOperations().getSiteConfiguration();
    Map<String,String> systemConfig = conn.instanceOperations().getSystemConfiguration();
   
    TableConfiguration tableConfig = ServerConfiguration.getTableConfiguration(conn.getInstance(), tableID);
   
    OutputStreamWriter osw = new OutputStreamWriter(dataOut);
   
    // only put props that are different than defaults and higher level configurations
    zipOut.putNextEntry(new ZipEntry(Constants.EXPORT_TABLE_CONFIG_FILE));
    for (Entry<String,String> prop : tableConfig) {
      if (prop.getKey().startsWith(Property.TABLE_PREFIX.getKey())) {
        Property key = Property.getPropertyByKey(prop.getKey());
       
        if (key == null || !defaultConfig.get(key).equals(prop.getValue())) {
          if (!prop.getValue().equals(siteConfig.get(prop.getKey())) && !prop.getValue().equals(systemConfig.get(prop.getKey()))) {
            osw.append(prop.getKey() + "=" + prop.getValue() + "\n");
          }
        }
      }
View Full Code Here

  private static final Value ONE = new Value("1".getBytes());

  static void bulkLoadLots(Logger log, State state, Value value) throws Exception {
    final Path dir = new Path("/tmp", "bulk_" + UUID.randomUUID().toString());
    final Path fail = new Path(dir.toString() + "_fail");
    final DefaultConfiguration defaultConfiguration = AccumuloConfiguration.getDefaultConfiguration();
    final Random rand = (Random) state.get("rand");
    final FileSystem fs = (FileSystem) state.get("fs");
    fs.mkdirs(fail);
    final int parts = rand.nextInt(10) + 1;
   
View Full Code Here

  }

  @Test
  public void testGetDefaultConfiguration() {
    ready();
    DefaultConfiguration c = scf.getDefaultConfiguration();
    assertNotNull(c);
  }
View Full Code Here

  private static final Value ONE = new Value("1".getBytes());

  static void bulkLoadLots(Logger log, State state, Value value) throws Exception {
    final Path dir = new Path("/tmp", "bulk_" + UUID.randomUUID().toString());
    final Path fail = new Path(dir.toString() + "_fail");
    final DefaultConfiguration defaultConfiguration = AccumuloConfiguration.getDefaultConfiguration();
    final Random rand = (Random) state.get("rand");
    final FileSystem fs = (FileSystem) state.get("fs");
    fs.mkdirs(fail);
    final int parts = rand.nextInt(10) + 1;
   
View Full Code Here

  }
 
  private static void exportConfig(Connector conn, String tableID, ZipOutputStream zipOut, DataOutputStream dataOut) throws AccumuloException,
      AccumuloSecurityException, TableNotFoundException, IOException {
   
    DefaultConfiguration defaultConfig = AccumuloConfiguration.getDefaultConfiguration();
    Map<String,String> siteConfig = conn.instanceOperations().getSiteConfiguration();
    Map<String,String> systemConfig = conn.instanceOperations().getSystemConfiguration();
   
    TableConfiguration tableConfig = ServerConfiguration.getTableConfiguration(conn.getInstance(), tableID);
   
    OutputStreamWriter osw = new OutputStreamWriter(dataOut, Constants.UTF8);
   
    // only put props that are different than defaults and higher level configurations
    zipOut.putNextEntry(new ZipEntry(Constants.EXPORT_TABLE_CONFIG_FILE));
    for (Entry<String,String> prop : tableConfig) {
      if (prop.getKey().startsWith(Property.TABLE_PREFIX.getKey())) {
        Property key = Property.getPropertyByKey(prop.getKey());
       
        if (key == null || !defaultConfig.get(key).equals(prop.getValue())) {
          if (!prop.getValue().equals(siteConfig.get(prop.getKey())) && !prop.getValue().equals(systemConfig.get(prop.getKey()))) {
            osw.append(prop.getKey() + "=" + prop.getValue() + "\n");
          }
        }
      }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.conf.DefaultConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.