You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/01/12 23:04:48 UTC
[37/50] [abbrv] airavata git commit: adding full path for stdout and
stderr
adding full path for stdout and stderr
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/e43b6d91
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/e43b6d91
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/e43b6d91
Branch: refs/heads/data-manager
Commit: e43b6d9188d4e9b9e13eaece1b8a89f44b30910e
Parents: da4ba5b
Author: Chathuri Wimalasena <ch...@apache.org>
Authored: Mon Jan 11 15:57:48 2016 -0500
Committer: Chathuri Wimalasena <ch...@apache.org>
Committed: Mon Jan 11 15:57:48 2016 -0500
----------------------------------------------------------------------
.../org/apache/airavata/gfac/core/GFacUtils.java | 4 ++--
.../apache/airavata/gfac/impl/GFacEngineImpl.java | 15 ++++++++++-----
2 files changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/e43b6d91/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
index a021e97..0a2d207 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
@@ -486,9 +486,9 @@ public class GFacUtils {
if (inputDataObjectType.getValue() != null
&& !inputDataObjectType.getValue().equals("")) {
if (inputDataObjectType.getType() == DataType.URI) {
- // set only the relative path : relative path does not work with lonestar
+ // set only the relative path
String filePath = inputDataObjectType.getValue();
-// filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
+ filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
inputValues.add(filePath);
} else {
inputValues.add(inputDataObjectType.getValue());
http://git-wip-us.apache.org/repos/asf/airavata/blob/e43b6d91/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
index f05c85d..4339869 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
@@ -40,6 +40,7 @@ import org.apache.airavata.gfac.impl.task.DataStreamingTask;
import org.apache.airavata.gfac.impl.task.EnvironmentSetupTask;
import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
import org.apache.airavata.model.appcatalog.computeresource.*;
+import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
import org.apache.airavata.model.appcatalog.gatewayprofile.StoragePreference;
import org.apache.airavata.model.appcatalog.storageresource.StorageResourceDescription;
@@ -70,6 +71,7 @@ import org.apache.thrift.TException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.*;
@@ -106,8 +108,11 @@ public class GFacEngineImpl implements GFacEngine {
GatewayResourceProfile gatewayProfile = appCatalog.getGatewayProfile().getGatewayProfile(gatewayId);
processContext.setGatewayResourceProfile(gatewayProfile);
- processContext.setComputeResourcePreference(appCatalog.getGatewayProfile().getComputeResourcePreference
- (gatewayId, processModel.getComputeResourceId()));
+ ComputeResourcePreference computeResourcePreference = appCatalog.getGatewayProfile().getComputeResourcePreference
+ (gatewayId, processModel.getComputeResourceId());
+ String scratchLocation = computeResourcePreference.getScratchLocation();
+ scratchLocation = scratchLocation + File.separator + processId + File.separator;
+ processContext.setComputeResourcePreference(computeResourcePreference);
StoragePreference storagePreference = appCatalog.getGatewayProfile().getStoragePreference(gatewayId, processModel.getStorageResourceId());
StorageResourceDescription storageResource = appCatalog.getStorageResource().getStorageResource(processModel.getStorageResourceId());
if (storageResource != null){
@@ -151,15 +156,15 @@ public class GFacEngineImpl implements GFacEngine {
for (OutputDataObjectType outputDataObjectType : applicationOutputs) {
if (outputDataObjectType.getType().equals(DataType.STDOUT)) {
if (outputDataObjectType.getValue() == null || outputDataObjectType.getValue().equals("")) {
- outputDataObjectType.setValue(applicationInterface.getApplicationName() + ".stdout");
- processContext.setStdoutLocation(applicationInterface.getApplicationName() + ".stdout");
+ outputDataObjectType.setValue(scratchLocation + applicationInterface.getApplicationName() + ".stdout");
+ processContext.setStdoutLocation(scratchLocation + applicationInterface.getApplicationName() + ".stdout");
} else {
processContext.setStdoutLocation(outputDataObjectType.getValue());
}
}
if (outputDataObjectType.getType().equals(DataType.STDERR)) {
if (outputDataObjectType.getValue() == null || outputDataObjectType.getValue().equals("")) {
- String stderrLocation = applicationInterface.getApplicationName() + ".stderr";
+ String stderrLocation = scratchLocation + applicationInterface.getApplicationName() + ".stderr";
outputDataObjectType.setValue(stderrLocation);
processContext.setStderrLocation(stderrLocation);
} else {