You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2015/06/15 21:36:56 UTC
[1/3] airavata git commit: adding deployement id and fixing some
issues with new models
Repository: airavata
Updated Branches:
refs/heads/master b00f20f25 -> 5264b390e
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
index 92e9131..d3aefeb 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
@@ -22,9 +22,15 @@
package org.apache.airavata.registry.core.experiment.catalog.utils;
import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.model.appcatalog.appinterface.DataType;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.application.io.DataType;
+import org.apache.airavata.model.application.io.InputDataObjectType;
+import org.apache.airavata.model.application.io.OutputDataObjectType;
+import org.apache.airavata.model.commons.ErrorModel;
+import org.apache.airavata.model.job.JobModel;
+import org.apache.airavata.model.process.ProcessModel;
+import org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel;
+import org.apache.airavata.model.status.*;
+import org.apache.airavata.model.task.TaskModel;
import org.apache.airavata.model.workspace.Gateway;
import org.apache.airavata.model.workspace.Project;
import org.apache.airavata.model.experiment.*;
@@ -82,26 +88,22 @@ public class ThriftDataModelConversion {
}
- public static Experiment getExperiment(ExperimentResource experimentResource) throws RegistryException {
+ public static ExperimentModel getExperiment(ExperimentResource experimentResource) throws RegistryException {
if (experimentResource != null){
- Experiment experiment = new Experiment();
- experiment.setProjectID(experimentResource.getProjectId());
- experiment.setExperimentID(experimentResource.getExpID());
+ ExperimentModel experiment = new ExperimentModel();
+ experiment.setProjectId(experimentResource.getProjectId());
+ experiment.setExperimentId(experimentResource.getExpID());
experiment.setCreationTime(experimentResource.getCreationTime().getTime());
experiment.setUserName(experimentResource.getExecutionUser());
- experiment.setName(experimentResource.getExpName());
+ experiment.setExperimentName(experimentResource.getExpName());
experiment.setDescription(experimentResource.getDescription());
- experiment.setApplicationId(experimentResource.getApplicationId());
- experiment.setApplicationVersion(experimentResource.getApplicationVersion());
- experiment.setWorkflowTemplateId(experimentResource.getWorkflowTemplateId());
+ experiment.setExecutionId(experimentResource.getApplicationId());
experiment.setEnableEmailNotification(experimentResource.isEnableEmailNotifications());
experiment.setGatewayExecutionId(experimentResource.getGatewayExecutionId());
if (experiment.isEnableEmailNotification()){
List<NotificationEmailResource> notificationEmails = experimentResource.getNotificationEmails();
experiment.setEmailAddresses(getEmailAddresses(notificationEmails));
}
- experiment.setWorkflowTemplateVersion(experimentResource.getWorkflowTemplateVersion());
- experiment.setWorkflowExecutionInstanceId(experimentResource.getWorkflowExecutionId());
List<ExperimentInputResource> experimentInputs = experimentResource.getExperimentInputs();
experiment.setExperimentInputs(getExpInputs(experimentInputs));
List<ExperimentOutputResource> experimentOutputs = experimentResource.getExperimentOutputs();
@@ -110,15 +112,6 @@ public class ThriftDataModelConversion {
if (experimentStatus != null){
experiment.setExperimentStatus(getExperimentStatus(experimentStatus));
}
- List<StatusResource> changeList = experimentResource.getWorkflowNodeStatuses();
- if (changeList != null && !changeList.isEmpty()){
- experiment.setStateChangeList(getWorkflowNodeStatusList(changeList));
- }
-
- List<WorkflowNodeDetailResource> workflowNodeDetails = experimentResource.getWorkflowNodeDetails();
- if (workflowNodeDetails != null && !workflowNodeDetails.isEmpty()){
- experiment.setWorkflowNodeDetailsList(getWfNodeList(workflowNodeDetails));
- }
List<ErrorDetailResource> errorDetails = experimentResource.getErrorDetails();
if (errorDetails!= null && !errorDetails.isEmpty()){
experiment.setErrors(getErrorDetailList(errorDetails));
@@ -132,11 +125,11 @@ public class ThriftDataModelConversion {
return null;
}
- public static ExperimentSummary getExperimentSummary(ExperimentSummaryResource experimentSummaryResource) throws RegistryException {
+ public static ExperimentSummaryModel getExperimentSummary(ExperimentSummaryResource experimentSummaryResource) throws RegistryException {
if (experimentSummaryResource != null){
- ExperimentSummary experimentSummary = new ExperimentSummary();
- experimentSummary.setProjectID(experimentSummaryResource.getProjectID());
- experimentSummary.setExperimentID(experimentSummaryResource.getExpID());
+ ExperimentSummaryModel experimentSummary = new ExperimentSummaryModel();
+ experimentSummary.setProjectId(experimentSummaryResource.getProjectID());
+ experimentSummary.setExperimentId(experimentSummaryResource.getExpID());
experimentSummary.setCreationTime(experimentSummaryResource.getCreationTime().getTime());
experimentSummary.setUserName(experimentSummaryResource.getExecutionUser());
experimentSummary.setName(experimentSummaryResource.getExpName());
@@ -343,35 +336,22 @@ public class ThriftDataModelConversion {
if (status.getState() == null || status.getState().equals("")){
status.setState("UNKNOWN");
}
- experimentStatus.setExperimentState(ExperimentState.valueOf(status.getState()));
+ experimentStatus.setState(ExperimentState.valueOf(status.getState()));
experimentStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
return experimentStatus;
}
return null;
}
- public static WorkflowNodeStatus getWorkflowNodeStatus (StatusResource status){
- if (status != null){
- WorkflowNodeStatus workflowNodeStatus = new WorkflowNodeStatus();
- if (status.getState() == null || status.getState().equals("")){
- status.setState("UNKNOWN");
- }
- workflowNodeStatus.setWorkflowNodeState(WorkflowNodeState.valueOf(status.getState()));
- workflowNodeStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
- return workflowNodeStatus;
- }
- return null;
- }
-
- public static TaskStatus getTaskStatus (StatusResource status){
+ public static ProcessStatus getProcessStatus (StatusResource status){
if (status != null){
- TaskStatus taskStatus = new TaskStatus();
+ ProcessStatus processStatus = new ProcessStatus();
if (status.getState() == null || status.getState().equals("")){
status.setState("UNKNOWN");
}
- taskStatus.setExecutionState(TaskState.valueOf(status.getState()));
- taskStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
- return taskStatus;
+ processStatus.setState(ProcessState.valueOf(status.getState()));
+ processStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
+ return processStatus;
}
return null;
}
@@ -393,141 +373,136 @@ public class ThriftDataModelConversion {
return null;
}
- public static TransferStatus getTransferStatus (StatusResource status){
- if (status != null){
- TransferStatus transferStatus = new TransferStatus();
- if (status.getState() == null || status.getState().equals("")){
- status.setState("UNKNOWN");
- }
- transferStatus.setTransferState(TransferState.valueOf(status.getState()));
- transferStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
- return transferStatus;
- }
- return null;
- }
-
- public static ApplicationStatus getApplicationStatus (StatusResource status){
- if (status != null){
- ApplicationStatus applicationStatus = new ApplicationStatus();
- if (status.getState() == null || status.getState().equals("")){
- status.setState("UNKNOWN");
- }
- applicationStatus.setApplicationState(status.getState());
- applicationStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
- return applicationStatus;
- }
- return null;
- }
-
- public static List<WorkflowNodeStatus> getWorkflowNodeStatusList(List<StatusResource> statuses){
- List<WorkflowNodeStatus> wfNodeStatuses = new ArrayList<WorkflowNodeStatus>();
- if (statuses != null && !statuses.isEmpty()){
- for (StatusResource statusResource : statuses){
- wfNodeStatuses.add(getWorkflowNodeStatus(statusResource));
- }
- }
- return wfNodeStatuses;
- }
-
- public static WorkflowNodeDetails getWorkflowNodeDetails(WorkflowNodeDetailResource nodeDetailResource) throws RegistryException {
- if (nodeDetailResource != null){
- WorkflowNodeDetails wfNode = new WorkflowNodeDetails();
- wfNode.setNodeInstanceId(nodeDetailResource.getNodeInstanceId());
- wfNode.setCreationTime(nodeDetailResource.getCreationTime().getTime());
- wfNode.setNodeName(nodeDetailResource.getNodeName());
- List<NodeInputResource> nodeInputs = nodeDetailResource.getNodeInputs();
- wfNode.setNodeInputs(getNodeInputs(nodeInputs));
- List<NodeOutputResource> nodeOutputs = nodeDetailResource.getNodeOutputs();
- wfNode.setNodeOutputs(getNodeOutputs(nodeOutputs));
- List<TaskDetailResource> taskDetails = nodeDetailResource.getTaskDetails();
- wfNode.setTaskDetailsList(getTaskDetailsList(taskDetails));
- wfNode.setWorkflowNodeStatus(getWorkflowNodeStatus(nodeDetailResource.getWorkflowNodeStatus()));
- List<ErrorDetailResource> errorDetails = nodeDetailResource.getErrorDetails();
- wfNode.setErrors(getErrorDetailList(errorDetails));
- wfNode.setExecutionUnit(ExecutionUnit.valueOf(nodeDetailResource.getExecutionUnit()));
- wfNode.setExecutionUnitData(nodeDetailResource.getExecutionUnitData());
- return wfNode;
- }
- return null;
- }
-
- public static List<WorkflowNodeDetails> getWfNodeList (List<WorkflowNodeDetailResource> resources) throws RegistryException {
- List<WorkflowNodeDetails> workflowNodeDetailsList = new ArrayList<WorkflowNodeDetails>();
- if (resources != null && !resources.isEmpty()){
- for (WorkflowNodeDetailResource resource : resources){
- workflowNodeDetailsList.add(getWorkflowNodeDetails(resource));
- }
- }
- return workflowNodeDetailsList;
- }
-
- public static TaskDetails getTaskDetail (TaskDetailResource taskDetailResource) throws RegistryException {
+// public static TransferStatus getTransferStatus (StatusResource status){
+// if (status != null){
+// TransferStatus transferStatus = new TransferStatus();
+// if (status.getState() == null || status.getState().equals("")){
+// status.setState("UNKNOWN");
+// }
+// transferStatus.setTransferState(TransferState.valueOf(status.getState()));
+// transferStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
+// return transferStatus;
+// }
+// return null;
+// }
+
+// public static ApplicationStatus getApplicationStatus (StatusResource status){
+// if (status != null){
+// ApplicationStatus applicationStatus = new ApplicationStatus();
+// if (status.getState() == null || status.getState().equals("")){
+// status.setState("UNKNOWN");
+// }
+// applicationStatus.setApplicationState(status.getState());
+// applicationStatus.setTimeOfStateChange(status.getStatusUpdateTime().getTime());
+// return applicationStatus;
+// }
+// return null;
+// }
+//
+// public static List<WorkflowNodeStatus> getWorkflowNodeStatusList(List<StatusResource> statuses){
+// List<WorkflowNodeStatus> wfNodeStatuses = new ArrayList<WorkflowNodeStatus>();
+// if (statuses != null && !statuses.isEmpty()){
+// for (StatusResource statusResource : statuses){
+// wfNodeStatuses.add(getWorkflowNodeStatus(statusResource));
+// }
+// }
+// return wfNodeStatuses;
+// }
+
+// public static WorkflowNodeDetails getWorkflowNodeDetails(WorkflowNodeDetailResource nodeDetailResource) throws RegistryException {
+// if (nodeDetailResource != null){
+// WorkflowNodeDetails wfNode = new WorkflowNodeDetails();
+// wfNode.setNodeInstanceId(nodeDetailResource.getNodeInstanceId());
+// wfNode.setCreationTime(nodeDetailResource.getCreationTime().getTime());
+// wfNode.setNodeName(nodeDetailResource.getNodeName());
+// List<NodeInputResource> nodeInputs = nodeDetailResource.getNodeInputs();
+// wfNode.setNodeInputs(getNodeInputs(nodeInputs));
+// List<NodeOutputResource> nodeOutputs = nodeDetailResource.getNodeOutputs();
+// wfNode.setNodeOutputs(getNodeOutputs(nodeOutputs));
+// List<TaskDetailResource> taskDetails = nodeDetailResource.getTaskDetails();
+// wfNode.setTaskDetailsList(getTaskDetailsList(taskDetails));
+// wfNode.setWorkflowNodeStatus(getWorkflowNodeStatus(nodeDetailResource.getWorkflowNodeStatus()));
+// List<ErrorDetailResource> errorDetails = nodeDetailResource.getErrorDetails();
+// wfNode.setErrors(getErrorDetailList(errorDetails));
+// wfNode.setExecutionUnit(ExecutionUnit.valueOf(nodeDetailResource.getExecutionUnit()));
+// wfNode.setExecutionUnitData(nodeDetailResource.getExecutionUnitData());
+// return wfNode;
+// }
+// return null;
+// }
+//
+// public static List<WorkflowNodeDetails> getWfNodeList (List<WorkflowNodeDetailResource> resources) throws RegistryException {
+// List<WorkflowNodeDetails> workflowNodeDetailsList = new ArrayList<WorkflowNodeDetails>();
+// if (resources != null && !resources.isEmpty()){
+// for (WorkflowNodeDetailResource resource : resources){
+// workflowNodeDetailsList.add(getWorkflowNodeDetails(resource));
+// }
+// }
+// return workflowNodeDetailsList;
+// }
+
+ public static ProcessModel getProcesModel (TaskDetailResource taskDetailResource) throws RegistryException {
if (taskDetailResource != null){
- TaskDetails taskDetails = new TaskDetails();
+ ProcessModel processModel = new ProcessModel();
String taskId = taskDetailResource.getTaskId();
- taskDetails.setTaskID(taskId);
- taskDetails.setApplicationId(taskDetailResource.getApplicationId());
- taskDetails.setApplicationVersion(taskDetailResource.getApplicationVersion());
+ processModel.setProcessId(taskId);
+ processModel.setApplicationInterfaceId(taskDetailResource.getApplicationId());
List<ApplicationInputResource> applicationInputs = taskDetailResource.getApplicationInputs();
- taskDetails.setApplicationInputs(getApplicationInputs(applicationInputs));
+ processModel.setProcessInputs(getApplicationInputs(applicationInputs));
List<ApplicationOutputResource> applicationOutputs = taskDetailResource.getApplicationOutputs();
- taskDetails.setApplicationOutputs(getApplicationOutputs(applicationOutputs));
- taskDetails.setEnableEmailNotification(taskDetailResource.isEnableEmailNotifications());
- if (taskDetails.isEnableEmailNotification()){
+ processModel.setProcessOutputs(getApplicationOutputs(applicationOutputs));
+ processModel.setEnableEmailNotification(taskDetailResource.isEnableEmailNotifications());
+ if (processModel.isEnableEmailNotification()){
List<NotificationEmailResource> notificationEmails = taskDetailResource.getNotificationEmails();
- taskDetails.setEmailAddresses(getEmailAddresses(notificationEmails));
+ processModel.setEmailAddresses(getEmailAddresses(notificationEmails));
}
- taskDetails.setApplicationDeploymentId(taskDetailResource.getApplicationDeploymentId());
+ processModel.setApplicationDeploymentId(taskDetailResource.getApplicationDeploymentId());
if (taskDetailResource.isExists(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING, taskId)){
ComputationSchedulingResource computationScheduling = taskDetailResource.getComputationScheduling(taskId);
- taskDetails.setTaskScheduling(getComputationalResourceScheduling(computationScheduling));
+ processModel.setResourceSchedule(getComputationalResourceScheduling(computationScheduling));
}
- if (taskDetailResource.isExists(ResourceType.ADVANCE_INPUT_DATA_HANDLING, taskId)){
- AdvanceInputDataHandlingResource inputDataHandling = taskDetailResource.getInputDataHandling(taskId);
- taskDetails.setAdvancedInputDataHandling(getAdvanceInputDataHandling(inputDataHandling));
- }
-
- if (taskDetailResource.isExists(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, taskId)){
- AdvancedOutputDataHandlingResource outputDataHandling = taskDetailResource.getOutputDataHandling(taskId);
- taskDetails.setAdvancedOutputDataHandling(getAdvanceOutputDataHandling(outputDataHandling));
- }
-
- taskDetails.setTaskStatus(getTaskStatus(taskDetailResource.getTaskStatus()));
- List<JobDetailResource> jobDetailList = taskDetailResource.getJobDetailList();
- taskDetails.setJobDetailsList(getJobDetailsList(jobDetailList));
- taskDetails.setErrors(getErrorDetailList(taskDetailResource.getErrorDetailList()));
- taskDetails.setDataTransferDetailsList(getDataTransferlList(taskDetailResource.getDataTransferDetailList()));
- return taskDetails;
+ processModel.setProcessStatus(getProcessStatus(taskDetailResource.getTaskStatus()));
+// List<JobDetailResource> jobDetailList = taskDetailResource.getJobDetailList();
+// processModel.setJobDetailsList(getJobDetailsList(jobDetailList));
+// processModel.setProcessError(getErrorDetails(taskDetailResource.getErrorDetailList().get(0)));
+// processModel.setDataTransferDetailsList(getDataTransferlList(taskDetailResource.getDataTransferDetailList()));
+ return processModel;
}
return null;
}
- public static List<TaskDetails> getTaskDetailsList (List<TaskDetailResource> resources) throws RegistryException {
- List<TaskDetails> taskDetailsList = new ArrayList<TaskDetails>();
+ public static List<TaskModel> getTaskDetailsList (List<TaskDetailResource> resources) throws RegistryException {
+ List<TaskModel> taskDetailsList = new ArrayList<TaskModel>();
if (resources != null && !resources.isEmpty()){
for (TaskDetailResource resource : resources){
- taskDetailsList.add(getTaskDetail(resource));
+ taskDetailsList.add(getTaskModel(resource));
}
}
return taskDetailsList;
}
- public static List<JobDetails> getJobDetailsList(List<JobDetailResource> jobs) throws RegistryException {
- List<JobDetails> jobDetailsList = new ArrayList<JobDetails>();
- if (jobs != null && !jobs.isEmpty()){
- for (JobDetailResource resource : jobs){
- jobDetailsList.add(getJobDetail(resource));
- }
- }
- return jobDetailsList;
+ //FIXME: should fill according to registry object
+ public static TaskModel getTaskModel (TaskDetailResource taskDetailResource){
+ TaskModel model = new TaskModel();
+ return model;
}
+// public static List<JobDetails> getJobDetailsList(List<JobDetailResource> jobs) throws RegistryException {
+// List<JobDetails> jobDetailsList = new ArrayList<JobDetails>();
+// if (jobs != null && !jobs.isEmpty()){
+// for (JobDetailResource resource : jobs){
+// jobDetailsList.add(getJobDetail(resource));
+// }
+// }
+// return jobDetailsList;
+// }
+
- public static JobDetails getJobDetail(JobDetailResource jobDetailResource) throws RegistryException {
+ public static JobModel getJobDetail(JobDetailResource jobDetailResource) throws RegistryException {
if (jobDetailResource != null){
- JobDetails jobDetails = new JobDetails();
- jobDetails.setJobID(jobDetailResource.getJobId());
+ JobModel jobDetails = new JobModel();
+ jobDetails.setJobId(jobDetailResource.getJobId());
jobDetails.setJobDescription(jobDetailResource.getJobDescription());
jobDetails.setCreationTime(jobDetailResource.getCreationTime().getTime());
StatusResource jobStatus = jobDetailResource.getJobStatus();
@@ -535,7 +510,7 @@ public class ThriftDataModelConversion {
jobDetails.setJobName(jobDetailResource.getJobName());
jobDetails.setWorkingDir(jobDetailResource.getWorkingDir());
StatusResource applicationStatus = jobDetailResource.getApplicationStatus();
- jobDetails.setApplicationStatus(getApplicationStatus(applicationStatus));
+ jobDetails.setJobStatus(getJobStatus(applicationStatus));
List<ErrorDetailResource> errorDetails = jobDetailResource.getErrorDetails();
jobDetails.setErrors(getErrorDetailList(errorDetails));
jobDetails.setComputeResourceConsumed(jobDetailResource.getComputeResourceConsumed());
@@ -544,24 +519,21 @@ public class ThriftDataModelConversion {
return null;
}
- public static ErrorDetails getErrorDetails (ErrorDetailResource resource){
+ public static ErrorModel getErrorDetails (ErrorDetailResource resource){
if (resource != null){
- ErrorDetails errorDetails = new ErrorDetails();
- errorDetails.setErrorID(String.valueOf(resource.getErrorId()));
+ ErrorModel errorDetails = new ErrorModel();
+ errorDetails.setErrorId(String.valueOf(resource.getErrorId()));
errorDetails.setCreationTime(resource.getCreationTime().getTime());
errorDetails.setActualErrorMessage(resource.getActualErrorMsg());
errorDetails.setUserFriendlyMessage(resource.getUserFriendlyErrorMsg());
- errorDetails.setErrorCategory(ErrorCategory.valueOf(resource.getErrorCategory()));
errorDetails.setTransientOrPersistent(resource.isTransientPersistent());
- errorDetails.setCorrectiveAction(CorrectiveAction.valueOf(resource.getCorrectiveAction()));
- errorDetails.setActionableGroup(ActionableGroup.valueOf(resource.getActionableGroup()));
return errorDetails;
}
return null;
}
- public static List<ErrorDetails> getErrorDetailList (List<ErrorDetailResource> errorDetailResources){
- List<ErrorDetails> errorDetailsList = new ArrayList<ErrorDetails>();
+ public static List<ErrorModel> getErrorDetailList (List<ErrorDetailResource> errorDetailResources){
+ List<ErrorModel> errorDetailsList = new ArrayList<ErrorModel>();
if (errorDetailResources != null && !errorDetailResources.isEmpty()){
for (ErrorDetailResource errorDetailResource : errorDetailResources){
errorDetailsList.add(getErrorDetails(errorDetailResource));
@@ -569,33 +541,33 @@ public class ThriftDataModelConversion {
}
return errorDetailsList;
}
-
- public static DataTransferDetails getDataTransferDetail (DataTransferDetailResource resource) throws RegistryException {
- if (resource != null){
- DataTransferDetails details = new DataTransferDetails();
- details.setTransferID(resource.getTransferId());
- details.setCreationTime(resource.getCreationTime().getTime());
- details.setTransferDescription(resource.getTransferDescription());
- details.setTransferStatus(getTransferStatus(resource.getDataTransferStatus()));
- return details;
- }
- return null;
- }
-
- public static List<DataTransferDetails> getDataTransferlList (List<DataTransferDetailResource> resources) throws RegistryException {
- List<DataTransferDetails> transferDetailsList = new ArrayList<DataTransferDetails>();
- if (resources != null && !resources.isEmpty()){
- for (DataTransferDetailResource resource : resources){
- transferDetailsList.add(getDataTransferDetail(resource));
- }
- }
- return transferDetailsList;
- }
-
-
- public static UserConfigurationData getUserConfigData (ConfigDataResource resource) throws RegistryException {
+//
+// public static DataTransferDetails getDataTransferDetail (DataTransferDetailResource resource) throws RegistryException {
+// if (resource != null){
+// DataTransferDetails details = new DataTransferDetails();
+// details.setTransferID(resource.getTransferId());
+// details.setCreationTime(resource.getCreationTime().getTime());
+// details.setTransferDescription(resource.getTransferDescription());
+// details.setTransferStatus(getTransferStatus(resource.getDataTransferStatus()));
+// return details;
+// }
+// return null;
+// }
+//
+// public static List<DataTransferDetails> getDataTransferlList (List<DataTransferDetailResource> resources) throws RegistryException {
+// List<DataTransferDetails> transferDetailsList = new ArrayList<DataTransferDetails>();
+// if (resources != null && !resources.isEmpty()){
+// for (DataTransferDetailResource resource : resources){
+// transferDetailsList.add(getDataTransferDetail(resource));
+// }
+// }
+// return transferDetailsList;
+// }
+
+
+ public static UserConfigurationDataModel getUserConfigData (ConfigDataResource resource) throws RegistryException {
if (resource != null){
- UserConfigurationData data = new UserConfigurationData();
+ UserConfigurationDataModel data = new UserConfigurationDataModel();
data.setAiravataAutoSchedule(resource.isAiravataAutoSchedule());
data.setOverrideManualScheduledParams(resource.isOverrideManualParams());
data.setShareExperimentPublicly(resource.isShareExp());
@@ -608,79 +580,25 @@ public class ThriftDataModelConversion {
ComputationSchedulingResource computationScheduling = experimentResource.getComputationScheduling(expID);
data.setComputationalResourceScheduling(getComputationalResourceScheduling(computationScheduling));
}
-
- if (experimentResource.isExists(ResourceType.ADVANCE_INPUT_DATA_HANDLING, expID)){
- AdvanceInputDataHandlingResource inputDataHandling = experimentResource.getInputDataHandling(expID);
- data.setAdvanceInputDataHandling(getAdvanceInputDataHandling(inputDataHandling));
- }
-
- if (experimentResource.isExists(ResourceType.ADVANCE_OUTPUT_DATA_HANDLING, expID)){
- AdvancedOutputDataHandlingResource outputDataHandling = experimentResource.getOutputDataHandling(expID);
- data.setAdvanceOutputDataHandling(getAdvanceOutputDataHandling(outputDataHandling));
- }
-
- if (experimentResource.isExists(ResourceType.QOS_PARAM, expID)){
- QosParamResource qoSparams = experimentResource.getQOSparams(expID);
- data.setQosParams(getQOSParams(qoSparams));
- }
return data;
}
return null;
}
- public static ComputationalResourceScheduling getComputationalResourceScheduling (ComputationSchedulingResource csr){
+ public static ComputationalResourceSchedulingModel getComputationalResourceScheduling (ComputationSchedulingResource csr){
if (csr != null){
- ComputationalResourceScheduling scheduling = new ComputationalResourceScheduling();
+ ComputationalResourceSchedulingModel scheduling = new ComputationalResourceSchedulingModel();
scheduling.setResourceHostId(csr.getResourceHostId());
scheduling.setTotalCPUCount(csr.getCpuCount());
scheduling.setNodeCount(csr.getNodeCount());
scheduling.setNumberOfThreads(csr.getNumberOfThreads());
scheduling.setQueueName(csr.getQueueName());
scheduling.setWallTimeLimit(csr.getWalltimeLimit());
- scheduling.setJobStartTime((int)csr.getJobStartTime().getTime());
scheduling.setTotalPhysicalMemory(csr.getPhysicalMemory());
- scheduling.setComputationalProjectAccount(csr.getProjectName());
- scheduling.setChassisName(csr.getChessisName());
+ scheduling.setChessisNumber(csr.getChessisName());
return scheduling;
}
return null;
}
-
- public static AdvancedInputDataHandling getAdvanceInputDataHandling(AdvanceInputDataHandlingResource adhr){
- if (adhr != null){
- AdvancedInputDataHandling adih = new AdvancedInputDataHandling();
- adih.setStageInputFilesToWorkingDir(adhr.isStageInputFiles());
- adih.setParentWorkingDirectory(adhr.getWorkingDirParent());
- adih.setUniqueWorkingDirectory(adhr.getWorkingDir());
- adih.setCleanUpWorkingDirAfterJob(adhr.isCleanAfterJob());
- return adih;
- }
- return null;
- }
-
- public static AdvancedOutputDataHandling getAdvanceOutputDataHandling(AdvancedOutputDataHandlingResource adodh){
- if (adodh != null){
- AdvancedOutputDataHandling outputDataHandling = new AdvancedOutputDataHandling();
- outputDataHandling.setOutputDataDir(adodh.getOutputDataDir());
- outputDataHandling.setDataRegistryURL(adodh.getDataRegUrl());
- outputDataHandling.setPersistOutputData(adodh.isPersistOutputData());
- return outputDataHandling;
- }
- return null;
- }
-
- public static QualityOfServiceParams getQOSParams (QosParamResource qos){
- if (qos != null){
- QualityOfServiceParams qosParams = new QualityOfServiceParams();
- qosParams.setStartExecutionAt(qos.getStartExecutionAt());
- qosParams.setExecuteBefore(qos.getExecuteBefore());
- qosParams.setNumberofRetries(qos.getNoOfRetries());
- return qosParams;
- }
- return null;
- }
-
-
-
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalog.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalog.java b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalog.java
index ad5da24..f465e7e 100644
--- a/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalog.java
+++ b/modules/registry/registry-cpi/src/main/java/org/apache/airavata/registry/cpi/WorkflowCatalog.java
@@ -21,7 +21,8 @@
package org.apache.airavata.registry.cpi;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+
+import org.apache.airavata.model.application.io.OutputDataObjectType;
import java.util.List;
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/thrift-interface-descriptions/airavata-api/process_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/airavata-api/process_model.thrift b/thrift-interface-descriptions/airavata-api/process_model.thrift
index 4229840..7ccc70b 100644
--- a/thrift-interface-descriptions/airavata-api/process_model.thrift
+++ b/thrift-interface-descriptions/airavata-api/process_model.thrift
@@ -47,13 +47,14 @@ struct ProcessModel {
5: optional status_models.ProcessStatus processStatus,
6: optional string processDetail,
7: optional string applicationInterfaceId,
- 8: optional list<application_io_models.InputDataObjectType> processInputs,
- 9: optional list<application_io_models.OutputDataObjectType> processOutputs,
- 10: optional scheduling_model.ComputationalResourceSchedulingModel resourceSchedule,
- 11: optional list<task_model.TaskModel> tasks,
- 12: optional string taskDag,
- 13: optional airavata_commons.ErrorModel processError,
- 14: optional string gatewayExecutionId,
- 15: optional bool enableEmailNotification,
- 16: optional list<string> emailAddresses
+ 8: optional string applicationDeploymentId,
+ 9: optional list<application_io_models.InputDataObjectType> processInputs,
+ 10: optional list<application_io_models.OutputDataObjectType> processOutputs,
+ 11: optional scheduling_model.ComputationalResourceSchedulingModel resourceSchedule,
+ 12: optional list<task_model.TaskModel> tasks,
+ 13: optional string taskDag,
+ 14: optional airavata_commons.ErrorModel processError,
+ 15: optional string gatewayExecutionId,
+ 16: optional bool enableEmailNotification,
+ 17: optional list<string> emailAddresses
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/thrift-interface-descriptions/airavata-api/scheduling_model.thrift
----------------------------------------------------------------------
diff --git a/thrift-interface-descriptions/airavata-api/scheduling_model.thrift b/thrift-interface-descriptions/airavata-api/scheduling_model.thrift
index 59c6abd..37e2742 100644
--- a/thrift-interface-descriptions/airavata-api/scheduling_model.thrift
+++ b/thrift-interface-descriptions/airavata-api/scheduling_model.thrift
@@ -36,4 +36,5 @@ struct ComputationalResourceSchedulingModel {
5: optional string queueName,
6: optional i32 wallTimeLimit,
7: optional i32 totalPhysicalMemory,
+ 8: optional string chessisNumber
}
\ No newline at end of file
[3/3] airavata git commit: adding deployement id and fixing some
issues with new models
Posted by ch...@apache.org.
adding deployement id and fixing some issues with new models
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/5264b390
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/5264b390
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/5264b390
Branch: refs/heads/master
Commit: 5264b390efa2e1e50dc0e53a485e4287df0c8afa
Parents: b00f20f
Author: Chathuri Wimalasena <ch...@apache.org>
Authored: Mon Jun 15 15:36:51 2015 -0400
Committer: Chathuri Wimalasena <ch...@apache.org>
Committed: Mon Jun 15 15:36:51 2015 -0400
----------------------------------------------------------------------
.../airavata/model/process/ProcessModel.java | 218 +++--
.../ComputationalResourceSchedulingModel.java | 114 ++-
.../catalog/impl/ApplicationInterfaceImpl.java | 10 +-
.../app/catalog/impl/ComputeResourceImpl.java | 2 +-
.../catalog/impl/GwyResourceProfileImpl.java | 3 +-
.../app/catalog/impl/WorkflowCatalogImpl.java | 4 +-
.../util/AppCatalogThriftConversion.java | 3 +
.../catalog/impl/ExperimentCatalogImpl.java | 59 +-
.../catalog/impl/ExperimentRegistry.java | 879 +++++++++----------
.../utils/ThriftDataModelConversion.java | 412 ++++-----
.../airavata/registry/cpi/WorkflowCatalog.java | 3 +-
.../airavata-api/process_model.thrift | 19 +-
.../airavata-api/scheduling_model.thrift | 1 +
13 files changed, 913 insertions(+), 814 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
index c1a6cd0..285a83f 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/process/ProcessModel.java
@@ -71,15 +71,16 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
private static final org.apache.thrift.protocol.TField PROCESS_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("processStatus", org.apache.thrift.protocol.TType.STRUCT, (short)5);
private static final org.apache.thrift.protocol.TField PROCESS_DETAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("processDetail", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField APPLICATION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final org.apache.thrift.protocol.TField PROCESS_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("processInputs", org.apache.thrift.protocol.TType.LIST, (short)8);
- private static final org.apache.thrift.protocol.TField PROCESS_OUTPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("processOutputs", org.apache.thrift.protocol.TType.LIST, (short)9);
- private static final org.apache.thrift.protocol.TField RESOURCE_SCHEDULE_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceSchedule", org.apache.thrift.protocol.TType.STRUCT, (short)10);
- private static final org.apache.thrift.protocol.TField TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("tasks", org.apache.thrift.protocol.TType.LIST, (short)11);
- private static final org.apache.thrift.protocol.TField TASK_DAG_FIELD_DESC = new org.apache.thrift.protocol.TField("taskDag", org.apache.thrift.protocol.TType.STRING, (short)12);
- private static final org.apache.thrift.protocol.TField PROCESS_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("processError", org.apache.thrift.protocol.TType.STRUCT, (short)13);
- private static final org.apache.thrift.protocol.TField GATEWAY_EXECUTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayExecutionId", org.apache.thrift.protocol.TType.STRING, (short)14);
- private static final org.apache.thrift.protocol.TField ENABLE_EMAIL_NOTIFICATION_FIELD_DESC = new org.apache.thrift.protocol.TField("enableEmailNotification", org.apache.thrift.protocol.TType.BOOL, (short)15);
- private static final org.apache.thrift.protocol.TField EMAIL_ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("emailAddresses", org.apache.thrift.protocol.TType.LIST, (short)16);
+ private static final org.apache.thrift.protocol.TField APPLICATION_DEPLOYMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationDeploymentId", org.apache.thrift.protocol.TType.STRING, (short)8);
+ private static final org.apache.thrift.protocol.TField PROCESS_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("processInputs", org.apache.thrift.protocol.TType.LIST, (short)9);
+ private static final org.apache.thrift.protocol.TField PROCESS_OUTPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("processOutputs", org.apache.thrift.protocol.TType.LIST, (short)10);
+ private static final org.apache.thrift.protocol.TField RESOURCE_SCHEDULE_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceSchedule", org.apache.thrift.protocol.TType.STRUCT, (short)11);
+ private static final org.apache.thrift.protocol.TField TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("tasks", org.apache.thrift.protocol.TType.LIST, (short)12);
+ private static final org.apache.thrift.protocol.TField TASK_DAG_FIELD_DESC = new org.apache.thrift.protocol.TField("taskDag", org.apache.thrift.protocol.TType.STRING, (short)13);
+ private static final org.apache.thrift.protocol.TField PROCESS_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("processError", org.apache.thrift.protocol.TType.STRUCT, (short)14);
+ private static final org.apache.thrift.protocol.TField GATEWAY_EXECUTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayExecutionId", org.apache.thrift.protocol.TType.STRING, (short)15);
+ private static final org.apache.thrift.protocol.TField ENABLE_EMAIL_NOTIFICATION_FIELD_DESC = new org.apache.thrift.protocol.TField("enableEmailNotification", org.apache.thrift.protocol.TType.BOOL, (short)16);
+ private static final org.apache.thrift.protocol.TField EMAIL_ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("emailAddresses", org.apache.thrift.protocol.TType.LIST, (short)17);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -94,6 +95,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
private org.apache.airavata.model.status.ProcessStatus processStatus; // optional
private String processDetail; // optional
private String applicationInterfaceId; // optional
+ private String applicationDeploymentId; // optional
private List<org.apache.airavata.model.application.io.InputDataObjectType> processInputs; // optional
private List<org.apache.airavata.model.application.io.OutputDataObjectType> processOutputs; // optional
private org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel resourceSchedule; // optional
@@ -113,15 +115,16 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
PROCESS_STATUS((short)5, "processStatus"),
PROCESS_DETAIL((short)6, "processDetail"),
APPLICATION_INTERFACE_ID((short)7, "applicationInterfaceId"),
- PROCESS_INPUTS((short)8, "processInputs"),
- PROCESS_OUTPUTS((short)9, "processOutputs"),
- RESOURCE_SCHEDULE((short)10, "resourceSchedule"),
- TASKS((short)11, "tasks"),
- TASK_DAG((short)12, "taskDag"),
- PROCESS_ERROR((short)13, "processError"),
- GATEWAY_EXECUTION_ID((short)14, "gatewayExecutionId"),
- ENABLE_EMAIL_NOTIFICATION((short)15, "enableEmailNotification"),
- EMAIL_ADDRESSES((short)16, "emailAddresses");
+ APPLICATION_DEPLOYMENT_ID((short)8, "applicationDeploymentId"),
+ PROCESS_INPUTS((short)9, "processInputs"),
+ PROCESS_OUTPUTS((short)10, "processOutputs"),
+ RESOURCE_SCHEDULE((short)11, "resourceSchedule"),
+ TASKS((short)12, "tasks"),
+ TASK_DAG((short)13, "taskDag"),
+ PROCESS_ERROR((short)14, "processError"),
+ GATEWAY_EXECUTION_ID((short)15, "gatewayExecutionId"),
+ ENABLE_EMAIL_NOTIFICATION((short)16, "enableEmailNotification"),
+ EMAIL_ADDRESSES((short)17, "emailAddresses");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -150,23 +153,25 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
return PROCESS_DETAIL;
case 7: // APPLICATION_INTERFACE_ID
return APPLICATION_INTERFACE_ID;
- case 8: // PROCESS_INPUTS
+ case 8: // APPLICATION_DEPLOYMENT_ID
+ return APPLICATION_DEPLOYMENT_ID;
+ case 9: // PROCESS_INPUTS
return PROCESS_INPUTS;
- case 9: // PROCESS_OUTPUTS
+ case 10: // PROCESS_OUTPUTS
return PROCESS_OUTPUTS;
- case 10: // RESOURCE_SCHEDULE
+ case 11: // RESOURCE_SCHEDULE
return RESOURCE_SCHEDULE;
- case 11: // TASKS
+ case 12: // TASKS
return TASKS;
- case 12: // TASK_DAG
+ case 13: // TASK_DAG
return TASK_DAG;
- case 13: // PROCESS_ERROR
+ case 14: // PROCESS_ERROR
return PROCESS_ERROR;
- case 14: // GATEWAY_EXECUTION_ID
+ case 15: // GATEWAY_EXECUTION_ID
return GATEWAY_EXECUTION_ID;
- case 15: // ENABLE_EMAIL_NOTIFICATION
+ case 16: // ENABLE_EMAIL_NOTIFICATION
return ENABLE_EMAIL_NOTIFICATION;
- case 16: // EMAIL_ADDRESSES
+ case 17: // EMAIL_ADDRESSES
return EMAIL_ADDRESSES;
default:
return null;
@@ -212,7 +217,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
private static final int __LASTUPDATETIME_ISSET_ID = 1;
private static final int __ENABLEEMAILNOTIFICATION_ISSET_ID = 2;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.LAST_UPDATE_TIME,_Fields.PROCESS_STATUS,_Fields.PROCESS_DETAIL,_Fields.APPLICATION_INTERFACE_ID,_Fields.PROCESS_INPUTS,_Fields.PROCESS_OUTPUTS,_Fields.RESOURCE_SCHEDULE,_Fields.TASKS,_Fields.TASK_DAG,_Fields.PROCESS_ERROR,_Fields.GATEWAY_EXECUTION_ID,_Fields.ENABLE_EMAIL_NOTIFICATION,_Fields.EMAIL_ADDRESSES};
+ private static final _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.LAST_UPDATE_TIME,_Fields.PROCESS_STATUS,_Fields.PROCESS_DETAIL,_Fields.APPLICATION_INTERFACE_ID,_Fields.APPLICATION_DEPLOYMENT_ID,_Fields.PROCESS_INPUTS,_Fields.PROCESS_OUTPUTS,_Fields.RESOURCE_SCHEDULE,_Fields.TASKS,_Fields.TASK_DAG,_Fields.PROCESS_ERROR,_Fields.GATEWAY_EXECUTION_ID,_Fields.ENABLE_EMAIL_NOTIFICATION,_Fields.EMAIL_ADDRESSES};
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);
@@ -230,6 +235,8 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.APPLICATION_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationInterfaceId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.APPLICATION_DEPLOYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationDeploymentId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PROCESS_INPUTS, new org.apache.thrift.meta_data.FieldMetaData("processInputs", 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, org.apache.airavata.model.application.io.InputDataObjectType.class))));
@@ -292,6 +299,9 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
if (other.isSetApplicationInterfaceId()) {
this.applicationInterfaceId = other.applicationInterfaceId;
}
+ if (other.isSetApplicationDeploymentId()) {
+ this.applicationDeploymentId = other.applicationDeploymentId;
+ }
if (other.isSetProcessInputs()) {
List<org.apache.airavata.model.application.io.InputDataObjectType> __this__processInputs = new ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(other.processInputs.size());
for (org.apache.airavata.model.application.io.InputDataObjectType other_element : other.processInputs) {
@@ -348,6 +358,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
this.processStatus = null;
this.processDetail = null;
this.applicationInterfaceId = null;
+ this.applicationDeploymentId = null;
this.processInputs = null;
this.processOutputs = null;
this.resourceSchedule = null;
@@ -519,6 +530,29 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
}
}
+ public String getApplicationDeploymentId() {
+ return this.applicationDeploymentId;
+ }
+
+ public void setApplicationDeploymentId(String applicationDeploymentId) {
+ this.applicationDeploymentId = applicationDeploymentId;
+ }
+
+ public void unsetApplicationDeploymentId() {
+ this.applicationDeploymentId = null;
+ }
+
+ /** Returns true if field applicationDeploymentId is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationDeploymentId() {
+ return this.applicationDeploymentId != null;
+ }
+
+ public void setApplicationDeploymentIdIsSet(boolean value) {
+ if (!value) {
+ this.applicationDeploymentId = null;
+ }
+ }
+
public int getProcessInputsSize() {
return (this.processInputs == null) ? 0 : this.processInputs.size();
}
@@ -843,6 +877,14 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
}
break;
+ case APPLICATION_DEPLOYMENT_ID:
+ if (value == null) {
+ unsetApplicationDeploymentId();
+ } else {
+ setApplicationDeploymentId((String)value);
+ }
+ break;
+
case PROCESS_INPUTS:
if (value == null) {
unsetProcessInputs();
@@ -941,6 +983,9 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
case APPLICATION_INTERFACE_ID:
return getApplicationInterfaceId();
+ case APPLICATION_DEPLOYMENT_ID:
+ return getApplicationDeploymentId();
+
case PROCESS_INPUTS:
return getProcessInputs();
@@ -993,6 +1038,8 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
return isSetProcessDetail();
case APPLICATION_INTERFACE_ID:
return isSetApplicationInterfaceId();
+ case APPLICATION_DEPLOYMENT_ID:
+ return isSetApplicationDeploymentId();
case PROCESS_INPUTS:
return isSetProcessInputs();
case PROCESS_OUTPUTS:
@@ -1091,6 +1138,15 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
return false;
}
+ boolean this_present_applicationDeploymentId = true && this.isSetApplicationDeploymentId();
+ boolean that_present_applicationDeploymentId = true && that.isSetApplicationDeploymentId();
+ if (this_present_applicationDeploymentId || that_present_applicationDeploymentId) {
+ if (!(this_present_applicationDeploymentId && that_present_applicationDeploymentId))
+ return false;
+ if (!this.applicationDeploymentId.equals(that.applicationDeploymentId))
+ return false;
+ }
+
boolean this_present_processInputs = true && this.isSetProcessInputs();
boolean that_present_processInputs = true && that.isSetProcessInputs();
if (this_present_processInputs || that_present_processInputs) {
@@ -1214,6 +1270,11 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
if (present_applicationInterfaceId)
list.add(applicationInterfaceId);
+ boolean present_applicationDeploymentId = true && (isSetApplicationDeploymentId());
+ list.add(present_applicationDeploymentId);
+ if (present_applicationDeploymentId)
+ list.add(applicationDeploymentId);
+
boolean present_processInputs = true && (isSetProcessInputs());
list.add(present_processInputs);
if (present_processInputs)
@@ -1340,6 +1401,16 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetApplicationDeploymentId()).compareTo(other.isSetApplicationDeploymentId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationDeploymentId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationDeploymentId, other.applicationDeploymentId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetProcessInputs()).compareTo(other.isSetProcessInputs());
if (lastComparison != 0) {
return lastComparison;
@@ -1507,6 +1578,16 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
}
first = false;
}
+ if (isSetApplicationDeploymentId()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationDeploymentId:");
+ if (this.applicationDeploymentId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationDeploymentId);
+ }
+ first = false;
+ }
if (isSetProcessInputs()) {
if (!first) sb.append(", ");
sb.append("processInputs:");
@@ -1712,7 +1793,15 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 8: // PROCESS_INPUTS
+ case 8: // APPLICATION_DEPLOYMENT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationDeploymentId = iprot.readString();
+ struct.setApplicationDeploymentIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // PROCESS_INPUTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
@@ -1731,7 +1820,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 9: // PROCESS_OUTPUTS
+ case 10: // PROCESS_OUTPUTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
@@ -1750,7 +1839,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 10: // RESOURCE_SCHEDULE
+ case 11: // RESOURCE_SCHEDULE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.resourceSchedule = new org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel();
struct.resourceSchedule.read(iprot);
@@ -1759,7 +1848,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 11: // TASKS
+ case 12: // TASKS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list6 = iprot.readListBegin();
@@ -1778,7 +1867,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 12: // TASK_DAG
+ case 13: // TASK_DAG
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.taskDag = iprot.readString();
struct.setTaskDagIsSet(true);
@@ -1786,7 +1875,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 13: // PROCESS_ERROR
+ case 14: // PROCESS_ERROR
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.processError = new org.apache.airavata.model.commons.ErrorModel();
struct.processError.read(iprot);
@@ -1795,7 +1884,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 14: // GATEWAY_EXECUTION_ID
+ case 15: // GATEWAY_EXECUTION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.gatewayExecutionId = iprot.readString();
struct.setGatewayExecutionIdIsSet(true);
@@ -1803,7 +1892,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 15: // ENABLE_EMAIL_NOTIFICATION
+ case 16: // ENABLE_EMAIL_NOTIFICATION
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.enableEmailNotification = iprot.readBool();
struct.setEnableEmailNotificationIsSet(true);
@@ -1811,7 +1900,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 16: // EMAIL_ADDRESSES
+ case 17: // EMAIL_ADDRESSES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list9 = iprot.readListBegin();
@@ -1883,6 +1972,13 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
oprot.writeFieldEnd();
}
}
+ if (struct.applicationDeploymentId != null) {
+ if (struct.isSetApplicationDeploymentId()) {
+ oprot.writeFieldBegin(APPLICATION_DEPLOYMENT_ID_FIELD_DESC);
+ oprot.writeString(struct.applicationDeploymentId);
+ oprot.writeFieldEnd();
+ }
+ }
if (struct.processInputs != null) {
if (struct.isSetProcessInputs()) {
oprot.writeFieldBegin(PROCESS_INPUTS_FIELD_DESC);
@@ -2007,34 +2103,37 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
if (struct.isSetApplicationInterfaceId()) {
optionals.set(4);
}
- if (struct.isSetProcessInputs()) {
+ if (struct.isSetApplicationDeploymentId()) {
optionals.set(5);
}
- if (struct.isSetProcessOutputs()) {
+ if (struct.isSetProcessInputs()) {
optionals.set(6);
}
- if (struct.isSetResourceSchedule()) {
+ if (struct.isSetProcessOutputs()) {
optionals.set(7);
}
- if (struct.isSetTasks()) {
+ if (struct.isSetResourceSchedule()) {
optionals.set(8);
}
- if (struct.isSetTaskDag()) {
+ if (struct.isSetTasks()) {
optionals.set(9);
}
- if (struct.isSetProcessError()) {
+ if (struct.isSetTaskDag()) {
optionals.set(10);
}
- if (struct.isSetGatewayExecutionId()) {
+ if (struct.isSetProcessError()) {
optionals.set(11);
}
- if (struct.isSetEnableEmailNotification()) {
+ if (struct.isSetGatewayExecutionId()) {
optionals.set(12);
}
- if (struct.isSetEmailAddresses()) {
+ if (struct.isSetEnableEmailNotification()) {
optionals.set(13);
}
- oprot.writeBitSet(optionals, 14);
+ if (struct.isSetEmailAddresses()) {
+ optionals.set(14);
+ }
+ oprot.writeBitSet(optionals, 15);
if (struct.isSetCreationTime()) {
oprot.writeI64(struct.creationTime);
}
@@ -2050,6 +2149,9 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
if (struct.isSetApplicationInterfaceId()) {
oprot.writeString(struct.applicationInterfaceId);
}
+ if (struct.isSetApplicationDeploymentId()) {
+ oprot.writeString(struct.applicationDeploymentId);
+ }
if (struct.isSetProcessInputs()) {
{
oprot.writeI32(struct.processInputs.size());
@@ -2110,7 +2212,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
struct.setProcessIdIsSet(true);
struct.experimentId = iprot.readString();
struct.setExperimentIdIsSet(true);
- BitSet incoming = iprot.readBitSet(14);
+ BitSet incoming = iprot.readBitSet(15);
if (incoming.get(0)) {
struct.creationTime = iprot.readI64();
struct.setCreationTimeIsSet(true);
@@ -2133,6 +2235,10 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
struct.setApplicationInterfaceIdIsSet(true);
}
if (incoming.get(5)) {
+ struct.applicationDeploymentId = iprot.readString();
+ struct.setApplicationDeploymentIdIsSet(true);
+ }
+ if (incoming.get(6)) {
{
org.apache.thrift.protocol.TList _list20 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.processInputs = new ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(_list20.size);
@@ -2146,7 +2252,7 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
}
struct.setProcessInputsIsSet(true);
}
- if (incoming.get(6)) {
+ if (incoming.get(7)) {
{
org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.processOutputs = new ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(_list23.size);
@@ -2160,12 +2266,12 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
}
struct.setProcessOutputsIsSet(true);
}
- if (incoming.get(7)) {
+ if (incoming.get(8)) {
struct.resourceSchedule = new org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel();
struct.resourceSchedule.read(iprot);
struct.setResourceScheduleIsSet(true);
}
- if (incoming.get(8)) {
+ if (incoming.get(9)) {
{
org.apache.thrift.protocol.TList _list26 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.tasks = new ArrayList<org.apache.airavata.model.task.TaskModel>(_list26.size);
@@ -2179,24 +2285,24 @@ public class ProcessModel implements org.apache.thrift.TBase<ProcessModel, Proce
}
struct.setTasksIsSet(true);
}
- if (incoming.get(9)) {
+ if (incoming.get(10)) {
struct.taskDag = iprot.readString();
struct.setTaskDagIsSet(true);
}
- if (incoming.get(10)) {
+ if (incoming.get(11)) {
struct.processError = new org.apache.airavata.model.commons.ErrorModel();
struct.processError.read(iprot);
struct.setProcessErrorIsSet(true);
}
- if (incoming.get(11)) {
+ if (incoming.get(12)) {
struct.gatewayExecutionId = iprot.readString();
struct.setGatewayExecutionIdIsSet(true);
}
- if (incoming.get(12)) {
+ if (incoming.get(13)) {
struct.enableEmailNotification = iprot.readBool();
struct.setEnableEmailNotificationIsSet(true);
}
- if (incoming.get(13)) {
+ if (incoming.get(14)) {
{
org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.emailAddresses = new ArrayList<String>(_list29.size);
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java
index 749738b..53d156a 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/scheduling/ComputationalResourceSchedulingModel.java
@@ -67,6 +67,7 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField WALL_TIME_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("wallTimeLimit", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField TOTAL_PHYSICAL_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPhysicalMemory", org.apache.thrift.protocol.TType.I32, (short)7);
+ private static final org.apache.thrift.protocol.TField CHESSIS_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("chessisNumber", org.apache.thrift.protocol.TType.STRING, (short)8);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -81,6 +82,7 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
private String queueName; // optional
private int wallTimeLimit; // optional
private int totalPhysicalMemory; // optional
+ private String chessisNumber; // 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 {
@@ -90,7 +92,8 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
NUMBER_OF_THREADS((short)4, "numberOfThreads"),
QUEUE_NAME((short)5, "queueName"),
WALL_TIME_LIMIT((short)6, "wallTimeLimit"),
- TOTAL_PHYSICAL_MEMORY((short)7, "totalPhysicalMemory");
+ TOTAL_PHYSICAL_MEMORY((short)7, "totalPhysicalMemory"),
+ CHESSIS_NUMBER((short)8, "chessisNumber");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -119,6 +122,8 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
return WALL_TIME_LIMIT;
case 7: // TOTAL_PHYSICAL_MEMORY
return TOTAL_PHYSICAL_MEMORY;
+ case 8: // CHESSIS_NUMBER
+ return CHESSIS_NUMBER;
default:
return null;
}
@@ -165,7 +170,7 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
private static final int __WALLTIMELIMIT_ISSET_ID = 3;
private static final int __TOTALPHYSICALMEMORY_ISSET_ID = 4;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.RESOURCE_HOST_ID,_Fields.TOTAL_CPUCOUNT,_Fields.NODE_COUNT,_Fields.NUMBER_OF_THREADS,_Fields.QUEUE_NAME,_Fields.WALL_TIME_LIMIT,_Fields.TOTAL_PHYSICAL_MEMORY};
+ private static final _Fields optionals[] = {_Fields.RESOURCE_HOST_ID,_Fields.TOTAL_CPUCOUNT,_Fields.NODE_COUNT,_Fields.NUMBER_OF_THREADS,_Fields.QUEUE_NAME,_Fields.WALL_TIME_LIMIT,_Fields.TOTAL_PHYSICAL_MEMORY,_Fields.CHESSIS_NUMBER};
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);
@@ -183,6 +188,8 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.TOTAL_PHYSICAL_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("totalPhysicalMemory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.CHESSIS_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("chessisNumber", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputationalResourceSchedulingModel.class, metaDataMap);
}
@@ -206,6 +213,9 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
}
this.wallTimeLimit = other.wallTimeLimit;
this.totalPhysicalMemory = other.totalPhysicalMemory;
+ if (other.isSetChessisNumber()) {
+ this.chessisNumber = other.chessisNumber;
+ }
}
public ComputationalResourceSchedulingModel deepCopy() {
@@ -226,6 +236,7 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
this.wallTimeLimit = 0;
setTotalPhysicalMemoryIsSet(false);
this.totalPhysicalMemory = 0;
+ this.chessisNumber = null;
}
public String getResourceHostId() {
@@ -384,6 +395,29 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTALPHYSICALMEMORY_ISSET_ID, value);
}
+ public String getChessisNumber() {
+ return this.chessisNumber;
+ }
+
+ public void setChessisNumber(String chessisNumber) {
+ this.chessisNumber = chessisNumber;
+ }
+
+ public void unsetChessisNumber() {
+ this.chessisNumber = null;
+ }
+
+ /** Returns true if field chessisNumber is set (has been assigned a value) and false otherwise */
+ public boolean isSetChessisNumber() {
+ return this.chessisNumber != null;
+ }
+
+ public void setChessisNumberIsSet(boolean value) {
+ if (!value) {
+ this.chessisNumber = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case RESOURCE_HOST_ID:
@@ -442,6 +476,14 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
}
break;
+ case CHESSIS_NUMBER:
+ if (value == null) {
+ unsetChessisNumber();
+ } else {
+ setChessisNumber((String)value);
+ }
+ break;
+
}
}
@@ -468,6 +510,9 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
case TOTAL_PHYSICAL_MEMORY:
return Integer.valueOf(getTotalPhysicalMemory());
+ case CHESSIS_NUMBER:
+ return getChessisNumber();
+
}
throw new IllegalStateException();
}
@@ -493,6 +538,8 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
return isSetWallTimeLimit();
case TOTAL_PHYSICAL_MEMORY:
return isSetTotalPhysicalMemory();
+ case CHESSIS_NUMBER:
+ return isSetChessisNumber();
}
throw new IllegalStateException();
}
@@ -573,6 +620,15 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
return false;
}
+ boolean this_present_chessisNumber = true && this.isSetChessisNumber();
+ boolean that_present_chessisNumber = true && that.isSetChessisNumber();
+ if (this_present_chessisNumber || that_present_chessisNumber) {
+ if (!(this_present_chessisNumber && that_present_chessisNumber))
+ return false;
+ if (!this.chessisNumber.equals(that.chessisNumber))
+ return false;
+ }
+
return true;
}
@@ -615,6 +671,11 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
if (present_totalPhysicalMemory)
list.add(totalPhysicalMemory);
+ boolean present_chessisNumber = true && (isSetChessisNumber());
+ list.add(present_chessisNumber);
+ if (present_chessisNumber)
+ list.add(chessisNumber);
+
return list.hashCode();
}
@@ -696,6 +757,16 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetChessisNumber()).compareTo(other.isSetChessisNumber());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetChessisNumber()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.chessisNumber, other.chessisNumber);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -765,6 +836,16 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
sb.append(this.totalPhysicalMemory);
first = false;
}
+ if (isSetChessisNumber()) {
+ if (!first) sb.append(", ");
+ sb.append("chessisNumber:");
+ if (this.chessisNumber == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.chessisNumber);
+ }
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -866,6 +947,14 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 8: // CHESSIS_NUMBER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.chessisNumber = iprot.readString();
+ struct.setChessisNumberIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -918,6 +1007,13 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
oprot.writeI32(struct.totalPhysicalMemory);
oprot.writeFieldEnd();
}
+ if (struct.chessisNumber != null) {
+ if (struct.isSetChessisNumber()) {
+ oprot.writeFieldBegin(CHESSIS_NUMBER_FIELD_DESC);
+ oprot.writeString(struct.chessisNumber);
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -957,7 +1053,10 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
if (struct.isSetTotalPhysicalMemory()) {
optionals.set(6);
}
- oprot.writeBitSet(optionals, 7);
+ if (struct.isSetChessisNumber()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
if (struct.isSetResourceHostId()) {
oprot.writeString(struct.resourceHostId);
}
@@ -979,12 +1078,15 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
if (struct.isSetTotalPhysicalMemory()) {
oprot.writeI32(struct.totalPhysicalMemory);
}
+ if (struct.isSetChessisNumber()) {
+ oprot.writeString(struct.chessisNumber);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ComputationalResourceSchedulingModel struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(7);
+ BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
struct.resourceHostId = iprot.readString();
struct.setResourceHostIdIsSet(true);
@@ -1013,6 +1115,10 @@ public class ComputationalResourceSchedulingModel implements org.apache.thrift.T
struct.totalPhysicalMemory = iprot.readI32();
struct.setTotalPhysicalMemoryIsSet(true);
}
+ if (incoming.get(7)) {
+ struct.chessisNumber = iprot.readString();
+ struct.setChessisNumberIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationInterfaceImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationInterfaceImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationInterfaceImpl.java
index a113d57..94d09cf 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationInterfaceImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/ApplicationInterfaceImpl.java
@@ -23,9 +23,9 @@ package org.apache.airavata.registry.core.app.catalog.impl;
import org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule;
import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.applicationInterfaceModelConstants;
+import org.apache.airavata.model.appcatalog.appinterface.application_interface_modelConstants;
+import org.apache.airavata.model.application.io.InputDataObjectType;
+import org.apache.airavata.model.application.io.OutputDataObjectType;
import org.apache.airavata.registry.core.app.catalog.resources.*;
import org.apache.airavata.registry.core.app.catalog.util.AppCatalogThriftConversion;
import org.apache.airavata.registry.core.app.catalog.util.AppCatalogUtils;
@@ -48,7 +48,7 @@ public class ApplicationInterfaceImpl implements ApplicationInterface {
AppModuleResource moduleResource = new AppModuleResource();
moduleResource.setModuleName(applicationModule.getAppModuleName());
moduleResource.setGatewayId(gatewayId);
- if (!applicationModule.getAppModuleId().equals("") && !applicationModule.getAppModuleId().equals(applicationInterfaceModelConstants.DEFAULT_ID)){
+ if (!applicationModule.getAppModuleId().equals("") && !applicationModule.getAppModuleId().equals(application_interface_modelConstants.DEFAULT_ID)){
moduleResource.setModuleId(applicationModule.getAppModuleId());
}else {
moduleResource.setModuleId(AppCatalogUtils.getID(applicationModule.getAppModuleName()));
@@ -69,7 +69,7 @@ public class ApplicationInterfaceImpl implements ApplicationInterface {
try {
AppInterfaceResource resource = new AppInterfaceResource();
resource.setAppName(applicationInterfaceDescription.getApplicationName());
- if (!applicationInterfaceDescription.getApplicationInterfaceId().equals("") && !applicationInterfaceDescription.getApplicationInterfaceId().equals(applicationInterfaceModelConstants.DEFAULT_ID)){
+ if (!applicationInterfaceDescription.getApplicationInterfaceId().equals("") && !applicationInterfaceDescription.getApplicationInterfaceId().equals(application_interface_modelConstants.DEFAULT_ID)){
resource.setInterfaceId(applicationInterfaceDescription.getApplicationInterfaceId());
}else {
resource.setInterfaceId(AppCatalogUtils.getID(applicationInterfaceDescription.getApplicationName()));
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/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 385a92a..df383aa 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
@@ -38,7 +38,7 @@ public class ComputeResourceImpl implements ComputeResource {
@Override
public String addComputeResource(ComputeResourceDescription description) throws AppCatalogException {
try {
- if (description.getComputeResourceId().equals("") || description.getComputeResourceId().equals(computeResourceModelConstants.DEFAULT_ID)){
+ if (description.getComputeResourceId().equals("") || description.getComputeResourceId().equals(compute_resource_modelConstants.DEFAULT_ID)){
description.setComputeResourceId(AppCatalogUtils.getID(description.getHostName()));
}
return saveComputeResourceDescriptorData(description);
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
index 8a4e067..359916d 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/GwyResourceProfileImpl.java
@@ -23,7 +23,6 @@ package org.apache.airavata.registry.core.app.catalog.impl;
import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
-import org.apache.airavata.model.appcatalog.gatewayprofile.gatewayResourceProfileModelConstants;
import org.apache.airavata.registry.core.app.catalog.resources.*;
import org.apache.airavata.registry.core.app.catalog.util.AppCatalogThriftConversion;
import org.apache.airavata.registry.cpi.AppCatalogException;
@@ -43,7 +42,7 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
public String addGatewayResourceProfile(org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile gatewayProfile) throws AppCatalogException {
try {
GatewayProfileResource profileResource = new GatewayProfileResource();
- if (!gatewayProfile.getGatewayID().equals("") && !gatewayProfile.getGatewayID().equals(gatewayResourceProfileModelConstants.DEFAULT_ID)){
+ if (!gatewayProfile.getGatewayID().equals("")){
profileResource.setGatewayID(gatewayProfile.getGatewayID());
}
// profileResource.setGatewayID(gatewayProfile.getGatewayID());
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/WorkflowCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/WorkflowCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/WorkflowCatalogImpl.java
index da3d66b..f54419a 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/WorkflowCatalogImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/impl/WorkflowCatalogImpl.java
@@ -22,8 +22,8 @@
package org.apache.airavata.registry.core.app.catalog.impl;
import org.apache.airavata.model.Workflow;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.application.io.InputDataObjectType;
+import org.apache.airavata.model.application.io.OutputDataObjectType;
import org.apache.airavata.registry.core.app.catalog.resources.*;
import org.apache.airavata.registry.core.app.catalog.util.AppCatalogThriftConversion;
import org.apache.airavata.registry.core.app.catalog.util.AppCatalogUtils;
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/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 9fa0b59..ea2f46b 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
@@ -38,6 +38,9 @@ import org.apache.airavata.model.appcatalog.computeresource.UnicoreDataMovement;
import org.apache.airavata.model.appcatalog.computeresource.UnicoreJobSubmission;
import org.apache.airavata.model.appcatalog.gatewayprofile.ComputeResourcePreference;
import org.apache.airavata.model.appcatalog.gatewayprofile.GatewayResourceProfile;
+import org.apache.airavata.model.application.io.DataType;
+import org.apache.airavata.model.application.io.InputDataObjectType;
+import org.apache.airavata.model.application.io.OutputDataObjectType;
import org.apache.airavata.registry.core.app.catalog.resources.*;
import org.apache.airavata.registry.cpi.AppCatalogException;
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
index 0a848a3..456b97d 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentCatalogImpl.java
@@ -23,11 +23,18 @@ package org.apache.airavata.registry.core.experiment.catalog.impl;
import org.apache.airavata.common.exception.ApplicationSettingsException;
import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.application.io.OutputDataObjectType;
+import org.apache.airavata.model.commons.ErrorModel;
+import org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel;
+import org.apache.airavata.model.status.ExperimentStatus;
+import org.apache.airavata.model.status.JobStatus;
+import org.apache.airavata.model.status.TaskStatus;
+import org.apache.airavata.model.task.TaskModel;
import org.apache.airavata.model.workspace.Gateway;
import org.apache.airavata.model.workspace.Project;
import org.apache.airavata.model.experiment.*;
import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
+import org.apache.airavata.registry.core.experiment.catalog.model.AdvancedOutputDataHandling;
import org.apache.airavata.registry.core.experiment.catalog.resources.GatewayResource;
import org.apache.airavata.registry.core.experiment.catalog.resources.UserResource;
import org.apache.airavata.registry.cpi.*;
@@ -106,7 +113,7 @@ public class ExperimentCatalogImpl implements ExperimentCatalog {
case PROJECT:
return projectRegistry.addProject((Project)newObjectToAdd, gatewayId);
case EXPERIMENT:
- return experimentRegistry.addExperiment((Experiment) newObjectToAdd, gatewayId);
+ return experimentRegistry.addExperiment((ExperimentModel) newObjectToAdd, gatewayId);
case GATEWAY:
return gatewayRegistry.addGateway((Gateway)newObjectToAdd);
default:
@@ -136,43 +143,43 @@ public class ExperimentCatalogImpl implements ExperimentCatalog {
try {
switch (dataType) {
case EXPERIMENT_CONFIGURATION_DATA:
- return experimentRegistry.addUserConfigData((UserConfigurationData) newObjectToAdd, (String) dependentIdentifier);
+ return experimentRegistry.addUserConfigData((UserConfigurationDataModel) newObjectToAdd, (String) dependentIdentifier);
case EXPERIMENT_OUTPUT:
return experimentRegistry.addExpOutputs((List<OutputDataObjectType>) newObjectToAdd, (String) dependentIdentifier);
case EXPERIMENT_STATUS:
return experimentRegistry.updateExperimentStatus((ExperimentStatus) newObjectToAdd, (String) dependentIdentifier);
- case WORKFLOW_NODE_DETAIL:
- return experimentRegistry.addWorkflowNodeDetails((WorkflowNodeDetails) newObjectToAdd, (String) dependentIdentifier);
- case WORKFLOW_NODE_STATUS:
- return experimentRegistry.addWorkflowNodeStatus((WorkflowNodeStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
- case NODE_OUTPUT:
- return experimentRegistry.addNodeOutputs((List<OutputDataObjectType>) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+// case WORKFLOW_NODE_DETAIL:
+// return experimentRegistry.addWorkflowNodeDetails((WorkflowNodeDetails) newObjectToAdd, (String) dependentIdentifier);
+// case WORKFLOW_NODE_STATUS:
+// return experimentRegistry.addWorkflowNodeStatus((WorkflowNodeStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+// case NODE_OUTPUT:
+// return experimentRegistry.addNodeOutputs((List<OutputDataObjectType>) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
case TASK_DETAIL:
- return experimentRegistry.addTaskDetails((TaskDetails) newObjectToAdd, (String) dependentIdentifier);
+ return experimentRegistry.addTaskDetails((TaskModel) newObjectToAdd, (String) dependentIdentifier);
case APPLICATION_OUTPUT:
return experimentRegistry.addApplicationOutputs((List<OutputDataObjectType>) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
case TASK_STATUS:
return experimentRegistry.addTaskStatus((TaskStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
- case JOB_DETAIL:
- return experimentRegistry.addJobDetails((JobDetails) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+// case JOB_DETAIL:
+// return experimentRegistry.addJobDetails((JobDetails) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
case JOB_STATUS:
return experimentRegistry.addJobStatus((JobStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
- case APPLICATION_STATUS:
- return experimentRegistry.addApplicationStatus((ApplicationStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
- case DATA_TRANSFER_DETAIL:
- return experimentRegistry.addDataTransferDetails((DataTransferDetails) newObjectToAdd, (String) dependentIdentifier);
- case TRANSFER_STATUS:
- return experimentRegistry.addTransferStatus((TransferStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+// case APPLICATION_STATUS:
+// return experimentRegistry.addApplicationStatus((ApplicationStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+// case DATA_TRANSFER_DETAIL:
+// return experimentRegistry.addDataTransferDetails((DataTransferDetails) newObjectToAdd, (String) dependentIdentifier);
+// case TRANSFER_STATUS:
+// return experimentRegistry.addTransferStatus((TransferStatus) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
case COMPUTATIONAL_RESOURCE_SCHEDULING:
- return experimentRegistry.addComputationalResourceScheduling((ComputationalResourceScheduling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
- case ADVANCE_OUTPUT_DATA_HANDLING:
- return experimentRegistry.addOutputDataHandling((AdvancedOutputDataHandling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
- case ADVANCE_INPUT_DATA_HANDLING:
- return experimentRegistry.addInputDataHandling((AdvancedInputDataHandling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
- case QOS_PARAM:
- return experimentRegistry.addQosParams((QualityOfServiceParams) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+ return experimentRegistry.addComputationalResourceScheduling((ComputationalResourceSchedulingModel) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+// case ADVANCE_OUTPUT_DATA_HANDLING:
+// return experimentRegistry.addOutputDataHandling((AdvancedOutputDataHandling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+// case ADVANCE_INPUT_DATA_HANDLING:
+// return experimentRegistry.addInputDataHandling((AdvancedInputDataHandling) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
+// case QOS_PARAM:
+// return experimentRegistry.addQosParams((QualityOfServiceParams) newObjectToAdd, (CompositeIdentifier) dependentIdentifier);
case ERROR_DETAIL:
- return experimentRegistry.addErrorDetails((ErrorDetails) newObjectToAdd, dependentIdentifier);
+ return experimentRegistry.addErrorDetails((ErrorModel) newObjectToAdd, dependentIdentifier);
default:
logger.error("Unsupported dependent data type...", new UnsupportedOperationException());
throw new UnsupportedOperationException();
[2/3] airavata git commit: adding deployement id and fixing some
issues with new models
Posted by ch...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/5264b390/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
index fca349e..c4865ef 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
@@ -21,12 +21,18 @@
package org.apache.airavata.registry.core.experiment.catalog.impl;
-import org.apache.airavata.common.logger.AiravataLogger;
-import org.apache.airavata.common.logger.AiravataLoggerFactory;
import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
-import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
+import org.apache.airavata.model.application.io.InputDataObjectType;
+import org.apache.airavata.model.application.io.OutputDataObjectType;
+import org.apache.airavata.model.commons.ErrorModel;
+import org.apache.airavata.model.commons.airavata_commonsConstants;
import org.apache.airavata.model.experiment.*;
+import org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel;
+import org.apache.airavata.model.status.ExperimentState;
+import org.apache.airavata.model.status.ExperimentStatus;
+import org.apache.airavata.model.status.JobStatus;
+import org.apache.airavata.model.status.TaskStatus;
+import org.apache.airavata.model.task.TaskModel;
import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
@@ -38,6 +44,8 @@ import org.apache.airavata.registry.cpi.RegistryException;
import org.apache.airavata.registry.cpi.ResultOrderType;
import org.apache.airavata.registry.cpi.utils.Constants;
import org.apache.airavata.registry.cpi.utils.StatusType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.sql.Timestamp;
import java.util.*;
@@ -45,7 +53,7 @@ import java.util.*;
public class ExperimentRegistry {
private GatewayResource gatewayResource;
private WorkerResource workerResource;
- private final static AiravataLogger logger = AiravataLoggerFactory.getLogger(ExperimentRegistry.class);
+ private final static Logger logger = LoggerFactory.getLogger(ExperimentRegistry.class);
public ExperimentRegistry(GatewayResource gateway, UserResource user) throws RegistryException {
gatewayResource = gateway;
@@ -57,7 +65,7 @@ public class ExperimentRegistry {
}
- public String addExperiment(Experiment experiment, String gatewayId) throws RegistryException {
+ public String addExperiment(ExperimentModel experiment, String gatewayId) throws RegistryException {
String experimentID;
try {
if (!ExpCatResourceUtils.isUserExist(experiment.getUserName())) {
@@ -1455,7 +1463,7 @@ public class ExperimentRegistry {
}
}
- public String addErrorDetails(ErrorDetails error, Object id) throws RegistryException {
+ public String addErrorDetails(ErrorModel error, Object id) throws RegistryException {
try {
ErrorDetailResource errorResource = null;
@@ -1479,11 +1487,11 @@ public class ExperimentRegistry {
workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
taskDetail = workflowNode.getTaskDetail((String) id);
errorResource = (ErrorDetailResource) taskDetail.create(ResourceType.ERROR_DETAIL);
- if (error.getErrorID() != null && !error.getErrorID().equals(experimentModelConstants.DEFAULT_ID)) {
+ if (error.getErrorId() != null && !error.getErrorId().equals(airavata_commonsConstants.DEFAULT_ID)) {
List<ErrorDetailResource> errorDetailList = taskDetail.getErrorDetailList();
if (errorDetailList != null && !errorDetailList.isEmpty()) {
for (ErrorDetailResource errorDetailResource : errorDetailList) {
- if (errorDetailResource.getErrorId() == Integer.parseInt(error.getErrorID())) {
+ if (errorDetailResource.getErrorId() == Integer.parseInt(error.getErrorId())) {
errorResource = errorDetailResource;
}
}
@@ -1504,11 +1512,11 @@ public class ExperimentRegistry {
taskDetail = workflowNode.getTaskDetail((String) cid.getTopLevelIdentifier());
JobDetailResource jobDetail = taskDetail.getJobDetail((String) cid.getSecondLevelIdentifier());
errorResource = (ErrorDetailResource) jobDetail.create(ResourceType.ERROR_DETAIL);
- if (error.getErrorID() != null && !error.getErrorID().equals(experimentModelConstants.DEFAULT_ID)) {
+ if (error.getErrorId() != null && !error.getErrorId().equals(airavata_commonsConstants.DEFAULT_ID)) {
List<ErrorDetailResource> errorDetailList = taskDetail.getErrorDetailList();
if (errorDetailList != null && !errorDetailList.isEmpty()) {
for (ErrorDetailResource errorDetailResource : errorDetailList) {
- if (errorDetailResource.getErrorId() == Integer.parseInt(error.getErrorID())) {
+ if (errorDetailResource.getErrorId() == Integer.parseInt(error.getErrorId())) {
errorResource = errorDetailResource;
}
}
@@ -1638,25 +1646,21 @@ public class ExperimentRegistry {
}
}
- public void updateExperiment(Experiment experiment, String expId) throws RegistryException {
+ public void updateExperiment(ExperimentModel experiment, String expId) throws RegistryException {
try {
ExperimentResource existingExperiment = gatewayResource.getExperiment(expId);
- existingExperiment.setExpName(experiment.getName());
+ existingExperiment.setExpName(experiment.getExperimentName());
existingExperiment.setExecutionUser(experiment.getUserName());
existingExperiment.setGatewayId(gatewayResource.getGatewayId());
existingExperiment.setGatewayExecutionId(experiment.getGatewayExecutionId());
- if (!workerResource.isProjectExists(experiment.getProjectID())) {
+ if (!workerResource.isProjectExists(experiment.getProjectId())) {
logger.error("Project does not exist in the system..");
throw new Exception("Project does not exist in the system, Please create the project first...");
}
- existingExperiment.setProjectId(experiment.getProjectID());
+ existingExperiment.setProjectId(experiment.getProjectId());
existingExperiment.setCreationTime(AiravataUtils.getTime(experiment.getCreationTime()));
existingExperiment.setDescription(experiment.getDescription());
- existingExperiment.setApplicationId(experiment.getApplicationId());
- existingExperiment.setApplicationVersion(experiment.getApplicationVersion());
- existingExperiment.setWorkflowTemplateId(experiment.getWorkflowTemplateId());
- existingExperiment.setWorkflowTemplateVersion(experiment.getWorkflowTemplateVersion());
- existingExperiment.setWorkflowExecutionId(experiment.getWorkflowExecutionInstanceId());
+ existingExperiment.setApplicationId(experiment.getExecutionId());
existingExperiment.setEnableEmailNotifications(experiment.isEnableEmailNotification());
existingExperiment.save();
@@ -1677,7 +1681,7 @@ public class ExperimentRegistry {
updateExpInputs(experimentInputs, existingExperiment);
}
- UserConfigurationData userConfigurationData = experiment.getUserConfigurationData();
+ UserConfigurationDataModel userConfigurationData = experiment.getUserConfigurationData();
if (userConfigurationData != null) {
updateUserConfigData(userConfigurationData, expId);
}
@@ -1690,15 +1694,15 @@ public class ExperimentRegistry {
if (experimentStatus != null) {
updateExperimentStatus(experimentStatus, expId);
}
- List<WorkflowNodeDetails> workflowNodeDetailsList = experiment.getWorkflowNodeDetailsList();
- if (workflowNodeDetailsList != null && !workflowNodeDetailsList.isEmpty()) {
- for (WorkflowNodeDetails wf : workflowNodeDetailsList) {
- updateWorkflowNodeDetails(wf, wf.getNodeInstanceId());
- }
- }
- List<ErrorDetails> errors = experiment.getErrors();
+// List<WorkflowNodeDetails> workflowNodeDetailsList = experiment.getWorkflowNodeDetailsList();
+// if (workflowNodeDetailsList != null && !workflowNodeDetailsList.isEmpty()) {
+// for (WorkflowNodeDetails wf : workflowNodeDetailsList) {
+// updateWorkflowNodeDetails(wf, wf.getNodeInstanceId());
+// }
+// }
+ List<ErrorModel> errors = experiment.getErrors();
if (errors != null && !errors.isEmpty()) {
- for (ErrorDetails errror : errors) {
+ for (ErrorModel errror : errors) {
addErrorDetails(errror, expId);
}
}
@@ -1709,7 +1713,7 @@ public class ExperimentRegistry {
}
- public void updateUserConfigData(UserConfigurationData configData, String expId) throws RegistryException {
+ public void updateUserConfigData(UserConfigurationDataModel configData, String expId) throws RegistryException {
try {
ExperimentResource experiment = gatewayResource.getExperiment(expId);
ConfigDataResource resource = (ConfigDataResource) experiment.get(ResourceType.CONFIG_DATA, expId);
@@ -1720,23 +1724,23 @@ public class ExperimentRegistry {
resource.setUserDn(configData.getUserDN());
resource.setGenerateCert(configData.isGenerateCert());
resource.save();
- ComputationalResourceScheduling resourceScheduling = configData.getComputationalResourceScheduling();
+ ComputationalResourceSchedulingModel resourceScheduling = configData.getComputationalResourceScheduling();
if (resourceScheduling != null) {
updateSchedulingData(resourceScheduling, experiment);
}
- AdvancedInputDataHandling inputDataHandling = configData.getAdvanceInputDataHandling();
- if (inputDataHandling != null) {
- updateInputDataHandling(inputDataHandling, experiment);
- }
- AdvancedOutputDataHandling outputDataHandling = configData.getAdvanceOutputDataHandling();
- if (outputDataHandling != null) {
- updateOutputDataHandling(outputDataHandling, experiment);
- }
-
- QualityOfServiceParams qosParams = configData.getQosParams();
- if (qosParams != null) {
- updateQosParams(qosParams, experiment);
- }
+// AdvancedInputDataHandling inputDataHandling = configData.getAdvanceInputDataHandling();
+// if (inputDataHandling != null) {
+// updateInputDataHandling(inputDataHandling, experiment);
+// }
+// AdvancedOutputDataHandling outputDataHandling = configData.getAdvanceOutputDataHandling();
+// if (outputDataHandling != null) {
+// updateOutputDataHandling(outputDataHandling, experiment);
+// }
+//
+// QualityOfServiceParams qosParams = configData.getQosParams();
+// if (qosParams != null) {
+// updateQosParams(qosParams, experiment);
+// }
} catch (Exception e) {
logger.error("Error while updating user config data...", e);
throw new RegistryException(e);
@@ -1744,78 +1748,78 @@ public class ExperimentRegistry {
}
- public void updateQosParams(QualityOfServiceParams qosParams, ExperimentCatResource resource) throws RegistryException {
- try {
- if (resource instanceof ExperimentResource) {
- ExperimentResource expResource = (ExperimentResource) resource;
- QosParamResource qosr = expResource.getQOSparams(expResource.getExpID());
- qosr.setExperimentId(expResource.getExpID());
- qosr.setStartExecutionAt(qosParams.getStartExecutionAt());
- qosr.setExecuteBefore(qosParams.getExecuteBefore());
- qosr.setNoOfRetries(qosParams.getNumberofRetries());
- qosr.save();
- }
- } catch (Exception e) {
- logger.error("Error while updating QOS data...", e);
- throw new RegistryException(e);
- }
-
- }
-
- public void updateOutputDataHandling(AdvancedOutputDataHandling outputDataHandling, ExperimentCatResource resource) throws RegistryException {
- AdvancedOutputDataHandlingResource adodh;
- try {
- if (resource instanceof ExperimentResource) {
- ExperimentResource expResource = (ExperimentResource) resource;
- adodh = expResource.getOutputDataHandling(expResource.getExpID());
- adodh.setExperimentId(expResource.getExpID());
- } else {
- TaskDetailResource taskDetailResource = (TaskDetailResource) resource;
- ExperimentResource experimentResource = new ExperimentResource();
- adodh = taskDetailResource.getOutputDataHandling(taskDetailResource.getTaskId());
- adodh.setTaskId(taskDetailResource.getTaskId());
- WorkflowNodeDetailResource nodeDetailResource = experimentResource.getWorkflowNode(taskDetailResource.getNodeId());
- adodh.setExperimentId(nodeDetailResource.getExperimentId());
- }
- adodh.setOutputDataDir(outputDataHandling.getOutputDataDir());
- adodh.setDataRegUrl(outputDataHandling.getDataRegistryURL());
- adodh.setPersistOutputData(outputDataHandling.isPersistOutputData());
- adodh.save();
- } catch (Exception e) {
- logger.error("Error while updating output data handling...", e);
- throw new RegistryException(e);
- }
-
- }
-
- public void updateInputDataHandling(AdvancedInputDataHandling inputDataHandling, ExperimentCatResource resource) throws RegistryException {
- AdvanceInputDataHandlingResource adidh;
- try {
- if (resource instanceof ExperimentResource) {
- ExperimentResource expResource = (ExperimentResource) resource;
- adidh = expResource.getInputDataHandling(expResource.getExpID());
- adidh.setExperimentId(expResource.getExpID());
- } else {
- TaskDetailResource taskDetailResource = (TaskDetailResource) resource;
- ExperimentResource experimentResource = new ExperimentResource();
- adidh = taskDetailResource.getInputDataHandling(taskDetailResource.getTaskId());
- adidh.setTaskId(taskDetailResource.getTaskId());
- WorkflowNodeDetailResource nodeDetailResource = experimentResource.getWorkflowNode(taskDetailResource.getNodeId());
- adidh.setExperimentId(nodeDetailResource.getExperimentId());
- }
- adidh.setWorkingDir(inputDataHandling.getUniqueWorkingDirectory());
- adidh.setWorkingDirParent(inputDataHandling.getParentWorkingDirectory());
- adidh.setStageInputFiles(inputDataHandling.isSetStageInputFilesToWorkingDir());
- adidh.setCleanAfterJob(inputDataHandling.isCleanUpWorkingDirAfterJob());
- adidh.save();
- } catch (Exception e) {
- logger.error("Error while updating input data handling...", e);
- throw new RegistryException(e);
- }
-
- }
-
- public void updateSchedulingData(ComputationalResourceScheduling resourceScheduling, ExperimentCatResource resource) throws RegistryException {
+// public void updateQosParams(QualityOfServiceParams qosParams, ExperimentCatResource resource) throws RegistryException {
+// try {
+// if (resource instanceof ExperimentResource) {
+// ExperimentResource expResource = (ExperimentResource) resource;
+// QosParamResource qosr = expResource.getQOSparams(expResource.getExpID());
+// qosr.setExperimentId(expResource.getExpID());
+// qosr.setStartExecutionAt(qosParams.getStartExecutionAt());
+// qosr.setExecuteBefore(qosParams.getExecuteBefore());
+// qosr.setNoOfRetries(qosParams.getNumberofRetries());
+// qosr.save();
+// }
+// } catch (Exception e) {
+// logger.error("Error while updating QOS data...", e);
+// throw new RegistryException(e);
+// }
+//
+// }
+
+// public void updateOutputDataHandling(AdvancedOutputDataHandling outputDataHandling, ExperimentCatResource resource) throws RegistryException {
+// AdvancedOutputDataHandlingResource adodh;
+// try {
+// if (resource instanceof ExperimentResource) {
+// ExperimentResource expResource = (ExperimentResource) resource;
+// adodh = expResource.getOutputDataHandling(expResource.getExpID());
+// adodh.setExperimentId(expResource.getExpID());
+// } else {
+// TaskDetailResource taskDetailResource = (TaskDetailResource) resource;
+// ExperimentResource experimentResource = new ExperimentResource();
+// adodh = taskDetailResource.getOutputDataHandling(taskDetailResource.getTaskId());
+// adodh.setTaskId(taskDetailResource.getTaskId());
+// WorkflowNodeDetailResource nodeDetailResource = experimentResource.getWorkflowNode(taskDetailResource.getNodeId());
+// adodh.setExperimentId(nodeDetailResource.getExperimentId());
+// }
+// adodh.setOutputDataDir(outputDataHandling.getOutputDataDir());
+// adodh.setDataRegUrl(outputDataHandling.getDataRegistryURL());
+// adodh.setPersistOutputData(outputDataHandling.isPersistOutputData());
+// adodh.save();
+// } catch (Exception e) {
+// logger.error("Error while updating output data handling...", e);
+// throw new RegistryException(e);
+// }
+//
+// }
+//
+// public void updateInputDataHandling(AdvancedInputDataHandling inputDataHandling, ExperimentCatResource resource) throws RegistryException {
+// AdvanceInputDataHandlingResource adidh;
+// try {
+// if (resource instanceof ExperimentResource) {
+// ExperimentResource expResource = (ExperimentResource) resource;
+// adidh = expResource.getInputDataHandling(expResource.getExpID());
+// adidh.setExperimentId(expResource.getExpID());
+// } else {
+// TaskDetailResource taskDetailResource = (TaskDetailResource) resource;
+// ExperimentResource experimentResource = new ExperimentResource();
+// adidh = taskDetailResource.getInputDataHandling(taskDetailResource.getTaskId());
+// adidh.setTaskId(taskDetailResource.getTaskId());
+// WorkflowNodeDetailResource nodeDetailResource = experimentResource.getWorkflowNode(taskDetailResource.getNodeId());
+// adidh.setExperimentId(nodeDetailResource.getExperimentId());
+// }
+// adidh.setWorkingDir(inputDataHandling.getUniqueWorkingDirectory());
+// adidh.setWorkingDirParent(inputDataHandling.getParentWorkingDirectory());
+// adidh.setStageInputFiles(inputDataHandling.isSetStageInputFilesToWorkingDir());
+// adidh.setCleanAfterJob(inputDataHandling.isCleanUpWorkingDirAfterJob());
+// adidh.save();
+// } catch (Exception e) {
+// logger.error("Error while updating input data handling...", e);
+// throw new RegistryException(e);
+// }
+//
+// }
+
+ public void updateSchedulingData(ComputationalResourceSchedulingModel resourceScheduling, ExperimentCatResource resource) throws RegistryException {
ComputationSchedulingResource cmsr;
try {
if (resource instanceof ExperimentResource) {
@@ -1836,9 +1840,7 @@ public class ExperimentRegistry {
cmsr.setNumberOfThreads(resourceScheduling.getNumberOfThreads());
cmsr.setQueueName(resourceScheduling.getQueueName());
cmsr.setWalltimeLimit(resourceScheduling.getWallTimeLimit());
- cmsr.setJobStartTime(AiravataUtils.getTime(resourceScheduling.getJobStartTime()));
cmsr.setPhysicalMemory(resourceScheduling.getTotalPhysicalMemory());
- cmsr.setProjectName(resourceScheduling.getComputationalProjectAccount());
cmsr.save();
} catch (Exception e) {
logger.error("Error while updating scheduling data...", e);
@@ -1861,7 +1863,7 @@ public class ExperimentRegistry {
resource.setUser((String) value);
List<ExperimentResource> resources = resource.getExperiments();
for (ExperimentResource experimentResource : resources) {
- Experiment experiment = ThriftDataModelConversion.getExperiment(experimentResource);
+ ExperimentModel experiment = ThriftDataModelConversion.getExperiment(experimentResource);
experiments.add(experiment);
}
return experiments;
@@ -1869,14 +1871,14 @@ public class ExperimentRegistry {
ProjectResource project = workerResource.getProject((String) value);
List<ExperimentResource> resources = project.getExperiments();
for (ExperimentResource resource : resources) {
- Experiment experiment = ThriftDataModelConversion.getExperiment(resource);
+ ExperimentModel experiment = ThriftDataModelConversion.getExperiment(resource);
experiments.add(experiment);
}
return experiments;
} else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.GATEWAY)) {
List<ExperimentResource> resources = gatewayResource.getExperiments();
for (ExperimentResource resource : resources) {
- Experiment experiment = ThriftDataModelConversion.getExperiment(resource);
+ ExperimentModel experiment = ThriftDataModelConversion.getExperiment(resource);
experiments.add(experiment);
}
return experiments;
@@ -1917,9 +1919,9 @@ public class ExperimentRegistry {
* @return
* @throws RegistryException
*/
- public List<Experiment> getExperimentList(String fieldName, Object value, int limit, int offset,
+ public List<ExperimentModel> getExperimentList(String fieldName, Object value, int limit, int offset,
Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
- List<Experiment> experiments = new ArrayList<Experiment>();
+ List<ExperimentModel> experiments = new ArrayList<ExperimentModel>();
try {
if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.USER_NAME)) {
WorkerResource resource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);
@@ -1927,7 +1929,7 @@ public class ExperimentRegistry {
List<ExperimentResource> resources = resource.getExperiments(limit, offset,
orderByIdentifier, resultOrderType);
for (ExperimentResource experimentResource : resources) {
- Experiment experiment = ThriftDataModelConversion.getExperiment(experimentResource);
+ ExperimentModel experiment = ThriftDataModelConversion.getExperiment(experimentResource);
experiments.add(experiment);
}
return experiments;
@@ -1936,7 +1938,7 @@ public class ExperimentRegistry {
List<ExperimentResource> resources = project.getExperiments(limit, offset,
Constants.FieldConstants.ExperimentConstants.CREATION_TIME, ResultOrderType.DESC);
for (ExperimentResource resource : resources) {
- Experiment experiment = ThriftDataModelConversion.getExperiment(resource);
+ ExperimentModel experiment = ThriftDataModelConversion.getExperiment(resource);
experiments.add(experiment);
}
return experiments;
@@ -1950,55 +1952,7 @@ public class ExperimentRegistry {
}
- public List<WorkflowNodeDetails> getWFNodeDetails(String fieldName, Object value) throws RegistryException {
- try {
- if (fieldName.equals(Constants.FieldConstants.WorkflowNodeConstants.EXPERIMENT_ID)) {
- ExperimentResource experiment = gatewayResource.getExperiment((String) value);
- List<WorkflowNodeDetailResource> workflowNodeDetails = experiment.getWorkflowNodeDetails();
-
- return ThriftDataModelConversion.getWfNodeList(workflowNodeDetails);
- }
- if (fieldName.equals(Constants.FieldConstants.WorkflowNodeConstants.TASK_LIST)) {
- if (value instanceof List<?>) {
- return getWFNodeDetails(fieldName, ((List<?>) value).get(0));
- } else if (value instanceof TaskDetails) {
- TaskDetailResource taskDetailResource = getTaskDetailResource(((TaskDetails) value).getTaskID());
- ExperimentResource experimentResource = new ExperimentResource();
- if (taskDetailResource != null) {
- WorkflowNodeDetailResource workflowNode = experimentResource.getWorkflowNode(taskDetailResource.getNodeId());
- return Arrays.asList(ThriftDataModelConversion
- .getWorkflowNodeDetails(workflowNode));
- }
- } else {
- logger.error("Unsupported field value to retrieve workflow node detail list...");
- }
- } else {
- logger.error("Unsupported field name to retrieve workflow detail list...");
- }
- } catch (Exception e) {
- logger.error("Error while getting workfkow details...", e);
- throw new RegistryException(e);
- }
- return null;
- }
-
- public List<WorkflowNodeStatus> getWFNodeStatusList(String fieldName, Object value) throws RegistryException {
- try {
- if (fieldName.equals(Constants.FieldConstants.WorkflowNodeStatusConstants.EXPERIMENT_ID)) {
- ExperimentResource experiment = gatewayResource.getExperiment((String) value);
- List<StatusResource> workflowNodeStatuses = experiment.getWorkflowNodeStatuses();
- return ThriftDataModelConversion.getWorkflowNodeStatusList(workflowNodeStatuses);
- } else {
- logger.error("Unsupported field name to retrieve workflow status list...");
- }
- } catch (Exception e) {
- logger.error("Error while getting workflow status...", e);
- throw new RegistryException(e);
- }
- return null;
- }
-
- public List<TaskDetails> getTaskDetails(String fieldName, Object value) throws RegistryException {
+ public List<TaskModel> getTaskDetails(String fieldName, Object value) throws RegistryException {
try {
if (fieldName.equals(Constants.FieldConstants.TaskDetailConstants.NODE_ID)) {
ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
@@ -2015,43 +1969,43 @@ public class ExperimentRegistry {
return null;
}
- public List<JobDetails> getJobDetails(String fieldName, Object value) throws RegistryException {
- try {
- if (fieldName.equals(Constants.FieldConstants.JobDetaisConstants.TASK_ID)) {
- ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
- TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) value);
- List<JobDetailResource> jobDetailList = taskDetail.getJobDetailList();
- return ThriftDataModelConversion.getJobDetailsList(jobDetailList);
- } else {
- logger.error("Unsupported field name to retrieve job details list...");
- }
- } catch (Exception e) {
- logger.error("Error while job details...", e);
- throw new RegistryException(e);
- }
- return null;
- }
-
- public List<DataTransferDetails> getDataTransferDetails(String fieldName, Object value) throws RegistryException {
- try {
- if (fieldName.equals(Constants.FieldConstants.DataTransferDetailConstants.TASK_ID)) {
- ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
- TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) value);
- List<DataTransferDetailResource> dataTransferDetailList = taskDetail.getDataTransferDetailList();
- return ThriftDataModelConversion.getDataTransferlList(dataTransferDetailList);
- } else {
- logger.error("Unsupported field name to retrieve job details list...");
- }
- } catch (Exception e) {
- logger.error("Error while getting data transfer details...", e);
- throw new RegistryException(e);
- }
- return null;
- }
+// public List<JobDetails> getJobDetails(String fieldName, Object value) throws RegistryException {
+// try {
+// if (fieldName.equals(Constants.FieldConstants.JobDetaisConstants.TASK_ID)) {
+// ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+// TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) value);
+// List<JobDetailResource> jobDetailList = taskDetail.getJobDetailList();
+// return ThriftDataModelConversion.getJobDetailsList(jobDetailList);
+// } else {
+// logger.error("Unsupported field name to retrieve job details list...");
+// }
+// } catch (Exception e) {
+// logger.error("Error while job details...", e);
+// throw new RegistryException(e);
+// }
+// return null;
+// }
+//
+// public List<DataTransferDetails> getDataTransferDetails(String fieldName, Object value) throws RegistryException {
+// try {
+// if (fieldName.equals(Constants.FieldConstants.DataTransferDetailConstants.TASK_ID)) {
+// ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+// TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) value);
+// List<DataTransferDetailResource> dataTransferDetailList = taskDetail.getDataTransferDetailList();
+// return ThriftDataModelConversion.getDataTransferlList(dataTransferDetailList);
+// } else {
+// logger.error("Unsupported field name to retrieve job details list...");
+// }
+// } catch (Exception e) {
+// logger.error("Error while getting data transfer details...", e);
+// throw new RegistryException(e);
+// }
+// return null;
+// }
- public List<ErrorDetails> getErrorDetails(String fieldName, Object value) throws RegistryException {
+ public List<ErrorModel> getErrorDetails(String fieldName, Object value) throws RegistryException {
try {
if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.EXPERIMENT_ID)) {
ExperimentResource experiment = gatewayResource.getExperiment((String) value);
@@ -2119,11 +2073,13 @@ public class ExperimentRegistry {
return ThriftDataModelConversion.getUserConfigData(resource.getUserConfigData(expId));
} else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_EXECUTION_ID)) {
return resource.getWorkflowExecutionId();
- } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.STATE_CHANGE_LIST)) {
- return ThriftDataModelConversion.getWorkflowNodeStatusList(resource.getWorkflowNodeStatuses());
- } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_NODE_LIST)) {
- return ThriftDataModelConversion.getWfNodeList(resource.getWorkflowNodeDetails());
- } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.ERROR_DETAIL_LIST)) {
+ }
+// else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.STATE_CHANGE_LIST)) {
+// return ThriftDataModelConversion.getWorkflowNodeStatusList(resource.getWorkflowNodeStatuses());
+// } else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.WORKFLOW_NODE_LIST)) {
+// return ThriftDataModelConversion.getWfNodeList(resource.getWorkflowNodeDetails());
+// }
+ else if (fieldName.equals(Constants.FieldConstants.ExperimentConstants.ERROR_DETAIL_LIST)) {
return ThriftDataModelConversion.getErrorDetailList(resource.getErrorDetails());
} else {
logger.error("Unsupported field name for experiment basic data..");
@@ -2149,12 +2105,13 @@ public class ExperimentRegistry {
return userConfigData.isShareExp();
} else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.COMPUTATIONAL_RESOURCE_SCHEDULING)) {
return ThriftDataModelConversion.getComputationalResourceScheduling(resource.getComputationScheduling(expId));
- } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_INPUT_HANDLING)) {
- return ThriftDataModelConversion.getAdvanceInputDataHandling(resource.getInputDataHandling(expId));
- } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_OUTPUT_HANDLING)) {
- return ThriftDataModelConversion.getAdvanceOutputDataHandling(resource.getOutputDataHandling(expId));
- } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.QOS_PARAMS)) {
- return ThriftDataModelConversion.getQOSParams(resource.getQOSparams(expId));
+// }
+// else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_INPUT_HANDLING)) {
+// return ThriftDataModelConversion.getAdvanceInputDataHandling(resource.getInputDataHandling(expId));
+// } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.ADVANCED_OUTPUT_HANDLING)) {
+// return ThriftDataModelConversion.getAdvanceOutputDataHandling(resource.getOutputDataHandling(expId));
+// } else if (fieldName.equals(Constants.FieldConstants.ConfigurationDataConstants.QOS_PARAMS)) {
+// return ThriftDataModelConversion.getQOSParams(resource.getQOSparams(expId));
} else {
logger.error("Unsupported field name for experiment configuration data..");
}
@@ -2187,7 +2144,7 @@ public class ExperimentRegistry {
}
}
- public ComputationalResourceScheduling getComputationalScheduling(ExperimentCatalogModelType type, String id) throws RegistryException {
+ public ComputationalResourceSchedulingModel getComputationalScheduling(ExperimentCatalogModelType type, String id) throws RegistryException {
try {
ComputationSchedulingResource computationScheduling = null;
switch (type) {
@@ -2212,107 +2169,107 @@ public class ExperimentRegistry {
return null;
}
- public AdvancedInputDataHandling getInputDataHandling(ExperimentCatalogModelType type, String id) throws RegistryException {
- try {
- AdvanceInputDataHandlingResource dataHandlingResource = null;
- switch (type) {
- case EXPERIMENT:
- ExperimentResource resource = gatewayResource.getExperiment(id);
- dataHandlingResource = resource.getInputDataHandling(id);
- break;
- case TASK_DETAIL:
- ExperimentResource exp = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource wf = (WorkflowNodeDetailResource) exp.create(ResourceType.WORKFLOW_NODE_DETAIL);
- TaskDetailResource taskDetail = wf.getTaskDetail(id);
- dataHandlingResource = taskDetail.getInputDataHandling(id);
- break;
- }
- if (dataHandlingResource != null) {
- return ThriftDataModelConversion.getAdvanceInputDataHandling(dataHandlingResource);
- }
- } catch (Exception e) {
- logger.error("Error while getting input data handling..", e);
- throw new RegistryException(e);
- }
- return null;
- }
-
- public AdvancedOutputDataHandling getOutputDataHandling(ExperimentCatalogModelType type, String id) throws RegistryException {
- try {
- AdvancedOutputDataHandlingResource dataHandlingResource = null;
- switch (type) {
- case EXPERIMENT:
- ExperimentResource resource = gatewayResource.getExperiment(id);
- dataHandlingResource = resource.getOutputDataHandling(id);
- break;
- case TASK_DETAIL:
- ExperimentResource exp = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource wf = (WorkflowNodeDetailResource) exp.create(ResourceType.WORKFLOW_NODE_DETAIL);
- TaskDetailResource taskDetail = wf.getTaskDetail(id);
- dataHandlingResource = taskDetail.getOutputDataHandling(id);
- break;
- }
- if (dataHandlingResource != null) {
- return ThriftDataModelConversion.getAdvanceOutputDataHandling(dataHandlingResource);
- }
- } catch (Exception e) {
- logger.error("Error while getting output data handling...", e);
- throw new RegistryException(e);
- }
- return null;
- }
-
- public QualityOfServiceParams getQosParams(ExperimentCatalogModelType type, String id) throws RegistryException {
- try {
- QosParamResource qosParamResource = null;
- switch (type) {
- case EXPERIMENT:
- ExperimentResource resource = gatewayResource.getExperiment(id);
- qosParamResource = resource.getQOSparams(id);
- break;
- }
- if (qosParamResource != null) {
- return ThriftDataModelConversion.getQOSParams(qosParamResource);
- }
- } catch (Exception e) {
- logger.error("Error while getting qos params..", e);
- throw new RegistryException(e);
- }
- return null;
- }
-
- private WorkflowNodeDetailResource getWorkflowNodeDetailResource(String nodeId) throws RegistryException {
- try {
- ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- return resource.getWorkflowNode(nodeId);
- } catch (Exception e) {
- logger.error("Error while getting workflow node details...", e);
- throw new RegistryException(e);
- }
- }
-
- public WorkflowNodeDetails getWorkflowNodeDetails(String nodeId) throws RegistryException {
- try {
- ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource workflowNode = resource.getWorkflowNode(nodeId);
- return ThriftDataModelConversion.getWorkflowNodeDetails(workflowNode);
- } catch (Exception e) {
- logger.error("Error while getting workflow node details...", e);
- throw new RegistryException(e);
- }
- }
-
- public WorkflowNodeStatus getWorkflowNodeStatus(String nodeId) throws RegistryException {
- try {
- ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource workflowNode = resource.getWorkflowNode(nodeId);
- StatusResource workflowNodeStatus = workflowNode.getWorkflowNodeStatus();
- return ThriftDataModelConversion.getWorkflowNodeStatus(workflowNodeStatus);
- } catch (Exception e) {
- logger.error("Error while getting workflow node status..", e);
- throw new RegistryException(e);
- }
- }
+// public AdvancedInputDataHandling getInputDataHandling(ExperimentCatalogModelType type, String id) throws RegistryException {
+// try {
+// AdvanceInputDataHandlingResource dataHandlingResource = null;
+// switch (type) {
+// case EXPERIMENT:
+// ExperimentResource resource = gatewayResource.getExperiment(id);
+// dataHandlingResource = resource.getInputDataHandling(id);
+// break;
+// case TASK_DETAIL:
+// ExperimentResource exp = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource wf = (WorkflowNodeDetailResource) exp.create(ResourceType.WORKFLOW_NODE_DETAIL);
+// TaskDetailResource taskDetail = wf.getTaskDetail(id);
+// dataHandlingResource = taskDetail.getInputDataHandling(id);
+// break;
+// }
+// if (dataHandlingResource != null) {
+// return ThriftDataModelConversion.getAdvanceInputDataHandling(dataHandlingResource);
+// }
+// } catch (Exception e) {
+// logger.error("Error while getting input data handling..", e);
+// throw new RegistryException(e);
+// }
+// return null;
+// }
+//
+// public AdvancedOutputDataHandling getOutputDataHandling(ExperimentCatalogModelType type, String id) throws RegistryException {
+// try {
+// AdvancedOutputDataHandlingResource dataHandlingResource = null;
+// switch (type) {
+// case EXPERIMENT:
+// ExperimentResource resource = gatewayResource.getExperiment(id);
+// dataHandlingResource = resource.getOutputDataHandling(id);
+// break;
+// case TASK_DETAIL:
+// ExperimentResource exp = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource wf = (WorkflowNodeDetailResource) exp.create(ResourceType.WORKFLOW_NODE_DETAIL);
+// TaskDetailResource taskDetail = wf.getTaskDetail(id);
+// dataHandlingResource = taskDetail.getOutputDataHandling(id);
+// break;
+// }
+// if (dataHandlingResource != null) {
+// return ThriftDataModelConversion.getAdvanceOutputDataHandling(dataHandlingResource);
+// }
+// } catch (Exception e) {
+// logger.error("Error while getting output data handling...", e);
+// throw new RegistryException(e);
+// }
+// return null;
+// }
+//
+// public QualityOfServiceParams getQosParams(ExperimentCatalogModelType type, String id) throws RegistryException {
+// try {
+// QosParamResource qosParamResource = null;
+// switch (type) {
+// case EXPERIMENT:
+// ExperimentResource resource = gatewayResource.getExperiment(id);
+// qosParamResource = resource.getQOSparams(id);
+// break;
+// }
+// if (qosParamResource != null) {
+// return ThriftDataModelConversion.getQOSParams(qosParamResource);
+// }
+// } catch (Exception e) {
+// logger.error("Error while getting qos params..", e);
+// throw new RegistryException(e);
+// }
+// return null;
+// }
+
+// private WorkflowNodeDetailResource getWorkflowNodeDetailResource(String nodeId) throws RegistryException {
+// try {
+// ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// return resource.getWorkflowNode(nodeId);
+// } catch (Exception e) {
+// logger.error("Error while getting workflow node details...", e);
+// throw new RegistryException(e);
+// }
+// }
+//
+// public WorkflowNodeDetails getWorkflowNodeDetails(String nodeId) throws RegistryException {
+// try {
+// ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource workflowNode = resource.getWorkflowNode(nodeId);
+// return ThriftDataModelConversion.getWorkflowNodeDetails(workflowNode);
+// } catch (Exception e) {
+// logger.error("Error while getting workflow node details...", e);
+// throw new RegistryException(e);
+// }
+// }
+//
+// public WorkflowNodeStatus getWorkflowNodeStatus(String nodeId) throws RegistryException {
+// try {
+// ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource workflowNode = resource.getWorkflowNode(nodeId);
+// StatusResource workflowNodeStatus = workflowNode.getWorkflowNodeStatus();
+// return ThriftDataModelConversion.getWorkflowNodeStatus(workflowNodeStatus);
+// } catch (Exception e) {
+// logger.error("Error while getting workflow node status..", e);
+// throw new RegistryException(e);
+// }
+// }
public List<OutputDataObjectType> getNodeOutputs(String nodeId) throws RegistryException {
try {
@@ -2326,10 +2283,10 @@ public class ExperimentRegistry {
}
}
- public TaskDetails getTaskDetails(String taskId) throws RegistryException {
+ public TaskModel getTaskDetails(String taskId) throws RegistryException {
try {
TaskDetailResource taskDetail = getTaskDetailResource(taskId);
- return ThriftDataModelConversion.getTaskDetail(taskDetail);
+ return ThriftDataModelConversion.getTaskModel(taskDetail);
} catch (Exception e) {
logger.error("Error while getting task details..", e);
throw new RegistryException(e);
@@ -2375,18 +2332,18 @@ public class ExperimentRegistry {
// ids contains task id + job id
- public JobDetails getJobDetails(CompositeIdentifier ids) throws RegistryException {
- try {
- ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) resource.create(ResourceType.WORKFLOW_NODE_DETAIL);
- TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) ids.getTopLevelIdentifier());
- JobDetailResource jobDetail = taskDetail.getJobDetail((String) ids.getSecondLevelIdentifier());
- return ThriftDataModelConversion.getJobDetail(jobDetail);
- } catch (Exception e) {
- logger.error("Error while getting job details..", e);
- throw new RegistryException(e);
- }
- }
+// public JobDetails getJobDetails(CompositeIdentifier ids) throws RegistryException {
+// try {
+// ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) resource.create(ResourceType.WORKFLOW_NODE_DETAIL);
+// TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) ids.getTopLevelIdentifier());
+// JobDetailResource jobDetail = taskDetail.getJobDetail((String) ids.getSecondLevelIdentifier());
+// return ThriftDataModelConversion.getJobDetail(jobDetail);
+// } catch (Exception e) {
+// logger.error("Error while getting job details..", e);
+// throw new RegistryException(e);
+// }
+// }
// ids contains task id + job id
public JobStatus getJobStatus(CompositeIdentifier ids) throws RegistryException {
@@ -2403,46 +2360,46 @@ public class ExperimentRegistry {
}
}
- public ApplicationStatus getApplicationStatus(CompositeIdentifier ids) throws RegistryException {
- try {
- ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) resource.create(ResourceType.WORKFLOW_NODE_DETAIL);
- TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) ids.getTopLevelIdentifier());
- JobDetailResource jobDetail = taskDetail.getJobDetail((String) ids.getSecondLevelIdentifier());
- StatusResource applicationStatus = jobDetail.getApplicationStatus();
- return ThriftDataModelConversion.getApplicationStatus(applicationStatus);
- } catch (Exception e) {
- logger.error("Error while getting application status..", e);
- throw new RegistryException(e);
- }
- }
-
- public DataTransferDetails getDataTransferDetails(String transferId) throws RegistryException {
- try {
- ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) resource.create(ResourceType.WORKFLOW_NODE_DETAIL);
- TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
- DataTransferDetailResource dataTransferDetail = taskDetail.getDataTransferDetail(transferId);
- return ThriftDataModelConversion.getDataTransferDetail(dataTransferDetail);
- } catch (Exception e) {
- logger.error("Error while getting data transfer details..", e);
- throw new RegistryException(e);
- }
- }
-
- public TransferStatus getDataTransferStatus(String transferId) throws RegistryException {
- try {
- ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) resource.create(ResourceType.WORKFLOW_NODE_DETAIL);
- TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
- DataTransferDetailResource dataTransferDetail = taskDetail.getDataTransferDetail(transferId);
- StatusResource dataTransferStatus = dataTransferDetail.getDataTransferStatus();
- return ThriftDataModelConversion.getTransferStatus(dataTransferStatus);
- } catch (Exception e) {
- logger.error("Error while getting data transfer status..", e);
- throw new RegistryException(e);
- }
- }
+// public ApplicationStatus getApplicationStatus(CompositeIdentifier ids) throws RegistryException {
+// try {
+// ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) resource.create(ResourceType.WORKFLOW_NODE_DETAIL);
+// TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) ids.getTopLevelIdentifier());
+// JobDetailResource jobDetail = taskDetail.getJobDetail((String) ids.getSecondLevelIdentifier());
+// StatusResource applicationStatus = jobDetail.getApplicationStatus();
+// return ThriftDataModelConversion.getApplicationStatus(applicationStatus);
+// } catch (Exception e) {
+// logger.error("Error while getting application status..", e);
+// throw new RegistryException(e);
+// }
+// }
+
+// public DataTransferDetails getDataTransferDetails(String transferId) throws RegistryException {
+// try {
+// ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) resource.create(ResourceType.WORKFLOW_NODE_DETAIL);
+// TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
+// DataTransferDetailResource dataTransferDetail = taskDetail.getDataTransferDetail(transferId);
+// return ThriftDataModelConversion.getDataTransferDetail(dataTransferDetail);
+// } catch (Exception e) {
+// logger.error("Error while getting data transfer details..", e);
+// throw new RegistryException(e);
+// }
+// }
+//
+// public TransferStatus getDataTransferStatus(String transferId) throws RegistryException {
+// try {
+// ExperimentResource resource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) resource.create(ResourceType.WORKFLOW_NODE_DETAIL);
+// TaskDetailResource taskDetail = (TaskDetailResource) workflowNode.create(ResourceType.TASK_DETAIL);
+// DataTransferDetailResource dataTransferDetail = taskDetail.getDataTransferDetail(transferId);
+// StatusResource dataTransferStatus = dataTransferDetail.getDataTransferStatus();
+// return ThriftDataModelConversion.getTransferStatus(dataTransferStatus);
+// } catch (Exception e) {
+// logger.error("Error while getting data transfer status..", e);
+// throw new RegistryException(e);
+// }
+// }
public List<String> getExperimentIDs(String fieldName, Object value) throws RegistryException {
List<String> expIDs = new ArrayList<String>();
@@ -2476,41 +2433,41 @@ public class ExperimentRegistry {
return expIDs;
}
- public List<String> getWorkflowNodeIds(String fieldName, Object value) throws RegistryException {
- List<String> wfIds = new ArrayList<String>();
- List<WorkflowNodeDetails> wfNodeDetails = getWFNodeDetails(fieldName, value);
- for (WorkflowNodeDetails wf : wfNodeDetails) {
- wfIds.add(wf.getNodeInstanceId());
- }
- return wfIds;
- }
+// public List<String> getWorkflowNodeIds(String fieldName, Object value) throws RegistryException {
+// List<String> wfIds = new ArrayList<String>();
+// List<WorkflowNodeDetails> wfNodeDetails = getWFNodeDetails(fieldName, value);
+// for (WorkflowNodeDetails wf : wfNodeDetails) {
+// wfIds.add(wf.getNodeInstanceId());
+// }
+// return wfIds;
+// }
public List<String> getTaskDetailIds(String fieldName, Object value) throws RegistryException {
List<String> taskDetailIds = new ArrayList<String>();
- List<TaskDetails> taskDetails = getTaskDetails(fieldName, value);
- for (TaskDetails td : taskDetails) {
- taskDetailIds.add(td.getTaskID());
+ List<TaskModel> taskDetails = getTaskDetails(fieldName, value);
+ for (TaskModel td : taskDetails) {
+ taskDetailIds.add(td.getTaskId());
}
return taskDetailIds;
}
- public List<String> getJobDetailIds(String fieldName, Object value) throws RegistryException {
- List<String> jobIds = new ArrayList<String>();
- List<JobDetails> jobDetails = getJobDetails(fieldName, value);
- for (JobDetails jd : jobDetails) {
- jobIds.add(jd.getJobID());
- }
- return jobIds;
- }
-
- public List<String> getTransferDetailIds(String fieldName, Object value) throws RegistryException {
- List<String> transferIds = new ArrayList<String>();
- List<DataTransferDetails> dataTransferDetails = getDataTransferDetails(fieldName, value);
- for (DataTransferDetails dtd : dataTransferDetails) {
- transferIds.add(dtd.getTransferID());
- }
- return transferIds;
- }
+// public List<String> getJobDetailIds(String fieldName, Object value) throws RegistryException {
+// List<String> jobIds = new ArrayList<String>();
+// List<JobDetails> jobDetails = getJobDetails(fieldName, value);
+// for (JobDetails jd : jobDetails) {
+// jobIds.add(jd.getJobID());
+// }
+// return jobIds;
+// }
+//
+// public List<String> getTransferDetailIds(String fieldName, Object value) throws RegistryException {
+// List<String> transferIds = new ArrayList<String>();
+// List<DataTransferDetails> dataTransferDetails = getDataTransferDetails(fieldName, value);
+// for (DataTransferDetails dtd : dataTransferDetails) {
+// transferIds.add(dtd.getTransferID());
+// }
+// return transferIds;
+// }
public void removeExperiment(String experimentId) throws RegistryException {
@@ -2809,7 +2766,7 @@ public class ExperimentRegistry {
return false;
}
- public void updateScheduling(ComputationalResourceScheduling scheduling, String id, String type) throws RegistryException {
+ public void updateScheduling(ComputationalResourceSchedulingModel scheduling, String id, String type) throws RegistryException {
try {
if (type.equals(ExperimentCatalogModelType.EXPERIMENT.toString())) {
ExperimentResource experiment = gatewayResource.getExperiment(id);
@@ -2826,56 +2783,56 @@ public class ExperimentRegistry {
}
}
- public void updateInputDataHandling(AdvancedInputDataHandling dataHandling, String id, String type) throws RegistryException {
- try {
- if (type.equals(ExperimentCatalogModelType.EXPERIMENT.toString())) {
- ExperimentResource experiment = gatewayResource.getExperiment(id);
- updateInputDataHandling(dataHandling, experiment);
- } else if (type.equals(ExperimentCatalogModelType.TASK_DETAIL.toString())) {
- ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
- TaskDetailResource taskDetail = workflowNode.getTaskDetail(id);
- updateInputDataHandling(dataHandling, taskDetail);
- }
- } catch (Exception e) {
- logger.error("Error while updating input data handling..", e);
- throw new RegistryException(e);
- }
- }
-
- public void updateOutputDataHandling(AdvancedOutputDataHandling dataHandling, String id, String type) throws RegistryException {
- try {
- if (type.equals(ExperimentCatalogModelType.EXPERIMENT.toString())) {
- ExperimentResource experiment = gatewayResource.getExperiment(id);
- updateOutputDataHandling(dataHandling, experiment);
- } else if (type.equals(ExperimentCatalogModelType.TASK_DETAIL.toString())) {
- ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
- TaskDetailResource taskDetail = workflowNode.getTaskDetail(id);
- updateOutputDataHandling(dataHandling, taskDetail);
- }
- } catch (Exception e) {
- logger.error("Error while updating output data handling", e);
- throw new RegistryException(e);
- }
- }
-
- public void updateQOSParams(QualityOfServiceParams params, String id, String type) throws RegistryException {
- try {
- if (type.equals(ExperimentCatalogModelType.EXPERIMENT.toString())) {
- ExperimentResource experiment = gatewayResource.getExperiment(id);
- updateQosParams(params, experiment);
- } else if (type.equals(ExperimentCatalogModelType.TASK_DETAIL.toString())) {
- ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
- WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
- TaskDetailResource taskDetail = workflowNode.getTaskDetail(id);
- updateQosParams(params, taskDetail);
- }
- } catch (Exception e) {
- logger.error("Error while updating QOS data..", e);
- throw new RegistryException(e);
- }
- }
+// public void updateInputDataHandling(AdvancedInputDataHandling dataHandling, String id, String type) throws RegistryException {
+// try {
+// if (type.equals(ExperimentCatalogModelType.EXPERIMENT.toString())) {
+// ExperimentResource experiment = gatewayResource.getExperiment(id);
+// updateInputDataHandling(dataHandling, experiment);
+// } else if (type.equals(ExperimentCatalogModelType.TASK_DETAIL.toString())) {
+// ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+// TaskDetailResource taskDetail = workflowNode.getTaskDetail(id);
+// updateInputDataHandling(dataHandling, taskDetail);
+// }
+// } catch (Exception e) {
+// logger.error("Error while updating input data handling..", e);
+// throw new RegistryException(e);
+// }
+// }
+//
+// public void updateOutputDataHandling(AdvancedOutputDataHandling dataHandling, String id, String type) throws RegistryException {
+// try {
+// if (type.equals(ExperimentCatalogModelType.EXPERIMENT.toString())) {
+// ExperimentResource experiment = gatewayResource.getExperiment(id);
+// updateOutputDataHandling(dataHandling, experiment);
+// } else if (type.equals(ExperimentCatalogModelType.TASK_DETAIL.toString())) {
+// ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+// TaskDetailResource taskDetail = workflowNode.getTaskDetail(id);
+// updateOutputDataHandling(dataHandling, taskDetail);
+// }
+// } catch (Exception e) {
+// logger.error("Error while updating output data handling", e);
+// throw new RegistryException(e);
+// }
+// }
+//
+// public void updateQOSParams(QualityOfServiceParams params, String id, String type) throws RegistryException {
+// try {
+// if (type.equals(ExperimentCatalogModelType.EXPERIMENT.toString())) {
+// ExperimentResource experiment = gatewayResource.getExperiment(id);
+// updateQosParams(params, experiment);
+// } else if (type.equals(ExperimentCatalogModelType.TASK_DETAIL.toString())) {
+// ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
+// WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
+// TaskDetailResource taskDetail = workflowNode.getTaskDetail(id);
+// updateQosParams(params, taskDetail);
+// }
+// } catch (Exception e) {
+// logger.error("Error while updating QOS data..", e);
+// throw new RegistryException(e);
+// }
+// }
/**
* To search the experiments of user with the given filter criteria and retrieve the results with
@@ -2890,11 +2847,11 @@ public class ExperimentRegistry {
* @return
* @throws RegistryException
*/
- public List<ExperimentSummary> searchExperiments(Map<String, String> filters, int limit,
+ public List<ExperimentSummaryModel> searchExperiments(Map<String, String> filters, int limit,
int offset, Object orderByIdentifier, ResultOrderType resultOrderType) throws RegistryException {
Map<String, String> fil = new HashMap<String, String>();
if (filters != null && filters.size() != 0) {
- List<ExperimentSummary> experimentSummaries = new ArrayList<>();
+ List<ExperimentSummaryModel> experimentSummaries = new ArrayList<>();
long fromTime = 0;
long toTime = 0;
try {
@@ -2960,7 +2917,7 @@ public class ExperimentRegistry {
experimentStatistics.setFailedExperimentCount(experimentStatisticsResource.getFailedExperimentCount());
experimentStatistics.setCancelledExperimentCount(experimentStatisticsResource.getCancelledExperimentCount());
- ArrayList<ExperimentSummary> experimentSummaries = new ArrayList();
+ ArrayList<ExperimentSummaryModel> experimentSummaries = new ArrayList();
for (ExperimentSummaryResource ex : experimentStatisticsResource.getAllExperiments()) {
experimentSummaries.add(ThriftDataModelConversion.getExperimentSummary(ex));
}
@@ -3025,8 +2982,8 @@ public class ExperimentRegistry {
case FAILED:
return nextState == ExperimentState.FAILED;
//case SUSPENDED: // We don't change state to SUSPEND
- case UNKNOWN:
- return true;
+// case UNKNOWN:
+// return true;
default:
return false;
}