alter

Modify an existing Geode resource.

  • alter disk-store

    Modify or remove a region from an offline disk-store.

  • alter region

    Alters the configuration of a region.

  • alter runtime

    Alters configuration properties for all members or a subset of members while the member or members are running.

alter disk-store

Modify or remove a region from an offline disk-store.

When modifying a region's configuration, it is customary to take the region off-line and restart using the new configuration. You can use the alter disk-store command to change the configuration of the region stored in the disk-store to match the configuration you will use at restart.

Availability: Offline.

Syntax:

alter disk-store --name=value --region=value --disk-dirs=value(,value)*
    [--compressor(=value)] [--concurrency-level=value]
    [--enable-statistics=value] [--initial-capacity=value] [--load-factor=value]
    [--lru-algorithm=value] [--lru-action=value] [--lru-limit=value]
    [--off-heap(=value)] [--remove(=value)]

The three required options, --name, --region, and --disk-dirs, identify the disk store and region to be altered. If no additional options are specified, gfsh displays the current configuration without making any changes.

Name Description
\-\-name Required. Name of the disk-store whose contents will be altered.
\-\-region Required. Name (including path) of the region using the disk store.
\-\-disk-dirs Required. Directories where the data for the disk store was previously written.
\-\-compressor The fully-qualified class name of the compressor to use when compressing region entry values. A value of none removes the compressor.
\-\-concurrency-level An estimate of the maximum number of application threads that will concurrently access a region entry. Together with \-\-initial-capacity and \-\-load-factor, sets the parameters on the underlying java.util.ConcurrentHashMap used for storing region entries. This attribute does not apply to partitioned regions.
\-\-enable-statistics Enables statistics for the region. Valid values are true or false. If the parameter is specified without a value, the value of true is used.
\-\-initial-capacity Together with \-\-concurrency-level and \-\-load-factor, sets the parameters on the underlying java.util.ConcurrentHashMap used for storing region entries.
\-\-load-factor Together with \-\-concurrency-level and \-\-initial-capacity, sets the parameters on the underlying java.util.ConcurrentHashMap used for storing region entries. This must be a floating point number between 0 and 1, inclusive.
\-\-lru-action Action to take when evicting entries from the region. Valid values are:
  • none
  • overflow-to-disk
  • local-destroy
\-\-lru-algorithm Least recently used eviction algorithm. Valid types are:
  • none
  • lru-entry-count
  • lru-heap-percentage
  • lru-memory-size
\-\-lru-limit Number of entries allowed in the region before eviction occurs.
\-\-off-heap Specifies whether the region values are in heap memory or off-heap memory. When true, region values are in off-heap memory. If the parameter is specified without a value, the value of true is used.
\-\-remove Specifies whether to remove the region from the disk-store. If the parameter is specified without a value, the value of true is used. Note: \-\-remove deletes all persistent data for the region. Consider copying the disk store files to a backup before using this option if you might want to retrieve the data at a later date.

Example Commands:

alter disk-store --name=DiskStore1 --region=region1 --disk-dirs=/Disks/DiskStore1 --off-heap
alter disk-store --name=DiskStore1 --region=region1 --disk-dirs=/Disks/DiskStore1 --remove

alter region

Alters the configuration of a region.

Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.

Syntax:

alter region --name=value [--group=value(,value)*]
    [--entry-idle-time-expiration(=value)?]
    [--entry-idle-time-expiration-action(=value)?]
    [--entry-time-to-live-expiration(=value)?]
    [--entry-time-to-live-expiration-action(=value)?]
    [--region-idle-time-expiration(=value)?]
    [--region-idle-time-expiration-action(=value)?]
    [--region-time-to-live-expiration(=value)?]
    [--region-time-to-live-expiration-action(=value)?]
    [--cache-listener=value(,value)*] [--cache-loader(=value)?]
    [--cache-writer(=value)?] [--async-event-queue-id=value(,value)*]
    [--gateway-sender-id=value(,value)*] [--enable-cloning(=value)?]
    [--eviction-max(=value)?]

Table 1. Alter Region Parameters
Name Description Default Value
\-\-async-event-queue-id IDs of the Async Event Queues that will be used for write-behind operations.
\-\-cache-listener Fully qualified class name of a plug-in to be instantiated for receiving after-event notification of changes to the region and its entries. Any number of cache listeners can be configured.
\-\-cache-loader Fully qualified class name of a plug-in to be instantiated for receiving notification of cache misses in the region. At most, one cache loader can be defined in each member for the region. For distributed regions, a cache loader may be invoked remotely from other members that have the region defined.
\-\-cache-writer Fully qualified class name of a plug-in to be instantiated for receiving before-event notification of changes to the region and its entries. The plug-in may cancel the event. At most, one cache writer can be defined in each member for the region
\-\-enable-cloning

Determines how fromDelta applies deltas to the local cache for delta propagation. When true, the updates are applied to a clone of the value and then the clone is saved to the cache. When false, the value is modified in place in the cache.

false
\-\-entry-idle-time-expiration Number of seconds before a region or an entry expires. Specify -1 to indicate that there is no expiration of this type -1
\-\-entry-idle-time-expiration-action Action that should take place when a region or an entry expires.
Select one of the following expiration actions:
local-destroy Removes the region or entry from the local cache, but does not distribute the removal operation to remote members. You cannot use this action on partitioned region entries.
destroy Removes the region or entry completely from the cache. Destroy actions are distributed according to the region's distribution settings. Use this option when the region or entry is no longer needed for any application in the distributed system.
invalidate Default expiration action. Marks an entry or all entries in the region as invalid. Distributes the invalidation according to the region's scope. This is the proper choice when the region or the entry is no longer valid for any application in the distributed system.
local-invalidate Marks an entry or all entries in the region as invalid but does not distribute the operation. You cannot use this action on partitioned region entries. Local region invalidation is only supported for regions that are not configured as replicated regions.
invalidate
\-\-entry-time-to-live-expiration Number of seconds before a region or an entry expires. Specify -1 to indicate that there is no expiration of this type. -1
\-\-entry-time-to-live-expiration-action Action that should take place when a region or an entry expires.
Select one of the following expiration actions:
local-destroy Removes the region or entry from the local cache, but does not distribute the removal operation to remote members. You cannot use this action on partitioned region entries.
destroy Removes the region or entry completely from the cache. Destroy actions are distributed according to the region's distribution settings. Use this option when the region or entry is no longer needed for any application in the distributed system.
invalidate Default expiration action. Marks an entry or all entries in the region as invalid. Distributes the invalidation according to the region's scope. This is the proper choice when the region or the entry is no longer valid for any application in the distributed system.
local-invalidate Marks an entry or all entries in the region as invalid but does not distribute the operation. You cannot use this action on partitioned region entries. Local region invalidation is only supported for regions that are not configured as replicated regions.
invalidate
\-\-eviction-max Maximum value for the Eviction Attributes that the eviction algorithm uses to determine when to perform its eviction action. The unit of the maximum value is determined by the Eviction Algorithm. 0
\-\-gateway-sender-id IDs of the Gateway Senders where data is routed.
\-\-group Group(s) of members where the region will be altered.
\-\-name Required. Name (including path) of the region.
\-\-region-idle-time-expiration Number of seconds before a region or an entry expires. If timeout is not specified, it defaults to zero (which means no expiration). -1
\-\-region-idle-time-expiration-action Action that should take place when a region or an entry expires.
Select one of the following expiration actions:
local-destroy Removes the region or entry from the local cache, but does not distribute the removal operation to remote members. You cannot use this action on partitioned region entries.
destroy Removes the region or entry completely from the cache. Destroy actions are distributed according to the region's distribution settings. Use this option when the region or entry is no longer needed for any application in the distributed system.
invalidate Default expiration action. Marks an entry or all entries in the region as invalid. Distributes the invalidation according to the region's scope. This is the proper choice when the region or the entry is no longer valid for any application in the distributed system.
local-invalidate Marks an entry or all entries in the region as invalid but does not distribute the operation. You cannot use this action on partitioned region entries. Local region invalidation is only supported for regions that are not configured as replicated regions.
invalidate
\-\-region-time-to-live-expiration Number of seconds before a region or an entry expires. If timeout is not specified, it defaults to zero (which means no expiration). -1
\-\-region-time-to-live-expiration-action Action that should take place when a region or an entry expires.
Select one of the following expiration actions:
local-destroy Removes the region or entry from the local cache, but does not distribute the removal operation to remote members. You cannot use this action on partitioned region entries.
destroy Removes the region or entry completely from the cache. Destroy actions are distributed according to the region's distribution settings. Use this option when the region or entry is no longer needed for any application in the distributed system.
invalidate Default expiration action. Marks an entry or all entries in the region as invalid. Distributes the invalidation according to the region's scope. This is the proper choice when the region or the entry is no longer valid for any application in the distributed system.
local-invalidate Marks an entry or all entries in the region as invalid but does not distribute the operation. You cannot use this action on partitioned region entries. Local region invalidation is only supported for regions that are not configured as replicated regions.
invalidate

Table 1. Alter Region Parameters

Example Commands:

alter region --name=region1 --eviction-max=5000 [-group=all]

Sample Output:

gfsh>alter region --name=customer --eviction-max=5000
Member  | Status
server1 | Region "/customer" altered on "server1"

alter runtime

Alters configuration properties for all members or a subset of members while the member or members are running.

For more information on these configuration properties, see cache.xml and configuration parameter reference.

Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.

Syntax:

alter runtime [--member=value] [--group=value] [--archive-disk-space-limit=value]
    [--archive-file-size-limit=value] [--log-disk-space-limit=value]
    [--log-file-size-limit=value] [--log-level=value]
    [--statistic-archive-file=value] [--statistic-sample-rate=value]
    [--enable-statistics=value] [--copy-on-read(=value)?] [--lock-lease=value]
    [--lock-timeout=value] [--message-sync-interval=value] [--search-timeout=value]

Table 2. Alter Runtime Parameters
Name Description Default Value
\-\-member Name or ID of the member whose configuration is to be altered at runtime. If you do not specify this parameter, the configuration properties are modified for all cluster members using the cluster configuration service. If not specified, all members using the cluster configuration service
\-\-group Name of the group whose members's runtime configuration is to be altered. If you do not specify this parameter, the configuration properties are modified for all cluster members using the cluster configuration service. If not specified, all members using the cluster configuration service
\-\-archive-disk-space-limit Archive disk space limit. Maximum size (in megabytes) of all inactive statistic archive files combined. If this limit is exceeded, inactive archive files are deleted, oldest first, until the total size is within the limit. If set to zero, disk space use is unlimited. Valid values are (in megabytes): 0 - 1000000. 0
\-\-archive-file-size-limit Archive file size limit. The maximum size (in megabytes) of a single statistic archive file. Once this limit is exceeded, a new statistic archive file is created, and the current archive file becomes inactive. If set to zero, file size is unlimited. Valid values are (in megabytes): 0 - 1000000. 0
\-\-log-disk-space-limit Log disk space limit. Maximum size in megabytes of all inactive log files combined. If this limit is exceeded, inactive log files are deleted, oldest first, until the total size is within the limit. If set to zero, disk space use is unlimited. Valid values are (in megabytes): 0 - 1000000. 0
\-\-log-file-size-limit Log file size limit. Maximum size in megabytes of a log file before it is closed and logging rolls on to a new (child) log file. If set to zero, log rolling is disabled. Valid values are (in megabytes): 0 - 1000000. 0
\-\-loglevel The new log level. This option is required and you must specify a value. Valid values are: `ALL`, `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL`, `OFF`. INFO
\-\-statistic-archive-file The file to which the running system member writes statistic samples. For example: "StatisticsArchiveFile.gfs". An empty string disables archiving. Adding .gz suffix to the file name causes it to be compressed. See Statistics. not set
\-\-statistic-sample-rate Statistic sampling rate. Valid values are (in milliseconds): 100 - 60000. See Statistics. 1000
\-\-enable-statistics Whether statistic sampling should be enabled. Valid values are: true and false. See Statistics. false
\-\-copy-on-read True or false. Sets the "copy on read" feature for cache read operations. See Safe Entry Modification. false
\-\-lock-lease Sets the length, in seconds, of distributed lock leases obtained by this cache. See Setting Cache Timeouts. 120
\-\-lock-timeout Sets the number of seconds a cache operation may wait to obtain a distributed lock lease before timing out. See Setting Cache Timeouts. 60
\-\-message-sync-interval Sets the frequency (in seconds) at which a message will be sent by the primary cache-server node to all the secondary cache-server nodes to remove the events which have already been dispatched from the queue. See Change Server Queue Synchronization Frequency. 1
\-\-search-timeout Sets the number of seconds a cache get operation can spend searching for a value. See Setting Cache Timeouts. 300

Table 2. Alter Runtime Parameters

Example Commands:

alter runtime --member=server1 --loglevel=WARN --enable-statistics=true

Sample Output:

gfsh>alter runtime --member=server1 --loglevel=WARN --enable-statistics=true
Runtime configuration altered successfully for the following member(s)
192.0.2.0(server1:240)<v1>:64871

results matching ""

    No results matching ""