Package org.apache.airavata.model.workspace.experiment

Examples of org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling


        }
        // Using the workflowContext Header values if user provided them in the request and overwrite the default values in DD
        //todo finish the scheduling based on workflow execution context
        TaskDetails taskData = context.getTaskData();
        if(taskData != null && taskData.isSetTaskScheduling()){
           ComputationalResourceScheduling computionnalResource = taskData.getTaskScheduling();
                try {
                    int cpuCount = computionnalResource.getTotalCPUCount();
                    if(cpuCount>0){
                        app.setCpuCount(cpuCount);
                    }
                } catch (NullPointerException e) {
                    log.debug("No Value sent in WorkflowContextHeader for CPU Count, value in the Deployment Descriptor will be used");
                    new GFacProviderException("No Value sent in WorkflowContextHeader for Node Count, value in the Deployment Descriptor will be used",e);
                }
                try {
                    int nodeCount = computionnalResource.getNodeCount();
                    if(nodeCount>0){
                        app.setNodeCount(nodeCount);
                    }
                } catch (NullPointerException e) {
                    log.debug("No Value sent in WorkflowContextHeader for Node Count, value in the Deployment Descriptor will be used");
                     new GFacProviderException("No Value sent in WorkflowContextHeader for Node Count, value in the Deployment Descriptor will be used",e);
                }
                try {
                    String queueName = computionnalResource.getQueueName();
                    if (queueName != null) {
                        if(app.getQueue() == null){
                            QueueType queueType = app.addNewQueue();
                            queueType.setQueueName(queueName);
                        }else{
                            app.getQueue().setQueueName(queueName);
                        }
                    }
                } catch (NullPointerException e) {
                    log.debug("No Value sent in WorkflowContextHeader for Node Count, value in the Deployment Descriptor will be used");
                     new GFacProviderException("No Value sent in WorkflowContextHeader for Node Count, value in the Deployment Descriptor will be used",e);
                }
                try {
                    int maxwallTime = computionnalResource.getWallTimeLimit();
                    if(maxwallTime>0){
                        app.setMaxWallTime(maxwallTime);
                    }
                } catch (NullPointerException e) {
                    log.debug("No Value sent in WorkflowContextHeader for Node Count, value in the Deployment Descriptor will be used");
View Full Code Here


        .getType();
   
    createMemory(value, appDepType);
    TaskDetails taskData = context.getTaskData();
      if(taskData != null && taskData.isSetTaskScheduling()){
        ComputationalResourceScheduling computionResource= taskData.getTaskScheduling();
                try {
                    int cpuCount = computionResource.getTotalCPUCount();
                    if(cpuCount>0){
//                      appDepType.setCpuCount(cpuCount);
                    NumberOfProcessesType num = NumberOfProcessesType.Factory.newInstance();
              String processers = Integer.toString(cpuCount);
            num.setStringValue(processers);
              JSDLUtils.getOrCreateSPMDApplication(value).setNumberOfProcesses(num);
                    }
                } catch (NullPointerException e) {
                    new GFacProviderException("No Value sent in WorkflowContextHeader for Node Count, value in the Deployment Descriptor will be used",e);
                }
                try {
                    int nodeCount = computionResource.getNodeCount();
                    if(nodeCount>0){
                      appDepType.setNodeCount(nodeCount);
                    }
                } catch (NullPointerException e) {
                     new GFacProviderException("No Value sent in WorkflowContextHeader for Node Count, value in the Deployment Descriptor will be used",e);
                }
                try {
                    String queueName = computionResource.getQueueName();
                    if (queueName != null) {
                        if(appDepType.getQueue() == null){
                            QueueType queueType = appDepType.addNewQueue();
                            queueType.setQueueName(queueName);
                        }else{
                          appDepType.getQueue().setQueueName(queueName);
                        }
                    }
                } catch (NullPointerException e) {
                     new GFacProviderException("No Value sent in WorkflowContextHeader for Node Count, value in the Deployment Descriptor will be used",e);
                }
                try {
                    int maxwallTime = computionResource.getWallTimeLimit();
                    if(maxwallTime>0){
                      appDepType.setMaxWallTime(maxwallTime);
                    }
                } catch (NullPointerException e) {
                     new GFacProviderException("No Value sent in WorkflowContextHeader for Node Count, value in the Deployment Descriptor will be used",e);
View Full Code Here

    }

    public static HostDescription getHostDescription(Orchestrator orchestrator, TaskDetails taskDetails)throws OrchestratorException {
        JobSubmitter jobSubmitter = ((SimpleOrchestratorImpl) orchestrator).getJobSubmitter();
        AiravataRegistry2 registry = ((GFACEmbeddedJobSubmitter) jobSubmitter).getOrchestratorContext().getRegistry();
        ComputationalResourceScheduling taskScheduling = taskDetails.getTaskScheduling();
        String resourceHostId = taskScheduling.getResourceHostId();
        try {
            return registry.getHostDescriptor(resourceHostId);
        } catch (RegException e) {
            throw new OrchestratorException(e);
        }
View Full Code Here

TOP

Related Classes of org.apache.airavata.model.workspace.experiment.ComputationalResourceScheduling

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.