Package sos.spooler

Examples of sos.spooler.Supervisor_client


    try{
            if ( xml.indexOf("<?xml") == -1 ) {
                xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>" + xml;
            }
      spooler_log.debug7("Sending xml:\n"+xml);
      Supervisor_client supervisor=null;
      try{
        supervisor=spooler.supervisor_client();
      } catch(Exception e){} // there is no supervisor
      String answer;
      if (host.length()>0 && port!=0){
        SOSSchedulerCommand schedulerCommand = new SOSSchedulerCommand();
        schedulerCommand.setHost(host);
        schedulerCommand.setPort(port);
        schedulerCommand.setProtocol("tcp");
        spooler_log.debug1(".. connecting to Job Scheduler " + schedulerCommand.getHost() + ":" + schedulerCommand.getPort());
              schedulerCommand.connect();
              schedulerCommand.sendRequest(xml);
              answer = schedulerCommand.getResponse();
      } else if (supervisor!=null && supervisor.hostname()!=null && supervisor.hostname().length()>0){
        SOSSchedulerCommand schedulerCommand = new SOSSchedulerCommand();
        schedulerCommand.setHost(supervisor.hostname());
        schedulerCommand.setPort(supervisor.tcp_port());
        schedulerCommand.setProtocol("tcp");
        spooler_log.debug1(".. connecting to Job Scheduler " + schedulerCommand.getHost() + ":" + schedulerCommand.getPort());
              schedulerCommand.connect();
              schedulerCommand.sendRequest(xml);
              answer = schedulerCommand.getResponse();
View Full Code Here


        int eventMaxFieldCount = 11;
        File eventFile = null;

        try {
            this.setParameters(spooler.create_variable_set());
            Supervisor_client supervisor = spooler.supervisor_client();
           
            try {
                if (spooler_task.params() != null) this.getParameters().merge(spooler_task.params());
                if (spooler_job.order_queue() != null) this.getParameters().merge(spooler_task.order().params());
               
                if (this.getParameters().value("event_file") != null && this.getParameters().value("event_file").length() > 0) {
                    this.setEventFilename(this.getParameters().value("event_file"));
                    spooler_log.debug1(".. parameter [event_file]: " + this.getEventFilename());
                } else {
                    this.setEventFilename(spooler.log_dir() + "/scheduler.events");
                }

                if (this.getParameters().value("event_file_prefix") != null && this.getParameters().value("event_file_prefix").length() > 0) {
                    this.setEventFilenamePrefix(this.getParameters().value("input_file_prefix"));
                    spooler_log.debug1(".. parameter [event_file_prefix]: " + this.getEventFilenamePrefix());
                } else {
                    this.setEventFilenamePrefix("-in tab -csv | ");
                }
               
                if (this.getParameters().value("supervisor_host") != null && this.getParameters().value("supervisor_host").length() > 0) {
                    this.setEventSupervisorSchedulerHost(this.getParameters().value("supervisor_host"));
                    spooler_log.debug1(".. parameter [supervisor_host]: " + this.getEventSupervisorSchedulerHost());
                } else {
                  if (supervisor.hostname() != null && supervisor.hostname().length() > 0) {
                    this.setEventSupervisorSchedulerHost(supervisor.hostname());
                  } else {
                    this.setEventSupervisorSchedulerHost(spooler.hostname());
                  }
                }

                if (this.getParameters().value("supervisor_port") != null && this.getParameters().value("supervisor_port").length() > 0) {
                    try {
                        this.setEventSupervisorSchedulerPort(Integer.parseInt(this.getParameters().value("supervisor_port")));
                        spooler_log.debug1(".. parameter [supervisor_port]: " + this.getEventSupervisorSchedulerPort());
                    } catch (Exception ex) {
                        throw new Exception("illegal non-numeric value for Supervisor Job Scheduler port specified: " + this.getParameters().value("supervisor_port"));
                    }
                } else  {
                  if (supervisor.hostname() != null && supervisor.hostname().length() > 0) {
                    this.setEventSupervisorSchedulerPort(supervisor.tcp_port());
                  } else {
                    this.setEventSupervisorSchedulerPort(spooler.tcp_port());
                  }
                }
View Full Code Here

TOP

Related Classes of sos.spooler.Supervisor_client

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.