create
Create async-event-queues, disk-stores, gateway receivers, gateway senders, indexes, and regions.
-
Creates an asynchronous event queue for batching events before they are delivered by a gateway sender.
-
Creates all the defined indexes.
-
Defines a pool of one or more disk stores, which can be used by regions and client subscription queues, and gateway sender queues for WAN distribution.
-
Creates a gateway receiver. You can only have one gateway receiver on each member, and unlike a gateway sender, you do not need to specify an identifier for the gateway receiver .
-
Creates a gateway sender on one or more members of a cluster.
-
Create an index that can be used when executing queries.
-
Create a JNDI binding that specifies resource attributes which describe a JDBC connection.
-
Create a region with given path and configuration.
-
Create a region with given path and configuration.
Note: The order in which components are created matters. For example, the recommendation for WAN setup is:
- Create/start WAN senders first
- Create Regions
- Create/start WAN receivers last
This assures that when WAN receivers are started, their associated regions are in place. Otherwise,
the create region command may fail if events are received before the region exists.
For more on this topic, see Configuring a Multi-site (WAN) System.
create async-event-queue
Creates an asynchronous event queue for batching events before they are delivered by a gateway sender.
See Configuring Multi-Site (WAN) Event Queues.
Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.
Syntax:
create async-event-queue --id=value --listener=value [--groups=value(,value)*]
[--parallel(=value)?] [--enable-batch-conflation(=value)?] [--batch-size=value]
[--batch-time-interval=value] [--persistent(=value)?] [--disk-store=value]
[--disk-synchronous(=value)?] [--max-queue-memory=value]
[--dispatcher-threads=value] [--order-policy=value]
[--gateway-event-filter=value(,value)*]
[--gateway-event-substitution-filter=value]
[--listener-param=value(,value)*] [--forward-expiration-destroy(=value)?]
[--pause-event-processing(=value)?]
Parameters, create async-event-queue:
| Name | Description | Default Value |
|---|---|---|
| ‑‑id | Required. ID of the asynchronous event queue | |
| ‑‑groups | The queue is created on all members of the group(s). If you do not specify a group, the queue is created on all members. | |
| ‑‑parallel | Specifies whether the queue is parallel. | false |
| ‑‑enable-batch-conflation | Enables batch conflation. | false |
| ‑‑batch-size | Maximum number of messages that a batch can contain. | 100 |
| ‑‑batch-time-interval | Maximum amount of time, in ms, that can elapse before a batch is delivered, when no events are found in the queue to reach the batch-size. | 5 |
| ‑‑persistent | Boolean value that determines whether Geode persists this queue. | false
If specified with out a value, default is true. |
| ‑‑disk-store | Named disk store to use for storing queue overflow, or for persisting the queue. If you specify a value, the named disk store must exist. If you specify a null value, Geode uses the default disk store for overflow and queue persistence. | |
| ‑‑disk-synchronous | Specifies whether disk writes are synchronous. | true |
| ‑‑max-queue-memory | Maximum amount of memory in megabytes that the queue can consume before overflowing to disk. | 100 |
| ‑‑dispatcher-threads | Number of threads used for sending events. | 5 |
| ‑‑order-policy | Policy for dispatching events when ‑‑dispatcher-threads is > 1. Possible values are THREAD, KEY, PARTITION. | KEY |
| ‑‑gateway-event-filter | List of fully qualified class names of GatewayEventFilters for this queue. These classes filter events before dispatching to remote servers. | |
| ‑‑gateway-event-substitution-filter | Fully-qualified class name of the GatewayEventSubstitutionFilter for this queue. | |
| ‑‑listener | Required. Fully-qualified class name of Async Event Listener for this queue | |
| ‑‑listener-param | Parameter name and value to be passed to the Async Event Listener class. Optionally, you can specify a value by following the parameter name with the # character and the value. For example:
| |
| ‑‑forward-expiration-destroy | Enables forwarding of expiration destroy operations to AsyncEventListener instances. If specified without a value, this parameter is set to “false”. | false |
| ‑‑pause-event-processing | Specifies whether event dispatching from the queue to the listener(s) will be paused when the AsyncEventQueue is started. If specified without a value, this parameter is set to "true". | false |
Example Commands:
create async-event-queue --id=myAEQ --listener=myApp.myListener
create defined indexes
Creates all the defined indexes.
See also define index and clear defined indexes.
Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.
Syntax:
create defined indexes [--members=value(,value)*] [--groups=value(,value)*]
Parameters, create defined indexes:
| Name | Description | Default |
|---|---|---|
| ‑‑members | Name/Id of the member(s) on which index will be created. | |
| ‑‑groups | The index will be created on all the members in the member group(s). |
Example Commands:
create defined indexes
Sample Output:
gfsh>create defined indexes
Indexes successfully created. Use list indexes to get details.
1. ubuntu(server1:17682)<v1>:27574
If index creation fails, you may receive an error message in gfsh similar to the following:
gfsh>create defined indexes
Exception : org.apache.geode.cache.query.RegionNotFoundException ,
Message : Region ' /r3' not found: from /r3Occurred on following members
1. india(s1:17866)<v1>:27809
create disk-store
Defines a pool of one or more disk stores, which can be used by regions and client subscription queues, and gateway sender queues for WAN distribution.
See Disk Storage
Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.
Syntax:
create disk-store --name=value --dir=value(,value)* [--allow-force-compaction(=value)?]
[--auto-compact(=value)?] [--compaction-threshold=value] [--max-oplog-size=value]
[--queue-size=value] [--time-interval=value] [--write-buffer-size=value]
[--groups=value(,value)*]
[--disk-usage-warning-percentage=value] [--disk-usage-critical-percentage=value]
Parameters, create disk-store:
| Name | Description | Default Value |
|---|---|---|
| ‑‑name | Required. The name of this disk store. | |
| ‑‑dir | Required. One or more directory names where the disk store files are written. Optionally, directory names may be followed by # and the maximum number of megabytes that the disk store can use in the directory. For example:
If the specified directory does not exist, the command will create the directory for you. | If the maximum directory size in megabytes is not specified, it will be set to 2147483647 (the value of Integer.MAX_VALUE) |
| ‑‑allow-force-compaction | Set to true to allow disk compaction to be forced on this disk store. | false |
| ‑‑auto-compact | Set to true to automatically compact the disk files. | true |
| ‑‑compaction-threshold | Percentage of non-garbage remaining, below which the disk store is eligible for compaction. | 50 |
| ‑‑max-oplog-size | Maximum size, in megabytes, for an oplog file. When the oplog file reaches this size, the file is rolled over to a new file. | 1024 |
| ‑‑queue-size | Maximum number of operations that can be asynchronously queued to be written to disk. | 0 |
| ‑‑time-interval | The number of milliseconds that can elapse before unwritten data is written to disk. | 1000 |
| --groups | The disk store is created on all members of the group(s). If no group is specified, the disk store is created on all members. | Â |
| ‑‑write-buffer-size | The size in bytes of the write buffer that this disk store uses when writing data to disk. Larger values may increase performance but use more memory. The disk store allocates one direct memory buffer of this size. | 32768 |
| ‑‑disk-usage-warning-percentage | Disk usage above this threshold generates a warning message. For example, if the threshold is set to 90%, then on a 1 TB drive falling under 100 GB of free disk space generates the warning.
Set to "0" (zero) to disable. | 90 |
| ‑‑disk-usage-critical-percentage | Disk usage above this threshold generates an error message and shuts down the member's cache. For example, if the threshold is set to 99%, then falling under 10 GB of free disk space on a 1 TB drive generates the error and shuts down the cache.
Set to "0" (zero) to disable. | 99 |
Example Commands:
create disk-store --name-store1 --dir=/data/ds1
Sample Output:
gfsh>create disk-store --name-store1 --dir=/data/ds1
Member | Result
------- | -------
server1 | Success
create gateway-receiver
Creates gateway receivers. You can only have one gateway receiver on each member, and unlike a gateway sender, you do not need to specify an identifier for the gateway receiver.
The create occurs on all servers,
unless the --groups or --members option is specified.
If the gateway receiver creation succeeds on at least one member,
this gfsh command exits with an exit code indicating success.
Outputs a tabular format status of each member's gateway receiver, independent of the success or failure of the creation.
See Gateway Receivers.
Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.
Syntax:
create gateway-receiver [--groups=value(,value)*] [--members=value(,value)*]
[--manual-start=(value)?] [--start-port=value] [--end-port=value] [--bind-address=value]
[--maximum-time-between-pings=value] [--socket-buffer-size=value]
[--gateway-transport-filter=value(,value)*] [--hostname-for-senders=value]
[--if-not-exists=(value)?]
Parameters, create gateway-receiver:
| Name | Description | Default Value |
|---|---|---|
--groups | Gateway receivers are created on the members of the specified group(s). | |
--members | Name of the member(s) on which to create the gateway receiver. For backward compatibility, no gateway receiver configuration is persisted if this option is specified and cluster configuration is enabled. | |
--manual-start | Boolean value that specifies whether you must manually start the gateway receiver. If specified without a value or set to true, the receiver must be started manually. | false |
--start-port | Starting port number for the range of possible ports used by this gateway receiver to accept connections from gateway senders in other sites. An unused port within the range is selected. If none are available, an exception is thrown. The start-port and end-port values are inclusive (for example, 50510–50520). | 5000 |
--end-port | Upper bound of the port range used by this gateway receiver for connections from gateway senders in other sites. An unused port within the range is selected. If none are available, an exception is thrown. The start-port and end-port values are inclusive. | 5500 |
--bind-address | Network address for connections from gateway senders in other sites. Specify as a literal string. | |
--socket-buffer-size | Buffer size (in bytes) for the socket connection. This should match the socket-buffer-size setting on gateway senders that connect to this receiver. | 32768 |
--gateway-transport-filter | Fully qualified class name of the GatewayTransportFilter to add to the gateway receiver. | |
--maximum-time-between-pings | Time interval (in milliseconds) between pings to connected WAN sites. Determines how long before a remote site is considered offline. | 60000 |
--hostname-for-senders | Host name or IP address that gateway senders use to connect to this receiver. Provided to senders by the locator. | |
--if-not-exists | If specified without a value or set to true, gateway receivers are not created if they already exist. The command output reports the status of each attempt. | false |
Example Commands:
gfsh>create gateway-receiver --members=server1
Sample Output:
gfsh>create gateway-receiver --members=server1
Member | Status
------- | ---------------------------------------------------------------------------
server1 | GatewayReceiver created on member "server1" and will listen on the port "0"
create gateway-sender
Creates a gateway sender on one or more members of a cluster.
See Gateway Senders.
Note:
The gateway sender configuration for a specific sender id must be identical on each Geode member that hosts the gateway sender.
Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.
Syntax:
create gateway-sender --id=value --remote-distributed-system-id=value
[--groups=value(,value)*] [--members=value(,value)*] [--parallel(=value)?]
[--manual-start=value] [--socket-buffer-size=value] [--socket-read-timeout=value]
[--enable-batch-conflation=value] [--batch-size=value] [--batch-time-interval=value]
[--enable-persistence=value] [--disk-store-name=value] [--disk-synchronous=value]
[--maximum-queue-memory=value] [--alert-threshold=value] [--dispatcher-threads=value]
[--order-policy=value][--gateway-event-filter=value(,value)*]
[--gateway-transport-filter=value(,value)*]
[--group-transaction-events(=value)?]
Parameters, create gateway-sender:
| Name | Description | Default |
|---|---|---|
--id | Required. Unique identifier for the gateway sender, usually associated with a physical location. | |
--remote-distributed-system-id | Required. ID of the remote cluster where this gateway sender sends events. | |
--groups | Gateway senders are created on the members of the specified group(s). | |
--members | Name of the member(s) on which to create the gateway sender. | |
--parallel | When true, specifies a parallel Gateway Sender. | false |
--enable-batch-conflation | Boolean value that determines whether messages are conflated. | false |
--manual-start | Deprecated. Boolean value that specifies whether you must manually start the gateway sender. A manual start is likely to cause data loss and should not be used in production. | false |
--socket-buffer-size | Size of the socket buffer used to send messages to remote sites. Should match the socket-buffer-size of remote gateway receivers. | 32768 |
--socket-read-timeout | Time in milliseconds the sender waits for an acknowledgment from a remote site. Must be ≥ 30000 if set; otherwise defaults to no timeout. | 0 |
--batch-size | Maximum number of messages per batch. | 100 |
--batch-time-interval | Maximum time (ms) before a batch is delivered if the batch size is not reached. | 1000 |
--enable-persistence | Boolean value that determines whether the gateway queue is persisted. | false |
--disk-store-name | Disk store used for queue overflow or persistence. If not specified, the default disk store is used. | |
--disk-synchronous | Specifies whether disk writes are synchronous. | true |
--maximum-queue-memory | Maximum memory (MB) the queue can use before overflowing to disk. | 100 MB |
--alert-threshold | Maximum time (ms) a region event can remain in the queue before an alert is logged. | 0 |
--dispatcher-threads | Number of dispatcher threads used to process region events. | 5 |
--order-policy | Configures ordering when dispatcher-threads > 1. Values: key, thread, partition. Not applicable to parallel queues. | key |
--gateway-event-filter | Comma-separated list of fully qualified GatewayEventFilter class names used to filter events before dispatch. Example: gateway-event-filter=com.user.filters.MyFilter1,com.user.filters.MyFilters2. | |
--gateway-transport-filter | Fully qualified class name of the GatewayTransportFilter to add to the GatewaySender. | |
--group-transaction-events | Ensures all events of a transaction are sent in the same batch (with constraints on parallel, dispatcher-threads, and enable-batch-conflation). May not be guaranteed under heavy load. | false |
--enforce-threads-connect-same-receiver | Applies only to serial senders. Ensures all dispatcher threads connect to the same receiver; starts one thread first, then the rest in parallel. | false |
Example Commands:
gfsh>create gateway-sender --remote-distributed-system-id="2" --id="sender2"
Sample Output:
gfsh>create gateway-sender --remote-distributed-system-id="2" --id="sender2"
Member | Status
------- | --------------------------------------------
server1 | GatewaySender "sender2" created on "server1"
create index
Create an index that can be used when executing queries.
Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.
See Working with Indexes.
Syntax:
create index --name=value --expression=value --region=value
[--members=value(,value)*] [--type=value] [--groups=value(,value)*]
Parameters, create index:
| Name | Description | Default |
|---|---|---|
| ‑‑name | Required. Name of the index to create. | Â |
| ‑‑expression | Required. Field of the region values that are referenced by the index. | Â |
| ‑‑region | Required. Name/Path of the region which corresponds to the "from" clause in a query. | Â |
| ‑‑members | Name/Id of the member(s) on which index will be created. | Â |
| ‑‑type | Type of the index. Valid values are: range and key. (A third type, hash, is still recognized but hash indexes are deprecated.) | range |
| ‑‑groups | The index will be created on all the members in the group(s). | Â |
Example Commands:
create index --name=myKeyIndex --expression=region1.Id --region=region1 --type=key
Sample Output:
gfsh>create index --name=myKeyIdex --expression=region1.Id --region=region1 --type=key
Index successfully created with following details
Name : myKeyIdex
Expression : region1.Id
RegionPath : /region1
Members which contain the index
1. ubuntu(server1:17682)<v1>:27574
gfsh>create index --name=myIndex2 --expression=exp2 --region=/exampleRegion
Failed to create index "myIndex2" due to following reasons
Index "myIndex2" already exists. Create failed due to duplicate name.
Occurred on following members
1. ubuntu(server1:17682)<v1>:27574
create jndi-binding
Create a JNDI binding that specifies resource attributes which describe a JDBC connection.
Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.
Syntax:
create jndi-binding --name=value --url=value
[--jdbc-driver-class=value] [--type=value] [--blocking-timeout-seconds=value]
[--conn-pooled-datasource-class=value] [--idle-timeout-seconds=value]
[--init-pool-size=value] [--login-timeout-seconds=value]
[--managed-conn-factory-class=value] [--max-pool-size=value] [--password=value]
[--transaction-type=value] [--username=value] [--xa-datasource-class=value]
[--if-not-exists(=value)?] [--datasource-config-properties=value(,value)*]
Parameters, create jndi-binding:
| Name | Description | Default |
|---|---|---|
| ‑‑name | Required. Name of the binding to create. | |
| ‑‑url or ‑‑connection-url | Required. the JDBC driver connection URL string. For example, jdbc:hsqldb:hsql://localhost:1701. | |
| ‑‑jdbc-driver-class | The fully qualified name of the JDBC driver class. | |
| ‑‑type | Type of the XA datasource. One of: MANAGED, SIMPLE, POOLED, or XAPOOLED. If --type=POOLED and a --conn-pooled-datasource-class option is not specified, a pool will be created using Hikari. For more information on Hikari, see https://brettwooldridge.github.io/HikariCP. | SIMPLE |
| ‑‑blocking-timeout-seconds | Specifies the maximum time, in seconds, to block while waiting for a connection before throwing an exception. | |
| ‑‑conn-pooled-datasource-class | The fully qualified name of the connection pool implementation that holds XA datasource connections. If --type=POOLED, then this class must implement org.apache.geode.datasource.PooledDataSourceFactory. | |
| ‑‑idle-timeout-seconds | Specifies the time, in seconds, that a connection may be idle before being closed. | |
| ‑‑init-pool-size | Specifies the initial number of connections the pool should hold. | |
| ‑‑login-timeout-seconds | The quantity of seconds after which the client thread will be disconnected due to inactivity. | |
| ‑‑managed-conn-factory-class | The fully qualified name of the connection factory implementation. | |
| ‑‑max-pool-size | The maximum number of connections that may be created in a pool. | |
| ‑‑password | The default password used when creating a new connection. | |
| ‑‑transaction-type | Type of the transaction. One of XATransaction, NoTransaction, or LocalTransaction. | |
| ‑‑username | Specifies the user name to be used when creating a new connection. When specified, if the --password option is not also specified, gfsh will prompt for the password. | |
| ‑‑xa-datasource-class | The fully qualified name of the javax.sql.XADataSource implementation class. | |
| ‑‑if-not-exists | When true, a duplicate jndi binding will not be created if one with the same name already exists. When false, an attempt to create a duplicate jndi binding results in an error. The option is set to true if the option is specified without a value. | false |
| ‑‑datasource-config-properties | Properties for the custom XADataSource driver. Append a JSON string containing a (name, type, value) tuple to set any property. If --type=POOLED, the properties will configure the database data source. If --type=POOLED and the value of a name within the tuple begins with the string "pool.", then the properties will configure the pool data source. For example: --datasource-config-properties={'name':'name1','type':'type1','value':'value1'},{'name':'pool.name2','type':'type2','value':'value2'} |
Example Commands:
gfsh>create jndi-binding --name=jndi1 --type=SIMPLE \
--jdbc-driver-class=org.apache.derby.jdbc.EmbeddedDriver \
--url="jdbc:derby:newDB;create=true"
create lucene index
Create a Lucene index. For details on Lucene index creation, see Apache Lucene Integration.
For additional Lucene-related gfsh commands, see describe lucene index, destroy lucene index, list lucene indexes and search lucene.
Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.
Syntax:
create lucene index --name=value --region=value --field=value(,value)*
[--analyzer=value(,value)*] [--serializer=value] [--group=value(,value)*]
Parameters, create lucene index:
| Name | Description | Default |
|---|---|---|
| ‑‑name | Required. Name of the index to create. | |
| ‑‑region | Required. Name/Path of the region on which to define the index. | |
| ‑‑field | Required. Field(s) of the region values that are referenced by the index, specified as a comma-separated list. To treat the entire value as a single field, specify __REGION_VALUE_FIELD. | |
| ‑‑analyzer | Analyzer(s) to extract terms from text, specified as a comma-separated list. If not specified, the default analyzer is used for all fields. If specified, the number of analyzers must exactly match the number of fields specified. When listing analyzers, use the keyword DEFAULT for any field that will use the default analyzer. | Lucene StandardAnalyzer |
| ‑‑serializer | Fully qualified class name of the serializer to be used with this index. The serializer must implement the LuceneSerializer interface. You can use the built-in org.apache.geode.cache.lucene.FlatFormatSerializer to index and search collections and nested fields. If not specified, the simple default serializer is used, which indexes and searches only the top level fields of the region objects. | simple serializer |
| ‑‑group | The index will be created on all the members in the specified member groups. |
Example Commands:
gfsh>create lucene index --name=customerIndex --region=/Customer
--field=__REGION_VALUE_FIELD
gfsh>create lucene index --name=analyzerIndex --region=/Person
--field=name,email,address,revenue
--analyzer=DEFAULT,org.apache.lucene.analysis.core.KeywordAnalyzer,
examples.MyCharacterAnalyzer,DEFAULT
Sample Output:
gfsh>create lucene index --name=testIndex --region=testRegion
--field=__REGION_VALUE_FIELD
Member | Status
-------------------------------------- | ---------------------------------
192.168.1.23(server505:17200)<v1>:1025 | Successfully created lucene index
create region
Create a region with given path and configuration.
You must specify either a --type or a --template-region for initial configuration when creating a region. Specifying a --key-constraint and --value-constraint makes object type information available during querying and indexing.
See Region Data Storage and Distribution.
See Specifying JSON within Command-Line Options for syntax details.
Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.
Syntax:
create region --name=value [--type=value] [--template-region=value]
[--groups=value(,value)*] [--if-not-exists(=value)?]
[--key-constraint=value] [--value-constraint=value]
[--enable-statistics=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]
[--entry-idle-time-custom-expiry=value] [--entry-time-to-live-custom-expiry=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] [--disk-store=value]
[--enable-synchronous-disk=value] [--enable-async-conflation=value]
[--enable-subscription-conflation=value] [--cache-listener=value(,value)*]
[--cache-loader=value] [--cache-writer=value]
[--async-event-queue-id=value(,value)*]
[--gateway-sender-id=value(,value)*] [--enable-concurrency-checks=value]
[--enable-cloning=value] [--concurrency-level=value]
[--colocated-with=value] [--local-max-memory=value]
[--recovery-delay=value] [--redundant-copies=value]
[--startup-recovery-delay=value] [--total-max-memory=value]
[--total-num-buckets=value] [--compressor=value] [--off-heap(=value)?]
[--partition-listener=value(,value)*] [--partition-resolver=value]
[--eviction-entry-count=value] [--scope=value]
[--eviction-max-memory=value] [--eviction-action=value]
[--eviction-object-sizer=value]
Parameters, create region:
| Name | Description | Default |
|---|---|---|
--name | Required. Name/Path of the region to be created. | |
--type | Required (if --template-region is not specified). Type of region to create (for example: PARTITION, PARTITION_REDUNDANT, REPLICATE, LOCAL). Use TAB completion to see all options. | |
--template-region | Required (if --type is not specified). Region whose attributes will be duplicated. | |
--groups | Group(s) of members on which the region will be created. | |
--if-not-exists | Skips creation if the region already exists. | false |
--key-constraint | Fully qualified class name allowed as region keys. | |
--value-constraint | Fully qualified class name allowed as region values. | |
--enable-statistics | Enables region statistics (required for expiration). | |
--entry-idle-time-expiration | Seconds entries can remain idle. | no expiration |
--entry-idle-time-expiration-action | Action when idle timeout occurs (destroy, local-destroy, invalidate, local-invalidate). | |
--entry-time-to-live-expiration | Seconds entries can exist without access or update. | no expiration |
--entry-time-to-live-expiration-action | Action when TTL expires. | |
--entry-idle-time-custom-expiry | Class implementing CustomExpiry for idle time. | |
--entry-time-to-live-custom-expiry | Class implementing CustomExpiry for TTL. | |
--region-idle-time-expiration | Seconds region can remain idle. | |
--region-idle-time-expiration-action | Action when region idle timeout occurs. | |
--region-time-to-live-expiration | Seconds region can exist without access or update. | no expiration |
--region-time-to-live-expiration-action | Action when region TTL expires. | |
--disk-store | Disk store used by the region. | |
--enable-synchronous-disk | Enables synchronous disk writes. | |
--enable-async-conflation | Enables aggregation of async TCP/IP messages. | |
--enable-subscription-conflation | Enables conflation of server-to-client messages. | |
--cache-listener | Fully qualified class for after-event notifications. | |
--cache-loader | Fully qualified class for cache misses. | |
--cache-writer | Fully qualified class for before-event notifications. | |
--async-event-queue-id | Async event queue IDs used for write-behind. | |
--gateway-sender-id | Gateway sender IDs for routing data. | |
--enable-concurrency-checks | Enables Region Version Vectors for replicated regions. | |
--enable-cloning | Applies deltas to a clone rather than in-place. | |
--concurrency-level | Estimated max concurrent threads per entry (not for partitioned regions). | |
--colocated-with | Region with which this region is colocated. | |
--local-max-memory | Max memory (MB) used by the region in this process. | |
--recovery-delay | Delay (ms) before redundancy recovery after a crash (-1 disables). | |
--redundant-copies | Number of extra bucket copies (0–3). | |
--startup-recovery-delay | Delay (ms) before new members assume redundancy. | immediate |
--total-max-memory | Max memory (MB) used by the region across all processes. | |
--total-num-buckets | Total number of hash buckets. | 113 |
--compressor | Compression class (for example SnappyCompressor). | no compression |
--off-heap | Stores values in off-heap memory when true. | false |
--partition-listener | Fully qualified class names of partition listeners. | |
--partition-resolver | Fully qualified class name of a partition resolver. | |
--eviction-entry-count | Enables eviction based on entry count. | |
--eviction-max-memory | Enables eviction based on memory (MB). | |
--eviction-action | Action when eviction threshold is reached (local-destroy, overflow-to-disk). | |
--eviction-object-sizer | Implementation of ObjectSizer for heap-based eviction. | |
--scope | Scope for replicated regions (default DISTRIBUTED_ACK). |
Example Commands:
create region --name=region1 --type=REPLICATE_PERSISTENT \
--cache-writer=org.apache.geode.examples.MyCacheWriter \
--group=Group1 --disk-store=DiskStore1
create region --name=region12 --template-region=/region1
create region --name=region2 --type=REPLICATE \
--cache-listener=org.apache.geode.examples.MyCacheListener1,\
org.apache.geode.examples.MyCacheListener2 \
--group=Group1,Group2
create region --name=region3 --type=PARTITION_PERSISTENT --redundant-copies=2 \
--total-max-memory=1000 --startup-recovery-delay=5 --total-num-buckets=100 \
--disk-store=DiskStore2 --cache-listener=org.apache.geode.examples.MyCacheListener3 \
--group=Group2
create region --name=region4 --type=REPLICATE_PROXY \
--cache-listener=org.apache.geode.examples.MyCacheListener1 --group=Group1,Group2
create region --name=myRegion --type=REPLICATE --eviction-max-memory=100 \
--eviction-action=overflow-to-disk --eviction-object-sizer=my.company.geode.MySizer
create region --name=r1 --type=PARTITION \
--cache-loader=org.example.myLoader{'URL':'jdbc:cloudscape:rmi:MyData'}
Sample Output:
gfsh>create region --name=myRegion --type=LOCAL
Member | Status
------- | ---------------------------------------
server1 | Region "/myRegion" created on "server1"