This topic describes the compact
command in gfsh
, the VMware Tanzu GemFire command-line interface.
Use this command to compact online and offline disk stores.
Compact a disk store on all members with that disk store.
Compact an offline disk store.
Compact a disk store on all members with that disk store.
This command uses the compaction threshold that each member has configured for its disk stores. The disk store must have the allow-force-compaction
property set to true
.
See Running Compaction on Disk Store Log Files for more information.
Availability: Online. You must be connected in gfsh
to a JMX Manager member to use this command.
Syntax:
compact disk-store --name=value [--groups=value(,value)*]
Parameters, compact disk-store
Name | Description |
---|---|
‑‑name | Required. Name of the disk store to be compacted. |
‑‑groups | Groups of members that perform disk compaction. If no group is specified, then the disk store is compacted by all members. |
Example Commands:
compact disk-store --name=Disk1
compact disk-store --name=Disk1 --group=MemberGroup1,MemberGroup2
Error Messages:
"Disk store \"{0}\" does not exist.";
" for groups \"{0}\"";
"No members found in the specified groups \"{0}\".";
"Compaction was attempted but nothing to compact.";
"Error occurred while doing compaction. Reason: \"{0}\"";
Compact an offline disk store.
If the disk store is large, you may need to allocate additional memory to the process by using the --J=-XmxNNNm
parameter.
See Running Compaction on Disk Store Log Files for more information.
Note: Do not perform offline compaction on the baseline directory of an incremental backup.
Availability: Online or offline.
Syntax:
compact offline-disk-store --name=value --disk-dirs=value(,value)*
[--max-oplog-size=value] [--J=value(,value)*]
Parameters, compact offline-disk-store
Name | Description | Default Value |
---|---|---|
‑‑name | Required. Name of the offline disk store to be compacted. | |
‑‑disk-dirs | Required. One or more directories where data for the disk store was previously written. Separate directories with commas. | |
‑‑max-oplog-size | Maximum size (in megabytes) of the oplogs created by compaction. | -1 |
‑‑J | Arguments passed to the Java Virtual Machine performing the compact operation on the disk store. For example: --J=-Xmx1024m . |
Example Commands:
compact offline-disk-store --name=Disk2 --disk-dirs=/Disks/Disk2
compact offline-disk-store --name=Disk2 --disk-dirs=/Disks/Disk2 --max-oplog-size=512 --J=-Xmx1024m