Repository: airavata
Updated Branches:
  refs/heads/develop 867135d41 -> 94508b62b


more logging for debugging


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/94508b62
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/94508b62
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/94508b62

Branch: refs/heads/develop
Commit: 94508b62b1b070cf62b7758d187b03d016a2c8fe
Parents: 867135d
Author: scnakandala <[email protected]>
Authored: Fri Jun 30 13:35:24 2017 -0400
Committer: scnakandala <[email protected]>
Committed: Fri Jun 30 13:35:24 2017 -0400

----------------------------------------------------------------------
 .../org/apache/airavata/gfac/impl/HPCRemoteCluster.java  | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/94508b62/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
----------------------------------------------------------------------
diff --git 
a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
 
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
index c638429..1e8a2f1 100644
--- 
a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
+++ 
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
@@ -196,22 +196,25 @@ public class HPCRemoteCluster extends 
AbstractRemoteCluster{
         * one file with that extension. In case if there are more than one 
file one random file name from the matching ones
         * will be returned.
         *
-        * @param fileExtension
+        * @param fileRegex
         * @param parentPath
         * @param session
         * @return
         */
        @Override
-       public List<String> getFileNameFromExtension(String fileExtension, 
String parentPath, Session session) throws GFacException {
+       public List<String> getFileNameFromExtension(String fileRegex, String 
parentPath, Session session) throws GFacException {
                try {
                        List<String> fileNames = 
SSHUtils.listDirectory(parentPath, session);
                        List<String> matchingNames = new ArrayList<>();
                        for(String fileName : fileNames){
-                               if(fileName.matches(fileExtension)){
+                               if(fileName.matches(fileRegex)){
+                                       log.info("File name matched for " + 
fileRegex + " : " + fileName);
                                        matchingNames.add(fileName);
+                               }else{
+                                       log.info("File name not matched for " + 
fileRegex + " : " + fileName);
                                }
                        }
-                       log.warn("No matching file found for extension: " + 
fileExtension + " in the " + parentPath + " directory");
+                       log.warn("No matching file found for extension: " + 
fileRegex + " in the " + parentPath + " directory");
                        return matchingNames;
                } catch (Exception e) {
                        e.printStackTrace();

Reply via email to