airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [22/50] [abbrv] airavata git commit: using experiment data directory when copying output data
Date Tue, 12 Jan 2016 22:04:33 GMT
using experiment data directory when copying output data


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

Branch: refs/heads/data-manager
Commit: 2fe5278f52522c907908d22cc005f411701b9920
Parents: 531cbdf
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Wed Jan 6 13:10:29 2016 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Wed Jan 6 13:10:29 2016 -0500

----------------------------------------------------------------------
 .../lib/airavata/process_model_types.cpp        |  22 ++++
 .../lib/airavata/process_model_types.h          |  12 +-
 .../lib/Airavata/Model/Process/Types.php        |  23 ++++
 .../lib/apache/airavata/model/process/ttypes.py |  15 ++-
 .../airavata/model/process/ProcessModel.java    | 114 ++++++++++++++++++-
 .../model/util/ExperimentModelUtil.java         |   1 +
 .../gfac/impl/task/SCPDataStageTask.java        |  17 ++-
 .../catalog/impl/ExperimentRegistry.java        |   2 +
 .../core/experiment/catalog/model/Process.java  |  10 ++
 .../catalog/resources/ProcessResource.java      |  10 ++
 .../utils/ThriftDataModelConversion.java        |   1 +
 .../src/main/resources/expcatalog-derby.sql     |   1 +
 .../src/main/resources/expcatalog-mysql.sql     |   1 +
 .../process_model.thrift                        |   3 +-
 14 files changed, 222 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.cpp
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.cpp
index b01eb50..629b78f 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.cpp
@@ -138,6 +138,11 @@ void ProcessModel::__set_generateCert(const bool val) {
 __isset.generateCert = true;
 }
 
+void ProcessModel::__set_experimentDataDir(const std::string& val) {
+  this->experimentDataDir = val;
+__isset.experimentDataDir = true;
+}
+
 uint32_t ProcessModel::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -377,6 +382,14 @@ uint32_t ProcessModel::read(::apache::thrift::protocol::TProtocol* iprot)
{
           xfer += iprot->skip(ftype);
         }
         break;
+      case 22:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->experimentDataDir);
+          this->__isset.experimentDataDir = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -533,6 +546,11 @@ uint32_t ProcessModel::write(::apache::thrift::protocol::TProtocol* oprot)
const
     xfer += oprot->writeBool(this->generateCert);
     xfer += oprot->writeFieldEnd();
   }
+  if (this->__isset.experimentDataDir) {
+    xfer += oprot->writeFieldBegin("experimentDataDir", ::apache::thrift::protocol::T_STRING,
22);
+    xfer += oprot->writeString(this->experimentDataDir);
+    xfer += oprot->writeFieldEnd();
+  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -561,6 +579,7 @@ void swap(ProcessModel &a, ProcessModel &b) {
   swap(a.storageResourceId, b.storageResourceId);
   swap(a.userDn, b.userDn);
   swap(a.generateCert, b.generateCert);
+  swap(a.experimentDataDir, b.experimentDataDir);
   swap(a.__isset, b.__isset);
 }
 
@@ -586,6 +605,7 @@ ProcessModel::ProcessModel(const ProcessModel& other24) {
   storageResourceId = other24.storageResourceId;
   userDn = other24.userDn;
   generateCert = other24.generateCert;
+  experimentDataDir = other24.experimentDataDir;
   __isset = other24.__isset;
 }
 ProcessModel& ProcessModel::operator=(const ProcessModel& other25) {
@@ -610,6 +630,7 @@ ProcessModel& ProcessModel::operator=(const ProcessModel& other25)
{
   storageResourceId = other25.storageResourceId;
   userDn = other25.userDn;
   generateCert = other25.generateCert;
+  experimentDataDir = other25.experimentDataDir;
   __isset = other25.__isset;
   return *this;
 }
@@ -637,6 +658,7 @@ void ProcessModel::printTo(std::ostream& out) const {
   out << ", " << "storageResourceId="; (__isset.storageResourceId ? (out <<
to_string(storageResourceId)) : (out << "<null>"));
   out << ", " << "userDn="; (__isset.userDn ? (out << to_string(userDn))
: (out << "<null>"));
   out << ", " << "generateCert="; (__isset.generateCert ? (out << to_string(generateCert))
: (out << "<null>"));
+  out << ", " << "experimentDataDir="; (__isset.experimentDataDir ? (out <<
to_string(experimentDataDir)) : (out << "<null>"));
   out << ")";
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.h
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.h
index 10515d0..efa30d1 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/process_model_types.h
@@ -44,7 +44,7 @@ namespace apache { namespace airavata { namespace model { namespace process
{
 class ProcessModel;
 
 typedef struct _ProcessModel__isset {
-  _ProcessModel__isset() : creationTime(false), lastUpdateTime(false), processStatus(false),
processDetail(false), applicationInterfaceId(false), applicationDeploymentId(false), computeResourceId(false),
processInputs(false), processOutputs(false), resourceSchedule(false), tasks(false), taskDag(false),
processError(false), gatewayExecutionId(false), enableEmailNotification(false), emailAddresses(false),
storageResourceId(false), userDn(false), generateCert(true) {}
+  _ProcessModel__isset() : creationTime(false), lastUpdateTime(false), processStatus(false),
processDetail(false), applicationInterfaceId(false), applicationDeploymentId(false), computeResourceId(false),
processInputs(false), processOutputs(false), resourceSchedule(false), tasks(false), taskDag(false),
processError(false), gatewayExecutionId(false), enableEmailNotification(false), emailAddresses(false),
storageResourceId(false), userDn(false), generateCert(true), experimentDataDir(false) {}
   bool creationTime :1;
   bool lastUpdateTime :1;
   bool processStatus :1;
@@ -64,6 +64,7 @@ typedef struct _ProcessModel__isset {
   bool storageResourceId :1;
   bool userDn :1;
   bool generateCert :1;
+  bool experimentDataDir :1;
 } _ProcessModel__isset;
 
 class ProcessModel {
@@ -71,7 +72,7 @@ class ProcessModel {
 
   ProcessModel(const ProcessModel&);
   ProcessModel& operator=(const ProcessModel&);
-  ProcessModel() : processId("DO_NOT_SET_AT_CLIENTS"), experimentId(), creationTime(0), lastUpdateTime(0),
processDetail(), applicationInterfaceId(), applicationDeploymentId(), computeResourceId(),
taskDag(), gatewayExecutionId(), enableEmailNotification(0), storageResourceId(), userDn(),
generateCert(false) {
+  ProcessModel() : processId("DO_NOT_SET_AT_CLIENTS"), experimentId(), creationTime(0), lastUpdateTime(0),
processDetail(), applicationInterfaceId(), applicationDeploymentId(), computeResourceId(),
taskDag(), gatewayExecutionId(), enableEmailNotification(0), storageResourceId(), userDn(),
generateCert(false), experimentDataDir() {
   }
 
   virtual ~ProcessModel() throw();
@@ -96,6 +97,7 @@ class ProcessModel {
   std::string storageResourceId;
   std::string userDn;
   bool generateCert;
+  std::string experimentDataDir;
 
   _ProcessModel__isset __isset;
 
@@ -141,6 +143,8 @@ class ProcessModel {
 
   void __set_generateCert(const bool val);
 
+  void __set_experimentDataDir(const std::string& val);
+
   bool operator == (const ProcessModel & rhs) const
   {
     if (!(processId == rhs.processId))
@@ -223,6 +227,10 @@ class ProcessModel {
       return false;
     else if (__isset.generateCert && !(generateCert == rhs.generateCert))
       return false;
+    if (__isset.experimentDataDir != rhs.__isset.experimentDataDir)
+      return false;
+    else if (__isset.experimentDataDir && !(experimentDataDir == rhs.experimentDataDir))
+      return false;
     return true;
   }
   bool operator != (const ProcessModel &rhs) const {

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Process/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Process/Types.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Process/Types.php
index 120c078..c0000d0 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Process/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Process/Types.php
@@ -113,6 +113,10 @@ class ProcessModel {
    * @var bool
    */
   public $generateCert = false;
+  /**
+   * @var string
+   */
+  public $experimentDataDir = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -223,6 +227,10 @@ class ProcessModel {
           'var' => 'generateCert',
           'type' => TType::BOOL,
           ),
+        22 => array(
+          'var' => 'experimentDataDir',
+          'type' => TType::STRING,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -289,6 +297,9 @@ class ProcessModel {
       if (isset($vals['generateCert'])) {
         $this->generateCert = $vals['generateCert'];
       }
+      if (isset($vals['experimentDataDir'])) {
+        $this->experimentDataDir = $vals['experimentDataDir'];
+      }
     }
   }
 
@@ -504,6 +515,13 @@ class ProcessModel {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 22:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->experimentDataDir);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -679,6 +697,11 @@ class ProcessModel {
       $xfer += $output->writeBool($this->generateCert);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->experimentDataDir !== null) {
+      $xfer += $output->writeFieldBegin('experimentDataDir', TType::STRING, 22);
+      $xfer += $output->writeString($this->experimentDataDir);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/process/ttypes.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/process/ttypes.py
b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/process/ttypes.py
index 802d6a7..7355759 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/process/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/process/ttypes.py
@@ -55,6 +55,7 @@ class ProcessModel:
    - storageResourceId
    - userDn
    - generateCert
+   - experimentDataDir
   """
 
   thrift_spec = (
@@ -80,9 +81,10 @@ class ProcessModel:
     (19, TType.STRING, 'storageResourceId', None, None, ), # 19
     (20, TType.STRING, 'userDn', None, None, ), # 20
     (21, TType.BOOL, 'generateCert', None, False, ), # 21
+    (22, TType.STRING, 'experimentDataDir', None, None, ), # 22
   )
 
-  def __init__(self, processId=thrift_spec[1][4], experimentId=None, creationTime=None, lastUpdateTime=None,
processStatus=None, processDetail=None, applicationInterfaceId=None, applicationDeploymentId=None,
computeResourceId=None, processInputs=None, processOutputs=None, resourceSchedule=None, tasks=None,
taskDag=None, processError=None, gatewayExecutionId=None, enableEmailNotification=None, emailAddresses=None,
storageResourceId=None, userDn=None, generateCert=thrift_spec[21][4],):
+  def __init__(self, processId=thrift_spec[1][4], experimentId=None, creationTime=None, lastUpdateTime=None,
processStatus=None, processDetail=None, applicationInterfaceId=None, applicationDeploymentId=None,
computeResourceId=None, processInputs=None, processOutputs=None, resourceSchedule=None, tasks=None,
taskDag=None, processError=None, gatewayExecutionId=None, enableEmailNotification=None, emailAddresses=None,
storageResourceId=None, userDn=None, generateCert=thrift_spec[21][4], experimentDataDir=None,):
     self.processId = processId
     self.experimentId = experimentId
     self.creationTime = creationTime
@@ -104,6 +106,7 @@ class ProcessModel:
     self.storageResourceId = storageResourceId
     self.userDn = userDn
     self.generateCert = generateCert
+    self.experimentDataDir = experimentDataDir
 
   def read(self, iprot):
     if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -245,6 +248,11 @@ class ProcessModel:
           self.generateCert = iprot.readBool()
         else:
           iprot.skip(ftype)
+      elif fid == 22:
+        if ftype == TType.STRING:
+          self.experimentDataDir = iprot.readString()
+        else:
+          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -351,6 +359,10 @@ class ProcessModel:
       oprot.writeFieldBegin('generateCert', TType.BOOL, 21)
       oprot.writeBool(self.generateCert)
       oprot.writeFieldEnd()
+    if self.experimentDataDir is not None:
+      oprot.writeFieldBegin('experimentDataDir', TType.STRING, 22)
+      oprot.writeString(self.experimentDataDir)
+      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 
@@ -385,6 +397,7 @@ class ProcessModel:
     value = (value * 31) ^ hash(self.storageResourceId)
     value = (value * 31) ^ hash(self.userDn)
     value = (value * 31) ^ hash(self.generateCert)
+    value = (value * 31) ^ hash(self.experimentDataDir)
     return value
 
   def __repr__(self):

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
index 232d45c..ebd4158 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
@@ -85,6 +85,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
   private static final org.apache.thrift.protocol.TField STORAGE_RESOURCE_ID_FIELD_DESC =
new org.apache.thrift.protocol.TField("storageResourceId", org.apache.thrift.protocol.TType.STRING,
(short)19);
   private static final org.apache.thrift.protocol.TField USER_DN_FIELD_DESC = new org.apache.thrift.protocol.TField("userDn",
org.apache.thrift.protocol.TType.STRING, (short)20);
   private static final org.apache.thrift.protocol.TField GENERATE_CERT_FIELD_DESC = new org.apache.thrift.protocol.TField("generateCert",
org.apache.thrift.protocol.TType.BOOL, (short)21);
+  private static final org.apache.thrift.protocol.TField EXPERIMENT_DATA_DIR_FIELD_DESC =
new org.apache.thrift.protocol.TField("experimentDataDir", org.apache.thrift.protocol.TType.STRING,
(short)22);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -113,6 +114,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
   private String storageResourceId; // optional
   private String userDn; // optional
   private boolean generateCert; // optional
+  private String experimentDataDir; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -136,7 +138,8 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
     EMAIL_ADDRESSES((short)18, "emailAddresses"),
     STORAGE_RESOURCE_ID((short)19, "storageResourceId"),
     USER_DN((short)20, "userDn"),
-    GENERATE_CERT((short)21, "generateCert");
+    GENERATE_CERT((short)21, "generateCert"),
+    EXPERIMENT_DATA_DIR((short)22, "experimentDataDir");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -193,6 +196,8 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
           return USER_DN;
         case 21: // GENERATE_CERT
           return GENERATE_CERT;
+        case 22: // EXPERIMENT_DATA_DIR
+          return EXPERIMENT_DATA_DIR;
         default:
           return null;
       }
@@ -238,7 +243,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
   private static final int __ENABLEEMAILNOTIFICATION_ISSET_ID = 2;
   private static final int __GENERATECERT_ISSET_ID = 3;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.LAST_UPDATE_TIME,_Fields.PROCESS_STATUS,_Fields.PROCESS_DETAIL,_Fields.APPLICATION_INTERFACE_ID,_Fields.APPLICATION_DEPLOYMENT_ID,_Fields.COMPUTE_RESOURCE_ID,_Fields.PROCESS_INPUTS,_Fields.PROCESS_OUTPUTS,_Fields.RESOURCE_SCHEDULE,_Fields.TASKS,_Fields.TASK_DAG,_Fields.PROCESS_ERROR,_Fields.GATEWAY_EXECUTION_ID,_Fields.ENABLE_EMAIL_NOTIFICATION,_Fields.EMAIL_ADDRESSES,_Fields.STORAGE_RESOURCE_ID,_Fields.USER_DN,_Fields.GENERATE_CERT};
+  private static final _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.LAST_UPDATE_TIME,_Fields.PROCESS_STATUS,_Fields.PROCESS_DETAIL,_Fields.APPLICATION_INTERFACE_ID,_Fields.APPLICATION_DEPLOYMENT_ID,_Fields.COMPUTE_RESOURCE_ID,_Fields.PROCESS_INPUTS,_Fields.PROCESS_OUTPUTS,_Fields.RESOURCE_SCHEDULE,_Fields.TASKS,_Fields.TASK_DAG,_Fields.PROCESS_ERROR,_Fields.GATEWAY_EXECUTION_ID,_Fields.ENABLE_EMAIL_NOTIFICATION,_Fields.EMAIL_ADDRESSES,_Fields.STORAGE_RESOURCE_ID,_Fields.USER_DN,_Fields.GENERATE_CERT,_Fields.EXPERIMENT_DATA_DIR};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -288,6 +293,8 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.GENERATE_CERT, new org.apache.thrift.meta_data.FieldMetaData("generateCert",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.EXPERIMENT_DATA_DIR, new org.apache.thrift.meta_data.FieldMetaData("experimentDataDir",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ProcessModel.class, metaDataMap);
   }
@@ -381,6 +388,9 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
       this.userDn = other.userDn;
     }
     this.generateCert = other.generateCert;
+    if (other.isSetExperimentDataDir()) {
+      this.experimentDataDir = other.experimentDataDir;
+    }
   }
 
   public ProcessModel deepCopy() {
@@ -415,6 +425,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
     this.userDn = null;
     this.generateCert = false;
 
+    this.experimentDataDir = null;
   }
 
   public String getProcessId() {
@@ -956,6 +967,29 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GENERATECERT_ISSET_ID, value);
   }
 
+  public String getExperimentDataDir() {
+    return this.experimentDataDir;
+  }
+
+  public void setExperimentDataDir(String experimentDataDir) {
+    this.experimentDataDir = experimentDataDir;
+  }
+
+  public void unsetExperimentDataDir() {
+    this.experimentDataDir = null;
+  }
+
+  /** Returns true if field experimentDataDir is set (has been assigned a value) and false
otherwise */
+  public boolean isSetExperimentDataDir() {
+    return this.experimentDataDir != null;
+  }
+
+  public void setExperimentDataDirIsSet(boolean value) {
+    if (!value) {
+      this.experimentDataDir = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case PROCESS_ID:
@@ -1126,6 +1160,14 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
       }
       break;
 
+    case EXPERIMENT_DATA_DIR:
+      if (value == null) {
+        unsetExperimentDataDir();
+      } else {
+        setExperimentDataDir((String)value);
+      }
+      break;
+
     }
   }
 
@@ -1194,6 +1236,9 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
     case GENERATE_CERT:
       return isGenerateCert();
 
+    case EXPERIMENT_DATA_DIR:
+      return getExperimentDataDir();
+
     }
     throw new IllegalStateException();
   }
@@ -1247,6 +1292,8 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
       return isSetUserDn();
     case GENERATE_CERT:
       return isSetGenerateCert();
+    case EXPERIMENT_DATA_DIR:
+      return isSetExperimentDataDir();
     }
     throw new IllegalStateException();
   }
@@ -1453,6 +1500,15 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
         return false;
     }
 
+    boolean this_present_experimentDataDir = true && this.isSetExperimentDataDir();
+    boolean that_present_experimentDataDir = true && that.isSetExperimentDataDir();
+    if (this_present_experimentDataDir || that_present_experimentDataDir) {
+      if (!(this_present_experimentDataDir && that_present_experimentDataDir))
+        return false;
+      if (!this.experimentDataDir.equals(that.experimentDataDir))
+        return false;
+    }
+
     return true;
   }
 
@@ -1565,6 +1621,11 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
     if (present_generateCert)
       list.add(generateCert);
 
+    boolean present_experimentDataDir = true && (isSetExperimentDataDir());
+    list.add(present_experimentDataDir);
+    if (present_experimentDataDir)
+      list.add(experimentDataDir);
+
     return list.hashCode();
   }
 
@@ -1786,6 +1847,16 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetExperimentDataDir()).compareTo(other.isSetExperimentDataDir());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetExperimentDataDir()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentDataDir, other.experimentDataDir);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -1995,6 +2066,16 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
       sb.append(this.generateCert);
       first = false;
     }
+    if (isSetExperimentDataDir()) {
+      if (!first) sb.append(", ");
+      sb.append("experimentDataDir:");
+      if (this.experimentDataDir == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.experimentDataDir);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -2271,6 +2352,14 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 22: // EXPERIMENT_DATA_DIR
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.experimentDataDir = iprot.readString();
+              struct.setExperimentDataDirIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -2447,6 +2536,13 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
         oprot.writeBool(struct.generateCert);
         oprot.writeFieldEnd();
       }
+      if (struct.experimentDataDir != null) {
+        if (struct.isSetExperimentDataDir()) {
+          oprot.writeFieldBegin(EXPERIMENT_DATA_DIR_FIELD_DESC);
+          oprot.writeString(struct.experimentDataDir);
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -2524,7 +2620,10 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
       if (struct.isSetGenerateCert()) {
         optionals.set(18);
       }
-      oprot.writeBitSet(optionals, 19);
+      if (struct.isSetExperimentDataDir()) {
+        optionals.set(19);
+      }
+      oprot.writeBitSet(optionals, 20);
       if (struct.isSetCreationTime()) {
         oprot.writeI64(struct.creationTime);
       }
@@ -2606,6 +2705,9 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
       if (struct.isSetGenerateCert()) {
         oprot.writeBool(struct.generateCert);
       }
+      if (struct.isSetExperimentDataDir()) {
+        oprot.writeString(struct.experimentDataDir);
+      }
     }
 
     @Override
@@ -2615,7 +2717,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
       struct.setProcessIdIsSet(true);
       struct.experimentId = iprot.readString();
       struct.setExperimentIdIsSet(true);
-      BitSet incoming = iprot.readBitSet(19);
+      BitSet incoming = iprot.readBitSet(20);
       if (incoming.get(0)) {
         struct.creationTime = iprot.readI64();
         struct.setCreationTimeIsSet(true);
@@ -2734,6 +2836,10 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel,
Proce
         struct.generateCert = iprot.readBool();
         struct.setGenerateCertIsSet(true);
       }
+      if (incoming.get(19)) {
+        struct.experimentDataDir = iprot.readString();
+        struct.setExperimentDataDirIsSet(true);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
index a908b99..502c8ce 100644
--- a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
+++ b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
@@ -98,6 +98,7 @@ public class ExperimentModelUtil {
         UserConfigurationDataModel configData = experiment.getUserConfigurationData();
         if (configData != null){
             processModel.setStorageResourceId(configData.getStorageId());
+            processModel.setExperimentDataDir(configData.getExperimentDataDir());
             processModel.setGenerateCert(configData.isGenerateCert());
             processModel.setUserDn(configData.getUserDN());
             ComputationalResourceSchedulingModel scheduling = configData.getComputationalResourceScheduling();

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
index 5437717..ac001ca 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
@@ -292,8 +292,21 @@ public class SCPDataStageTask implements Task {
     }
 
     public URI getDestinationURI(TaskContext taskContext, String fileName) throws URISyntaxException
{
-        String filePath = (inputPath.endsWith(File.separator) ? inputPath : inputPath + File.separator)
+
-                taskContext.getParentProcessContext().getProcessId() + File.separator + fileName;
+        String experimentDataDir = taskContext.getParentProcessContext().getProcessModel().getExperimentDataDir();
+        String filePath;
+        if(experimentDataDir != null && !experimentDataDir.isEmpty()) {
+            if(experimentDataDir.startsWith(File.separator)){
+                experimentDataDir = experimentDataDir.substring(1);
+            }
+            if(!experimentDataDir.endsWith(File.separator)){
+                experimentDataDir += File.separator;
+            }
+           filePath = (inputPath.endsWith(File.separator) ? inputPath : inputPath + File.separator)
+ experimentDataDir +
+                    taskContext.getParentProcessContext().getProcessId() + File.separator
+ fileName;
+        } else {
+           filePath =(inputPath.endsWith(File.separator) ? inputPath : inputPath + File.separator)
+
+                    taskContext.getParentProcessContext().getProcessId() + File.separator
+ fileName;
+        }
         return new URI("SCP", hostName, filePath, null);
 
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
index 24ffa5f..ee0f18a 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
@@ -278,6 +278,7 @@ public class ExperimentRegistry {
             processResource.setStorageResourceId(process.getStorageResourceId());
             processResource.setUserDn(process.getUserDn());
             processResource.setGenerateCert(process.isGenerateCert());
+            processResource.setExperimentDataDir(process.getExperimentDataDir());
             if(process.isEnableEmailNotification()){
                 processResource.setEnableEmailNotification(true);
                 if(process.getEmailAddresses() != null){
@@ -730,6 +731,7 @@ public class ExperimentRegistry {
             processResource.setStorageResourceId(process.getStorageResourceId());
             processResource.setUserDn(process.getUserDn());
             processResource.setGenerateCert(process.isGenerateCert());
+            processResource.setExperimentDataDir(process.getExperimentDataDir());
             if(process.isEnableEmailNotification()){
                 processResource.setEnableEmailNotification(true);
                 if(process.getEmailAddresses() != null){

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
index d6a83b4..222ae03 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
@@ -44,6 +44,7 @@ public class Process {
     private boolean enableEmailNotification;
     private String emailAddresses;
     private String storageId;
+    private String experimentDataDir;
     private Experiment experiment;
     private Collection<ProcessError> processErrors;
     private Collection<ProcessInput> processInputs;
@@ -193,6 +194,15 @@ public class Process {
         this.generateCert = generateCert;
     }
 
+    @Column(name = "EXPERIMENT_DATA_DIR")
+    public String getExperimentDataDir() {
+        return experimentDataDir;
+    }
+
+    public void setExperimentDataDir(String experimentDataDir) {
+        this.experimentDataDir = experimentDataDir;
+    }
+
 //    @Override
 //    public boolean equals(Object o) {
 //        if (this == o) return true;

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
index 2934552..e1720de 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
@@ -55,6 +55,7 @@ public class ProcessResource extends AbstractExpCatResource {
     private String storageResourceId;
     private String userDn;
     private boolean generateCert;
+    private String experimentDataDir;
 
     public String getProcessId() {
         return processId;
@@ -176,6 +177,14 @@ public class ProcessResource extends AbstractExpCatResource {
         this.generateCert = generateCert;
     }
 
+    public String getExperimentDataDir() {
+        return experimentDataDir;
+    }
+
+    public void setExperimentDataDir(String experimentDataDir) {
+        this.experimentDataDir = experimentDataDir;
+    }
+
     public ExperimentCatResource create(ResourceType type) throws RegistryException{
        switch (type){
            case PROCESS_ERROR:
@@ -580,6 +589,7 @@ public class ProcessResource extends AbstractExpCatResource {
             process.setStorageId(storageResourceId);
             process.setUserDn(userDn);
             process.setGenerateCert(generateCert);
+            process.setExperimentDataDir(experimentDataDir);
             if (existingProcess == null){
                 em.persist(process);
             }else {

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
index dc9bfde..1ecc37b 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
@@ -349,6 +349,7 @@ public class ThriftDataModelConversion {
             processModel.setApplicationDeploymentId(processResource.getApplicationDeploymentId());
             processModel.setComputeResourceId(processResource.getComputeResourceId());
             processModel.setEnableEmailNotification(processResource.getEnableEmailNotification());
+            processModel.setExperimentDataDir(processResource.getExperimentDataDir());
             if (processModel.isEnableEmailNotification()){
                 String notificationEmails = processResource.getEmailAddresses();
                 processModel.setEmailAddresses(getEmailAddresses(notificationEmails.split(",")));

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
index 603c921..c395b94 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
@@ -192,6 +192,7 @@ CREATE TABLE PROCESS (
   STORAGE_RESOURCE_ID varchar(255),
   USER_DN varchar(255),
   GENERATE_CERT SMALLINT,
+  EXPERIMENT_DATA_DIR VARCHAR (512),
   PRIMARY KEY (PROCESS_ID),
   FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
 );

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
index 1bb170a..b3dcf43 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
@@ -196,6 +196,7 @@ CREATE TABLE PROCESS (
   STORAGE_RESOURCE_ID varchar(255),
   USER_DN varchar(255),
   GENERATE_CERT SMALLINT,
+  EXPERIMENT_DATA_DIR VARCHAR (512),
   PRIMARY KEY (PROCESS_ID),
   FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
 );

http://git-wip-us.apache.org/repos/asf/airavata/blob/2fe5278f/thrift-interface-descriptions/data-models/experiment-catalog-models/process_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/experiment-catalog-models/process_model.thrift
b/thrift-interface-descriptions/data-models/experiment-catalog-models/process_model.thrift
index 66c5f93..d46a7f4 100644
--- a/thrift-interface-descriptions/data-models/experiment-catalog-models/process_model.thrift
+++ b/thrift-interface-descriptions/data-models/experiment-catalog-models/process_model.thrift
@@ -60,5 +60,6 @@ struct ProcessModel {
     18: optional list<string> emailAddresses,
     19: optional string storageResourceId,
     20: optional string userDn,
-    21: optional bool generateCert = 0
+    21: optional bool generateCert = 0,
+    22: optional string experimentDataDir
 }
\ No newline at end of file


Mime
View raw message