You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2015/11/03 20:48:01 UTC
[36/51] [abbrv] airavata git commit: output data location
output data location
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f4c64245
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f4c64245
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f4c64245
Branch: refs/heads/master
Commit: f4c6424565bd5926b2ab0a8efc4351a58212a431
Parents: 88a611d
Author: Chathuri Wimalasena <ch...@apache.org>
Authored: Wed Oct 21 15:06:19 2015 -0400
Committer: Chathuri Wimalasena <ch...@apache.org>
Committed: Wed Oct 21 15:06:19 2015 -0400
----------------------------------------------------------------------
.../apache/airavata/common/utils/ServerSettings.java | 2 +-
.../orchestrator/cpi/impl/SimpleOrchestratorImpl.java | 12 ++----------
2 files changed, 3 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/f4c64245/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java b/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
index 6196c07..d158199 100644
--- a/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
+++ b/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
@@ -382,7 +382,7 @@ public class ServerSettings extends ApplicationSettings {
}
public static String getRemoteDataLocation() throws ApplicationSettingsException {
- return getSetting(LOCAL_DATA_DIR);
+ return getSetting(REMOTE_DATA_DIR);
}
public static String getClientHostName() throws ApplicationSettingsException {
http://git-wip-us.apache.org/repos/asf/airavata/blob/f4c64245/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index 869f65a..b207ce8 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -404,8 +404,6 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
dataStagingTaskIds.add(outputDataStagingTask.getTaskId());
} catch (TException e) {
throw new RegistryException("Error while serializing data staging sub task model", e);
- } catch (ApplicationSettingsException e) {
- throw new RegistryException("Error while reading airavata server properties", e);
}
break;
default:
@@ -489,7 +487,7 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
return taskModel;
}
- private TaskModel getOutputDataStagingTask(ProcessModel processModel, OutputDataObjectType processOutput, String gatewayId) throws RegistryException, TException, ApplicationSettingsException {
+ private TaskModel getOutputDataStagingTask(ProcessModel processModel, OutputDataObjectType processOutput, String gatewayId) throws RegistryException, TException {
try {
// create new task model for this task
@@ -505,11 +503,7 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
DataStoragePreference dataStoragePreference = OrchestratorUtils.getDateStoragePreference(orchestratorContext, processModel, gatewayId);
ComputeResourcePreference computeResourcePreference = OrchestratorUtils.getComputeResourcePreference(orchestratorContext, processModel, gatewayId);
ComputeResourceDescription computeResource = orchestratorContext.getRegistry().getAppCatalog().getComputeResource().getComputeResource(processModel.getComputeResourceId());
- // FIXME : need to fix once we start saving data storage preferences
- String remoteOutputDir = ServerSettings.getRemoteDataLocation();
- if (dataStoragePreference != null){
- remoteOutputDir = dataStoragePreference.getFileSystemRootLocation();
- }
+ String remoteOutputDir = computeResourcePreference.getScratchLocation() + File.separator + processModel.getProcessId();
remoteOutputDir = remoteOutputDir.endsWith("/") ? remoteOutputDir : remoteOutputDir + "/";
DataStagingTaskModel submodel = new DataStagingTaskModel();
submodel.setType(DataStageType.OUPUT);
@@ -531,8 +525,6 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
return taskModel;
} catch (AppCatalogException | TaskException e) {
throw new RegistryException("Error occurred while retrieving data movement from app catalog", e);
- } catch (ApplicationSettingsException e) {
- throw new ApplicationSettingsException("Error occurred while reading airavata-server.properties", e);
}
}