volume compact
Runs the compactor to remove recalled data on the Data Fabric cluster or stale data on a tier.
Permissions Required
The user running the command must have one of the following:
- Full control (fc) on the cluster or volume
- Volume edit permissions
Syntax
- CLI
-
maprcli volume compact [ -cluster <cluster_name> ] -name <vol_name> [ -forcerecallexpiry <true|false>. default:false ] [ -scanopten <true|false>. default:true ]
- REST
-
Request Type POST Request URL http[s]://<host>:<port>/rest/volume/compact?<parameters>
Parameters
Parameter |
Description |
---|---|
cluster |
The name of the cluster on which to run the command. |
forcerecallexpiry |
Specifies whether (true ) or not (false ) to
purge recalled data on the Data Fabric cluster. If
the command is run with the value for this set to true , the
compactor purges recalled data on the Data Fabric
cluster whether or not the expiry time for recalled data has been reached. If this
is not specified or if the value for this is false , the compactor
purges stale data on the tier and recalled data on the Data Fabric cluster if the expiry time for recalled data
has been reached or has passed. The default value is false . |
name |
The name of the volume. |
scanopten |
The parameter is used for performance optimization. true is
the default value, and true indicates that the volume compaction
optimizations are enabled. One of the compaction optimizations include skipping
containers that do not have enough garbage. This parameter is generally not set to
false , except when you wish to disable the performance
optimization feature for a particular reason. |
Examples
Remove stale data on the tier for the volume named sampleVol:
# maprcli volume compact -name sampleVol -json
{
"timestamp":1528299575917,
"timeofday":"2018-06-06 08:39:35.917 GMT-0700 AM",
"status":"OK",
"total":0,
"data":[
],
"messages":[
"Successfully started compaction."
]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/volume/compact?name=sampleVol' --user mapr:mapr
{"timestamp":1528299575917,"timeofday":"2018-06-06 08:39:35.917 GMT-0700 AM","status":"OK","total":0,"data":[],"messages":["Successfully started compaction."]}
Remove recalled data immediately on the volume named sampleVol:
# maprcli volume compact -name sampleVol -forcerecallexpiry true -json
{
"timestamp":1528299765110,
"timeofday":"2018-06-06 08:42:45.110 GMT-0700 AM",
"status":"OK",
"total":0,
"data":[
],
"messages":[
"Successfully started compaction."
]
}
# curl -X POST 'https://abc.sj.us:8443/rest/volume/compact?name=sampleVol&forcerecallexpiry=true' --user <username>:<password>
{"timestamp":1528299765110,"timeofday":"2018-06-06 08:42:45.110 GMT-0700 AM","status":"OK","total":0,"data":[],"messages":["Successfully started compaction."]}