git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineSmartExecutor@122746 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9eacbea92b
commit
d19d36488c
|
@ -2,7 +2,6 @@ package org.gcube.dataanalysis.executor.rscripts.generic;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
|
@ -20,6 +19,7 @@ import org.gcube.dataanalysis.executor.util.StorageUtils;
|
|||
|
||||
public abstract class GenericRScript extends StandardLocalExternalAlgorithm {
|
||||
|
||||
|
||||
// FIXED part
|
||||
protected HashMap<String, String> outputValues = new HashMap<String, String>();
|
||||
protected LinkedHashMap<String, StatisticalType> output = new LinkedHashMap<String, StatisticalType>();
|
||||
|
@ -176,14 +176,16 @@ public abstract class GenericRScript extends StandardLocalExternalAlgorithm {
|
|||
fw.write(Rlog);
|
||||
fw.close();
|
||||
AnalysisLogger.getLogger().debug("Written in " + logfile);
|
||||
String url = StorageUtils.uploadFilesOnStorage(config.getGcubeScope(), config.getParam("Username"), logfile.getParent(), "/ScriptLogs/" + uuid + "/", logfile.getName());
|
||||
AnalysisLogger.getLogger().debug("Uploaded on storage: " + url);
|
||||
String httpurl = "";
|
||||
String httpurl = StorageUtils.uploadFilesOnStorage(config.getGcubeScope(), config.getParam("Username"), logfile.getParent(), "/ScriptLogs/" + uuid + "/", logfile.getName(),true);
|
||||
AnalysisLogger.getLogger().debug("Uploaded on storage: " + httpurl);
|
||||
|
||||
// String httpurl = url.replace("smp:", "http:");
|
||||
/*
|
||||
if (config.getGcubeScope().startsWith("/gcube"))
|
||||
httpurl = "http://data-d.d4science.org/uri-resolver/smp?smp-uri=" + url + "&fileName=" + logfile.getName() ;
|
||||
else
|
||||
httpurl = "http://data.d4science.org/uri-resolver/smp?smp-uri=" + url + "&fileName=" + logfile.getName() ;
|
||||
*/
|
||||
|
||||
AnalysisLogger.getLogger().debug("Deleting log file and returning " + httpurl);
|
||||
logfile.delete();
|
||||
|
|
Loading…
Reference in New Issue