airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [1/3] airavata git commit: AIRAVATA-2113. Fixing local provider
Date Wed, 12 Oct 2016 19:37:40 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 7c6c56253 -> 6250ff1dc


AIRAVATA-2113. Fixing local provider


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

Branch: refs/heads/develop
Commit: 8f91bdee95c0b27825fe9f59d72a48dad1168149
Parents: 1f48ce3
Author: Ajinkya Dhamnaskar <adhamnas@umail.iu.edu>
Authored: Tue Oct 4 14:58:44 2016 -0400
Committer: Ajinkya Dhamnaskar <adhamnas@umail.iu.edu>
Committed: Tue Oct 4 14:58:44 2016 -0400

----------------------------------------------------------------------
 .../airavata/compute_resource_model_types.cpp   |  28 ++--
 .../lib/airavata/compute_resource_model_types.h |  13 +-
 .../Model/AppCatalog/ComputeResource/Types.php  |   2 +
 .../model/appcatalog/computeresource/ttypes.py  |   5 +
 .../computeresource/LOCALSubmission.java        |  53 +++----
 .../appcatalog/computeresource/MonitorMode.java |   5 +-
 .../server/src/main/resources/gfac-config.yaml  |   4 +-
 .../airavata/gfac/impl/GFacEngineImpl.java      |  11 +-
 .../airavata/gfac/impl/LocalRemoteCluster.java  |  42 +++++-
 .../gfac/impl/task/LocalJobSubmissionTask.java  | 150 ++++++++++---------
 .../airavata/gfac/impl/task/TaskUtils.java      |   2 +-
 .../cpi/impl/SimpleOrchestratorImpl.java        |  14 +-
 .../app/catalog/impl/ComputeResourceImpl.java   |   1 +
 .../core/app/catalog/model/LocalSubmission.java |  11 ++
 .../resources/LocalSubmissionResource.java      |  12 +-
 .../app/catalog/util/AppCatalogJPAUtils.java    |   1 +
 .../util/AppCatalogThriftConversion.java        |   1 +
 .../src/main/resources/appcatalog-derby.sql     |   1 +
 .../src/main/resources/appcatalog-mysql.sql     |   1 +
 .../compute_resource_model.thrift               |   5 +-
 20 files changed, 223 insertions(+), 139 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp
index 650bcac..d1f0f20 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp
@@ -106,15 +106,17 @@ int _kMonitorModeValues[] = {
   MonitorMode::POLL_JOB_MANAGER,
   MonitorMode::JOB_EMAIL_NOTIFICATION_MONITOR,
   MonitorMode::XSEDE_AMQP_SUBSCRIBE,
-  MonitorMode::FORK
+  MonitorMode::FORK,
+  MonitorMode::LOCAL
 };
 const char* _kMonitorModeNames[] = {
   "POLL_JOB_MANAGER",
   "JOB_EMAIL_NOTIFICATION_MONITOR",
   "XSEDE_AMQP_SUBSCRIBE",
-  "FORK"
+  "FORK",
+  "LOCAL"
 };
-const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kMonitorModeValues, _kMonitorModeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kMonitorModeValues, _kMonitorModeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
 int _kDMTypeValues[] = {
   DMType::COMPUTE_RESOURCE,
@@ -628,7 +630,6 @@ void LOCALSubmission::__set_resourceJobManager(const ResourceJobManager& val) {
 
 void LOCALSubmission::__set_securityProtocol(const  ::apache::airavata::model::data::movement::SecurityProtocol::type val) {
   this->securityProtocol = val;
-__isset.securityProtocol = true;
 }
 
 uint32_t LOCALSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -645,6 +646,7 @@ uint32_t LOCALSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   bool isset_jobSubmissionInterfaceId = false;
   bool isset_resourceJobManager = false;
+  bool isset_securityProtocol = false;
 
   while (true)
   {
@@ -675,7 +677,7 @@ uint32_t LOCALSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
           int32_t ecast23;
           xfer += iprot->readI32(ecast23);
           this->securityProtocol = ( ::apache::airavata::model::data::movement::SecurityProtocol::type)ecast23;
-          this->__isset.securityProtocol = true;
+          isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
         }
@@ -693,6 +695,8 @@ uint32_t LOCALSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_resourceJobManager)
     throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_securityProtocol)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
 
@@ -709,11 +713,10 @@ uint32_t LOCALSubmission::write(::apache::thrift::protocol::TProtocol* oprot) co
   xfer += this->resourceJobManager.write(oprot);
   xfer += oprot->writeFieldEnd();
 
-  if (this->__isset.securityProtocol) {
-    xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 3);
-    xfer += oprot->writeI32((int32_t)this->securityProtocol);
-    xfer += oprot->writeFieldEnd();
-  }
+  xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 3);
+  xfer += oprot->writeI32((int32_t)this->securityProtocol);
+  xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -724,20 +727,17 @@ void swap(LOCALSubmission &a, LOCALSubmission &b) {
   swap(a.jobSubmissionInterfaceId, b.jobSubmissionInterfaceId);
   swap(a.resourceJobManager, b.resourceJobManager);
   swap(a.securityProtocol, b.securityProtocol);
-  swap(a.__isset, b.__isset);
 }
 
 LOCALSubmission::LOCALSubmission(const LOCALSubmission& other24) {
   jobSubmissionInterfaceId = other24.jobSubmissionInterfaceId;
   resourceJobManager = other24.resourceJobManager;
   securityProtocol = other24.securityProtocol;
-  __isset = other24.__isset;
 }
 LOCALSubmission& LOCALSubmission::operator=(const LOCALSubmission& other25) {
   jobSubmissionInterfaceId = other25.jobSubmissionInterfaceId;
   resourceJobManager = other25.resourceJobManager;
   securityProtocol = other25.securityProtocol;
-  __isset = other25.__isset;
   return *this;
 }
 void LOCALSubmission::printTo(std::ostream& out) const {
@@ -745,7 +745,7 @@ void LOCALSubmission::printTo(std::ostream& out) const {
   out << "LOCALSubmission(";
   out << "jobSubmissionInterfaceId=" << to_string(jobSubmissionInterfaceId);
   out << ", " << "resourceJobManager=" << to_string(resourceJobManager);
-  out << ", " << "securityProtocol="; (__isset.securityProtocol ? (out << to_string(securityProtocol)) : (out << "<null>"));
+  out << ", " << "securityProtocol=" << to_string(securityProtocol);
   out << ")";
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h
index f18dcd6..463c246 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.h
@@ -96,7 +96,8 @@ struct MonitorMode {
     POLL_JOB_MANAGER = 0,
     JOB_EMAIL_NOTIFICATION_MONITOR = 1,
     XSEDE_AMQP_SUBSCRIBE = 2,
-    FORK = 3
+    FORK = 3,
+    LOCAL = 4
   };
 };
 
@@ -314,10 +315,6 @@ inline std::ostream& operator<<(std::ostream& out, const BatchQueue& obj)
   return out;
 }
 
-typedef struct _LOCALSubmission__isset {
-  _LOCALSubmission__isset() : securityProtocol(false) {}
-  bool securityProtocol :1;
-} _LOCALSubmission__isset;
 
 class LOCALSubmission {
  public:
@@ -332,8 +329,6 @@ class LOCALSubmission {
   ResourceJobManager resourceJobManager;
    ::apache::airavata::model::data::movement::SecurityProtocol::type securityProtocol;
 
-  _LOCALSubmission__isset __isset;
-
   void __set_jobSubmissionInterfaceId(const std::string& val);
 
   void __set_resourceJobManager(const ResourceJobManager& val);
@@ -346,9 +341,7 @@ class LOCALSubmission {
       return false;
     if (!(resourceJobManager == rhs.resourceJobManager))
       return false;
-    if (__isset.securityProtocol != rhs.__isset.securityProtocol)
-      return false;
-    else if (__isset.securityProtocol && !(securityProtocol == rhs.securityProtocol))
+    if (!(securityProtocol == rhs.securityProtocol))
       return false;
     return true;
   }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
index 49fdf5a..c96c05f 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
@@ -174,11 +174,13 @@ final class MonitorMode {
   const JOB_EMAIL_NOTIFICATION_MONITOR = 1;
   const XSEDE_AMQP_SUBSCRIBE = 2;
   const FORK = 3;
+  const LOCAL = 4;
   static public $__names = array(
     0 => 'POLL_JOB_MANAGER',
     1 => 'JOB_EMAIL_NOTIFICATION_MONITOR',
     2 => 'XSEDE_AMQP_SUBSCRIBE',
     3 => 'FORK',
+    4 => 'LOCAL',
   );
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/computeresource/ttypes.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/computeresource/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/computeresource/ttypes.py
index e129db4..71b7322 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/computeresource/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/computeresource/ttypes.py
@@ -213,12 +213,14 @@ class MonitorMode:
   JOB_EMAIL_NOTIFICATION_MONITOR = 1
   XSEDE_AMQP_SUBSCRIBE = 2
   FORK = 3
+  LOCAL = 4
 
   _VALUES_TO_NAMES = {
     0: "POLL_JOB_MANAGER",
     1: "JOB_EMAIL_NOTIFICATION_MONITOR",
     2: "XSEDE_AMQP_SUBSCRIBE",
     3: "FORK",
+    4: "LOCAL",
   }
 
   _NAMES_TO_VALUES = {
@@ -226,6 +228,7 @@ class MonitorMode:
     "JOB_EMAIL_NOTIFICATION_MONITOR": 1,
     "XSEDE_AMQP_SUBSCRIBE": 2,
     "FORK": 3,
+    "LOCAL": 4,
   }
 
 class DMType:
@@ -667,6 +670,8 @@ class LOCALSubmission:
       raise TProtocol.TProtocolException(message='Required field jobSubmissionInterfaceId is unset!')
     if self.resourceJobManager is None:
       raise TProtocol.TProtocolException(message='Required field resourceJobManager is unset!')
+    if self.securityProtocol is None:
+      raise TProtocol.TProtocolException(message='Required field securityProtocol is unset!')
     return
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java
index 6a08e19..907f427 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java
@@ -76,7 +76,7 @@ public class LOCALSubmission implements org.apache.thrift.TBase<LOCALSubmission,
 
   private String jobSubmissionInterfaceId; // required
   private ResourceJobManager resourceJobManager; // required
-  private org.apache.airavata.model.data.movement.SecurityProtocol securityProtocol; // optional
+  private org.apache.airavata.model.data.movement.SecurityProtocol securityProtocol; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -147,7 +147,6 @@ public class LOCALSubmission implements org.apache.thrift.TBase<LOCALSubmission,
   }
 
   // isset id assignments
-  private static final _Fields optionals[] = {_Fields.SECURITY_PROTOCOL};
   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);
@@ -155,7 +154,7 @@ public class LOCALSubmission implements org.apache.thrift.TBase<LOCALSubmission,
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ResourceJobManager.class)));
-    tmpMap.put(_Fields.SECURITY_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("securityProtocol", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+    tmpMap.put(_Fields.SECURITY_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("securityProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.data.movement.SecurityProtocol.class)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LOCALSubmission.class, metaDataMap);
@@ -168,11 +167,13 @@ public class LOCALSubmission implements org.apache.thrift.TBase<LOCALSubmission,
 
   public LOCALSubmission(
     String jobSubmissionInterfaceId,
-    ResourceJobManager resourceJobManager)
+    ResourceJobManager resourceJobManager,
+    org.apache.airavata.model.data.movement.SecurityProtocol securityProtocol)
   {
     this();
     this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
     this.resourceJobManager = resourceJobManager;
+    this.securityProtocol = securityProtocol;
   }
 
   /**
@@ -478,16 +479,14 @@ public class LOCALSubmission implements org.apache.thrift.TBase<LOCALSubmission,
       sb.append(this.resourceJobManager);
     }
     first = false;
-    if (isSetSecurityProtocol()) {
-      if (!first) sb.append(", ");
-      sb.append("securityProtocol:");
-      if (this.securityProtocol == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.securityProtocol);
-      }
-      first = false;
+    if (!first) sb.append(", ");
+    sb.append("securityProtocol:");
+    if (this.securityProtocol == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.securityProtocol);
     }
+    first = false;
     sb.append(")");
     return sb.toString();
   }
@@ -502,6 +501,10 @@ public class LOCALSubmission implements org.apache.thrift.TBase<LOCALSubmission,
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceJobManager' is unset! Struct:" + toString());
     }
 
+    if (!isSetSecurityProtocol()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'securityProtocol' is unset! Struct:" + toString());
+    }
+
     // check for sub-struct validity
     if (resourceJobManager != null) {
       resourceJobManager.validate();
@@ -591,11 +594,9 @@ public class LOCALSubmission implements org.apache.thrift.TBase<LOCALSubmission,
         oprot.writeFieldEnd();
       }
       if (struct.securityProtocol != null) {
-        if (struct.isSetSecurityProtocol()) {
-          oprot.writeFieldBegin(SECURITY_PROTOCOL_FIELD_DESC);
-          oprot.writeI32(struct.securityProtocol.getValue());
-          oprot.writeFieldEnd();
-        }
+        oprot.writeFieldBegin(SECURITY_PROTOCOL_FIELD_DESC);
+        oprot.writeI32(struct.securityProtocol.getValue());
+        oprot.writeFieldEnd();
       }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
@@ -616,14 +617,7 @@ public class LOCALSubmission implements org.apache.thrift.TBase<LOCALSubmission,
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeString(struct.jobSubmissionInterfaceId);
       struct.resourceJobManager.write(oprot);
-      BitSet optionals = new BitSet();
-      if (struct.isSetSecurityProtocol()) {
-        optionals.set(0);
-      }
-      oprot.writeBitSet(optionals, 1);
-      if (struct.isSetSecurityProtocol()) {
-        oprot.writeI32(struct.securityProtocol.getValue());
-      }
+      oprot.writeI32(struct.securityProtocol.getValue());
     }
 
     @Override
@@ -634,11 +628,8 @@ public class LOCALSubmission implements org.apache.thrift.TBase<LOCALSubmission,
       struct.resourceJobManager = new ResourceJobManager();
       struct.resourceJobManager.read(iprot);
       struct.setResourceJobManagerIsSet(true);
-      BitSet incoming = iprot.readBitSet(1);
-      if (incoming.get(0)) {
-        struct.securityProtocol = org.apache.airavata.model.data.movement.SecurityProtocol.findByValue(iprot.readI32());
-        struct.setSecurityProtocolIsSet(true);
-      }
+      struct.securityProtocol = org.apache.airavata.model.data.movement.SecurityProtocol.findByValue(iprot.readI32());
+      struct.setSecurityProtocolIsSet(true);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
index b0d303a..2aeba80 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
@@ -43,7 +43,8 @@ public enum MonitorMode implements org.apache.thrift.TEnum {
   POLL_JOB_MANAGER(0),
   JOB_EMAIL_NOTIFICATION_MONITOR(1),
   XSEDE_AMQP_SUBSCRIBE(2),
-  FORK(3);
+  FORK(3),
+  LOCAL(4);
 
   private final int value;
 
@@ -72,6 +73,8 @@ public enum MonitorMode implements org.apache.thrift.TEnum {
         return XSEDE_AMQP_SUBSCRIBE;
       case 3:
         return FORK;
+      case 4:
+        return LOCAL;
       default:
         return null;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/configuration/server/src/main/resources/gfac-config.yaml
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/gfac-config.yaml b/modules/configuration/server/src/main/resources/gfac-config.yaml
index 206903c..802d1e5 100644
--- a/modules/configuration/server/src/main/resources/gfac-config.yaml
+++ b/modules/configuration/server/src/main/resources/gfac-config.yaml
@@ -32,7 +32,7 @@ jobSubmitters:
     taskClass: org.apache.airavata.gfac.impl.task.ForkJobSubmissionTask
 
   - submissionProtocol: LOCAL
-    taskClass: org.apache.airavata.gfac.impl.task.DefaultJobSubmissionTask
+    taskClass: org.apache.airavata.gfac.impl.task.LocalJobSubmissionTask
 
 
 # Following job subbmitters are not yet implemented.
@@ -49,6 +49,8 @@ commonTasks:
 fileTransferTasks:
   - transferProtocol: SCP
     taskClass: org.apache.airavata.gfac.impl.task.SCPDataStageTask
+  - transferProtocol: LOCAL
+    taskClass: org.apache.airavata.gfac.impl.task.SCPDataStageTask
 
 # If your client doen't run the same instance where airavata server is running then you need to comment above
 # DataStageTask and uncomment SCPDataStageTask. To work with SCPDataStageTask, you either need to

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
index 51a97c1..90e3aca 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
@@ -493,7 +493,8 @@ public class GFacEngineImpl implements GFacEngine {
         try {
             EnvironmentSetupTaskModel subTaskModel = (EnvironmentSetupTaskModel) taskContext.getSubTaskModel();
             Task envSetupTask = null;
-            if (subTaskModel.getProtocol() == SecurityProtocol.SSH_KEYS) {
+            if (subTaskModel.getProtocol() == SecurityProtocol.SSH_KEYS ||
+                    subTaskModel.getProtocol() == SecurityProtocol.LOCAL) {
                 envSetupTask = new EnvironmentSetupTask();
             } else {
                 throw new GFacException("Unsupported security protocol, Airavata doesn't support " +
@@ -539,6 +540,10 @@ public class GFacEngineImpl implements GFacEngine {
         ProcessContext processContext = taskContext.getParentProcessContext();
         // handle URI_COLLECTION input data type
         Task dMoveTask = Factory.getDataMovementTask(processContext.getDataMovementProtocol());
+        if(null == dMoveTask){
+            throw new GFacException("Unsupported security protocol, Airavata doesn't support " +
+                    processContext.getDataMovementProtocol() + " protocol yet.");
+        }
         if (taskContext.getProcessInput().getType() == DataType.URI_COLLECTION) {
             String values = taskContext.getProcessInput().getValue();
             String[] multiple_inputs = values.split(GFacConstants.MULTIPLE_INPUTS_SPLITTER);
@@ -709,6 +714,10 @@ public class GFacEngineImpl implements GFacEngine {
         } else {
             dMoveTask = Factory.getDataMovementTask(processContext.getDataMovementProtocol());
         }
+        if(null == dMoveTask){
+            throw new GFacException("Unsupported security protocol, Airavata doesn't support " +
+                    processContext.getDataMovementProtocol() + " protocol yet.");
+        }
         taskStatus = executeTask(taskContext, dMoveTask, recovery);
         taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
         taskContext.setTaskStatus(taskStatus);

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/LocalRemoteCluster.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/LocalRemoteCluster.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/LocalRemoteCluster.java
index 178238d..9294470 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/LocalRemoteCluster.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/LocalRemoteCluster.java
@@ -20,13 +20,17 @@
  */
 package org.apache.airavata.gfac.impl;
 
+import com.jcraft.jsch.JSchException;
 import com.jcraft.jsch.Session;
+import org.apache.airavata.common.exception.AiravataException;
 import org.apache.airavata.gfac.core.JobManagerConfiguration;
 import org.apache.airavata.gfac.core.SSHApiException;
 import org.apache.airavata.gfac.core.authentication.AuthenticationInfo;
 import org.apache.airavata.gfac.core.authentication.SSHKeyAuthentication;
 import org.apache.airavata.gfac.core.cluster.*;
 import org.apache.airavata.model.status.JobStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.File;
 import java.io.IOException;
@@ -44,6 +48,9 @@ import java.util.*;
  */
 public class LocalRemoteCluster extends AbstractRemoteCluster {
 
+    private static final Logger log = LoggerFactory.getLogger(LocalRemoteCluster.class);
+    private static final int MAX_RETRY_COUNT = 3;
+
     public LocalRemoteCluster(ServerInfo serverInfo, JobManagerConfiguration jobManagerConfiguration, AuthenticationInfo authenticationInfo) {
         super(serverInfo, jobManagerConfiguration, authenticationInfo);
     }
@@ -52,9 +59,9 @@ public class LocalRemoteCluster extends AbstractRemoteCluster {
     public JobSubmissionOutput submitBatchJob(String jobScriptFilePath, String workingDirectory) throws SSHApiException {
         try {
             JobSubmissionOutput jsoutput = new JobSubmissionOutput();
-            copyTo(jobScriptFilePath, workingDirectory); // scp script file to working directory
+            copyTo(jobScriptFilePath, workingDirectory + File.separator + new File(jobScriptFilePath).getName()); // scp script file to working directory
             RawCommandInfo submitCommand = jobManagerConfiguration.getSubmitCommand(workingDirectory, jobScriptFilePath);
-            submitCommand.setRawCommand("cd " + workingDirectory + "; " + submitCommand.getRawCommand());
+            submitCommand.setRawCommand(submitCommand.getRawCommand());
             LocalCommandOutput localCommandOutput = new LocalCommandOutput();
             executeCommand(submitCommand, localCommandOutput);
             jsoutput.setJobId(outputParser.parseJobSubmission(localCommandOutput.getStandardOut()));
@@ -93,16 +100,41 @@ public class LocalRemoteCluster extends AbstractRemoteCluster {
 
     @Override
     public void scpThirdParty(String sourceFile, String destinationFile, Session session, DIRECTION inOrOut, boolean ignoreEmptyFile) throws SSHApiException {
-        throw new UnsupportedOperationException("Scp third party is not support with LocalRemoteCluster");
+        int retryCount= 0;
+        try {
+            while (retryCount < MAX_RETRY_COUNT) {
+                retryCount++;
+                log.info("Transferring from:" + sourceFile + " To: " + destinationFile);
+                try {
+                    if (inOrOut == DIRECTION.TO) {
+                        SSHUtils.scpThirdParty(sourceFile, session, destinationFile, session, ignoreEmptyFile);
+                    } else {
+                        SSHUtils.scpThirdParty(sourceFile, session, destinationFile, session, ignoreEmptyFile);
+                    }
+                    break; // exit while loop
+                } catch (JSchException e) {
+                    if (retryCount == MAX_RETRY_COUNT) {
+                        log.error("Retry count " + MAX_RETRY_COUNT + " exceeded for  transferring from:"
+                                + sourceFile + " To: " + destinationFile, e);
+                        throw e;
+                    }
+                    log.error("Issue with jsch, Retry transferring from:" + sourceFile + " To: " + destinationFile, e);
+                }
+            }
+        } catch (IOException | JSchException e) {
+            throw new SSHApiException("Failed scp file:" + sourceFile + " to remote file "
+                    +destinationFile , e);
+        }
     }
 
     @Override
     public void makeDirectory(String directoryPath) throws SSHApiException {
         Path dirPath = Paths.get(directoryPath);
         Set<PosixFilePermission> perms = new HashSet<>();
-        // add permission as rw-r--r-- 644
+        // add permission as rwxr--r-- 744
         perms.add(PosixFilePermission.OWNER_WRITE);
         perms.add(PosixFilePermission.OWNER_READ);
+        perms.add(PosixFilePermission.OWNER_EXECUTE);
         perms.add(PosixFilePermission.GROUP_READ);
         perms.add(PosixFilePermission.OTHERS_READ);
         FileAttribute<Set<PosixFilePermission>> fileAttributes = PosixFilePermissions.asFileAttribute(perms);
@@ -198,7 +230,7 @@ public class LocalRemoteCluster extends AbstractRemoteCluster {
 
     @Override
     public ServerInfo getServerInfo() {
-        return null;
+        return this.serverInfo;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/LocalJobSubmissionTask.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/LocalJobSubmissionTask.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/LocalJobSubmissionTask.java
index 7954961..a8b8e39 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/LocalJobSubmissionTask.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/LocalJobSubmissionTask.java
@@ -21,24 +21,29 @@
 
 package org.apache.airavata.gfac.impl.task;
 
-import org.apache.airavata.gfac.core.GFacConstants;
-import org.apache.airavata.gfac.core.GFacException;
-import org.apache.airavata.gfac.core.GFacUtils;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.gfac.core.*;
+import org.apache.airavata.gfac.core.cluster.JobSubmissionOutput;
+import org.apache.airavata.gfac.core.cluster.RemoteCluster;
 import org.apache.airavata.gfac.core.context.ProcessContext;
 import org.apache.airavata.gfac.core.context.TaskContext;
 import org.apache.airavata.gfac.core.task.JobSubmissionTask;
 import org.apache.airavata.gfac.core.task.TaskException;
-import org.apache.airavata.gfac.local.utils.InputStreamToFileWriter;
-import org.apache.airavata.gfac.local.utils.InputUtils;
+import org.apache.airavata.gfac.impl.Factory;
 import org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription;
 import org.apache.airavata.model.appcatalog.appdeployment.SetEnvPaths;
+import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManager;
 import org.apache.airavata.model.application.io.InputDataObjectType;
+import org.apache.airavata.model.commons.ErrorModel;
 import org.apache.airavata.model.job.JobModel;
 import org.apache.airavata.model.status.JobState;
 import org.apache.airavata.model.status.JobStatus;
 import org.apache.airavata.model.status.TaskState;
 import org.apache.airavata.model.status.TaskStatus;
 import org.apache.airavata.model.task.TaskTypes;
+import org.apache.airavata.registry.cpi.AppCatalogException;
+import org.apache.commons.io.FileUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -56,78 +61,85 @@ public class LocalJobSubmissionTask implements JobSubmissionTask{
 
     @Override
     public TaskStatus execute(TaskContext taskContext) {
-     /*   try {
+        TaskStatus taskStatus = new TaskStatus(TaskState.CREATED);
+        try {
             ProcessContext processContext = taskContext.getParentProcessContext();
-            // build command with all inputs
-            List<String> cmdList = buildCommand(processContext);
-            initProcessBuilder(processContext.getApplicationDeploymentDescription(), cmdList);
+            JobModel jobModel = processContext.getJobModel();
+            jobModel.setTaskId(taskContext.getTaskId());
 
-            // extra environment variables
-            builder.environment().put(GFacConstants.INPUT_DATA_DIR_VAR_NAME, processContext.getInputDir());
-            builder.environment().put(GFacConstants.OUTPUT_DATA_DIR_VAR_NAME, processContext.getOutputDir());
+            RemoteCluster remoteCluster = processContext.getJobSubmissionRemoteCluster();
+            GroovyMap groovyMap = GFacUtils.creatGroovyMap(processContext,taskContext);
 
-            // set working directory
-            builder.directory(new File(processContext.getWorkingDir()));
+            String jobId = AiravataUtils.getId("JOB_ID_");
+            jobModel.setJobName(groovyMap.get(Script.JOB_NAME).toString());
+            jobModel.setJobId(jobId);
 
-            // log info
-            log.info("Command = " + InputUtils.buildCommand(cmdList));
-            log.info("Working dir = " + builder.directory());
-            JobModel jobModel = processContext.getJobModel();
-            if (jobModel == null) {
-                jobModel = new JobModel();
+            ResourceJobManager resourceJobManager = GFacUtils.getResourceJobManager(processContext);
+            JobManagerConfiguration jConfig = null;
+
+            if (resourceJobManager != null) {
+                jConfig = Factory.getJobManagerConfiguration(resourceJobManager);
             }
-            String jobId = taskContext.getTaskModel().getTaskId();
-            jobModel.setJobId(jobId);
-            jobModel.setJobDescription("sample local job");
-            processContext.setJobModel(jobModel);
-            GFacUtils.saveJobStatus(taskContext, jobModel, JobState.SUBMITTED);
-            // running cmd
-            Process process = builder.start();
-
-            Thread standardOutWriter = new InputStreamToFileWriter(process.getInputStream(), processContext.getStdoutLocation());
-            Thread standardErrorWriter = new InputStreamToFileWriter(process.getErrorStream(), processContext.getStderrLocation());
-
-            // start output threads
-            standardOutWriter.setDaemon(true);
-            standardErrorWriter.setDaemon(true);
-            standardOutWriter.start();
-            standardErrorWriter.start();
-
-            int returnValue = process.waitFor();
-
-            // make sure other two threads are done
-            standardOutWriter.join();
-            standardErrorWriter.join();
-
-            *//*
-             * check return value. usually not very helpful to draw conclusions based on return values so don't bother.
-             * just provide warning in the log messages
-             *//*
-            if (returnValue != 0) {
-                log.error("Process finished with non zero return value. Process may have failed");
+
+            JobStatus jobStatus = new JobStatus();
+            File jobFile = GFacUtils.createJobFile(groovyMap, taskContext, jConfig);
+            if (jobFile != null && jobFile.exists()) {
+                jobModel.setJobDescription(FileUtils.readFileToString(jobFile));
+
+                GFacUtils.saveJobModel(processContext, jobModel);
+
+                JobSubmissionOutput jobSubmissionOutput = remoteCluster.submitBatchJob(jobFile.getPath(),
+                        processContext.getWorkingDir());
+
+                jobStatus.setJobState(JobState.SUBMITTED);
+                jobStatus.setReason("Successfully Submitted to " + taskContext.getParentProcessContext()
+                        .getComputeResourceDescription().getHostName());
+                jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+                jobModel.setJobStatuses(Arrays.asList(jobStatus));
+                //log job submit status
+                GFacUtils.saveJobStatus(taskContext.getParentProcessContext(), jobModel);
+
+                //for local, job gets completed synchronously
+                //so changing job status to complete
+
+                jobModel.setExitCode(jobSubmissionOutput.getExitCode());
+                jobModel.setStdErr(jobSubmissionOutput.getStdErr());
+                jobModel.setStdOut(jobSubmissionOutput.getStdOut());
+
+
+                jobModel.setJobId(jobId);
+                jobStatus.setJobState(JobState.COMPLETE);
+                jobStatus.setReason("Successfully Completed " + taskContext.getParentProcessContext()
+                        .getComputeResourceDescription().getHostName());
+                jobStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
+                jobModel.setJobStatuses(Arrays.asList(jobStatus));
+                //log job complete status
+                GFacUtils.saveJobStatus(taskContext.getParentProcessContext(), jobModel);
+
+
+                taskStatus = new TaskStatus(TaskState.COMPLETED);
+                taskStatus.setReason("Submitted job to compute resource");
+
             } else {
-                log.info("Process finished with return value of zero.");
+                taskStatus.setState(TaskState.FAILED);
+                if (jobFile == null) {
+                    taskStatus.setReason("JobFile is null");
+                } else {
+                    taskStatus.setReason("Job file doesn't exist");
+                }
             }
 
-            StringBuffer buf = new StringBuffer();
-            buf.append("Executed ").append(InputUtils.buildCommand(cmdList))
-                    .append(" on the localHost, working directory = ").append(processContext.getWorkingDir())
-                    .append(" tempDirectory = ").append(processContext.getWorkingDir()).append(" With the status ")
-                    .append(String.valueOf(returnValue));
-
-            log.info(buf.toString());
-            GFacUtils.saveJobStatus(taskContext, jobModel, JobState.COMPLETE);
-        } catch (GFacException e) {
-            log.error("Error while submitting local job", e);
-            throw new TaskException("Error while submitting local job", e);
-        } catch (InterruptedException e) {
-            log.error("Error while submitting local job", e);
-            throw new TaskException("Error while submitting local job", e);
-        } catch (IOException e) {
-            log.error("Error while submitting local job", e);
-            throw new TaskException("Error while submitting local job", e);
-        }*/
-	    return new TaskStatus(TaskState.COMPLETED);
+        } catch (GFacException | IOException | AppCatalogException | ApplicationSettingsException | SSHApiException e) {
+            String msg = "Error occurred while submitting a local job";
+            log.error(msg, e);
+            taskStatus.setReason(msg);
+            ErrorModel errorModel = new ErrorModel();
+            errorModel.setActualErrorMessage(e.getMessage());
+            errorModel.setUserFriendlyMessage(msg);
+            taskContext.getTaskModel().setTaskErrors(Arrays.asList(errorModel));
+            taskStatus.setState(TaskState.FAILED);
+        }
+        return taskStatus;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/TaskUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/TaskUtils.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/TaskUtils.java
index 888abb0..715823b 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/TaskUtils.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/TaskUtils.java
@@ -43,7 +43,7 @@ public class TaskUtils {
         } else {
             filePath = inputPath + taskContext.getParentProcessContext().getProcessId() + File.separator + fileName;
         }
-        return new URI("file", hostName, filePath, null);
+        return new URI("file", taskContext.getParentProcessContext().getStoragePreference().getLoginUserName(), hostName, 0, filePath, null, null);
 
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index b1218e4..b14b5cd 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -406,11 +406,17 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
                 DataType type = processOutput.getType();
                 switch (type) {
                     case STDOUT :
-                        processOutput.setValue(appName + ".stdout");
+                        if(null == processOutput.getValue() ||
+                                (null != processOutput.getValue() && processOutput.getValue().trim().isEmpty())){
+                            processOutput.setValue(appName + ".stdout");
+                        }
                         createOutputDataSatagingTasks(processModel, gatewayId, dataStagingTaskIds, processOutput);
                         break;
                     case STDERR:
-                        processOutput.setValue(appName + ".stderr");
+                        if(null == processOutput.getValue() ||
+                                (null != processOutput.getValue() && processOutput.getValue().trim().isEmpty())){
+                            processOutput.setValue(appName + ".stderr");
+                        }
                         createOutputDataSatagingTasks(processModel, gatewayId, dataStagingTaskIds, processOutput);
                         break;
                     case URI:
@@ -475,7 +481,9 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
             monitorMode = sshJobSubmission.getMonitorMode();
         } else if (jobSubmissionProtocol == JobSubmissionProtocol.UNICORE) {
             monitorMode = MonitorMode.FORK;
-        } else {
+        } else if(jobSubmissionProtocol == JobSubmissionProtocol.LOCAL){
+            monitorMode = MonitorMode.LOCAL;
+        }else {
             logger.error("expId : {}, processId : {} :- Unsupported Job submission protocol {}.",
                     processModel.getExperimentId(), processModel.getProcessId(), jobSubmissionProtocol.name());
             throw new OrchestratorException("Unsupported Job Submission Protocol " + jobSubmissionProtocol.name());

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ComputeResourceImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ComputeResourceImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ComputeResourceImpl.java
index e0e260c..35536f5 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ComputeResourceImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ComputeResourceImpl.java
@@ -927,6 +927,7 @@ public class ComputeResourceImpl implements ComputeResource {
 		LocalSubmissionResource localJobSubmission = AppCatalogThriftConversion.getLocalJobSubmission(localSubmission);
 		localJobSubmission.setResourceJobManagerId(resourceJobManagerId);
 		localJobSubmission.getResourceJobManagerResource().setResourceJobManagerId(resourceJobManagerId);
+        localJobSubmission.setSecurityProtocol(localSubmission.getSecurityProtocol().toString());
     	localJobSubmission.save();
     	return localJobSubmission.getJobSubmissionInterfaceId();
 	}

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/LocalSubmission.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/LocalSubmission.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/LocalSubmission.java
index c66e2e8..7399083 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/LocalSubmission.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/model/LocalSubmission.java
@@ -47,6 +47,9 @@ public class LocalSubmission implements Serializable {
 	@Column(name = "JOB_SUBMISSION_INTERFACE_ID")
 	private String jobSubmissionInterfaceId;
 
+	@Column(name = "SECURITY_PROTOCOL")
+	private String securityProtocol;
+
     @Column(name = "CREATION_TIME")
     private Timestamp creationTime;
 
@@ -92,4 +95,12 @@ public class LocalSubmission implements Serializable {
 	public void setJobSubmissionInterfaceId(String jobSubmissionInterfaceId) {
 		this.jobSubmissionInterfaceId=jobSubmissionInterfaceId;
 	}
+
+	public String getSecurityProtocol() {
+		return securityProtocol;
+	}
+
+	public void setSecurityProtocol(String securityProtocol) {
+		this.securityProtocol=securityProtocol;
+	}
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/LocalSubmissionResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/LocalSubmissionResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/LocalSubmissionResource.java
index 9a3ec88..2e8edd4 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/LocalSubmissionResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/resources/LocalSubmissionResource.java
@@ -44,6 +44,7 @@ public class LocalSubmissionResource extends AppCatAbstractResource {
 	private String resourceJobManagerId;
 	private ResourceJobManagerResource resourceJobManagerResource;
 	private String jobSubmissionInterfaceId;
+	private String securityProtocol;
     private Timestamp createdTime;
     private Timestamp updatedTime;
 
@@ -261,6 +262,7 @@ public class LocalSubmissionResource extends AppCatAbstractResource {
 			ResourceJobManager resourceJobManager = em.find(ResourceJobManager.class, getResourceJobManagerId());
 			localSubmission.setResourceJobManager(resourceJobManager);
 			localSubmission.setJobSubmissionInterfaceId(getJobSubmissionInterfaceId());
+			localSubmission.setSecurityProtocol(getSecurityProtocol());
 			if (existingLocalSubmission == null) {
 				em.persist(localSubmission);
 			} else {
@@ -323,7 +325,11 @@ public class LocalSubmissionResource extends AppCatAbstractResource {
 	public String getJobSubmissionInterfaceId() {
 		return jobSubmissionInterfaceId;
 	}
-	
+
+	public String getSecurityProtocol() {
+		return securityProtocol;
+	}
+
 	public void setResourceJobManagerId(String resourceJobManagerId) {
 		this.resourceJobManagerId=resourceJobManagerId;
 	}
@@ -335,4 +341,8 @@ public class LocalSubmissionResource extends AppCatAbstractResource {
 	public void setJobSubmissionInterfaceId(String jobSubmissionInterfaceId) {
 		this.jobSubmissionInterfaceId=jobSubmissionInterfaceId;
 	}
+
+	public void setSecurityProtocol(String securityProtocol) {
+		this.securityProtocol=securityProtocol;
+	}
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
index a62259b..d6a4632 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
@@ -398,6 +398,7 @@ public class AppCatalogJPAUtils {
             localSubmissionResource.setResourceJobManagerResource((ResourceJobManagerResource) createResourceJobManager(o.getResourceJobManager()));
             localSubmissionResource.setJobSubmissionInterfaceId(o.getJobSubmissionInterfaceId());
             localSubmissionResource.setCreatedTime(o.getCreationTime());
+            localSubmissionResource.setSecurityProtocol(o.getSecurityProtocol());
             if (o.getUpdateTime() != null) {
                 localSubmissionResource.setUpdatedTime(o.getUpdateTime());
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
index 8b40d62..cfecd22 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
@@ -367,6 +367,7 @@ public class AppCatalogThriftConversion {
     	LOCALSubmission submission = new LOCALSubmission();
     	submission.setJobSubmissionInterfaceId(localSubmission.getJobSubmissionInterfaceId());
     	submission.setResourceJobManager(getResourceJobManager(localSubmission.getResourceJobManagerResource()));
+        submission.setSecurityProtocol(SecurityProtocol.valueOf(localSubmission.getSecurityProtocol()));
     	return submission;
     }
     

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
index 9a23f5e..36c3012 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-derby.sql
@@ -443,6 +443,7 @@ CREATE TABLE LOCAL_SUBMISSION
 (
         RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
         JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+        SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
         PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
index 0aa91a4..ced2043 100644
--- a/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/appcatalog-mysql.sql
@@ -442,6 +442,7 @@ CREATE TABLE LOCAL_SUBMISSION
 (
         RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
         JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+        SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
         CREATION_TIME TIMESTAMP DEFAULT NOW(),
         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
         PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),

http://git-wip-us.apache.org/repos/asf/airavata/blob/8f91bdee/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift b/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift
index af376bc..d674584 100644
--- a/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift
+++ b/thrift-interface-descriptions/data-models/resource-catalog-models/compute_resource_model.thrift
@@ -195,7 +195,8 @@ enum MonitorMode {
    POLL_JOB_MANAGER,
    JOB_EMAIL_NOTIFICATION_MONITOR,
    XSEDE_AMQP_SUBSCRIBE,
-   FORK
+   FORK,
+   LOCAL
 }
 
 enum DMType {
@@ -215,7 +216,7 @@ enum DMType {
 struct LOCALSubmission {
     1: required string jobSubmissionInterfaceId = airavata_commons.DEFAULT_ID,
     2: required ResourceJobManager resourceJobManager,
-    3: optional data_movement_models.SecurityProtocol securityProtocol
+    3: required data_movement_models.SecurityProtocol securityProtocol
 }
 
 /**


Mime
View raw message