SYS.HDFS_FORCE_COMPACTION

Initiates a major compaction cycle for a table that is configured with HDFS read/write persistence.

See How GemFire XD Manages HDFS Data for more information about GemFire XD compaction for HDFS read/write tables. See also SYS.HDFS_LAST_MAJOR_COMPACTION.

Syntax

SYS.HDFS_FORCE_COMPACTION (
IN FQTN VARCHAR(128),
IN MAX_WAIT_TIME INTEGER
)
FQTN
The fully-qualified name of the table (schemaname.tablename) to compact. The table that you specify must use HDFS read/write persistence in order to compact the persisted data.
MAX_WAIT_TIME
The maximum amount of time, in seconds, to wait for the compaction cycle to complete. Specify zero (0) to block indefinitely until compaction completes.

Example

Perform major compaction for persisted HDFS data for the FLIGHTS table in the APP schema. The procedure does not return control until the compaction completes:
gfxd> call sys.hdfs_force_compaction('APP.FLIGHTS', 0);
Statement executed.
You can also verify the time of the last completed major compaction cycle using SYS.HDFS_LAST_MAJOR_COMPACTION
gfxd> values sys.hdfs_last_major_compaction('app.flights);
1                         
--------------------------
2014-11-13 03:45:37.71    

1 row selected