org.apache.ignite.mesos

## Class ClusterProperties

- java.lang.Object
- - org.apache.ignite.mesos.ClusterProperties

-     public class ClusterProperties
      extends Object

  The class defines cluster configuration. This configuration created from properties file that passed on startup or environment variables.

  If Mesos cluster working in Intranet or behind NAT then an access to local resources can be set by `ignitePackagePath()` or `ignitePackageUrl()` which should be available from nodes.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_CLUSTER_NAME`
    `static String` | `DEFAULT_HTTP_SERVER_PORT`
    `static String` | `DEFAULT_IGNITE_VERSION`
    `static String` | `DEFAULT_IGNITE_WORK_DIR`
    `static String` | `DEFAULT_MESOS_MASTER_URL`
    `static double` | `DEFAULT_RESOURCE_MIN_CPU`
    `static double` | `DEFAULT_RESOURCE_MIN_MEM`
    `static String` | `IGNITE_CLUSTER_NAME`
    `static String` | `IGNITE_CONFIG_XML`
    `static String` | `IGNITE_CONFIG_XML_URL`
    `static String` | `IGNITE_DISK_SPACE_PER_NODE`
    `static String` | `IGNITE_HOSTNAME_CONSTRAINT`
    `static String` | `IGNITE_HTTP_SERVER_HOST`
    `static String` | `IGNITE_HTTP_SERVER_IDLE_TIMEOUT`
    `static long` | `IGNITE_HTTP_SERVER_IDLE_TIMEOUT_DEFAULT`
    `static String` | `IGNITE_HTTP_SERVER_PORT`
    `static String` | `IGNITE_JVM_OPTS`
    `static String` | `IGNITE_MEMORY_PER_NODE`
    `static String` | `IGNITE_MIN_CPU_PER_NODE`
    `static String` | `IGNITE_MIN_MEMORY_PER_NODE`
    `static String` | `IGNITE_NODE_COUNT`
    `static String` | `IGNITE_PACKAGE_PATH`
    `static String` | `IGNITE_PACKAGE_URL`
    `static String` | `IGNITE_RUN_CPU_PER_NODE`
    `static String` | `IGNITE_TOTAL_CPU`
    `static String` | `IGNITE_TOTAL_DISK_SPACE`
    `static String` | `IGNITE_TOTAL_MEMORY`
    `static String` | `IGNITE_USERS_LIBS`
    `static String` | `IGNITE_USERS_LIBS_URL`
    `static String` | `IGNITE_VERSION`
    `static String` | `IGNITE_WORK_DIR`
    `static String` | `LICENCE_URL`
    `static String` | `MESOS_MASTER_URL`
    `static double` | `UNLIMITED` Unlimited.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClusterProperties()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `clusterName()`
    `double` | `cpus()`
    `void` | `cpus(double cpu)` Sets CPU count limit.
    `double` | `cpusPerNode()`
    `void` | `cpusPerNode(double cpu)` Sets CPU count limit.
    `double` | `disk()`
    `double` | `diskPerNode()`
    `static ClusterProperties` | `from(String cfg)`
    `static String` | `getNonLoopbackAddress()` Finds a local, non-loopback, IPv4 address
    `Pattern` | `hostnameConstraint()`
    `void` | `hostnameConstraint(Pattern ptrn)` Sets hostname constraint.
    `String` | `httpServerHost()`
    `int` | `httpServerPort()`
    `long` | `idleTimeout()` Sets the maximum Idle time for a http connection, which will be used for jetty server.
    `String` | `igniteCfg()`
    `String` | `igniteConfigUrl()`
    `String` | `ignitePackagePath()` Path on local file system to ignite archive.
    `String` | `ignitePackageUrl()` URL to ignite package.
    `String` | `igniteVer()`
    `String` | `igniteWorkDir()`
    `double` | `instances()`
    `String` | `jmvOpts()`
    `String` | `licenceUrl()`
    `String` | `masterUrl()`
    `double` | `memory()`
    `void` | `memory(double mem)` Sets mem limit.
    `double` | `memoryPerNode()`
    `void` | `memoryPerNode(double mem)` Sets mem limit.
    `double` | `minCpuPerNode()`
    `void` | `minCpuPerNode(double minCpu)` Sets min cpu count per node.
    `double` | `minMemoryPerNode()`
    `void` | `minMemoryPerNode(double minMemory)` Sets min memory.
    `String` | `userLibs()`
    `String` | `usersLibsUrl()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### UNLIMITED

          public static final double UNLIMITED

      Unlimited.
      See Also:
        Constant Field Values

    - #### MESOS_MASTER_URL

          public static final String MESOS_MASTER_URL

      See Also:
        Constant Field Values

    - #### DEFAULT_MESOS_MASTER_URL

          public static final String DEFAULT_MESOS_MASTER_URL

      See Also:
        Constant Field Values

    - #### IGNITE_JVM_OPTS

          public static final String IGNITE_JVM_OPTS

      See Also:
        Constant Field Values

    - #### IGNITE_CLUSTER_NAME

          public static final String IGNITE_CLUSTER_NAME

      See Also:
        Constant Field Values

    - #### DEFAULT_CLUSTER_NAME

          public static final String DEFAULT_CLUSTER_NAME

      See Also:
        Constant Field Values

    - #### IGNITE_HTTP_SERVER_HOST

          public static final String IGNITE_HTTP_SERVER_HOST

      See Also:
        Constant Field Values

    - #### IGNITE_HTTP_SERVER_PORT

          public static final String IGNITE_HTTP_SERVER_PORT

      See Also:
        Constant Field Values

    - #### DEFAULT_HTTP_SERVER_PORT

          public static final String DEFAULT_HTTP_SERVER_PORT

      See Also:
        Constant Field Values

    - #### IGNITE_TOTAL_CPU

          public static final String IGNITE_TOTAL_CPU

      See Also:
        Constant Field Values

    - #### IGNITE_RUN_CPU_PER_NODE

          public static final String IGNITE_RUN_CPU_PER_NODE

      See Also:
        Constant Field Values

    - #### IGNITE_TOTAL_MEMORY

          public static final String IGNITE_TOTAL_MEMORY

      See Also:
        Constant Field Values

    - #### IGNITE_MEMORY_PER_NODE

          public static final String IGNITE_MEMORY_PER_NODE

      See Also:
        Constant Field Values

    - #### IGNITE_TOTAL_DISK_SPACE

          public static final String IGNITE_TOTAL_DISK_SPACE

      See Also:
        Constant Field Values

    - #### IGNITE_DISK_SPACE_PER_NODE

          public static final String IGNITE_DISK_SPACE_PER_NODE

      See Also:
        Constant Field Values

    - #### IGNITE_NODE_COUNT

          public static final String IGNITE_NODE_COUNT

      See Also:
        Constant Field Values

    - #### IGNITE_MIN_CPU_PER_NODE

          public static final String IGNITE_MIN_CPU_PER_NODE

      See Also:
        Constant Field Values

    - #### DEFAULT_RESOURCE_MIN_CPU

          public static final double DEFAULT_RESOURCE_MIN_CPU

      See Also:
        Constant Field Values

    - #### IGNITE_MIN_MEMORY_PER_NODE

          public static final String IGNITE_MIN_MEMORY_PER_NODE

      See Also:
        Constant Field Values

    - #### DEFAULT_RESOURCE_MIN_MEM

          public static final double DEFAULT_RESOURCE_MIN_MEM

      See Also:
        Constant Field Values

    - #### IGNITE_VERSION

          public static final String IGNITE_VERSION

      See Also:
        Constant Field Values

    - #### DEFAULT_IGNITE_VERSION

          public static final String DEFAULT_IGNITE_VERSION

      See Also:
        Constant Field Values

    - #### IGNITE_PACKAGE_URL

          public static final String IGNITE_PACKAGE_URL

      See Also:
        Constant Field Values

    - #### IGNITE_PACKAGE_PATH

          public static final String IGNITE_PACKAGE_PATH

      See Also:
        Constant Field Values

    - #### IGNITE_WORK_DIR

          public static final String IGNITE_WORK_DIR

      See Also:
        Constant Field Values

    - #### DEFAULT_IGNITE_WORK_DIR

          public static final String DEFAULT_IGNITE_WORK_DIR

      See Also:
        Constant Field Values

    - #### IGNITE_USERS_LIBS

          public static final String IGNITE_USERS_LIBS

      See Also:
        Constant Field Values

    - #### IGNITE_USERS_LIBS_URL

          public static final String IGNITE_USERS_LIBS_URL

      See Also:
        Constant Field Values

    - #### LICENCE_URL

          public static final String LICENCE_URL

      See Also:
        Constant Field Values

    - #### IGNITE_CONFIG_XML

          public static final String IGNITE_CONFIG_XML

      See Also:
        Constant Field Values

    - #### IGNITE_CONFIG_XML_URL

          public static final String IGNITE_CONFIG_XML_URL

      See Also:
        Constant Field Values

    - #### IGNITE_HTTP_SERVER_IDLE_TIMEOUT

          public static final String IGNITE_HTTP_SERVER_IDLE_TIMEOUT

      See Also:
        Constant Field Values

    - #### IGNITE_HTTP_SERVER_IDLE_TIMEOUT_DEFAULT

          public static final long IGNITE_HTTP_SERVER_IDLE_TIMEOUT_DEFAULT

      See Also:
        Constant Field Values

    - #### IGNITE_HOSTNAME_CONSTRAINT

          public static final String IGNITE_HOSTNAME_CONSTRAINT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ClusterProperties

          public ClusterProperties()

  - ### Method Detail

    - #### clusterName

          public String clusterName()

      Returns:
        Cluster name.

    - #### cpus

          public double cpus()

      Returns:
        CPU count limit.

    - #### cpus

          public void cpus(double cpu)

      Sets CPU count limit.

    - #### cpusPerNode

          public double cpusPerNode()

      Returns:
        CPU count limit.

    - #### cpusPerNode

          public void cpusPerNode(double cpu)

      Sets CPU count limit.

    - #### memory

          public double memory()

      Returns:
        mem limit.

    - #### memory

          public void memory(double mem)

      Sets mem limit.
      Parameters:
        `mem` - Memory.

    - #### memoryPerNode

          public double memoryPerNode()

      Returns:
        mem limit.

    - #### memoryPerNode

          public void memoryPerNode(double mem)

      Sets mem limit.
      Parameters:
        `mem` - Memory.

    - #### jmvOpts

          public String jmvOpts()

      Returns:
        JVM opts for ignite.

    - #### disk

          public double disk()

      Returns:
        disk limit.

    - #### diskPerNode

          public double diskPerNode()

      Returns:
        disk limit per node.

    - #### instances

          public double instances()

      Returns:
        instance count limit.

    - #### minMemoryPerNode

          public double minMemoryPerNode()

      Returns:
        min memory per node.

    - #### minMemoryPerNode

          public void minMemoryPerNode(double minMemory)

      Sets min memory.
      Parameters:
        `minMemory` - Min memory.

    - #### hostnameConstraint

          public void hostnameConstraint(Pattern ptrn)

      Sets hostname constraint.
      Parameters:
        `ptrn` - Hostname pattern.

    - #### minCpuPerNode

          public double minCpuPerNode()

      Returns:
        min cpu count per node.

    - #### minCpuPerNode

          public void minCpuPerNode(double minCpu)

      Sets min cpu count per node.
      Parameters:
        `minCpu` - min cpu count per node.

    - #### igniteVer

          public String igniteVer()

      Returns:
        Ignite version.

    - #### igniteWorkDir

          public String igniteWorkDir()

      Returns:
        Working directory.

    - #### userLibs

          public String userLibs()

      Returns:
        User's libs.

    - #### igniteCfg

          public String igniteCfg()

      Returns:
        Ignite configuration.

    - #### masterUrl

          public String masterUrl()

      Returns:
        Master url.

    - #### httpServerHost

          public String httpServerHost()

      Returns:
        Http server host.

    - #### httpServerPort

          public int httpServerPort()

      Returns:
        Http server port.

    - #### idleTimeout

          public long idleTimeout()

      Sets the maximum Idle time for a http connection, which will be used for jetty server. The server provides resources for ignite mesos framework such as ignite archive, user's libs, configurations and etc.
      Returns:
        Http server idle timeout.

    - #### ignitePackageUrl

          public String ignitePackageUrl()

      URL to ignite package. The URL should to point at valid apache ignite archive. This property can be useful if using own apache ignite build.
      Returns:
        Url to ignite package.

    - #### ignitePackagePath

          public String ignitePackagePath()

      Path on local file system to ignite archive. That can be useful when Mesos working in Intranet or behind NAT.
      Returns:
        Path on local host to ignite package.

    - #### igniteConfigUrl

          public String igniteConfigUrl()

      Returns:
        Url to ignite configuration.

    - #### usersLibsUrl

          public String usersLibsUrl()

      Returns:
        Url to users libs configuration.

    - #### licenceUrl

          public String licenceUrl()

      Returns:
        Url to licence.

    - #### hostnameConstraint

          public Pattern hostnameConstraint()

      Returns:
        Host name constraint.

    - #### from

          public static ClusterProperties from(String cfg)

      Parameters:
        `cfg` - path to config file.
      Returns:
        Cluster configuration.

    - #### getNonLoopbackAddress

          public static String getNonLoopbackAddress()
                                              throws SocketException

      Finds a local, non-loopback, IPv4 address
      Returns:
        The first non-loopback IPv4 address found, or `null` if no such addresses found
      Throws:
        `SocketException` - If there was a problem querying the network interfaces

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021