use of es.bsc.compss.types.data.operation.DataOperation in project compss by bsc-wdc.
the class Dispatcher method processRequests.
public void processRequests() {
DataOperation fOp;
while (true) {
fOp = queue.dequeue();
if (fOp == null) {
break;
}
// What kind of operation is requested?
if (fOp instanceof ImmediateCopy) {
// File transfer (copy)
ImmediateCopy c = (ImmediateCopy) fOp;
c.perform();
} else if (fOp instanceof DeferredCopy) {
// DO nothing
} else {
// fOp instanceof Delete
Delete d = (Delete) fOp;
performOperation(d);
}
}
}
use of es.bsc.compss.types.data.operation.DataOperation 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");
}
Aggregations