Examples of SchedulerException


Examples of com.sos.scheduler.engine.kernel.SchedulerException

                parsers.add((CommandXmlParser)handler);
            else
            if (handler instanceof ResultXmlizer)
                xmlizers.add((ResultXmlizer)handler);
            else
                throw new SchedulerException("CommandDispatcher " + handler);
        }
        executor = new DispatchingCommandExecutor(executors);
        parser = new DispatchingXmlCommandParser(parsers);
        resultXmlizer = new DispatchingResultXmlizer(xmlizers);
    }
View Full Code Here

Examples of com.sos.scheduler.engine.kernel.SchedulerException

            } else
            if (p instanceof PrefixCommandXmlParser) {
                PrefixCommandXmlParser pp = (PrefixCommandXmlParser)p;
                prefixBuilder.put(pp.getCommandPrefix(), pp);
            } else
                throw new SchedulerException("Unknown CommandParser " + p);
        }
        singleCommandParsers = builder.build();
        prefixCommandParsers = prefixBuilder.build();
    }
View Full Code Here

Examples of com.sos.scheduler.engine.kernel.SchedulerException

    }


    private ResultXmlizer resultXmlizer(Class<?> clas) {
        ResultXmlizer result = resultXmlizers.get(clas);
        if (result == nullthrow new SchedulerException("No " + ResultXmlizer.class.getName() + " for " + clas.getName());
        return result;
    }
View Full Code Here

Examples of com.sos.scheduler.engine.kernel.SchedulerException

    @Override public final Scheduler waitUntilSchedulerIsRunning() {
        try {
            Scheduler result = coOp.waitWhileSchedulerIsStarting();
            throwableMailbox.throwUncheckedIfSet();
            if (result == null) {
                throw new SchedulerException("Scheduler aborted before startup");
            }
            return result;
        }
        catch (InterruptedException x) { throw new RuntimeException(x); }
    }
View Full Code Here

Examples of com.sos.scheduler.engine.kernel.SchedulerException

        int exitCode = -1;
        Throwable t = null;
        try {
            exitCode = cppScheduler.run(arguments, "", new MyMainContext());
            synchronized (exitCodeAtom) { exitCodeAtom.set(exitCode); }
            if (exitCode != 0throw new SchedulerException("Scheduler terminated with exit code " + exitCode);
        }
        catch (Exception x) {
            throwableMailbox.setIfFirst(x);
            t = x;
        }
View Full Code Here

Examples of org.apache.airavata.core.gfac.exception.SchedulerException

        } catch (AiravataAPIInvocationException e2) {
            e2.printStackTrace();
        }

        if (serviceDesc == null)
            throw new SchedulerException("Service Desciption for " + context.getServiceName()
                    + " does not found on resource Catalog " + registryService);

        /*
         * Load host
         */
        HostDescription host = scheduleToHost(registryService, context.getServiceName());

        if (host == null)
            throw new SchedulerException("Host Desciption for " + context.getServiceName()
                    + " does not found on resource Catalog " + registryService);

        /*
         * Load app
         */
        ApplicationDescription app = null;
        try {
            app = registryService.getApplicationManager().getApplicationDescription(context.getServiceName(),
                    getRegisteredHost(registryService, context.getServiceName()).getType().getHostName());
        } catch (AiravataAPIInvocationException e2) {
            e2.printStackTrace();
        }

        if (app == null)
            throw new SchedulerException("App Desciption for " + context.getServiceName()
                    + " does not found on resource Catalog " + registryService);

        /*
         * Check class and binding
         */

        if (context.getExecutionDescription() == null) {
            context.setExecutionDescription(new DefaultExecutionDescription());
        }
        context.getExecutionDescription().setHost(host);
        context.getExecutionDescription().setService(serviceDesc);
        context.getExecutionDescription().setApp(app);

        OMElement omSecurityContextHeader = context.getExecutionContext().getSecurityContextHeader();

        ContextHeaderDocument document = null;
        try {
            if (omSecurityContextHeader != null) {
                document = ContextHeaderDocument.Factory.parse(omSecurityContextHeader.toStringWithConsume());
            }
        } catch (XMLStreamException e) {
            e.printStackTrace();
        } catch (XmlException e) {
            e.printStackTrace();
        }

        SecurityContextDocument.SecurityContext.AmazonWebservices amazonWebservices = null;
        if (document != null) {
            amazonWebservices = document.getContextHeader().getSecurityContext().getAmazonWebservices();
        }

        /*
         * Determine provider
         */
        String hostName = host.getType().getHostAddress();
        try {
            if (GfacUtils.isLocalHost(hostName)) {
                return new LocalProvider();
            } else if (amazonWebservices != null && hostName != null) {
                log.info("host name: " + hostName);

                // Amazon Provider
                if (hostName.equalsIgnoreCase("AMAZON")){
                    log.info("EC2 Provider Selected");
                    try {
                        return new EC2Provider(context);
                    } catch (ProviderException e) {
                        throw new SchedulerException("Unable to select the EC2Provider", e);
                    }
                }
            } else {
                return new GramProvider();
            }
        } catch (UnknownHostException e) {
            throw new SchedulerException("Cannot get IP for current host", e);
        }

        return null;
    }
View Full Code Here

Examples of org.apache.aurora.scheduler.base.SchedulerException

      byte[] taskInBytes;
      try {
        taskInBytes = ThriftBinaryCodec.encode(task.newBuilder());
      } catch (ThriftBinaryCodec.CodingException e) {
        LOG.log(Level.SEVERE, "Unable to serialize task.", e);
        throw new SchedulerException("Internal error.", e);
      }

      ITaskConfig config = task.getTask();
      // TODO(wfarner): Re-evaluate if/why we need to continue handling unset assignedPorts field.
      List<Resource> resources = Resources.from(config)
View Full Code Here

Examples of org.apache.oodt.cas.resource.structs.exceptions.SchedulerException

        try {
            jobId = scheduler.getJobQueue().addJob(spec);
        } catch (JobQueueException e) {
            LOG.log(Level.WARNING, "JobQueue exception adding job: Message: "
                    + e.getMessage());
            throw new SchedulerException(e.getMessage());
        }
        return jobId;
    }
View Full Code Here

Examples of org.apache.oodt.cas.resource.structs.exceptions.SchedulerException

                }
            } catch (MonitorException e) {
                LOG.log(Level.WARNING, "Exception assigning load to resource "
                        + "node: [" + node.getNodeId() + "]: load: [" + load
                        + "]: Message: " + e.getMessage());
                throw new SchedulerException(e.getMessage());
            }
        } else {
            // could not find resource, push onto JobQueue
            try {
                myJobQueue.addJob(spec);
View Full Code Here

Examples of org.apache.oodt.cas.resource.structs.exceptions.SchedulerException

            } catch (MonitorException e) {
                LOG
                        .log(Level.WARNING, "Exception getting load on "
                                + "node: [" + resNode.getNodeId()
                                + "]: Message: " + e.getMessage());
                throw new SchedulerException(e.getMessage());
            }

            if (load <= nodeLoad) {
                return resNode;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.