Execution policy properties

From JPPF Documentation version 3.x

Jump to: navigation, search

Contents

Main Page > Execution policy reference > Node properties

Related APIs

All properties can be obtained using the JPPFSystemInformation class. This is what is sent to any execution policy object when its accepts(JPPFSystemInformation) method is called to evaluate the policy against a specific node or driver connection. As JPPFSystemInformation encapsulates several sets of properties, the ExecutionPolicy class provides a method getProperty(JPPFSystemInformation, String) that will lookup a specified property in the following order:

  • in JPPFSystemInformation.getUuid() : JPPF uuid and version properties
  • in JPPFSystemInformation.getJppf() : JPPF configuration properties
  • in JPPFSystemInformation.getSystem() : system properties
  • in JPPFSystemInformation.getEnv() : environment variables
  • in JPPFSystemInformation.getNetwork() : IPV4 and IPV6 addresses assigned to the node or driver
  • in JPPFSystemInformation.getRuntime() : runtime properties
  • in JPPFSystemInformation.getStorage() : storage space properties

JPPF uuid and version properties

The following properties are provided:

  • jppf.uuid : the uuid of the node or driver
  • jppf.version.number : the current JPPF version number
  • jppf.build.number : the current build number
  • jppf.build.date : the build date, including the time zone, in the format “yyyy-MM-dd hh:mm z”


Related APIs:

JPPF configuration properties

The JPPF properties are all the properties defined in the node's or driver's JPPF configuration file, depending on where the execution policy applies.

Additionally, there is one special property “jppf.channel.local”, which is set internally by JPPF and which determines whether the job executor is a local node (i.e. node local to the driver's JVM) when used in a server SLA, or a local executor in the client when used in a client SLA. When used in a client SLA, this allows toggling local vs. remote execution on a per-job basis, as in the following example:

 JPPFJob job = ...;
 // allow job execution only in the client-local executor
 ExecutionPolicy localExecutionPolicy = new Equal("jppf.channel.local", true);
 job.getClientSLA().setExecutionPolicy(localExecutionPolicy);


Related APIs:

System properties

The system properties are all the properties accessible through a call to System.getProperties() including all the -Dproperty=value definitions in the Java command line.


Related APIs:

Environment variables

These are the operating system environment variables defined at the time the node's JVM was launched.


Related APIs:

Runtime properties

These are properties that can be obtained through a call to the JDK Runtime class.


Related APIs:


List of properties:

  • availableProcessors : number of processors available to the JVM
  • freeMemory : estimated free JVM heap memory, in bytes
  • totalMemory : estimated total JVM heap memory, in bytes
  • maxMemory : maximum JVM heap memory, in bytes, equivalent to the value defined through the -Xmx JVM flag

Note: totalMemory and freeMemory are the values taken when the node first connected to the JPPF server. They may have changed subsequently and should therefore only be used with appropriate precautions.

Network properties

These properties enumerate all IPV4 and IPV6 addresses assigned to the JPPF node's host.


Related APIs:


List of properties:

  • ipv4.addresses: space-separated list of IPV4 addresses with associated host in the format ipv4_address|host_name
  • ipv6.addresses: space-separated list of IPV6 addresses with associated host in the format ipv6_address|host_name

Example:

 ipv4.addresses = 192.168.121.3|www.myhost.com 127.0.0.1|localhost 254.169.0.12|
 ipv6.addresses = 2001:0db8:85a3:08d3:1319:8a2e:0370:7334|www.myhost.com

Note: when a host name cannot be resolved, the right-hand part of the address, on the right of the "|" (pipe character) will be empty

Storage properties

These properties provide storage space information about the node's file system. This is an enumeration of the file system roots with associated information such as root name and storage space informaiton. The storage space information is only available with Java 1.6 or later, as the related APIs did not exist before this version.


Related APIs:


List of properties:

  • host.roots.names = root_name_0 ... root_name_n-1 : the names of all accessible file system roots
  • host.roots.number = n : the number of accessible file system roots
  • For each root i:
    • root.i.name = root_name : for instance "C:\" on Windows or "/" on Unix
    • root.i.space.free = space_in_bytes : current free space for the root (Java 1.6 or later)
    • root.i.space.total = space_in_bytes : total space for the root (Java 1.6 or later)
    • root.i.space.usable = space_in_bytes : space available to the user the JVM is running under

Example:

 host.roots.names = C:\ D:\
 host.roots.number = 2
 root.0.name = C:\ 
 root.0.space.free = 921802928128
 root.0.space.total = 984302772224
 root.0.space.usable = 921802928128
 root.1.name = D:\
 root.1.space.free = 2241486848
 root.1.space.total = 15899463680
 root.1.space.usable = 2241486848
Main Page > Execution policy reference > Node properties

Support This Project Powered by MediaWiki