- algorithm SubmitQuery modified in order to pass the string pathfile to the submitQuery method of class DatabaseManagement in order to generate a file and retrieve it from the statistical manager with the map as output.
- version pom file modified in 1.3.0 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManagerAlgorithms@101652 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3814a3ad4c
commit
417291b489
|
@ -552,7 +552,7 @@ public class SubmitQuery extends StandardLocalExternalAlgorithm {
|
|||
// sf, config.getPersistencePath());
|
||||
|
||||
result = mgt
|
||||
.submitQuery(query, dbconnection);
|
||||
.submitQuery(query, dbconnection, config.getPersistencePath());
|
||||
}
|
||||
|
||||
if (driverInfo.toLowerCase().contains("mysql")) {
|
||||
|
@ -563,7 +563,7 @@ public class SubmitQuery extends StandardLocalExternalAlgorithm {
|
|||
// sf, config.getPersistencePath());
|
||||
|
||||
result = mgt
|
||||
.submitQuery(query, dbconnection);
|
||||
.submitQuery(query, dbconnection, config.getPersistencePath());
|
||||
}
|
||||
|
||||
if (result == null) {
|
||||
|
@ -575,6 +575,7 @@ public class SubmitQuery extends StandardLocalExternalAlgorithm {
|
|||
|
||||
HashMap<String, String> mapResult = new HashMap<String, String>();
|
||||
mapResult = mgt.getMapQueryResult();
|
||||
// System.out.println("map size alg with header: " + mapResult.size());
|
||||
|
||||
String encoded = null;
|
||||
encoded = new String(mapResult.get("HEADERS").getBytes(), "UTF-8");
|
||||
|
@ -594,8 +595,8 @@ public class SubmitQuery extends StandardLocalExternalAlgorithm {
|
|||
.getBytes(), "UTF-8");
|
||||
|
||||
// // check the encoded value
|
||||
// AnalysisLogger.getLogger().debug(
|
||||
// "In RandomSampleOnTable->string encoded: " + encoded);
|
||||
// AnalysisLogger.getLogger().debug(
|
||||
// "In RandomSampleOnTable->string encoded: " + encoded);
|
||||
|
||||
PrimitiveType val1 = new PrimitiveType(String.class.getName(),
|
||||
encoded, PrimitiveTypes.STRING, "Row", "Row");
|
||||
|
@ -603,16 +604,16 @@ public class SubmitQuery extends StandardLocalExternalAlgorithm {
|
|||
// //check value contained in map
|
||||
// String value = (String) val1.getContent();
|
||||
//
|
||||
// AnalysisLogger.getLogger().debug(
|
||||
// "In RandomSampleOnTable->value: " + value);
|
||||
// AnalysisLogger.getLogger().debug(
|
||||
// "In RandomSampleOnTable->value: " + value);
|
||||
}
|
||||
|
||||
// to add the file
|
||||
// PrimitiveType fileResult = new
|
||||
// PrimitiveType(File.class.getName(),
|
||||
// mgt.getFileQueryResult(), PrimitiveTypes.FILE, "File",
|
||||
// "File");
|
||||
// mapResults.put("File", fileResult);
|
||||
PrimitiveType fileResult = new
|
||||
PrimitiveType(File.class.getName(),
|
||||
mgt.getFileQueryResult(), PrimitiveTypes.FILE, "File",
|
||||
"File");
|
||||
mapResults.put("File", fileResult);
|
||||
}
|
||||
return mapResults;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue