git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineSmartExecutor@117754 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e308cdd888
commit
f35dd3fb44
|
@ -130,15 +130,17 @@ public class ICCATVPA extends ActorNode {
|
|||
@Override
|
||||
public StatisticalType getOutput() {
|
||||
|
||||
File outfile = new File(config.getPersistencePath(),processOutput);
|
||||
//File outfile = new File(config.getPersistencePath(),processOutput);
|
||||
File outfile = new File(processOutput);
|
||||
LinkedHashMap<String, StatisticalType> outputmap = new LinkedHashMap<String, StatisticalType>();
|
||||
AnalysisLogger.getLogger().debug("ICCAT-VPA Output: "+outfile.getAbsolutePath()+" : "+outfile.exists());
|
||||
|
||||
if (outfile.exists())
|
||||
AnalysisLogger.getLogger().debug("ICCAT-VPA Output: "+outfile.getAbsolutePath()+" : "+outfile.exists());
|
||||
else
|
||||
AnalysisLogger.getLogger().debug("ICCAT-VPA Output file does not exist - returning a proxy");
|
||||
if (!outfile.exists()){
|
||||
AnalysisLogger.getLogger().debug("ICCAT-VPA Output file "+processOutput+" does not exist - returning null ");
|
||||
return null;
|
||||
}
|
||||
|
||||
PrimitiveType o = new PrimitiveType(File.class.getName(), outfile, PrimitiveTypes.FILE, "ProcessedSpecies", "Output file with processed species");
|
||||
PrimitiveType o = new PrimitiveType(File.class.getName(), outfile, PrimitiveTypes.FILE, "ProcessSummary", "Output file containing the process summary");
|
||||
outputmap.put("Zip file containing the process output", o);
|
||||
|
||||
PrimitiveType output = new PrimitiveType(HashMap.class.getName(), outputmap, PrimitiveTypes.MAP, "Results File", "Results File");
|
||||
|
@ -267,7 +269,20 @@ public class ICCATVPA extends ActorNode {
|
|||
|
||||
AnalysisLogger.getLogger().debug("ICCAT-VPA - Downloading file "+processOutput);
|
||||
StorageUtils.downloadFilefromStorage(config.getGcubeScope(), config.getParam("ServiceUserName"), config.getPersistencePath(), processOutput);
|
||||
AnalysisLogger.getLogger().debug("ICCAT-VPA - Postprocess complete: output ready in "+processOutput);
|
||||
File of = new File(config.getPersistencePath(),processOutput);
|
||||
for (int i=0;i<3;i++){
|
||||
if (of.exists())
|
||||
break;
|
||||
else
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
|
||||
if (of.exists()){
|
||||
AnalysisLogger.getLogger().debug("ICCAT-VPA - Postprocess complete: output ready in "+of.getAbsolutePath());
|
||||
processOutput=of.getAbsolutePath();
|
||||
}
|
||||
else
|
||||
AnalysisLogger.getLogger().debug("ICCAT-VPA - Warning Postprocess error - output does not exist ! "+of.getAbsolutePath());
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Reference in New Issue