use of es.bsc.compss.util.ThreadPool in project compss by bsc-wdc.
the class GATAdaptor method init.
public void init() {
// Create request queues
copyQueue = new RequestQueue<DataOperation>();
safeQueue = new RequestQueue<DataOperation>();
String adaptor = System.getProperty(COMPSsConstants.GAT_FILE_ADAPTOR);
if (debug) {
logger.debug("Initializing GAT");
}
pool = new ThreadPool(GAT_POOL_SIZE, POOL_NAME, new Dispatcher(copyQueue));
try {
pool.startThreads();
} catch (Exception e) {
ErrorManager.error(THREAD_POOL_ERR, e);
}
safePool = new ThreadPool(SAFE_POOL_SIZE, SAFE_POOL_NAME, new Dispatcher(safeQueue));
try {
safePool.startThreads();
} catch (Exception e) {
ErrorManager.error(THREAD_POOL_ERR, e);
}
// GAT adaptor path
if (debug) {
logger.debug("Initializing GAT Tranfer Context");
}
transferContext = new GATContext();
/*
* We need to try the local adaptor when both source and target hosts are local, because ssh file adaptor cannot
* perform local operations
*/
transferContext.addPreference("File.adaptor.name", adaptor + ", srcToLocalToDestCopy, local");
}
use of es.bsc.compss.util.ThreadPool in project compss by bsc-wdc.
the class WSJob method init.
public static void init() throws Exception {
// Create thread that will handle job submission requests
if (callerQueue == null) {
callerQueue = new RequestQueue<>();
} else {
callerQueue.clear();
}
caller = new WSCaller(callerQueue);
callerPool = new ThreadPool(POOL_SIZE, POOL_NAME, caller);
try {
callerPool.startThreads();
} catch (Exception e) {
logger.error(THREAD_POOL_ERR, e);
throw e;
}
}
Aggregations