adding node and cpu count preferences to compute resource and application deployment description
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/5904cb13 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/5904cb13 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/5904cb13 Branch: refs/heads/auroraMesosIntegration Commit: 5904cb13b93810e5b657a3a431a34639bd16f272 Parents: ba9d60d Author: scnakandala <[email protected]> Authored: Tue Nov 1 15:13:18 2016 -0400 Committer: scnakandala <[email protected]> Committed: Tue Nov 1 15:13:18 2016 -0400 ---------------------------------------------------------------------- .../application_deployment_model_types.cpp | 88 ++++ .../application_deployment_model_types.h | 36 +- .../airavata/compute_resource_model_types.cpp | 88 ++++ .../lib/airavata/compute_resource_model_types.h | 36 +- .../Model/AppCatalog/AppDeployment/Types.php | 92 ++++ .../Model/AppCatalog/ComputeResource/Types.php | 92 ++++ .../model/appcatalog/appdeployment/ttypes.py | 54 ++- .../model/appcatalog/computeresource/ttypes.py | 54 ++- .../ApplicationDeploymentDescription.java | 415 +++++++++++++++++- .../appcatalog/computeresource/BatchQueue.java | 431 +++++++++++++++++-- .../catalog/impl/ApplicationDeploymentImpl.java | 8 + .../catalog/model/ApplicationDeployment.java | 42 +- .../core/app/catalog/model/BatchQueue.java | 44 ++ .../resources/AppDeploymentResource.java | 44 ++ .../catalog/resources/BatchQueueResource.java | 56 ++- .../app/catalog/util/AppCatalogJPAUtils.java | 8 + .../util/AppCatalogThriftConversion.java | 13 + .../src/main/resources/appcatalog-derby.sql | 8 + .../src/main/resources/appcatalog-mysql.sql | 8 + .../application_deployment_model.thrift | 4 + .../compute_resource_model.thrift | 6 +- 21 files changed, 1581 insertions(+), 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/5904cb13/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_deployment_model_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_deployment_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_deployment_model_types.cpp index d465140..52598ef 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_deployment_model_types.cpp +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_deployment_model_types.cpp @@ -491,6 +491,26 @@ void ApplicationDeploymentDescription::__set_postJobCommands(const std::vector<C __isset.postJobCommands = true; } +void ApplicationDeploymentDescription::__set_defaultQueueName(const std::string& val) { + this->defaultQueueName = val; +__isset.defaultQueueName = true; +} + +void ApplicationDeploymentDescription::__set_defaultNodeCount(const int32_t val) { + this->defaultNodeCount = val; +__isset.defaultNodeCount = true; +} + +void ApplicationDeploymentDescription::__set_defaultCPUCount(const int32_t val) { + this->defaultCPUCount = val; +__isset.defaultCPUCount = true; +} + +void ApplicationDeploymentDescription::__set_editableByUser(const bool val) { + this->editableByUser = val; +__isset.editableByUser = true; +} + uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); @@ -687,6 +707,38 @@ uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TPro xfer += iprot->skip(ftype); } break; + case 13: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->defaultQueueName); + this->__isset.defaultQueueName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 14: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->defaultNodeCount); + this->__isset.defaultNodeCount = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 15: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->defaultCPUCount); + this->__isset.defaultCPUCount = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 16: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->editableByUser); + this->__isset.editableByUser = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -817,6 +869,26 @@ uint32_t ApplicationDeploymentDescription::write(::apache::thrift::protocol::TPr } xfer += oprot->writeFieldEnd(); } + if (this->__isset.defaultQueueName) { + xfer += oprot->writeFieldBegin("defaultQueueName", ::apache::thrift::protocol::T_STRING, 13); + xfer += oprot->writeString(this->defaultQueueName); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.defaultNodeCount) { + xfer += oprot->writeFieldBegin("defaultNodeCount", ::apache::thrift::protocol::T_I32, 14); + xfer += oprot->writeI32(this->defaultNodeCount); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.defaultCPUCount) { + xfer += oprot->writeFieldBegin("defaultCPUCount", ::apache::thrift::protocol::T_I32, 15); + xfer += oprot->writeI32(this->defaultCPUCount); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.editableByUser) { + xfer += oprot->writeFieldBegin("editableByUser", ::apache::thrift::protocol::T_BOOL, 16); + xfer += oprot->writeBool(this->editableByUser); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -836,6 +908,10 @@ void swap(ApplicationDeploymentDescription &a, ApplicationDeploymentDescription swap(a.setEnvironment, b.setEnvironment); swap(a.preJobCommands, b.preJobCommands); swap(a.postJobCommands, b.postJobCommands); + swap(a.defaultQueueName, b.defaultQueueName); + swap(a.defaultNodeCount, b.defaultNodeCount); + swap(a.defaultCPUCount, b.defaultCPUCount); + swap(a.editableByUser, b.editableByUser); swap(a.__isset, b.__isset); } @@ -852,6 +928,10 @@ ApplicationDeploymentDescription::ApplicationDeploymentDescription(const Applica setEnvironment = other43.setEnvironment; preJobCommands = other43.preJobCommands; postJobCommands = other43.postJobCommands; + defaultQueueName = other43.defaultQueueName; + defaultNodeCount = other43.defaultNodeCount; + defaultCPUCount = other43.defaultCPUCount; + editableByUser = other43.editableByUser; __isset = other43.__isset; } ApplicationDeploymentDescription& ApplicationDeploymentDescription::operator=(const ApplicationDeploymentDescription& other44) { @@ -867,6 +947,10 @@ ApplicationDeploymentDescription& ApplicationDeploymentDescription::operator=(co setEnvironment = other44.setEnvironment; preJobCommands = other44.preJobCommands; postJobCommands = other44.postJobCommands; + defaultQueueName = other44.defaultQueueName; + defaultNodeCount = other44.defaultNodeCount; + defaultCPUCount = other44.defaultCPUCount; + editableByUser = other44.editableByUser; __isset = other44.__isset; return *this; } @@ -885,6 +969,10 @@ void ApplicationDeploymentDescription::printTo(std::ostream& out) const { out << ", " << "setEnvironment="; (__isset.setEnvironment ? (out << to_string(setEnvironment)) : (out << "<null>")); out << ", " << "preJobCommands="; (__isset.preJobCommands ? (out << to_string(preJobCommands)) : (out << "<null>")); out << ", " << "postJobCommands="; (__isset.postJobCommands ? (out << to_string(postJobCommands)) : (out << "<null>")); + out << ", " << "defaultQueueName="; (__isset.defaultQueueName ? (out << to_string(defaultQueueName)) : (out << "<null>")); + out << ", " << "defaultNodeCount="; (__isset.defaultNodeCount ? (out << to_string(defaultNodeCount)) : (out << "<null>")); + out << ", " << "defaultCPUCount="; (__isset.defaultCPUCount ? (out << to_string(defaultCPUCount)) : (out << "<null>")); + out << ", " << "editableByUser="; (__isset.editableByUser ? (out << to_string(editableByUser)) : (out << "<null>")); out << ")"; } http://git-wip-us.apache.org/repos/asf/airavata/blob/5904cb13/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_deployment_model_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_deployment_model_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_deployment_model_types.h index 5409805..42599df 100644 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_deployment_model_types.h +++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/application_deployment_model_types.h @@ -224,7 +224,7 @@ inline std::ostream& operator<<(std::ostream& out, const ApplicationModule& obj) } typedef struct _ApplicationDeploymentDescription__isset { - _ApplicationDeploymentDescription__isset() : appDeploymentDescription(false), moduleLoadCmds(false), libPrependPaths(false), libAppendPaths(false), setEnvironment(false), preJobCommands(false), postJobCommands(false) {} + _ApplicationDeploymentDescription__isset() : appDeploymentDescription(false), moduleLoadCmds(false), libPrependPaths(false), libAppendPaths(false), setEnvironment(false), preJobCommands(false), postJobCommands(false), defaultQueueName(false), defaultNodeCount(false), defaultCPUCount(false), editableByUser(false) {} bool appDeploymentDescription :1; bool moduleLoadCmds :1; bool libPrependPaths :1; @@ -232,6 +232,10 @@ typedef struct _ApplicationDeploymentDescription__isset { bool setEnvironment :1; bool preJobCommands :1; bool postJobCommands :1; + bool defaultQueueName :1; + bool defaultNodeCount :1; + bool defaultCPUCount :1; + bool editableByUser :1; } _ApplicationDeploymentDescription__isset; class ApplicationDeploymentDescription { @@ -239,7 +243,7 @@ class ApplicationDeploymentDescription { ApplicationDeploymentDescription(const ApplicationDeploymentDescription&); ApplicationDeploymentDescription& operator=(const ApplicationDeploymentDescription&); - ApplicationDeploymentDescription() : appDeploymentId("DO_NOT_SET_AT_CLIENTS"), appModuleId(), computeHostId(), executablePath(), parallelism(( ::apache::airavata::model::appcatalog::parallelism::ApplicationParallelismType::type)0), appDeploymentDescription() { + ApplicationDeploymentDescription() : appDeploymentId("DO_NOT_SET_AT_CLIENTS"), appModuleId(), computeHostId(), executablePath(), parallelism(( ::apache::airavata::model::appcatalog::parallelism::ApplicationParallelismType::type)0), appDeploymentDescription(), defaultQueueName(), defaultNodeCount(0), defaultCPUCount(0), editableByUser(0) { parallelism = ( ::apache::airavata::model::appcatalog::parallelism::ApplicationParallelismType::type)0; } @@ -257,6 +261,10 @@ class ApplicationDeploymentDescription { std::vector<SetEnvPaths> setEnvironment; std::vector<CommandObject> preJobCommands; std::vector<CommandObject> postJobCommands; + std::string defaultQueueName; + int32_t defaultNodeCount; + int32_t defaultCPUCount; + bool editableByUser; _ApplicationDeploymentDescription__isset __isset; @@ -284,6 +292,14 @@ class ApplicationDeploymentDescription { void __set_postJobCommands(const std::vector<CommandObject> & val); + void __set_defaultQueueName(const std::string& val); + + void __set_defaultNodeCount(const int32_t val); + + void __set_defaultCPUCount(const int32_t val); + + void __set_editableByUser(const bool val); + bool operator == (const ApplicationDeploymentDescription & rhs) const { if (!(appDeploymentId == rhs.appDeploymentId)) @@ -324,6 +340,22 @@ class ApplicationDeploymentDescription { return false; else if (__isset.postJobCommands && !(postJobCommands == rhs.postJobCommands)) return false; + if (__isset.defaultQueueName != rhs.__isset.defaultQueueName) + return false; + else if (__isset.defaultQueueName && !(defaultQueueName == rhs.defaultQueueName)) + return false; + if (__isset.defaultNodeCount != rhs.__isset.defaultNodeCount) + return false; + else if (__isset.defaultNodeCount && !(defaultNodeCount == rhs.defaultNodeCount)) + return false; + if (__isset.defaultCPUCount != rhs.__isset.defaultCPUCount) + return false; + else if (__isset.defaultCPUCount && !(defaultCPUCount == rhs.defaultCPUCount)) + return false; + if (__isset.editableByUser != rhs.__isset.editableByUser) + return false; + else if (__isset.editableByUser && !(editableByUser == rhs.editableByUser)) + return false; return true; } bool operator != (const ApplicationDeploymentDescription &rhs) const { http://git-wip-us.apache.org/repos/asf/airavata/blob/5904cb13/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 b84306c..a744a1f 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 @@ -435,6 +435,26 @@ void BatchQueue::__set_maxMemory(const int32_t val) { __isset.maxMemory = true; } +void BatchQueue::__set_cpuPerNode(const int32_t val) { + this->cpuPerNode = val; +__isset.cpuPerNode = true; +} + +void BatchQueue::__set_defaultNodeCount(const int32_t val) { + this->defaultNodeCount = val; +__isset.defaultNodeCount = true; +} + +void BatchQueue::__set_defaultCPUCount(const int32_t val) { + this->defaultCPUCount = val; +__isset.defaultCPUCount = true; +} + +void BatchQueue::__set_isDefaultQueue(const bool val) { + this->isDefaultQueue = val; +__isset.isDefaultQueue = true; +} + uint32_t BatchQueue::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); @@ -513,6 +533,38 @@ uint32_t BatchQueue::read(::apache::thrift::protocol::TProtocol* iprot) { xfer += iprot->skip(ftype); } break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->cpuPerNode); + this->__isset.cpuPerNode = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->defaultNodeCount); + this->__isset.defaultNodeCount = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->defaultCPUCount); + this->__isset.defaultCPUCount = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isDefaultQueue); + this->__isset.isDefaultQueue = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -566,6 +618,26 @@ uint32_t BatchQueue::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeI32(this->maxMemory); xfer += oprot->writeFieldEnd(); } + if (this->__isset.cpuPerNode) { + xfer += oprot->writeFieldBegin("cpuPerNode", ::apache::thrift::protocol::T_I32, 8); + xfer += oprot->writeI32(this->cpuPerNode); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.defaultNodeCount) { + xfer += oprot->writeFieldBegin("defaultNodeCount", ::apache::thrift::protocol::T_I32, 9); + xfer += oprot->writeI32(this->defaultNodeCount); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.defaultCPUCount) { + xfer += oprot->writeFieldBegin("defaultCPUCount", ::apache::thrift::protocol::T_I32, 10); + xfer += oprot->writeI32(this->defaultCPUCount); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.isDefaultQueue) { + xfer += oprot->writeFieldBegin("isDefaultQueue", ::apache::thrift::protocol::T_BOOL, 11); + xfer += oprot->writeBool(this->isDefaultQueue); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -580,6 +652,10 @@ void swap(BatchQueue &a, BatchQueue &b) { swap(a.maxProcessors, b.maxProcessors); swap(a.maxJobsInQueue, b.maxJobsInQueue); swap(a.maxMemory, b.maxMemory); + swap(a.cpuPerNode, b.cpuPerNode); + swap(a.defaultNodeCount, b.defaultNodeCount); + swap(a.defaultCPUCount, b.defaultCPUCount); + swap(a.isDefaultQueue, b.isDefaultQueue); swap(a.__isset, b.__isset); } @@ -591,6 +667,10 @@ BatchQueue::BatchQueue(const BatchQueue& other21) { maxProcessors = other21.maxProcessors; maxJobsInQueue = other21.maxJobsInQueue; maxMemory = other21.maxMemory; + cpuPerNode = other21.cpuPerNode; + defaultNodeCount = other21.defaultNodeCount; + defaultCPUCount = other21.defaultCPUCount; + isDefaultQueue = other21.isDefaultQueue; __isset = other21.__isset; } BatchQueue& BatchQueue::operator=(const BatchQueue& other22) { @@ -601,6 +681,10 @@ BatchQueue& BatchQueue::operator=(const BatchQueue& other22) { maxProcessors = other22.maxProcessors; maxJobsInQueue = other22.maxJobsInQueue; maxMemory = other22.maxMemory; + cpuPerNode = other22.cpuPerNode; + defaultNodeCount = other22.defaultNodeCount; + defaultCPUCount = other22.defaultCPUCount; + isDefaultQueue = other22.isDefaultQueue; __isset = other22.__isset; return *this; } @@ -614,6 +698,10 @@ void BatchQueue::printTo(std::ostream& out) const { out << ", " << "maxProcessors="; (__isset.maxProcessors ? (out << to_string(maxProcessors)) : (out << "<null>")); out << ", " << "maxJobsInQueue="; (__isset.maxJobsInQueue ? (out << to_string(maxJobsInQueue)) : (out << "<null>")); out << ", " << "maxMemory="; (__isset.maxMemory ? (out << to_string(maxMemory)) : (out << "<null>")); + out << ", " << "cpuPerNode="; (__isset.cpuPerNode ? (out << to_string(cpuPerNode)) : (out << "<null>")); + out << ", " << "defaultNodeCount="; (__isset.defaultNodeCount ? (out << to_string(defaultNodeCount)) : (out << "<null>")); + out << ", " << "defaultCPUCount="; (__isset.defaultCPUCount ? (out << to_string(defaultCPUCount)) : (out << "<null>")); + out << ", " << "isDefaultQueue="; (__isset.isDefaultQueue ? (out << to_string(isDefaultQueue)) : (out << "<null>")); out << ")"; } http://git-wip-us.apache.org/repos/asf/airavata/blob/5904cb13/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 5c90bd9..89566a0 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 @@ -224,13 +224,17 @@ inline std::ostream& operator<<(std::ostream& out, const ResourceJobManager& obj } typedef struct _BatchQueue__isset { - _BatchQueue__isset() : queueDescription(false), maxRunTime(false), maxNodes(false), maxProcessors(false), maxJobsInQueue(false), maxMemory(false) {} + _BatchQueue__isset() : queueDescription(false), maxRunTime(false), maxNodes(false), maxProcessors(false), maxJobsInQueue(false), maxMemory(false), cpuPerNode(false), defaultNodeCount(false), defaultCPUCount(false), isDefaultQueue(false) {} bool queueDescription :1; bool maxRunTime :1; bool maxNodes :1; bool maxProcessors :1; bool maxJobsInQueue :1; bool maxMemory :1; + bool cpuPerNode :1; + bool defaultNodeCount :1; + bool defaultCPUCount :1; + bool isDefaultQueue :1; } _BatchQueue__isset; class BatchQueue { @@ -238,7 +242,7 @@ class BatchQueue { BatchQueue(const BatchQueue&); BatchQueue& operator=(const BatchQueue&); - BatchQueue() : queueName(), queueDescription(), maxRunTime(0), maxNodes(0), maxProcessors(0), maxJobsInQueue(0), maxMemory(0) { + BatchQueue() : queueName(), queueDescription(), maxRunTime(0), maxNodes(0), maxProcessors(0), maxJobsInQueue(0), maxMemory(0), cpuPerNode(0), defaultNodeCount(0), defaultCPUCount(0), isDefaultQueue(0) { } virtual ~BatchQueue() throw(); @@ -249,6 +253,10 @@ class BatchQueue { int32_t maxProcessors; int32_t maxJobsInQueue; int32_t maxMemory; + int32_t cpuPerNode; + int32_t defaultNodeCount; + int32_t defaultCPUCount; + bool isDefaultQueue; _BatchQueue__isset __isset; @@ -266,6 +274,14 @@ class BatchQueue { void __set_maxMemory(const int32_t val); + void __set_cpuPerNode(const int32_t val); + + void __set_defaultNodeCount(const int32_t val); + + void __set_defaultCPUCount(const int32_t val); + + void __set_isDefaultQueue(const bool val); + bool operator == (const BatchQueue & rhs) const { if (!(queueName == rhs.queueName)) @@ -294,6 +310,22 @@ class BatchQueue { return false; else if (__isset.maxMemory && !(maxMemory == rhs.maxMemory)) return false; + if (__isset.cpuPerNode != rhs.__isset.cpuPerNode) + return false; + else if (__isset.cpuPerNode && !(cpuPerNode == rhs.cpuPerNode)) + return false; + if (__isset.defaultNodeCount != rhs.__isset.defaultNodeCount) + return false; + else if (__isset.defaultNodeCount && !(defaultNodeCount == rhs.defaultNodeCount)) + return false; + if (__isset.defaultCPUCount != rhs.__isset.defaultCPUCount) + return false; + else if (__isset.defaultCPUCount && !(defaultCPUCount == rhs.defaultCPUCount)) + return false; + if (__isset.isDefaultQueue != rhs.__isset.isDefaultQueue) + return false; + else if (__isset.isDefaultQueue && !(isDefaultQueue == rhs.isDefaultQueue)) + return false; return true; } bool operator != (const BatchQueue &rhs) const { http://git-wip-us.apache.org/repos/asf/airavata/blob/5904cb13/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php index 29965e7..03d1121 100644 --- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php +++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php @@ -493,6 +493,22 @@ class ApplicationDeploymentDescription { * @var \Airavata\Model\AppCatalog\AppDeployment\CommandObject[] */ public $postJobCommands = null; + /** + * @var string + */ + public $defaultQueueName = null; + /** + * @var int + */ + public $defaultNodeCount = null; + /** + * @var int + */ + public $defaultCPUCount = null; + /** + * @var bool + */ + public $editableByUser = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -575,6 +591,22 @@ class ApplicationDeploymentDescription { 'class' => '\Airavata\Model\AppCatalog\AppDeployment\CommandObject', ), ), + 13 => array( + 'var' => 'defaultQueueName', + 'type' => TType::STRING, + ), + 14 => array( + 'var' => 'defaultNodeCount', + 'type' => TType::I32, + ), + 15 => array( + 'var' => 'defaultCPUCount', + 'type' => TType::I32, + ), + 16 => array( + 'var' => 'editableByUser', + 'type' => TType::BOOL, + ), ); } if (is_array($vals)) { @@ -614,6 +646,18 @@ class ApplicationDeploymentDescription { if (isset($vals['postJobCommands'])) { $this->postJobCommands = $vals['postJobCommands']; } + if (isset($vals['defaultQueueName'])) { + $this->defaultQueueName = $vals['defaultQueueName']; + } + if (isset($vals['defaultNodeCount'])) { + $this->defaultNodeCount = $vals['defaultNodeCount']; + } + if (isset($vals['defaultCPUCount'])) { + $this->defaultCPUCount = $vals['defaultCPUCount']; + } + if (isset($vals['editableByUser'])) { + $this->editableByUser = $vals['editableByUser']; + } } } @@ -786,6 +830,34 @@ class ApplicationDeploymentDescription { $xfer += $input->skip($ftype); } break; + case 13: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->defaultQueueName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 14: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->defaultNodeCount); + } else { + $xfer += $input->skip($ftype); + } + break; + case 15: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->defaultCPUCount); + } else { + $xfer += $input->skip($ftype); + } + break; + case 16: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->editableByUser); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -931,6 +1003,26 @@ class ApplicationDeploymentDescription { } $xfer += $output->writeFieldEnd(); } + if ($this->defaultQueueName !== null) { + $xfer += $output->writeFieldBegin('defaultQueueName', TType::STRING, 13); + $xfer += $output->writeString($this->defaultQueueName); + $xfer += $output->writeFieldEnd(); + } + if ($this->defaultNodeCount !== null) { + $xfer += $output->writeFieldBegin('defaultNodeCount', TType::I32, 14); + $xfer += $output->writeI32($this->defaultNodeCount); + $xfer += $output->writeFieldEnd(); + } + if ($this->defaultCPUCount !== null) { + $xfer += $output->writeFieldBegin('defaultCPUCount', TType::I32, 15); + $xfer += $output->writeI32($this->defaultCPUCount); + $xfer += $output->writeFieldEnd(); + } + if ($this->editableByUser !== null) { + $xfer += $output->writeFieldBegin('editableByUser', TType::BOOL, 16); + $xfer += $output->writeBool($this->editableByUser); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; http://git-wip-us.apache.org/repos/asf/airavata/blob/5904cb13/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 71b4fd7..39acd3c 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 @@ -522,6 +522,22 @@ class BatchQueue { * @var int */ public $maxMemory = null; + /** + * @var int + */ + public $cpuPerNode = null; + /** + * @var int + */ + public $defaultNodeCount = null; + /** + * @var int + */ + public $defaultCPUCount = null; + /** + * @var bool + */ + public $isDefaultQueue = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -554,6 +570,22 @@ class BatchQueue { 'var' => 'maxMemory', 'type' => TType::I32, ), + 8 => array( + 'var' => 'cpuPerNode', + 'type' => TType::I32, + ), + 9 => array( + 'var' => 'defaultNodeCount', + 'type' => TType::I32, + ), + 10 => array( + 'var' => 'defaultCPUCount', + 'type' => TType::I32, + ), + 11 => array( + 'var' => 'isDefaultQueue', + 'type' => TType::BOOL, + ), ); } if (is_array($vals)) { @@ -578,6 +610,18 @@ class BatchQueue { if (isset($vals['maxMemory'])) { $this->maxMemory = $vals['maxMemory']; } + if (isset($vals['cpuPerNode'])) { + $this->cpuPerNode = $vals['cpuPerNode']; + } + if (isset($vals['defaultNodeCount'])) { + $this->defaultNodeCount = $vals['defaultNodeCount']; + } + if (isset($vals['defaultCPUCount'])) { + $this->defaultCPUCount = $vals['defaultCPUCount']; + } + if (isset($vals['isDefaultQueue'])) { + $this->isDefaultQueue = $vals['isDefaultQueue']; + } } } @@ -649,6 +693,34 @@ class BatchQueue { $xfer += $input->skip($ftype); } break; + case 8: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->cpuPerNode); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->defaultNodeCount); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->defaultCPUCount); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isDefaultQueue); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -697,6 +769,26 @@ class BatchQueue { $xfer += $output->writeI32($this->maxMemory); $xfer += $output->writeFieldEnd(); } + if ($this->cpuPerNode !== null) { + $xfer += $output->writeFieldBegin('cpuPerNode', TType::I32, 8); + $xfer += $output->writeI32($this->cpuPerNode); + $xfer += $output->writeFieldEnd(); + } + if ($this->defaultNodeCount !== null) { + $xfer += $output->writeFieldBegin('defaultNodeCount', TType::I32, 9); + $xfer += $output->writeI32($this->defaultNodeCount); + $xfer += $output->writeFieldEnd(); + } + if ($this->defaultCPUCount !== null) { + $xfer += $output->writeFieldBegin('defaultCPUCount', TType::I32, 10); + $xfer += $output->writeI32($this->defaultCPUCount); + $xfer += $output->writeFieldEnd(); + } + if ($this->isDefaultQueue !== null) { + $xfer += $output->writeFieldBegin('isDefaultQueue', TType::BOOL, 11); + $xfer += $output->writeBool($this->isDefaultQueue); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; http://git-wip-us.apache.org/repos/asf/airavata/blob/5904cb13/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/appdeployment/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/appdeployment/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/appdeployment/ttypes.py index 14fdbfa..12dfca0 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/appdeployment/ttypes.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/appcatalog/appdeployment/ttypes.py @@ -376,6 +376,10 @@ class ApplicationDeploymentDescription: - setEnvironment - preJobCommands - postJobCommands + - defaultQueueName + - defaultNodeCount + - defaultCPUCount + - editableByUser """ thrift_spec = ( @@ -392,9 +396,13 @@ class ApplicationDeploymentDescription: (10, TType.LIST, 'setEnvironment', (TType.STRUCT,(SetEnvPaths, SetEnvPaths.thrift_spec)), None, ), # 10 (11, TType.LIST, 'preJobCommands', (TType.STRUCT,(CommandObject, CommandObject.thrift_spec)), None, ), # 11 (12, TType.LIST, 'postJobCommands', (TType.STRUCT,(CommandObject, CommandObject.thrift_spec)), None, ), # 12 + (13, TType.STRING, 'defaultQueueName', None, None, ), # 13 + (14, TType.I32, 'defaultNodeCount', None, None, ), # 14 + (15, TType.I32, 'defaultCPUCount', None, None, ), # 15 + (16, TType.BOOL, 'editableByUser', None, None, ), # 16 ) - def __init__(self, appDeploymentId=thrift_spec[1][4], appModuleId=None, computeHostId=None, executablePath=None, parallelism=thrift_spec[5][4], appDeploymentDescription=None, moduleLoadCmds=None, libPrependPaths=None, libAppendPaths=None, setEnvironment=None, preJobCommands=None, postJobCommands=None,): + def __init__(self, appDeploymentId=thrift_spec[1][4], appModuleId=None, computeHostId=None, executablePath=None, parallelism=thrift_spec[5][4], appDeploymentDescription=None, moduleLoadCmds=None, libPrependPaths=None, libAppendPaths=None, setEnvironment=None, preJobCommands=None, postJobCommands=None, defaultQueueName=None, defaultNodeCount=None, defaultCPUCount=None, editableByUser=None,): self.appDeploymentId = appDeploymentId self.appModuleId = appModuleId self.computeHostId = computeHostId @@ -407,6 +415,10 @@ class ApplicationDeploymentDescription: self.setEnvironment = setEnvironment self.preJobCommands = preJobCommands self.postJobCommands = postJobCommands + self.defaultQueueName = defaultQueueName + self.defaultNodeCount = defaultNodeCount + self.defaultCPUCount = defaultCPUCount + self.editableByUser = editableByUser 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: @@ -513,6 +525,26 @@ class ApplicationDeploymentDescription: iprot.readListEnd() else: iprot.skip(ftype) + elif fid == 13: + if ftype == TType.STRING: + self.defaultQueueName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.I32: + self.defaultNodeCount = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.I32: + self.defaultCPUCount = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 16: + if ftype == TType.BOOL: + self.editableByUser = iprot.readBool() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -589,6 +621,22 @@ class ApplicationDeploymentDescription: iter41.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() + if self.defaultQueueName is not None: + oprot.writeFieldBegin('defaultQueueName', TType.STRING, 13) + oprot.writeString(self.defaultQueueName) + oprot.writeFieldEnd() + if self.defaultNodeCount is not None: + oprot.writeFieldBegin('defaultNodeCount', TType.I32, 14) + oprot.writeI32(self.defaultNodeCount) + oprot.writeFieldEnd() + if self.defaultCPUCount is not None: + oprot.writeFieldBegin('defaultCPUCount', TType.I32, 15) + oprot.writeI32(self.defaultCPUCount) + oprot.writeFieldEnd() + if self.editableByUser is not None: + oprot.writeFieldBegin('editableByUser', TType.BOOL, 16) + oprot.writeBool(self.editableByUser) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -620,6 +668,10 @@ class ApplicationDeploymentDescription: value = (value * 31) ^ hash(self.setEnvironment) value = (value * 31) ^ hash(self.preJobCommands) value = (value * 31) ^ hash(self.postJobCommands) + value = (value * 31) ^ hash(self.defaultQueueName) + value = (value * 31) ^ hash(self.defaultNodeCount) + value = (value * 31) ^ hash(self.defaultCPUCount) + value = (value * 31) ^ hash(self.editableByUser) return value def __repr__(self): http://git-wip-us.apache.org/repos/asf/airavata/blob/5904cb13/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 f402da2..174d3b8 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 @@ -455,6 +455,10 @@ class BatchQueue: - maxProcessors - maxJobsInQueue - maxMemory + - cpuPerNode + - defaultNodeCount + - defaultCPUCount + - isDefaultQueue """ thrift_spec = ( @@ -466,9 +470,13 @@ class BatchQueue: (5, TType.I32, 'maxProcessors', None, None, ), # 5 (6, TType.I32, 'maxJobsInQueue', None, None, ), # 6 (7, TType.I32, 'maxMemory', None, None, ), # 7 + (8, TType.I32, 'cpuPerNode', None, None, ), # 8 + (9, TType.I32, 'defaultNodeCount', None, None, ), # 9 + (10, TType.I32, 'defaultCPUCount', None, None, ), # 10 + (11, TType.BOOL, 'isDefaultQueue', None, None, ), # 11 ) - def __init__(self, queueName=None, queueDescription=None, maxRunTime=None, maxNodes=None, maxProcessors=None, maxJobsInQueue=None, maxMemory=None,): + def __init__(self, queueName=None, queueDescription=None, maxRunTime=None, maxNodes=None, maxProcessors=None, maxJobsInQueue=None, maxMemory=None, cpuPerNode=None, defaultNodeCount=None, defaultCPUCount=None, isDefaultQueue=None,): self.queueName = queueName self.queueDescription = queueDescription self.maxRunTime = maxRunTime @@ -476,6 +484,10 @@ class BatchQueue: self.maxProcessors = maxProcessors self.maxJobsInQueue = maxJobsInQueue self.maxMemory = maxMemory + self.cpuPerNode = cpuPerNode + self.defaultNodeCount = defaultNodeCount + self.defaultCPUCount = defaultCPUCount + self.isDefaultQueue = isDefaultQueue 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: @@ -521,6 +533,26 @@ class BatchQueue: self.maxMemory = iprot.readI32() else: iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I32: + self.cpuPerNode = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I32: + self.defaultNodeCount = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.I32: + self.defaultCPUCount = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.BOOL: + self.isDefaultQueue = iprot.readBool() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -559,6 +591,22 @@ class BatchQueue: oprot.writeFieldBegin('maxMemory', TType.I32, 7) oprot.writeI32(self.maxMemory) oprot.writeFieldEnd() + if self.cpuPerNode is not None: + oprot.writeFieldBegin('cpuPerNode', TType.I32, 8) + oprot.writeI32(self.cpuPerNode) + oprot.writeFieldEnd() + if self.defaultNodeCount is not None: + oprot.writeFieldBegin('defaultNodeCount', TType.I32, 9) + oprot.writeI32(self.defaultNodeCount) + oprot.writeFieldEnd() + if self.defaultCPUCount is not None: + oprot.writeFieldBegin('defaultCPUCount', TType.I32, 10) + oprot.writeI32(self.defaultCPUCount) + oprot.writeFieldEnd() + if self.isDefaultQueue is not None: + oprot.writeFieldBegin('isDefaultQueue', TType.BOOL, 11) + oprot.writeBool(self.isDefaultQueue) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -577,6 +625,10 @@ class BatchQueue: value = (value * 31) ^ hash(self.maxProcessors) value = (value * 31) ^ hash(self.maxJobsInQueue) value = (value * 31) ^ hash(self.maxMemory) + value = (value * 31) ^ hash(self.cpuPerNode) + value = (value * 31) ^ hash(self.defaultNodeCount) + value = (value * 31) ^ hash(self.defaultCPUCount) + value = (value * 31) ^ hash(self.isDefaultQueue) return value def __repr__(self): http://git-wip-us.apache.org/repos/asf/airavata/blob/5904cb13/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java index 63e3882..36f1d9d 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java @@ -93,6 +93,10 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase private static final org.apache.thrift.protocol.TField SET_ENVIRONMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("setEnvironment", org.apache.thrift.protocol.TType.LIST, (short)10); private static final org.apache.thrift.protocol.TField PRE_JOB_COMMANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("preJobCommands", org.apache.thrift.protocol.TType.LIST, (short)11); private static final org.apache.thrift.protocol.TField POST_JOB_COMMANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("postJobCommands", org.apache.thrift.protocol.TType.LIST, (short)12); + private static final org.apache.thrift.protocol.TField DEFAULT_QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultQueueName", org.apache.thrift.protocol.TType.STRING, (short)13); + private static final org.apache.thrift.protocol.TField DEFAULT_NODE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultNodeCount", org.apache.thrift.protocol.TType.I32, (short)14); + private static final org.apache.thrift.protocol.TField DEFAULT_CPUCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultCPUCount", org.apache.thrift.protocol.TType.I32, (short)15); + private static final org.apache.thrift.protocol.TField EDITABLE_BY_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("editableByUser", org.apache.thrift.protocol.TType.BOOL, (short)16); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -112,6 +116,10 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase private List<SetEnvPaths> setEnvironment; // optional private List<CommandObject> preJobCommands; // optional private List<CommandObject> postJobCommands; // optional + private String defaultQueueName; // optional + private int defaultNodeCount; // optional + private int defaultCPUCount; // optional + private boolean editableByUser; // 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 { @@ -130,7 +138,11 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase LIB_APPEND_PATHS((short)9, "libAppendPaths"), SET_ENVIRONMENT((short)10, "setEnvironment"), PRE_JOB_COMMANDS((short)11, "preJobCommands"), - POST_JOB_COMMANDS((short)12, "postJobCommands"); + POST_JOB_COMMANDS((short)12, "postJobCommands"), + DEFAULT_QUEUE_NAME((short)13, "defaultQueueName"), + DEFAULT_NODE_COUNT((short)14, "defaultNodeCount"), + DEFAULT_CPUCOUNT((short)15, "defaultCPUCount"), + EDITABLE_BY_USER((short)16, "editableByUser"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -169,6 +181,14 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase return PRE_JOB_COMMANDS; case 12: // POST_JOB_COMMANDS return POST_JOB_COMMANDS; + case 13: // DEFAULT_QUEUE_NAME + return DEFAULT_QUEUE_NAME; + case 14: // DEFAULT_NODE_COUNT + return DEFAULT_NODE_COUNT; + case 15: // DEFAULT_CPUCOUNT + return DEFAULT_CPUCOUNT; + case 16: // EDITABLE_BY_USER + return EDITABLE_BY_USER; default: return null; } @@ -209,7 +229,11 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase } // isset id assignments - private static final _Fields optionals[] = {_Fields.APP_DEPLOYMENT_DESCRIPTION,_Fields.MODULE_LOAD_CMDS,_Fields.LIB_PREPEND_PATHS,_Fields.LIB_APPEND_PATHS,_Fields.SET_ENVIRONMENT,_Fields.PRE_JOB_COMMANDS,_Fields.POST_JOB_COMMANDS}; + private static final int __DEFAULTNODECOUNT_ISSET_ID = 0; + private static final int __DEFAULTCPUCOUNT_ISSET_ID = 1; + private static final int __EDITABLEBYUSER_ISSET_ID = 2; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.APP_DEPLOYMENT_DESCRIPTION,_Fields.MODULE_LOAD_CMDS,_Fields.LIB_PREPEND_PATHS,_Fields.LIB_APPEND_PATHS,_Fields.SET_ENVIRONMENT,_Fields.PRE_JOB_COMMANDS,_Fields.POST_JOB_COMMANDS,_Fields.DEFAULT_QUEUE_NAME,_Fields.DEFAULT_NODE_COUNT,_Fields.DEFAULT_CPUCOUNT,_Fields.EDITABLE_BY_USER}; 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); @@ -243,6 +267,14 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase tmpMap.put(_Fields.POST_JOB_COMMANDS, new org.apache.thrift.meta_data.FieldMetaData("postJobCommands", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CommandObject.class)))); + tmpMap.put(_Fields.DEFAULT_QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("defaultQueueName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DEFAULT_NODE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("defaultNodeCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.DEFAULT_CPUCOUNT, new org.apache.thrift.meta_data.FieldMetaData("defaultCPUCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.EDITABLE_BY_USER, new org.apache.thrift.meta_data.FieldMetaData("editableByUser", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ApplicationDeploymentDescription.class, metaDataMap); } @@ -273,6 +305,7 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase * Performs a deep copy on <i>other</i>. */ public ApplicationDeploymentDescription(ApplicationDeploymentDescription other) { + __isset_bitfield = other.__isset_bitfield; if (other.isSetAppDeploymentId()) { this.appDeploymentId = other.appDeploymentId; } @@ -333,6 +366,12 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase } this.postJobCommands = __this__postJobCommands; } + if (other.isSetDefaultQueueName()) { + this.defaultQueueName = other.defaultQueueName; + } + this.defaultNodeCount = other.defaultNodeCount; + this.defaultCPUCount = other.defaultCPUCount; + this.editableByUser = other.editableByUser; } public ApplicationDeploymentDescription deepCopy() { @@ -355,6 +394,13 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase this.setEnvironment = null; this.preJobCommands = null; this.postJobCommands = null; + this.defaultQueueName = null; + setDefaultNodeCountIsSet(false); + this.defaultNodeCount = 0; + setDefaultCPUCountIsSet(false); + this.defaultCPUCount = 0; + setEditableByUserIsSet(false); + this.editableByUser = false; } public String getAppDeploymentId() { @@ -731,6 +777,95 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase } } + public String getDefaultQueueName() { + return this.defaultQueueName; + } + + public void setDefaultQueueName(String defaultQueueName) { + this.defaultQueueName = defaultQueueName; + } + + public void unsetDefaultQueueName() { + this.defaultQueueName = null; + } + + /** Returns true if field defaultQueueName is set (has been assigned a value) and false otherwise */ + public boolean isSetDefaultQueueName() { + return this.defaultQueueName != null; + } + + public void setDefaultQueueNameIsSet(boolean value) { + if (!value) { + this.defaultQueueName = null; + } + } + + public int getDefaultNodeCount() { + return this.defaultNodeCount; + } + + public void setDefaultNodeCount(int defaultNodeCount) { + this.defaultNodeCount = defaultNodeCount; + setDefaultNodeCountIsSet(true); + } + + public void unsetDefaultNodeCount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID); + } + + /** Returns true if field defaultNodeCount is set (has been assigned a value) and false otherwise */ + public boolean isSetDefaultNodeCount() { + return EncodingUtils.testBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID); + } + + public void setDefaultNodeCountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID, value); + } + + public int getDefaultCPUCount() { + return this.defaultCPUCount; + } + + public void setDefaultCPUCount(int defaultCPUCount) { + this.defaultCPUCount = defaultCPUCount; + setDefaultCPUCountIsSet(true); + } + + public void unsetDefaultCPUCount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID); + } + + /** Returns true if field defaultCPUCount is set (has been assigned a value) and false otherwise */ + public boolean isSetDefaultCPUCount() { + return EncodingUtils.testBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID); + } + + public void setDefaultCPUCountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID, value); + } + + public boolean isEditableByUser() { + return this.editableByUser; + } + + public void setEditableByUser(boolean editableByUser) { + this.editableByUser = editableByUser; + setEditableByUserIsSet(true); + } + + public void unsetEditableByUser() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EDITABLEBYUSER_ISSET_ID); + } + + /** Returns true if field editableByUser is set (has been assigned a value) and false otherwise */ + public boolean isSetEditableByUser() { + return EncodingUtils.testBit(__isset_bitfield, __EDITABLEBYUSER_ISSET_ID); + } + + public void setEditableByUserIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EDITABLEBYUSER_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case APP_DEPLOYMENT_ID: @@ -829,6 +964,38 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase } break; + case DEFAULT_QUEUE_NAME: + if (value == null) { + unsetDefaultQueueName(); + } else { + setDefaultQueueName((String)value); + } + break; + + case DEFAULT_NODE_COUNT: + if (value == null) { + unsetDefaultNodeCount(); + } else { + setDefaultNodeCount((Integer)value); + } + break; + + case DEFAULT_CPUCOUNT: + if (value == null) { + unsetDefaultCPUCount(); + } else { + setDefaultCPUCount((Integer)value); + } + break; + + case EDITABLE_BY_USER: + if (value == null) { + unsetEditableByUser(); + } else { + setEditableByUser((Boolean)value); + } + break; + } } @@ -870,6 +1037,18 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase case POST_JOB_COMMANDS: return getPostJobCommands(); + case DEFAULT_QUEUE_NAME: + return getDefaultQueueName(); + + case DEFAULT_NODE_COUNT: + return getDefaultNodeCount(); + + case DEFAULT_CPUCOUNT: + return getDefaultCPUCount(); + + case EDITABLE_BY_USER: + return isEditableByUser(); + } throw new IllegalStateException(); } @@ -905,6 +1084,14 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase return isSetPreJobCommands(); case POST_JOB_COMMANDS: return isSetPostJobCommands(); + case DEFAULT_QUEUE_NAME: + return isSetDefaultQueueName(); + case DEFAULT_NODE_COUNT: + return isSetDefaultNodeCount(); + case DEFAULT_CPUCOUNT: + return isSetDefaultCPUCount(); + case EDITABLE_BY_USER: + return isSetEditableByUser(); } throw new IllegalStateException(); } @@ -1030,6 +1217,42 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase return false; } + boolean this_present_defaultQueueName = true && this.isSetDefaultQueueName(); + boolean that_present_defaultQueueName = true && that.isSetDefaultQueueName(); + if (this_present_defaultQueueName || that_present_defaultQueueName) { + if (!(this_present_defaultQueueName && that_present_defaultQueueName)) + return false; + if (!this.defaultQueueName.equals(that.defaultQueueName)) + return false; + } + + boolean this_present_defaultNodeCount = true && this.isSetDefaultNodeCount(); + boolean that_present_defaultNodeCount = true && that.isSetDefaultNodeCount(); + if (this_present_defaultNodeCount || that_present_defaultNodeCount) { + if (!(this_present_defaultNodeCount && that_present_defaultNodeCount)) + return false; + if (this.defaultNodeCount != that.defaultNodeCount) + return false; + } + + boolean this_present_defaultCPUCount = true && this.isSetDefaultCPUCount(); + boolean that_present_defaultCPUCount = true && that.isSetDefaultCPUCount(); + if (this_present_defaultCPUCount || that_present_defaultCPUCount) { + if (!(this_present_defaultCPUCount && that_present_defaultCPUCount)) + return false; + if (this.defaultCPUCount != that.defaultCPUCount) + return false; + } + + boolean this_present_editableByUser = true && this.isSetEditableByUser(); + boolean that_present_editableByUser = true && that.isSetEditableByUser(); + if (this_present_editableByUser || that_present_editableByUser) { + if (!(this_present_editableByUser && that_present_editableByUser)) + return false; + if (this.editableByUser != that.editableByUser) + return false; + } + return true; } @@ -1097,6 +1320,26 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase if (present_postJobCommands) list.add(postJobCommands); + boolean present_defaultQueueName = true && (isSetDefaultQueueName()); + list.add(present_defaultQueueName); + if (present_defaultQueueName) + list.add(defaultQueueName); + + boolean present_defaultNodeCount = true && (isSetDefaultNodeCount()); + list.add(present_defaultNodeCount); + if (present_defaultNodeCount) + list.add(defaultNodeCount); + + boolean present_defaultCPUCount = true && (isSetDefaultCPUCount()); + list.add(present_defaultCPUCount); + if (present_defaultCPUCount) + list.add(defaultCPUCount); + + boolean present_editableByUser = true && (isSetEditableByUser()); + list.add(present_editableByUser); + if (present_editableByUser) + list.add(editableByUser); + return list.hashCode(); } @@ -1228,6 +1471,46 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase return lastComparison; } } + lastComparison = Boolean.valueOf(isSetDefaultQueueName()).compareTo(other.isSetDefaultQueueName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDefaultQueueName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultQueueName, other.defaultQueueName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDefaultNodeCount()).compareTo(other.isSetDefaultNodeCount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDefaultNodeCount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultNodeCount, other.defaultNodeCount); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDefaultCPUCount()).compareTo(other.isSetDefaultCPUCount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDefaultCPUCount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultCPUCount, other.defaultCPUCount); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEditableByUser()).compareTo(other.isSetEditableByUser()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEditableByUser()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.editableByUser, other.editableByUser); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1357,6 +1640,34 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase } first = false; } + if (isSetDefaultQueueName()) { + if (!first) sb.append(", "); + sb.append("defaultQueueName:"); + if (this.defaultQueueName == null) { + sb.append("null"); + } else { + sb.append(this.defaultQueueName); + } + first = false; + } + if (isSetDefaultNodeCount()) { + if (!first) sb.append(", "); + sb.append("defaultNodeCount:"); + sb.append(this.defaultNodeCount); + first = false; + } + if (isSetDefaultCPUCount()) { + if (!first) sb.append(", "); + sb.append("defaultCPUCount:"); + sb.append(this.defaultCPUCount); + first = false; + } + if (isSetEditableByUser()) { + if (!first) sb.append(", "); + sb.append("editableByUser:"); + sb.append(this.editableByUser); + first = false; + } sb.append(")"); return sb.toString(); } @@ -1396,6 +1707,8 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -1582,6 +1895,38 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 13: // DEFAULT_QUEUE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.defaultQueueName = iprot.readString(); + struct.setDefaultQueueNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // DEFAULT_NODE_COUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.defaultNodeCount = iprot.readI32(); + struct.setDefaultNodeCountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // DEFAULT_CPUCOUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.defaultCPUCount = iprot.readI32(); + struct.setDefaultCPUCountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // EDITABLE_BY_USER + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.editableByUser = iprot.readBool(); + struct.setEditableByUserIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1711,6 +2056,28 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase oprot.writeFieldEnd(); } } + if (struct.defaultQueueName != null) { + if (struct.isSetDefaultQueueName()) { + oprot.writeFieldBegin(DEFAULT_QUEUE_NAME_FIELD_DESC); + oprot.writeString(struct.defaultQueueName); + oprot.writeFieldEnd(); + } + } + if (struct.isSetDefaultNodeCount()) { + oprot.writeFieldBegin(DEFAULT_NODE_COUNT_FIELD_DESC); + oprot.writeI32(struct.defaultNodeCount); + oprot.writeFieldEnd(); + } + if (struct.isSetDefaultCPUCount()) { + oprot.writeFieldBegin(DEFAULT_CPUCOUNT_FIELD_DESC); + oprot.writeI32(struct.defaultCPUCount); + oprot.writeFieldEnd(); + } + if (struct.isSetEditableByUser()) { + oprot.writeFieldBegin(EDITABLE_BY_USER_FIELD_DESC); + oprot.writeBool(struct.editableByUser); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1755,7 +2122,19 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase if (struct.isSetPostJobCommands()) { optionals.set(6); } - oprot.writeBitSet(optionals, 7); + if (struct.isSetDefaultQueueName()) { + optionals.set(7); + } + if (struct.isSetDefaultNodeCount()) { + optionals.set(8); + } + if (struct.isSetDefaultCPUCount()) { + optionals.set(9); + } + if (struct.isSetEditableByUser()) { + optionals.set(10); + } + oprot.writeBitSet(optionals, 11); if (struct.isSetAppDeploymentDescription()) { oprot.writeString(struct.appDeploymentDescription); } @@ -1813,6 +2192,18 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase } } } + if (struct.isSetDefaultQueueName()) { + oprot.writeString(struct.defaultQueueName); + } + if (struct.isSetDefaultNodeCount()) { + oprot.writeI32(struct.defaultNodeCount); + } + if (struct.isSetDefaultCPUCount()) { + oprot.writeI32(struct.defaultCPUCount); + } + if (struct.isSetEditableByUser()) { + oprot.writeBool(struct.editableByUser); + } } @Override @@ -1828,7 +2219,7 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase struct.setExecutablePathIsSet(true); struct.parallelism = org.apache.airavata.model.parallelism.ApplicationParallelismType.findByValue(iprot.readI32()); struct.setParallelismIsSet(true); - BitSet incoming = iprot.readBitSet(7); + BitSet incoming = iprot.readBitSet(11); if (incoming.get(0)) { struct.appDeploymentDescription = iprot.readString(); struct.setAppDeploymentDescriptionIsSet(true); @@ -1917,6 +2308,22 @@ public class ApplicationDeploymentDescription implements org.apache.thrift.TBase } struct.setPostJobCommandsIsSet(true); } + if (incoming.get(7)) { + struct.defaultQueueName = iprot.readString(); + struct.setDefaultQueueNameIsSet(true); + } + if (incoming.get(8)) { + struct.defaultNodeCount = iprot.readI32(); + struct.setDefaultNodeCountIsSet(true); + } + if (incoming.get(9)) { + struct.defaultCPUCount = iprot.readI32(); + struct.setDefaultCPUCountIsSet(true); + } + if (incoming.get(10)) { + struct.editableByUser = iprot.readBool(); + struct.setEditableByUserIsSet(true); + } } }
