This topic describes the destroy
command in gfsh
, the VMware Tanzu GemFire command-line interface.
Use this command to delete or unregister functions, or to remove indexes, disk stores, and regions.
Destroy an asynchronous event queue.
Delete a disk store and all files on disk used by the disk store.
Destroy or unregister a function.
Destroy a gateway receiver.
Destroy a gateway sender.
Destroy or remove the specified index.
Destroy the specified JNDI binding.
Destroy or remove a region.
Destroy an asynchronous event queue.
Availability: Online. You must be connected in gfsh
to a JMX Manager member to use this command.
Syntax:
destroy async-event-queue --id=value [--groups=value(,value)*] [--if-exists=value]
Parameters, destroy async-event-queue:
Name | Description |
---|---|
‑‑id | Required. ID of the async event queue to be deleted. |
‑‑groups | Groups of members on which the async event queue will be destroyed. If no group is specified, the queue is destroyed on all members. |
‑‑if‑exists | If the specified async event queue does not exist, gfsh responds with a message to that effect. If this parameter is true, the response is prefixed with the label "Skipping: ". Useful for scripted tests. Default (if the parameter is not specified): false. Default (if the parameter is specified without value): true. |
Example Commands:
destroy async-event-queue --id=myAsyncEventQueue
Delete a disk store and all files on disk used by the disk store. Data for closed regions that previously used this disk store are lost.
Availability: Online. You must be connected in gfsh
to a JMX Manager member to use this command.
Syntax:
destroy disk-store --name=value [--groups=value(,value)*] [--if-exists=value]
Parameters, destroy disk-store:
Name | Description |
---|---|
‑‑name | Required. Name of the disk store to be deleted. |
‑‑groups | Groups of members on which the disk store will be destroyed. If no group is specified, the disk store is destroyed on all members. |
‑‑if‑exists | If the specified disk store does not exist, gfsh responds with a message to that effect. If this parameter is true, the response is prefixed with the label "Skipping: ". Useful for scripted tests. Default (if the parameter is not specified): false. Default (if the parameter is specified without value): true. |
Example Commands:
destroy disk-store --name=store1
Sample Output:
gfsh>destroy disk-store --name=store1
Member | Result
------- | -------
server1 | Success
Destroy or unregister a function.
The default is for the function to be unregistered from all members.
Availability: Online. You must be connected in gfsh
to a JMX Manager member to use this command.
Syntax:
destroy function --id=value [--groups=value(,value)*] [--member=value]
Parameters, destroy function:
Name | Description |
---|---|
‑‑id | Required. Unique function identifier. Use the list functions command to obtain the ID. |
‑‑groups | One or more groups of members from which this function will be unregistered. |
‑‑member | Name or ID of the member from which this function will be unregistered. |
Example Commands:
(1) destroy function --id=InterestCalculations
(2) destroy function --id=InterestCalculations --member=server1
(3) destroy function --id=InterestCalculations --group=Group1
Destroy the gateway receiver on one or more members. Since there can be only one gateway receiver per member, specifying the member specifies which gateway receiver to destroy.
Availability: Online. You must be connected in gfsh
to a JMX Manager member to use this command.
Syntax:
destroy gateway-receiver [--group=value(,value)*]
[--member=value(,value)*] [--if-exists(=value)?]
Parameters, destroy gateway-receiver:
Name | Description |
---|---|
‑‑group | One or more groups of members on which the gateway receiver will be destroyed. |
‑‑members | Name or ID of each member on which the gateway receiver will be destroyed. |
‑‑if‑exists | If this option is true and the gateway receiver does not exist, gfsh responds with a message prefixed with the label "Skipping: ". If this option is false and the gateway receiver does not exist, an error message is output. Default (if this option is not specified): false. Default (if this option is specified without a value): true. |
Example Commands:
destroy gateway-receiver --member=server1,server2
Destroy a gateway sender that is no longer used by a region.
The default is for the gateway sender to be destroyed on all members.
No region may be attached to the gateway sender to be destroyed. If a region is still attached, the system issues an error message similar to:
ERROR: The GatewaySender ParallelGatewaySender{id=ln,remoteDsId=2,isRunning =false}
could not be destroyed as it is still used by regions.
Remove the gateway sender from the region with a command similar to:
gfsh>alter region --name=regionA --gateway-sender-id=""
Note: Do not reuse the removed parallel gateway-sender in the new region unless that region is colocated with the previously attached region, as that will lead to data replication issues.
Availability: Online. You must be connected in gfsh
to a JMX Manager member to use this command.
Syntax:
destroy gateway-sender --id=value [--groups=value(,value)*]
[--members=value(,value)*] [--if-exists=value]
Parameters, destroy gateway-sender:
Name | Description |
---|---|
‑‑id | Required. Unique gateway sender identifier. Use the list gateways command to obtain the ID. |
‑‑groups | One or more groups of members from which this gateway sender will be destroyed. |
‑‑members | Name or ID of the members from which this gateway sender will be destroyed. |
‑‑if‑exists | If the specified gateway sender does not exist, gfsh responds with a message to that effect. If this parameter is true, the response is prefixed with the label "Skipping: ". Useful for scripted tests. Default (if the parameter is not specified): false. Default (if the parameter is specified without value): true. |
Example Commands:
destroy gateway-sender --id=SiteASender
Destroy or remove the specified index.
Availability: Online. You must be connected in gfsh
to a JMX Manager member to use this command.
Syntax:
destroy index [--name=value] [--region=value] [--members=value(,value)*]
[--groups=value(,value)*] [--if-exists=value]
Note: You must specify at least one of the parameter options. If you enter destroy index
without any parameters, the command will ask you to specify at least one option.
Parameters, destroy index:
Name | Description |
---|---|
‑‑name | Name of the index to be removed. |
‑‑members | Id of the members on which index is to be removed. |
‑‑region | Name of the region from which an index or all indexes are to be destroyed. |
‑‑groups | The index will be removed on all the members in the groups. |
‑‑if‑exists | If the specified index does not exist, gfsh responds with a message to that effect. If this parameter is true, the response is prefixed with the label "Skipping: ". Useful for scripted tests. Default (if the parameter is not specified): false. Default (if the parameter is specified without value): true. |
Example Commands:
destroy index --members=server2
destroy index --name=MyKeyIndex
Destroy a specified JNDI binding that holds the configuration for an XA data source.
Availability: Online. You must be connected in gfsh
to a JMX Manager member to use this command.
Syntax:
destroy jndi-binding --name=value [--if-exists=value]
Parameters, destroy jndi-binding:
Name | Description |
---|---|
‑‑name | Required. Name of the JNDI binding to be destroyed. |
‑‑if‑exists | Skip the destroy operation when the specified JNDI binding does not exist. Without this option, an error results from the specification of a JNDI binding that does not exist. Default (if the parameter is not specified): false. Default (if the parameter is specified without value): true. |
Example Command:
destroy jndi-binding --name=jndi1
Destroy or remove a region.
Availability: Online. You must be connected in gfsh
to a JMX Manager member to use this command.
Syntax:
destroy region --name=value [--if-exists=value]
Parameters, destroy region:
Name | Description |
---|---|
‑‑name | Required. Name and path of the region to be removed. |
‑‑if‑exists | If the specified region does not exist, gfsh responds with a message to that effect. If this parameter is true, the response is prefixed with the label "Skipping: ". Useful for scripted tests. Default (if the parameter is not specified): false. Default (if the parameter is specified without value): true. |
Example Commands:
destroy region --name=region4
destroy region --name=/region1/subregion1
Sample Output:
gfsh>destroy region --name=region1
"region1" destroyed successfully.