set-hazelcast-configuration

Configures the underlying Data Grid (Hazelcast) instance.

Synopsis

asadmin [asadmin-options] set-hazelcast-configuration
[--help]
[--target target]
[--enabled={true|false}]
[--dynamic={true|false}]
[--hazelcastconfigurationfile hazelcastconfigurationfile]
[--startport startport]
[--publicaddress publicaddress]
[--daspublicaddress daspublicaddress]
[--dasbindaddress dasbindaddress]
[--dasport dasport]
[--clustermode clustermode]
[--tcpipmembers tcpipmembers]
[--dnsmembers dnsmembers]
[--interfaces interfaces]
[--multicastgroup multicastgroup]
[--multicastport multicastport]
[--clustername clustername]
[--jndiname name]
[--cachemanagerjndiname name]
[--cachingproviderjndiname name]
[--executorpoolsize executorpoolsize]
[--executorqueuecapacity executorqueuecapacity]
[--scheduledexecutorpoolsize scheduledExecutorPoolsize]
[--scheduledexecutorqueuecapacity scheduledexecutorQueueCapacity]
[--licensekey=licensekey]
[--lite={true|false}]
[--hostawarePartitioning={true|false}]
[--membername membername]
[--membergroup membergroup]
[--kubernetesNamespace namespace]
[--kubernetesServicename serviceName]
[--autoIncrementport={true|false}]
[--configSpecificDatagridStartport startPort]
[--encryptDatagrid={true|false}]

Description

This command can be used to configure the settings of the underlying Data Grid (Hazelcast) instance.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin help page.

--help
-?

Displays the help text for the subcommand.

--target

This option helps specify the target on which you are executing this operation. Valid values are:

server

Applies to the default server instance. This is the default value.

instance_name

Applies to a specified server instance.

--enabled

Enables the Data Grid (Hazelcast).

If no target is specified, this will enable Hazelcast on the domain configuration server-config.

If no arguments are specified, defaults to true. If other options are specified, asadmin will interactively prompt for --enabled.

The default value is true.

--dynamic

Enable or disable dynamic stopping and starting of the embedded Hazelcast member. The default value is false.

--hazelcastconfigurationfile
-f

The Hazelcast configuration file to use.

This path is relative to the domain config directory, domain-dir/config/.

The default value is hazelcast-config.xml.

--startport

The port to run the Data Grid (Hazelcast) on for Payara Server Instances.

If this port is busy, the port specified will be incremented until a valid port is found.

The default value is 5900.

--publicaddress

The Public Address to use for this Data Grid Node.

Used when the node is behind a NAT.

--daspublicaddress

This is the public IP Address that the DAS should use if the DAS is behind a NAT firewall and other Payara Server Instances need to connect via the public NAT address rather than the internal IP Address.

--dasbindaddress

Explicitly specifies the IP Address the DAS should bind the Hazelcast instance to.

By default, Hazelcast will try to choose the correct bind address from the IP addresses available on the host.

If you find the DAS is binding to an incorrect IP Address the correct address can be specified here.

--dasport

The port to run Hazelcast on for the DAS.

If this port is busy, the port specified will be incremented until a valid port is found.

The default value is 4900.

--clustermode

Sets the Data Grid cluster discovery mode.

Can be one of domain, tcpip, multicast or kubernetes.

See Discovery Modes for a detailed description of each mode.

--tcpipmembers

Comma separated list of IP-Address:port used to discover cluster members if tcpip is selected as the cluster mode.

--dnsmembers

Sets the list of DNS names and ports of all Data Grid members when DNS Discovery Mode is used.

--interfaces

Similar to DAS Bind address by default Hazelcast will choose the correct IP Address to bind to.

If you find Hazelcast is binding to the incorrect address a comma separated list of IP Addresses can be specified here.

--multicastgroup
-g

The multicast group for communications in the Hazelcast instance if multicast is selected as cluster mode. The default value is 224.2.2.3.

--multicastport

The multicast port for communications in the Hazelcast instance if multicast is selected as cluster mode. The default value is 54327.

--clustername

Specifies the Hazelcast group name, to be optionally used to help divide clusters into logical, segregated groups (i.e. dev-group, prod_group).

--jndiname
-j

Specifies the JNDI name to bind the Hazelcast instance to.

--cacheManagerJndiname

Specified the JNDI name to bind the JCache Caching provider.

--cachingProviderJndiname

The JNDI name to bind the JCache Caching Provider to.

--executorpoolsize

The thread pool’s size for the Hazelcast Executor service.

--executorqueuecapacity

Queue Capacity of the Data Grid Executor Service.

Executions are queued until a thread is available.

--scheduledexecutorpoolsize

The thread pool’s size for the Hazelcast Scheduled Executor service.

--scheduledexecutorqueuecapacity

Queue Capacity of the Data Grid Scheduled Executor Service. Executions are queued until a thread is available.

--licensekey
-lk

Used to set the license key to start Hazelcast using an equivalent Hazelcast Enterprise edition compatible build.

Hazelcast Enterprise binaries have to be properly patched in the server installation for the Data Grid to be started correctly.
--lite

Sets the cluster to lite mode, where it will cluster but not store any cluster data. The default value is false.

--hostawarePartitioning

Whether to enable host-aware partitioning for the cluster.

Host aware partitioning must be enabled on all members of the cluster (including Payara Micro instances) for this feature to work correctly. The default value is false.

--membername

Member name. The default value is instance name.

--membergroup

Instance group name for all Server Instances using the configuration. Future functionality may use this name. The default value is config name.

--kubernetesNamespace

Sets the Kubernetes namespace when Kubernetes Discovery Mode is used.

If a namespace is not specified, Payara Server will use the default namespace.
--kubernetesServicename

Sets the Kubernetes service name when Kubernetes Discovery Mode is used.

--autoincrementport

By default, the Data Grid uses the next unoccupied port that is available starting with the start port.

When auto-increment is turned off an occupied start port results in a startup failure instead.

The default value is false.

--configSpecificDataGridStartPort

Sets a specific Data Grid start port to the instance.

This argument is only applicable when targeting standalone instances.

If set to 0 the Domain wide start port will be used instead.

--encryptdatagrid

Enables or disables encryption of data stored in the Domain Data Grid store using a key created using the generate-encryption-key command.

The default value is false.

Examples

Example 1 Basic configuration of the Data Grid settings

This example demonstrates configuring the Data Grid settings for a Hazelcast cluster called cluster1.

asadmin> set-hazelcast-configuration --enabled=true --target=cluster1 --dynamic=true -f hazelcast-config.xml --startPort=5902 -g 224.2.2.3 --multicastPort=6666 --clustermode multicast --hostawarePartitioning=true -j payara/Hazelcast
Command set-hazelcast-configuration executed successfully.