Search in sources :

Example 1 with TraceExecutorService

use of org.apache.htrace.wrappers.TraceExecutorService in project accumulo by apache.

the class TabletServerResourceManager method addEs.

private ExecutorService addEs(String name, ExecutorService tp) {
    if (threadPools.containsKey(name)) {
        throw new IllegalArgumentException("Cannot create two executor services with same name " + name);
    }
    tp = new TraceExecutorService(tp);
    threadPools.put(name, tp);
    return tp;
}
Also used : TraceExecutorService(org.apache.htrace.wrappers.TraceExecutorService)

Example 2 with TraceExecutorService

use of org.apache.htrace.wrappers.TraceExecutorService in project accumulo by apache.

the class LoadFiles method getThreadPool.

private static synchronized ExecutorService getThreadPool(Master master) {
    if (threadPool == null) {
        int threadPoolSize = master.getConfiguration().getCount(Property.MASTER_BULK_THREADPOOL_SIZE);
        ThreadPoolExecutor pool = new SimpleThreadPool(threadPoolSize, "bulk import");
        pool.allowCoreThreadTimeOut(true);
        threadPool = new TraceExecutorService(pool);
    }
    return threadPool;
}
Also used : TraceExecutorService(org.apache.htrace.wrappers.TraceExecutorService) ThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor) SimpleThreadPool(org.apache.accumulo.core.util.SimpleThreadPool)

Aggregations

TraceExecutorService (org.apache.htrace.wrappers.TraceExecutorService)2 ThreadPoolExecutor (java.util.concurrent.ThreadPoolExecutor)1 SimpleThreadPool (org.apache.accumulo.core.util.SimpleThreadPool)1