JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   Forums 

Execution policy properties

From JPPF 5.2 Documentation

Revision as of 06:55, 9 April 2016 by Lolocohen (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Main Page > Execution policy reference > Properties

1 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

2 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:

3 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:

4 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:

5 Environment variables

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


Related APIs:

6 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
  • usedMemory : the used heap memory in bytes
  • availableMemory : the total available memory in bytes, equal to maxMemory - usedMemory
  • startTime : the JVM start time in milliseconds
  • uptime : the JVM uptime in milliseconds
  • inputArgs : the options passed to the JVM. This does not include the arguments of the application accessed from the main() method, formatted as a list of strings separated by ", " (comma followed by a space)


Note: uptime, totalMemory and freeMemory are the values taken upon the node or server startup. They may have changed subsequently and should therefore only be used with appropriate precautions.

7 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 host_name|ipv4_address
  • ipv6.addresses: space-separated list of IPV6 addresses with associated host in the format host_name|ipv6_address

Example:

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

Note: when a host name cannot be resolved, the left-hand part of the address, on the left of the "|" (pipe character) will be set to the IP address.

8 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

9 Operating system properties

Related APIs:


List of properties:

  • os.TotalPhysicalMemorySize : total system RAM in bytes
  • os.FreePhysicalMemorySize : available system RAM in bytes *
  • os.TotalSwapSpaceSize : total system swap space in bytes
  • os.FreeSwapSpaceSize : available system swap space in bytes *
  • os.CommittedVirtualMemorySize : process committed vm in bytes *
  • os.ProcessCpuTime : process CPU time in nanoseconds *
  • os.Name : operating system name
  • os.Version : operating system version
  • os.Arch : operating system architecture
  • os.AvailableProcessors : system available cores


* these values are computed at node or server startup time, and will change subsequently; they should be used with appropriate precautions.


Example:

os.Arch = amd64
os.AvailableProcessors = 8
os.CommittedVirtualMemorySize = 375021568
os.FreePhysicalMemorySize = 12983939072
os.FreeSwapSpaceSize = 29355577344
os.Name = Windows 7
os.ProcessCpuTime = 312002000
os.TotalPhysicalMemorySize = 17113022464
os.TotalSwapSpaceSize = 34224136192
os.Version = 6.1

10 Server statistics

Related APIs:


Related documentation: The JPPF statistics API


The server statistics values defined as constants in JPPFStatisticsHelper are now included and available in the execution properties for a JPPF driver. The property names are formatted as "statistic_label.attribute = value" where:

  • statistic_label is the string returned by JPPFSnapshot.getLabel()
  • attribute is the attribute name corresponding to one of the other getters in JPPFSnapshot
  • value is always expressed as a double value, even if it is an integer


For a a cumulative or non-cumulative statistics snapshot, such as JPPFStatisticHelper.IDLE_NODE, the available properties will thus be:

idle.nodes.avg = 1.0
idle.nodes.count = 1.0
idle.nodes.latest = 1.0
idle.nodes.max = 1.0
idle.nodes.min = 0.0
idle.nodes.total = 1.0

For a single value snapshot such as JPPFStatisticHelper.CLIENT_IN_TRAFFIC, there is a single property:

client.traffic.in.total = 1589.0
Main Page > Execution policy reference > Properties

JPPF Copyright © 2005-2017 JPPF.org Powered by MediaWiki