Fixing build issues
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 @@
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 @@
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 @@
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 @@
}
}
} 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>