GigaSpaces XAP 9.5 API

org.openspaces.admin.pu.elastic.config
Class DiscoveredMachineProvisioningConfig

java.lang.Object
  extended by org.openspaces.admin.pu.elastic.config.DiscoveredMachineProvisioningConfig
All Implemented Interfaces:
BeanConfig, ElasticMachineProvisioningConfig

public class DiscoveredMachineProvisioningConfig
extends Object
implements ElasticMachineProvisioningConfig

Allows to configure an Elastic Processing Unit machine provisioning that discovers existing machines.

Since:
8.0.1
Author:
itaif
See Also:
DiscoveredMachineProvisioningConfigurer, ElasticDeploymentTopology.dedicatedMachineProvisioning(org.openspaces.admin.pu.elastic.ElasticMachineProvisioningConfig), ElasticDeploymentTopology.sharedMachineProvisioning(String, org.openspaces.admin.pu.elastic.ElasticMachineProvisioningConfig)

Constructor Summary
DiscoveredMachineProvisioningConfig()
           
DiscoveredMachineProvisioningConfig(Map<String,String> properties)
           
 
Method Summary
static double detectMinimumNumberOfCpuCoresPerMachine(Admin admin)
           
 String getBeanClassName()
          The Bean implementation class name corresponding to this BeanConfig.
 RequiredZonesConfig getGridServiceAgentZones()
          Gets the list of zones that can be discovered and started by this machine provisioning.
 double getMinimumNumberOfCpuCoresPerMachine()
          Gets the minimum number of CPU cores per machine.
 Map<String,String> getProperties()
          Get the String key-value pairs properties used to configure this bean.
 CapacityRequirements getReservedCapacityPerMachine()
          Gets the expected amount of memory,cpu,disk,etc... per machine that is reserved for processes other than grid containers.
 CapacityRequirements getReservedCapacityPerManagementMachine()
          Gets the expected amount of memory,cpu,disk,etc... per management machine that is reserved for processes other than grid containers.
 double getReservedCpuCapacityPerMachine()
           
 Map<String,Long> getReservedDriveCapacityPerMachineInMB()
           
 long getReservedMemoryCapacityPerMachineInMB()
           
 boolean isDedicatedManagementMachines()
          By default is false, which means that a Grid Service Agents may run a management process.
 boolean isGridServiceAgentZoneMandatory()
          Deprecated. 
 void setDedicatedManagementMachines(boolean isDedicatedManagementMachines)
          A false value indicates that Grid Service Agents may run a management process.
 void setGridServiceAgentZoneMandatory(boolean zoneMandatory)
          Deprecated. 
 void setGridServiceAgentZones(String[] zones)
          Sets the list of zones that can be discovered and started by this machine provisioning.
 void setMinimumNumberOfCpuCoresPerMachine(double minimumNumberOfCpuCoresPerMachine)
          Sets an assessment for the minimum number of CPU cores per machine.
 void setProperties(Map<String,String> properties)
          Set with String key-value pairs to configure properties belonging to this bean.
 void setReservedCapacityPerMachine(CapacityRequirements capacityRequirements)
          Sets the expected amount of memory, cpu, drive space (per machine) that is reserved for processes other than processing units.
 void setReservedCpuCapacityPerMachineInMB(double reservedCpu)
          Sets the expected CPU cores per machine that is reserved for processes other than grid containers.
 void setReservedDriveCapacityPerMachineInMB(Map<String,Long> reservedInMB)
          Sets the expected amount of disk drive size per machine that is reserved for processes other than grid containers.
 void setReservedMemoryCapacityPerMachineInMB(long reservedInMB)
          Sets the expected amount of memory per machine that is reserved for processes other than grid containers.
 void setReservedMemoryCapacityPerManagementMachineInMB(long reservedInMB)
          Sets the expected amount of memory per management machine that is reserved for processes other than grid containers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscoveredMachineProvisioningConfig

public DiscoveredMachineProvisioningConfig(Map<String,String> properties)

DiscoveredMachineProvisioningConfig

public DiscoveredMachineProvisioningConfig()
Method Detail

getBeanClassName

public String getBeanClassName()
Description copied from interface: BeanConfig
The Bean implementation class name corresponding to this BeanConfig.

Specified by:
getBeanClassName in interface BeanConfig
Returns:
the name of the admin Bean implementation class.

setProperties

public void setProperties(Map<String,String> properties)
Description copied from interface: BeanConfig
Set with String key-value pairs to configure properties belonging to this bean. Overrides all previously set properties.

Specified by:
setProperties in interface BeanConfig
Parameters:
properties - the properties to configure this bean object.

getProperties

public Map<String,String> getProperties()
Description copied from interface: BeanConfig
Get the String key-value pairs properties used to configure this bean.

Specified by:
getProperties in interface BeanConfig
Returns:
the properties used to configure this bean object.

getMinimumNumberOfCpuCoresPerMachine

public double getMinimumNumberOfCpuCoresPerMachine()
Description copied from interface: ElasticMachineProvisioningConfig
Gets the minimum number of CPU cores per machine. This value is used during deployment to calculate number of partitions (partitions = maxNumberOfCpuCores/minNumberOfCpuCoresPerMachine)

Specified by:
getMinimumNumberOfCpuCoresPerMachine in interface ElasticMachineProvisioningConfig

setMinimumNumberOfCpuCoresPerMachine

public void setMinimumNumberOfCpuCoresPerMachine(double minimumNumberOfCpuCoresPerMachine)
Sets an assessment for the minimum number of CPU cores per machine. If not specified Processing Unit deployment calls detectMinimumNumberOfCpuCoresPerMachine(org.openspaces.admin.Admin) to get an assessment of minimum number of CPU cores per machine.

Since:
8.0.0

getGridServiceAgentZones

public RequiredZonesConfig getGridServiceAgentZones()
Description copied from interface: ElasticMachineProvisioningConfig
Gets the list of zones that can be discovered and started by this machine provisioning. By default returns an empty array. For example: If Grid Service Agents can be with/without any zone return new AnyZonesConfig() If Grid Service Agents must have at least "zoneA" (started with -Dcom.gs.zones=zoneA) return new AtLeastOneZoneConfigurer().addZone("zoneA").create() If Grid Service Agents must have at least "zoneA" or "zoneB" (or both) return new AtLeastOneZoneConfigurer().addZones("zoneA","zoneB").create() If Grid Service Agents must have exactly "zoneA" and "zoneB" (and no other zone) return new ExactOneZoneConfigurer().addZones("zoneA","zoneB").create()

Specified by:
getGridServiceAgentZones in interface ElasticMachineProvisioningConfig

setGridServiceAgentZones

public void setGridServiceAgentZones(String[] zones)
Sets the list of zones that can be discovered and started by this machine provisioning. For example: String[] {} - Grid Service Agents are started without -Dcom.gs.zones (requires that isGridServiceAgentZoneMandatory() is false) String[] {"zoneA"} - Grid Service Agents are started with -Dcom.gs.zones=zoneA (or without -Dcom.gs.zones if isGridServiceAgentZoneMandatory() is false) String[] {"zoneA","zoneB"} - Grid Service Agents are started with -Dcom.gs.zones=zoneA or -Dcom.gs.zones=zoneB or -Dcom.gs.zones=zoneA,zoneB (or without -Dcom.gs.zones if isGridServiceAgentZoneMandatory() is false)

Since:
8.0.1

setReservedMemoryCapacityPerMachineInMB

public void setReservedMemoryCapacityPerMachineInMB(long reservedInMB)
Sets the expected amount of memory per machine that is reserved for processes other than grid containers. These include Grid Service Manager, Lookup Service or any other daemon running on the system. Default value is 1024 MB. For example, by default, a 16GB server can run 3 containers 5GB each, since it approximately leaves 1024MB memory free.

Parameters:
reservedInMB - - amount of reserved memory in MB
Since:
8.0.1
See Also:
setReservedCapacityPerMachine(CapacityRequirements)

setReservedMemoryCapacityPerManagementMachineInMB

public void setReservedMemoryCapacityPerManagementMachineInMB(long reservedInMB)
Sets the expected amount of memory per management machine that is reserved for processes other than grid containers. These include Grid Service Manager, Lookup Service or any other daemon running on the system. Default value is 1280 MB. For example, by default, a 16GB server can run 3 containers 5GB each, since it approximately leaves 1024MB memory free.

Parameters:
reservedInMB - - amount of reserved memory in MB
Since:
9.5.0
See Also:
setReservedCapacityPerMachine(CapacityRequirements)

getReservedDriveCapacityPerMachineInMB

public Map<String,Long> getReservedDriveCapacityPerMachineInMB()

setReservedDriveCapacityPerMachineInMB

public void setReservedDriveCapacityPerMachineInMB(Map<String,Long> reservedInMB)
Sets the expected amount of disk drive size per machine that is reserved for processes other than grid containers. These include Grid Service Manager, Lookup Service or any other daemon running on the system. Default value is 0 MB.

Parameters:
reservedInMB - - amount of reserved disk drive in MB
Since:
8.0.3
See Also:
setReservedCapacityPerMachine(CapacityRequirements)

getReservedMemoryCapacityPerMachineInMB

public long getReservedMemoryCapacityPerMachineInMB()

getReservedCpuCapacityPerMachine

public double getReservedCpuCapacityPerMachine()

setReservedCpuCapacityPerMachineInMB

public void setReservedCpuCapacityPerMachineInMB(double reservedCpu)
Sets the expected CPU cores per machine that is reserved for processes other than grid containers. These include Grid Service Manager, Lookup Service or any other daemon running on the system. Default value is 0 cpu cores.

Parameters:
reservedCpu - - number of reserved CPU cores
Since:
8.0.3
See Also:
setReservedCapacityPerMachine(CapacityRequirements)

getReservedCapacityPerMachine

public CapacityRequirements getReservedCapacityPerMachine()
Description copied from interface: ElasticMachineProvisioningConfig
Gets the expected amount of memory,cpu,disk,etc... per machine that is reserved for processes other than grid containers. These include Grid Service Manager, Lookup Service or any other daemon running on the system. For example, a machine with a 16GB server and 1GB reserved can run 3 containers 5GB each.

Specified by:
getReservedCapacityPerMachine in interface ElasticMachineProvisioningConfig

getReservedCapacityPerManagementMachine

public CapacityRequirements getReservedCapacityPerManagementMachine()
Description copied from interface: ElasticMachineProvisioningConfig
Gets the expected amount of memory,cpu,disk,etc... per management machine that is reserved for processes other than grid containers. These include Grid Service Manager, Lookup Service or any other daemon running on the system. For example, a machine with a 16GB server and 1GB reserved can run 3 containers 5GB each.

Specified by:
getReservedCapacityPerManagementMachine in interface ElasticMachineProvisioningConfig

setReservedCapacityPerMachine

public void setReservedCapacityPerMachine(CapacityRequirements capacityRequirements)
Sets the expected amount of memory, cpu, drive space (per machine) that is reserved for processes other than processing units. These include Grid Service Manager, Lookup Service or any other daemon running on the system. Default value is 1024 MB RAM. For example, by default, a 16GB server can run 3 containers 5GB each, since it approximately leaves 1024MB memory free.

Parameters:
capacityRequirements - - specifies the reserved memory/cpu/disk space
Since:
8.0.3
See Also:
setReservedCpuCapacityPerMachineInMB(double), setReservedMemoryCapacityPerMachineInMB(long), setReservedDriveCapacityPerMachineInMB(Map)

isDedicatedManagementMachines

public boolean isDedicatedManagementMachines()
Description copied from interface: ElasticMachineProvisioningConfig
By default is false, which means that a Grid Service Agents may run a management process. If true, it means that agents started and discovered by this machine provisioning cannot run a GridServiceManager nor LookupService nor ElasticServiceManager Usually setting this value to true means that ElasticMachineProvisioningConfig.getReservedCapacityPerMachine() memory can be decreased, since no memory needs to be reserved for management processes.

Specified by:
isDedicatedManagementMachines in interface ElasticMachineProvisioningConfig

setDedicatedManagementMachines

public void setDedicatedManagementMachines(boolean isDedicatedManagementMachines)
A false value indicates that Grid Service Agents may run a management process. True indicates that agents started and discovered by this machine provisioning cannot run a GridServiceManager nor LookupService nor ElasticServiceManager Usually setting this value to true means that setReservedMemoryCapacityPerMachineInMB(long) can be decreased, since no memory needs to be reserved for management processes.

Since:
8.0.1

isGridServiceAgentZoneMandatory

@Deprecated
public boolean isGridServiceAgentZoneMandatory()
Deprecated. 

Description copied from interface: ElasticMachineProvisioningConfig
By default is false, which means that Grid Service Agents without a zone can be started and discovered by this machine provisioning. When true, each started or discovered agent much have one or more of the zones described in ElasticMachineProvisioningConfig.getGridServiceAgentZones() This flag is deprecated since 9.1.0 since the zones behavior of agents and containers are the same. Meaning an elastic pu that has a zone defined will not deploy on a GSA without zone anyhow.

Specified by:
isGridServiceAgentZoneMandatory in interface ElasticMachineProvisioningConfig

setGridServiceAgentZoneMandatory

@Deprecated
public void setGridServiceAgentZoneMandatory(boolean zoneMandatory)
Deprecated. 

A false value indicates that Grid Service Agents without a zone can be started and discovered by this machine provisioning. True indicates that each started or discovered agent much have one or more of the zones described in setGridServiceAgentZones(String[]) This flag is deprecated since 9.1.0 since the zones behavior of agents and containers are the same. Meaning an elastic pu that has a zone defined will not deploy on a GSA without zone anyhow.

Since:
8.0.1

detectMinimumNumberOfCpuCoresPerMachine

public static double detectMinimumNumberOfCpuCoresPerMachine(Admin admin)

GigaSpaces XAP 9.5 API

Copyright © GigaSpaces.