public static org.apache.accumulo.server.fs.VolumeManager getLocal(String localBasePath) throws IOException { AccumuloConfiguration accConf = DefaultConfiguration.getDefaultConfiguration(); Volume defaultLocalVolume = VolumeConfiguration .create(FileSystem.getLocal(CachedConfiguration.getInstance()), localBasePath); // The default volume gets placed in the map, but local filesystem is only used for testing // purposes return new VolumeManagerImpl(Collections.singletonMap(DEFAULT, defaultLocalVolume), defaultLocalVolume, accConf); }
for (Entry<String,String> entry : DefaultConfiguration.getDefaultConfiguration()) accumuloConf.setIfUnset(entry.getKey(), entry.getValue());
public static void main(String[] args) throws Exception { Configuration conf = CachedConfiguration.getInstance(); Opts opts = new Opts(); opts.parseArgs(CreateEmpty.class.getName(), args); for (String arg : opts.files) { Path path = new Path(arg); log.info("Writing to file '" + path + "'"); FileSKVWriter writer = (new RFileOperations()).newWriterBuilder() .forFile(arg, path.getFileSystem(conf), conf) .withTableConfiguration(DefaultConfiguration.getDefaultConfiguration()) .withCompression(opts.codec).build(); writer.close(); } }
AccumuloConfiguration aconf = DefaultConfiguration.getDefaultConfiguration(); Path path = new Path(file); CachableBlockFile.Reader rdr = new CachableBlockFile.Reader(fs, path, conf, null, null,
@Override public void run() { DefaultConfiguration defaultConf = DefaultConfiguration.getDefaultConfiguration(); long defaultDelay = defaultConf.getTimeInMillis(Property.REPLICATION_WORK_PROCESSOR_DELAY); long defaultPeriod = defaultConf.getTimeInMillis(Property.REPLICATION_WORK_PROCESSOR_PERIOD); long delay = conf.getTimeInMillis(Property.REPLICATION_WORK_PROCESSOR_DELAY); long period = conf.getTimeInMillis(Property.REPLICATION_WORK_PROCESSOR_PERIOD); try { DistributedWorkQueue workQueue; if (defaultDelay != delay && defaultPeriod != period) { log.debug("Configuration DistributedWorkQueue with delay and period of {} and {}", delay, period); workQueue = new DistributedWorkQueue( ZooUtil.getRoot(inst) + ReplicationConstants.ZOO_WORK_QUEUE, conf, delay, period); } else { log.debug("Configuring DistributedWorkQueue with default delay and period"); workQueue = new DistributedWorkQueue( ZooUtil.getRoot(inst) + ReplicationConstants.ZOO_WORK_QUEUE, conf); } workQueue.startProcessing(new ReplicationProcessor(context, conf, fs), executor); } catch (KeeperException | InterruptedException e) { throw new RuntimeException(e); } } }
@SuppressWarnings("unchecked") Iterator<TabletLocationState> scanner = (Iterator<TabletLocationState>) new IteratorChain(rootScanner, metaScanner); LiveTServerSet tservers = new LiveTServerSet(instance, DefaultConfiguration.getDefaultConfiguration(), new Listener() { @Override public void update(LiveTServerSet current, Set<TServerInstance> deleted, Set<TServerInstance> added) {