Package org.apache.accumulo.core.util

Examples of org.apache.accumulo.core.util.NamingThreadFactory


      return loadThreadPool;
    }
   
    if (maxLoadThreads > 0) {
      BlockingQueue<Runnable> q = new LinkedBlockingQueue<Runnable>();
      loadThreadPool = new ThreadPoolExecutor(0, maxLoadThreads, 60, TimeUnit.SECONDS, q, new NamingThreadFactory("bloom-loader"));
    }
   
    return loadThreadPool;
  }
View Full Code Here


    Collections.sort(splits);

    CountDownLatch latch = new CountDownLatch(splits.size());
    AtomicReference<Exception> exception = new AtomicReference<Exception>(null);

    ExecutorService executor = Executors.newFixedThreadPool(16, new NamingThreadFactory("addSplits"));
    try {
      executor.submit(new SplitTask(new SplitEnv(tableName, tableId, executor, latch, exception), splits));

      while (!latch.await(100, TimeUnit.MILLISECONDS)) {
        if (exception.get() != null) {
View Full Code Here

        }
      }

      final BatchWriter finalWriter = writer;

      ExecutorService deleteThreadPool = Executors.newFixedThreadPool(getNumDeleteThreads(), new NamingThreadFactory("deleting"));

      final List<Pair<Path,Path>> replacements = ServerConstants.getVolumeReplacements();

      for (final String delete : confirmedDeletes.values()) {
View Full Code Here

    }
   
    final BatchWriter finalWriter = writer;
    final BatchWriter finalRootWriter = rootWriter;
   
    ExecutorService deleteThreadPool = Executors.newFixedThreadPool(numDeleteThreads, new NamingThreadFactory("deleting"));
   
    for (final String delete : confirmedDeletes) {
     
      Runnable deleteTask = new Runnable() {
        @Override
View Full Code Here

    Collections.sort(splits);

    CountDownLatch latch = new CountDownLatch(splits.size());
    AtomicReference<Exception> exception = new AtomicReference<Exception>(null);

    ExecutorService executor = Executors.newFixedThreadPool(16, new NamingThreadFactory("addSplits"));
    try {
      executor.submit(new SplitTask(new SplitEnv(tableName, tableId, executor, latch, exception), splits));

      while (!latch.await(100, TimeUnit.MILLISECONDS)) {
        if (exception.get() != null) {
View Full Code Here

      return loadThreadPool;
    }
   
    if (maxLoadThreads > 0) {
      BlockingQueue<Runnable> q = new LinkedBlockingQueue<Runnable>();
      loadThreadPool = new ThreadPoolExecutor(0, maxLoadThreads, 60, TimeUnit.SECONDS, q, new NamingThreadFactory("bloom-loader"));
    }
   
    return loadThreadPool;
  }
View Full Code Here

      return loadThreadPool;
    }
   
    if (maxLoadThreads > 0) {
      BlockingQueue<Runnable> q = new LinkedBlockingQueue<Runnable>();
      loadThreadPool = new ThreadPoolExecutor(0, maxLoadThreads, 60, TimeUnit.SECONDS, q, new NamingThreadFactory("bloom-loader"));
    }
   
    return loadThreadPool;
  }
View Full Code Here

  private Master master;
  private ZooCache zooCache;

  public RecoveryManager(Master master) {
    this.master = master;
    executor = Executors.newScheduledThreadPool(4, new NamingThreadFactory("Walog sort starter "));
    zooCache = new ZooCache();
    try {
      List<String> workIDs = new DistributedWorkQueue(ZooUtil.getRoot(master.getInstance()) + Constants.ZRECOVERY).getWorkQueued();
      sortsQueued.addAll(workIDs);
    } catch (Exception e) {
View Full Code Here

    Collections.sort(splits);

    CountDownLatch latch = new CountDownLatch(splits.size());
    AtomicReference<Exception> exception = new AtomicReference<Exception>(null);

    ExecutorService executor = Executors.newFixedThreadPool(16, new NamingThreadFactory("addSplits"));
    try {
      executor.submit(new SplitTask(new SplitEnv(tableName, tableId, executor, latch, exception), splits));

      while (!latch.await(100, TimeUnit.MILLISECONDS)) {
        if (exception.get() != null) {
View Full Code Here

    }, 1000, 10 * 1000);
    return result;
  }

  private ExecutorService createEs(int max, String name) {
    return addEs(name, Executors.newFixedThreadPool(max, new NamingThreadFactory(name)));
  }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.util.NamingThreadFactory

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.