Package org.apache.accumulo.core.conf

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


    }
   
    ArrayList<Integer> vals = new ArrayList<Integer>(valsSet);
    Collections.sort(vals);
   
    ConfigurationCopy acuconf = new ConfigurationCopy(AccumuloConfiguration.getDefaultConfiguration());
    acuconf.set(Property.TABLE_BLOOM_ENABLED, "true");
    acuconf.set(Property.TABLE_BLOOM_KEY_FUNCTOR, "accumulo.core.file.keyfunctor.ColumnFamilyFunctor");
    acuconf.set(Property.TABLE_FILE_TYPE, RFile.EXTENSION);
    acuconf.set(Property.TABLE_BLOOM_LOAD_THRESHOLD, "1");
    acuconf.set(Property.TSERV_BLOOM_LOAD_MAXCONCURRENT, "1");
   
    Configuration conf = CachedConfiguration.getInstance();
    FileSystem fs = FileSystem.get(conf);
   
    String suffix = FileOperations.getNewFileExtension(acuconf);
View Full Code Here


      if (!conn.tableOperations().exists(opts.tableName)) {
        System.err.println("table " + opts.tableName + " does not exist");
        return;
      }
      if (opts.goalSize == null || opts.goalSize < 1) {
        AccumuloConfiguration tableConfig = new ConfigurationCopy(conn.tableOperations().getProperties(opts.tableName));
        opts.goalSize = tableConfig.getMemoryInBytes(Property.TABLE_SPLIT_THRESHOLD);
      }
     
      message("Merging tablets in table %s to %d bytes", opts.tableName, opts.goalSize);
      mergomatic(conn, opts.tableName, opts.begin, opts.end, opts.goalSize, opts.force);
    } catch (Exception ex) {
View Full Code Here

   * @throws TableNotFoundException
   *           if the table does not exist
   */
  @Override
  public Map<String,Set<Text>> getLocalityGroups(String tableName) throws AccumuloException, TableNotFoundException {
    AccumuloConfiguration conf = new ConfigurationCopy(this.getProperties(tableName));
    Map<String,Set<ByteSequence>> groups = LocalityGroupUtil.getLocalityGroups(conf);

    Map<String,Set<Text>> groups2 = new HashMap<String,Set<Text>>();
    for (Entry<String,Set<ByteSequence>> entry : groups.entrySet()) {

View Full Code Here

    this.authorizations = authorizations;
    this.readers = new ArrayList<SortedKeyValueIterator<Key,Value>>();
   
    try {
      conn = instance.getConnector(credentials.getPrincipal(), credentials.getToken());
      config = new ConfigurationCopy(conn.instanceOperations().getSiteConfiguration());
      nextTablet();
     
      while (iter != null && !iter.hasTop())
        nextTablet();
     
View Full Code Here

    }
  }

  @Test(expected = IllegalArgumentException.class)
  public void noViewFS() throws Exception {
    ConfigurationCopy conf = new ConfigurationCopy();
    conf.set(Property.INSTANCE_VOLUMES, "viewfs://dummy");
    VolumeManagerImpl.get(conf);
  }
View Full Code Here

      for (String table : shellState.getConnector().tableOperations().list())
        if (table.matches(cl.getOptionValue(optTablePattern.getOpt())))
          tablesToFlush.add(table);
    }
    try {
      AccumuloConfiguration acuConf = new ConfigurationCopy(shellState.getConnector().instanceOperations().getSystemConfiguration());
      TableDiskUsage.printDiskUsage(acuConf, tablesToFlush, FileSystem.get(new Configuration()), shellState.getConnector());
    } catch (Exception ex) {
      throw new RuntimeException(ex);
    }
    return 0;
View Full Code Here

    }
  }
 
  @Test
  public void test1() throws IOException {
    ConfigurationCopy conf = new ConfigurationCopy();
   
    // create an iterator that adds 1 and then squares
    conf.set(Property.TABLE_ITERATOR_PREFIX + IteratorScope.minc.name() + ".addIter", "1," + AddingIter.class.getName());
    conf.set(Property.TABLE_ITERATOR_PREFIX + IteratorScope.minc.name() + ".sqIter", "2," + SquaringIter.class.getName());
   
    TreeMap<Key,Value> tm = new TreeMap<Key,Value>();
   
    MultiIteratorTest.nkv(tm, 1, 0, false, "1");
    MultiIteratorTest.nkv(tm, 2, 0, false, "2");
View Full Code Here

 
  @Test
  public void test4() throws IOException {
   
    // try loading for a different scope
    AccumuloConfiguration conf = new ConfigurationCopy();
   
    TreeMap<Key,Value> tm = new TreeMap<Key,Value>();
   
    MultiIteratorTest.nkv(tm, 1, 0, false, "1");
    MultiIteratorTest.nkv(tm, 2, 0, false, "2");
View Full Code Here

 
  @Test
  public void test3() throws IOException {
    // change the load order, so it squares and then adds
   
    ConfigurationCopy conf = new ConfigurationCopy();
   
    TreeMap<Key,Value> tm = new TreeMap<Key,Value>();
   
    MultiIteratorTest.nkv(tm, 1, 0, false, "1");
    MultiIteratorTest.nkv(tm, 2, 0, false, "2");
   
    SortedMapIterator source = new SortedMapIterator(tm);
   
    conf.set(Property.TABLE_ITERATOR_PREFIX + IteratorScope.minc.name() + ".addIter", "2," + AddingIter.class.getName());
    conf.set(Property.TABLE_ITERATOR_PREFIX + IteratorScope.minc.name() + ".sqIter", "1," + SquaringIter.class.getName());
   
    SortedKeyValueIterator<Key,Value> iter = IteratorUtil.loadIterators(IteratorScope.minc, source, new KeyExtent(new Text("tab"), null, null), conf,
        new DefaultIteratorEnvironment(conf));
    iter.seek(new Range(), EMPTY_COL_FAMS, false);
   
View Full Code Here

  }
 
  @Test
  public void test2() throws IOException {
   
    ConfigurationCopy conf = new ConfigurationCopy();
   
    // create an iterator that adds 1 and then squares
    conf.set(Property.TABLE_ITERATOR_PREFIX + IteratorScope.minc.name() + ".addIter", "1," + AddingIter.class.getName());
    conf.set(Property.TABLE_ITERATOR_PREFIX + IteratorScope.minc.name() + ".addIter.opt.amount", "7");
    conf.set(Property.TABLE_ITERATOR_PREFIX + IteratorScope.minc.name() + ".sqIter", "2," + SquaringIter.class.getName());
   
    TreeMap<Key,Value> tm = new TreeMap<Key,Value>();
   
    MultiIteratorTest.nkv(tm, 1, 0, false, "1");
    MultiIteratorTest.nkv(tm, 2, 0, false, "2");
View Full Code Here

TOP

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

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.