Class Configuration

java.lang.Object
edu.rit.pj.cluster.Configuration

public class Configuration extends Object
Class Configuration provides configuration information about a parallel computer running Parallel Java. The configuration information is read from a plain text file. Each configuration file entry is on a single line. Lines beginning with # and blank lines are ignored. The order of the entries in the file does not matter (unless stated otherwise below). The items in each entry are separated by whitespace; there cannot be any whitespace within an item (unless stated otherwise below). The configuration file entries are:
  • cluster <name>
    The name of the cluster is <name>. The name may contain whitespace. This entry must be specified; there is no default.
  • logfile <file>
    The Job Scheduler will append log entries to the log file named <file>. This entry must be specified; there is no default.
  • webhost <host>
    The host name for the Job Scheduler's web interface is <host>. This entry must be specified; there is no default.
  • webport <port>
    The port number for the Job Scheduler's web interface is <port>. If not specified, the default port number is 8080.
  • schedulerhost <host>
    The host name to which the Job Scheduler listens for connections from job frontend processes is <host>. If not specified, the default is "localhost".
  • schedulerport <port>
    The port number to which the Job Scheduler listens for connections from job frontend processes is <port>. If not specified, the default port number is 20617.
  • frontendhost <host>
    The host name to which job frontend processes listen for connections from job backend processes is <host>. This entry must be specified; there is no default.
  • backend <name> <cpus> <host> <jvm> <classpath> [<jvmflag> ...]
    The parallel computer includes a backend node named <name> with <cpus> CPUs. The host name for SSH remote logins to the backend node is <host>. The full pathname for executing the Java Virtual Machine (JVM) on the backend node is <jvm>. The Java class path for the Parallel Java Library on the backend node is <classpath>. Each <jvmflag> (zero or more) gives a flag passed to the JVM on the command line. At least one of this entry must be specified.
  • backendshell <name> <shell command>
    On the backend node named <name>, use the given shell command string when starting a job backend process. This entry, if present, must appear after the corresponding backend <name> entry. If this entry is omitted, the default shell command string is "bash -l -c".
  • jobtime <time>
    The maximum time in seconds any Parallel Java job is allowed to run. The Job Scheduler will abort a job if it runs for this many seconds. If not specified, the default is not to impose a maximum time on jobs. Note: If the Job Scheduler is configured with a maximum job time and a particular job is given a maximum time with the -Dpj.jobtime property, the smaller of the Job Scheduler's maximum job time and the job's maximum time will be used for that job.

Here is an example of a configuration file:

Parallel Java Job Scheduler configuration file
 # Parallel Java Job Scheduler configuration file
 # Frontend node: tardis.cs.rit.edu
 # Backend nodes: dr00-dr09

 cluster RIT CS Tardis Hybrid SMP Cluster
 logfile /var/tmp/parajava/scheduler.log
 webhost tardis.cs.rit.edu
 webport 8080
 schedulerhost localhost
 schedulerport 20617
 frontendhost 10.10.221.1
 backend dr00 4 10.10.221.10 /usr/local/versions/jdk-1.5.0_15/bin/java /var/tmp/parajava/pj.jar
 backend dr01 4 10.10.221.11 /usr/local/versions/jdk-1.5.0_15/bin/java /var/tmp/parajava/pj.jar
 backend dr02 4 10.10.221.12 /usr/local/versions/jdk-1.5.0_15/bin/java /var/tmp/parajava/pj.jar
 backend dr03 4 10.10.221.13 /usr/local/versions/jdk-1.5.0_15/bin/java /var/tmp/parajava/pj.jar
 backend dr04 4 10.10.221.14 /usr/local/versions/jdk-1.5.0_15/bin/java /var/tmp/parajava/pj.jar
 backend dr05 4 10.10.221.15 /usr/local/versions/jdk-1.5.0_15/bin/java /var/tmp/parajava/pj.jar
 backend dr06 4 10.10.221.16 /usr/local/versions/jdk-1.5.0_15/bin/java /var/tmp/parajava/pj.jar
 backend dr07 4 10.10.221.17 /usr/local/versions/jdk-1.5.0_15/bin/java /var/tmp/parajava/pj.jar
 backend dr08 4 10.10.221.18 /usr/local/versions/jdk-1.5.0_15/bin/java /var/tmp/parajava/pj.jar
 backend dr09 4 10.10.221.19 /usr/local/versions/jdk-1.5.0_15/bin/java /var/tmp/parajava/pj.jar
Version:
20-Jun-2012
Author:
Alan Kaminsky
  • Constructor Details

    • Configuration

      public Configuration(String configfile) throws IOException
      Construct a new configuration. The configuration information is read from the given file.
      Parameters:
      configfile - Configuration file name.
      Throws:
      IOException - Thrown if an I/O error occurred while reading the configuration file. Thrown if there was an error in the configuration file.
      IOException - if any.
  • Method Details

    • getClusterName

      public String getClusterName()
      Returns the cluster name.
      Returns:
      Cluster name.
    • getLogFile

      public String getLogFile()
      Returns the Job Scheduler's log file name.
      Returns:
      Log file name.
    • getWebHost

      public String getWebHost()
      Returns the Job Scheduler's web interface host name.
      Returns:
      Host name.
    • getWebPort

      public int getWebPort()
      Returns the Job Scheduler's web interface port number.
      Returns:
      Port number.
    • getSchedulerHost

      public String getSchedulerHost()
      Returns the Job Scheduler's channel group host name. To send messages to the Job Scheduler, a job frontend connects a channel to this host.
      Returns:
      Host name.
    • getSchedulerPort

      public int getSchedulerPort()
      Returns the Job Scheduler's channel group port number. To send messages to the Job Scheduler, a job frontend connects a channel to this port.
      Returns:
      Port number.
    • getFrontendHost

      public String getFrontendHost()
      Returns the host name of the cluster's frontend processor.
      Returns:
      Host name.
    • getBackendCount

      public int getBackendCount()
      Returns the number of backend processors.
      Returns:
      Count.
    • getBackendInfo

      public BackendInfo getBackendInfo(int i)
      Returns information about the given backend processor.
      Parameters:
      i - Index in the range 0 .. getBackendCount()-1.
      Returns:
      Backend information object.
    • getBackendInfoList

      public List<BackendInfo> getBackendInfoList()
      Returns information about all backend processors.
      Returns:
      List of backend information objects.
    • getJobTime

      public int getJobTime()
      Returns the maximum job time.
      Returns:
      Maximum job time (seconds), or 0 if no maximum.