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;
}
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;
}
Aggregations