use of es.bsc.compss.types.data.AccessParams.FileAccessParams in project compss by bsc-wdc.
the class COMPSsRuntimeImpl method finishAccessToFile.
private void finishAccessToFile(String fileName, DataLocation loc, AccessMode am, String destDir) {
FileAccessParams fap = new FileAccessParams(am, loc);
ap.finishAccessToFile(loc, fap, destDir);
}
use of es.bsc.compss.types.data.AccessParams.FileAccessParams in project compss by bsc-wdc.
the class COMPSsRuntimeImpl method mainAccessToFile.
private String mainAccessToFile(String fileName, DataLocation loc, AccessMode am, String destDir) {
// Tell the AP that the application wants to access a file.
FileAccessParams fap = new FileAccessParams(am, loc);
DataLocation targetLocation = ap.mainAccessToFile(loc, fap, destDir);
// Checks on target
String path = (targetLocation == null) ? fileName : targetLocation.getPath();
DataLocation finalLocation = (targetLocation == null) ? loc : targetLocation;
if (finalLocation == null) {
ErrorManager.fatal(ERROR_FILE_NAME);
return null;
}
// Return the final target path
String finalPath;
MultiURI u = finalLocation.getURIInHost(Comm.getAppHost());
if (u != null) {
finalPath = u.getPath();
} else {
finalPath = path;
}
return finalPath;
}
Aggregations