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());
}
}