You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2018/11/05 18:50:27 UTC
[airavata] branch develop updated: Improving logs
This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/develop by this push:
new 8c6d4d3 Improving logs
8c6d4d3 is described below
commit 8c6d4d321be8b56865801f5e1c91568e301937d3
Author: Dimuthu Wannipurage <di...@datasprouts.com>
AuthorDate: Mon Nov 5 13:49:38 2018 -0500
Improving logs
---
.../airavata/helix/impl/task/parsing/DataParsingTask.java | 5 +++--
.../helix/core/support/adaptor/AdaptorSupportImpl.java | 11 +++++++++++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/parsing/DataParsingTask.java b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/parsing/DataParsingTask.java
index c93a6d7..03f9a56 100644
--- a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/parsing/DataParsingTask.java
+++ b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/parsing/DataParsingTask.java
@@ -269,10 +269,11 @@ public class DataParsingTask extends AbstractTask {
token = groupResourceProfile.getDefaultCredentialStoreToken();
}
if (gatewayStoragePreference == null) {
- logger.error("Could not find a gateway storage preference for stogate " + storageResourceId + " gateway id " + gatewayId);
- throw new TaskOnFailException("Could not find a gateway storage preference for stogate " + storageResourceId + " gateway id " + gatewayId, false, null);
+ logger.error("Could not find a gateway storage preference for storage " + storageResourceId + " gateway id " + gatewayId);
+ throw new TaskOnFailException("Could not find a gateway storage preference for storage " + storageResourceId + " gateway id " + gatewayId, false, null);
}
+ logger.info("Fetching adaptor for storage resource " + storageResourceId + " with token " + token);
return adaptorSupport.fetchStorageAdaptor(gatewayId, storageResourceId, DataMovementProtocol.SCP, token,
gatewayStoragePreference.getLoginUserName());
diff --git a/modules/airavata-helix/task-core/src/main/java/org/apache/airavata/helix/core/support/adaptor/AdaptorSupportImpl.java b/modules/airavata-helix/task-core/src/main/java/org/apache/airavata/helix/core/support/adaptor/AdaptorSupportImpl.java
index 105459f..32c6ed4 100644
--- a/modules/airavata-helix/task-core/src/main/java/org/apache/airavata/helix/core/support/adaptor/AdaptorSupportImpl.java
+++ b/modules/airavata-helix/task-core/src/main/java/org/apache/airavata/helix/core/support/adaptor/AdaptorSupportImpl.java
@@ -25,6 +25,8 @@ import org.apache.airavata.helix.adaptor.SSHJStorageAdaptor;
import org.apache.airavata.helix.task.api.support.AdaptorSupport;
import org.apache.airavata.model.appcatalog.computeresource.JobSubmissionProtocol;
import org.apache.airavata.model.data.movement.DataMovementProtocol;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.Optional;
@@ -36,6 +38,8 @@ import java.util.Optional;
*/
public class AdaptorSupportImpl implements AdaptorSupport {
+ private final static Logger logger = LoggerFactory.getLogger(AdaptorSupportImpl.class);
+
private static AdaptorSupportImpl INSTANCE;
private final AgentStore agentStore = new AgentStore();
@@ -54,6 +58,9 @@ public class AdaptorSupportImpl implements AdaptorSupport {
public AgentAdaptor fetchAdaptor(String gatewayId, String computeResource, JobSubmissionProtocol protocol, String authToken, String userId) throws AgentException {
+ logger.debug("Fetching adaptor for compute resource " + computeResource + " with token " + authToken +
+ " with user " + userId + " with protocol" + protocol.name());
+
Optional<AgentAdaptor> agentAdaptorOp = agentStore.getAgentAdaptor(computeResource, protocol, authToken);
if (agentAdaptorOp.isPresent()) {
return agentAdaptorOp.get();
@@ -80,6 +87,10 @@ public class AdaptorSupportImpl implements AdaptorSupport {
@Override
public StorageResourceAdaptor fetchStorageAdaptor(String gatewayId, String storageResourceId, DataMovementProtocol protocol, String authToken, String userId) throws AgentException {
+
+ logger.debug("Fetching adaptor for storage resource " + storageResourceId + " with token " + authToken +
+ " with user " + userId + " with protocol" + protocol.name());
+
Optional<StorageResourceAdaptor> agentAdaptorOp = agentStore.getStorageAdaptor(storageResourceId, protocol, authToken);
if (agentAdaptorOp.isPresent()) {
return agentAdaptorOp.get();