This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch mft-integration
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/mft-integration by this push:
new c58a70e Fixing build issues
c58a70e is described below
commit c58a70ea3c8237f60a91fc6de4a37797f5d82664
Author: Dimuthu Wannipurage <[email protected]>
AuthorDate: Sun Jan 24 22:05:42 2021 -0500
Fixing build issues
---
modules/airavata-helix/helix-spectator/pom.xml | 2 +-
.../helix/impl/task/staging/DataStagingTask.java | 28 ++++++++++++----------
modules/airavata-helix/task-api/pom.xml | 2 +-
pom.xml | 2 +-
4 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/modules/airavata-helix/helix-spectator/pom.xml
b/modules/airavata-helix/helix-spectator/pom.xml
index 7a1fdb0..8151c8f 100644
--- a/modules/airavata-helix/helix-spectator/pom.xml
+++ b/modules/airavata-helix/helix-spectator/pom.xml
@@ -24,7 +24,7 @@
<parent>
<artifactId>airavata-helix</artifactId>
<groupId>org.apache.airavata</groupId>
- <version>${project.version}</version>
+ <version>0.21-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git
a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/staging/DataStagingTask.java
b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/staging/DataStagingTask.java
index 705cd78..2021d14 100644
---
a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/staging/DataStagingTask.java
+++
b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/staging/DataStagingTask.java
@@ -326,34 +326,36 @@ public abstract class DataStagingTask extends
AiravataTask {
TaskOnFailException {
destPath = destPath + new File(sourcePath).getName();
- String sourceId = "STORAGE:" + sourcePath + ":" + getGatewayId() + ":"
+ getTaskContext().getStorageResourceId() + ":" +
getTaskContext().getStorageResourceLoginUserName();
+ String sourceId = "STORAGE:" + getGatewayId() + ":" +
getTaskContext().getStorageResourceId() + ":" +
getTaskContext().getStorageResourceLoginUserName();
String sourceToken =
getTaskContext().getStorageResourceCredentialToken() + ":" + getGatewayId();
- String destId = "CLUSTER:" + destPath + ":" + getGatewayId() + ":" +
getTaskContext().getComputeResourceId() + ":" +
getTaskContext().getComputeResourceLoginUserName();
+ String destId = "CLUSTER:" + getGatewayId() + ":" +
getTaskContext().getComputeResourceId() + ":" +
getTaskContext().getComputeResourceLoginUserName();
String destToken =
getTaskContext().getComputeResourceCredentialToken() + ":" + getGatewayId();
- return transferThroughMFT(sourceId, sourceToken, destId, destToken);
+ return transferThroughMFT(sourceId, sourcePath, sourceToken, destId,
destPath, destToken);
}
protected boolean transferFileToStorageThroughMFT(String sourcePath,
String destPath) throws TaskOnFailException,
ApplicationSettingsException {
- String sourceId = "CLUSTER:" + sourcePath + ":" + getGatewayId() + ":"
+ getTaskContext().getComputeResourceId() + ":" +
getTaskContext().getComputeResourceLoginUserName();
+ String sourceId = "CLUSTER:" + getGatewayId() + ":" +
getTaskContext().getComputeResourceId() + ":" +
getTaskContext().getComputeResourceLoginUserName();
String sourceToken =
getTaskContext().getComputeResourceCredentialToken() + ":" + getGatewayId();
- String destId = "STORAGE:" + destPath + ":" + getGatewayId() + ":" +
getTaskContext().getStorageResourceId() + ":" +
getTaskContext().getStorageResourceLoginUserName();
+ String destId = "STORAGE:" + getGatewayId() + ":" +
getTaskContext().getStorageResourceId() + ":" +
getTaskContext().getStorageResourceLoginUserName();
String destToken =
getTaskContext().getStorageResourceCredentialToken() + ":" + getGatewayId();
- return transferThroughMFT(sourceId, sourceToken, destId, destToken);
+ return transferThroughMFT(sourceId, sourcePath, sourceToken, destId,
destPath, destToken);
}
- private boolean transferThroughMFT(String sourceId, String sourceToken,
String destId, String destToken) throws ApplicationSettingsException,
TaskOnFailException {
+ private boolean transferThroughMFT(String sourceStorageId, String
sourcePath, String sourceToken,
+ String destStorageId, String destPath,
String destToken) throws
+
ApplicationSettingsException, TaskOnFailException {
MFTApiServiceGrpc.MFTApiServiceBlockingStub mftClient =
MFTApiClient.buildClient(
ServerSettings.getSetting("mft.server.host"),
Integer.parseInt(ServerSettings.getSetting("mft.server.port")));
ResourceAvailabilityResponse resourceAvailability =
mftClient.getResourceAvailability(ResourceAvailabilityRequest.newBuilder()
- .setResourceId(sourceId)
+ .setResourceId(sourceStorageId)
.setResourceToken(sourceToken)
.setResourceType("SCP")
.setResourceBackend("AIRAVATA")
@@ -361,10 +363,12 @@ public abstract class DataStagingTask extends
AiravataTask {
if (resourceAvailability.getAvailable()) {
TransferApiRequest request = TransferApiRequest.newBuilder()
- .setSourceId(sourceId)
+ .setSourceStorageId(sourceStorageId)
+ .setSourcePath(sourcePath)
.setSourceToken(sourceToken)
.setSourceType("SCP")
- .setDestinationId(destId)
+ .setDestinationStorageId(destStorageId)
+ .setDestinationPath(destPath)
.setDestinationToken(destToken)
.setDestinationType("SCP")
.setSourceResourceBackend("AIRAVATA")
@@ -379,7 +383,7 @@ public abstract class DataStagingTask extends AiravataTask {
TransferModel transferModel = new TransferModel();
transferModel.setTaskId(getTaskId());
transferModel.setTransferId(response.getTransferId());
- transferModel.setFilePath(sourceId);
+ transferModel.setFilePath(sourcePath);
try {
getRegistryServiceClient().saveTransfer(transferModel);
@@ -410,7 +414,7 @@ public abstract class DataStagingTask extends AiravataTask {
}
}
} else {
- logger.warn("Resource " + sourceId + " is not available. So
ignoring");
+ logger.warn("Resource {} in storage {} is not available. So
ignoring", sourcePath, sourceStorageId);
return false;
}
}
diff --git a/modules/airavata-helix/task-api/pom.xml
b/modules/airavata-helix/task-api/pom.xml
index 253b3da..6d1b558 100644
--- a/modules/airavata-helix/task-api/pom.xml
+++ b/modules/airavata-helix/task-api/pom.xml
@@ -24,7 +24,7 @@
<parent>
<artifactId>airavata-helix</artifactId>
<groupId>org.apache.airavata</groupId>
- <version>${project.version}</version>
+ <version>0.21-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/pom.xml b/pom.xml
index a8c649a..4af328f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -780,10 +780,10 @@
<module>modules/cluster-monitoring</module>
<module>airavata-services</module>
<module>modules/db-event-manager</module>
+ <module>modules/platform-monitoring</module>
<module>modules/airavata-helix</module>
<module>modules/compute-account-provisioning</module>
<module>modules/job-monitor</module>
- <module>modules/platform-monitoring</module>
<module>modules/distribution</module>
<module>tools</module>
<module>modules/ide-integration</module>