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.File;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
@ -20,6 +19,7 @@ import org.gcube.dataanalysis.executor.util.StorageUtils;
|
||||||
|
|
||||||
public abstract class GenericRScript extends StandardLocalExternalAlgorithm {
|
public abstract class GenericRScript extends StandardLocalExternalAlgorithm {
|
||||||
|
|
||||||
|
|
||||||
// FIXED part
|
// FIXED part
|
||||||
protected HashMap<String, String> outputValues = new HashMap<String, String>();
|
protected HashMap<String, String> outputValues = new HashMap<String, String>();
|
||||||
protected LinkedHashMap<String, StatisticalType> output = new LinkedHashMap<String, StatisticalType>();
|
protected LinkedHashMap<String, StatisticalType> output = new LinkedHashMap<String, StatisticalType>();
|
||||||
|
@ -176,15 +176,17 @@ public abstract class GenericRScript extends StandardLocalExternalAlgorithm {
|
||||||
fw.write(Rlog);
|
fw.write(Rlog);
|
||||||
fw.close();
|
fw.close();
|
||||||
AnalysisLogger.getLogger().debug("Written in " + logfile);
|
AnalysisLogger.getLogger().debug("Written in " + logfile);
|
||||||
String url = StorageUtils.uploadFilesOnStorage(config.getGcubeScope(), config.getParam("Username"), logfile.getParent(), "/ScriptLogs/" + uuid + "/", logfile.getName());
|
String httpurl = StorageUtils.uploadFilesOnStorage(config.getGcubeScope(), config.getParam("Username"), logfile.getParent(), "/ScriptLogs/" + uuid + "/", logfile.getName(),true);
|
||||||
AnalysisLogger.getLogger().debug("Uploaded on storage: " + url);
|
AnalysisLogger.getLogger().debug("Uploaded on storage: " + httpurl);
|
||||||
String httpurl = "";
|
|
||||||
// String httpurl = url.replace("smp:", "http:");
|
// String httpurl = url.replace("smp:", "http:");
|
||||||
|
/*
|
||||||
if (config.getGcubeScope().startsWith("/gcube"))
|
if (config.getGcubeScope().startsWith("/gcube"))
|
||||||
httpurl = "http://data-d.d4science.org/uri-resolver/smp?smp-uri=" + url + "&fileName=" + logfile.getName() ;
|
httpurl = "http://data-d.d4science.org/uri-resolver/smp?smp-uri=" + url + "&fileName=" + logfile.getName() ;
|
||||||
else
|
else
|
||||||
httpurl = "http://data.d4science.org/uri-resolver/smp?smp-uri=" + url + "&fileName=" + logfile.getName() ;
|
httpurl = "http://data.d4science.org/uri-resolver/smp?smp-uri=" + url + "&fileName=" + logfile.getName() ;
|
||||||
|
*/
|
||||||
|
|
||||||
AnalysisLogger.getLogger().debug("Deleting log file and returning " + httpurl);
|
AnalysisLogger.getLogger().debug("Deleting log file and returning " + httpurl);
|
||||||
logfile.delete();
|
logfile.delete();
|
||||||
// httpurl = URLEncoder.encode(httpurl, "UTF-8");
|
// httpurl = URLEncoder.encode(httpurl, "UTF-8");
|
||||||
|
|
Loading…
Reference in New Issue