You are viewing the documentation for a prerelease version.

View Latest

Establishing Auto-Compaction Settings

Auto-compaction settings can be established for the cluster.

Description

Auto-Compaction settings determine the compaction process; whereby databases and their respective view-indexes are compacted.

HTTP method and URI

POST /controller/setAutoCompaction

Syntax

Curl syntax is as follows:

curl -u Administrator:password -v -X POST
http://[cluster-ip-address]:8091/controller/setAutoCompaction
  -d databaseFragmentationThreshold[percentage]=[percentage]
  -d databaseFragmentationThreshold[size]=[size]
  -d viewFragmentationThreshold[percentage]=[percentage]
  -d viewFragmentationThreshold[size]=[percentage]
  -d allowedTimePeriod[fromHour]=[integer]
  -d allowedTimePeriod[fromMinute]=[integer]
  -d allowedTimePeriod[toHour]=[integer]
  -d allowedTimePeriod[toMinute]=[integer]
  -d allowedTimePeriod[abortOutside]=[ true | false ]
  -d parallelDBAndViewCompaction=[ true | false ]
  -d purgeInterval=[numberofdays]
  -d indexCompactionMode=[ standard | circular ]
  -d indexCircularCompaction[daysOfWeek]=[daynames-comma-separated]
  -d indexCircularCompaction[interval][fromHour]=[integer]
  -d indexCircularCompaction[interval][fromMinute]=[integer]
  -d indexCircularCompaction[interval][toHour]=[integer]
  -d indexCircularCompaction[interval][toMinute]=[integer]\
  -d indexCircularCompaction[interval][abortOutside]=[ true | false ]

Controller Parameters

Function Description

databaseFragmentationThreshold[percentage]

Integer specifying the database fragmentation percentage that is the point at which compaction is triggered.

databaseFragmentationThreshold[size]

Integer specifying the megabytes of database fragmentation that is the point at which compaction is triggered.

viewFragmentationThreshold[percentage]

Integer specifying the view fragmentation percentage that is the point at which compaction is triggered.

viewFragmentationThreshold[size]

Integer specifying the megabytes of view fragmentation that is the point at which compaction is triggered.

allowedTimePeriod[fromHour]

Integer between 0 and 23 inclusive, specifying the starting hour of the time-period during which compaction can run.

allowedTimePeriod[fromMinute]

Integer between 0 and 59 inclusive, specifying the starting minute (within the specified starting hour) of the time-period during which compaction can run.

allowedTimePeriod[toHour]

Integer between 0 and 23 inclusive, specifying the concluding hour of the time-period during which compaction can run.

allowedTimePeriod[toMinute]

Integer between 0 and 59 inclusive, specifying the concluding minute (within the specified concluding hour) of the time-period during which compaction can run.

allowedTimePeriod[abortOutside]

Either true or false, indicating respectively that compaction should or should not be aborted, if its running extends beyond the specified time of conclusion.

parallelDBAndViewCompaction

Either true or false, indicating respectively that compaction of databases and views should or should not run in parallel.

purgeInterval

The frequency with which the tombstone purge is run, specified as either an integer or a decimal number. If a decimal is specified, the fractional part is rounded at fifteen places. The default value is 3.0; the minimum 0.04; the maximum 60.

indexCompactionMode

The compaction mode for indexes. Can be either standard or circular.

indexCircularCompaction[daysOfWeek]

The days of the week on which circular compaction (if specified) is to run. Individual values must be day-names, each specified with an initial capital, and otherwise lower-case: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday. Multiple values must be separated by a single comma, with no spaces.

indexCircularCompaction[interval][fromHour]

Integer between 0 and 23 inclusive, specifying the starting hour of the time-period during which circular index compaction, if specified, can run.

indexCircularCompaction[interval][fromMinute]

Integer between 0 and 59 inclusive, specifying the starting minute of the time-period, within the specified starting hour, during which circular index compaction, if specified, can run.

indexCircularCompaction[interval][toHour]

Integer between 0 and 23 inclusive, specifying the concluding hour of the time-period during which circular index compaction, if specified, can run.

indexCircularCompaction[interval][toMinute]

Integer between 0 and 59 inclusive, specifying the concluding minute of the time-period, within the specified concluding hour, during which circular index compaction, if specified, can run.

indexCircularCompaction[interval][abortOutside]

Either true or false, indicating respectively that circular index compaction, if specified, should or should not be aborted, if its running extends beyond the specified time of conclusion.

Example

curl -i -X POST http://10.143.192.101:8091/controller/setAutoCompaction \
-u Administrator:password \
-d databaseFragmentationThreshold[percentage]=30 \
-d databaseFragmentationThreshold[size]=1073741824 \
-d viewFragmentationThreshold[percentage]=30 \
-d viewFragmentationThreshold[size]=1073741824 \
-d allowedTimePeriod[fromHour]=0 \
-d allowedTimePeriod[fromMinute]=0 \
-d allowedTimePeriod[toHour]=6 \
-d allowedTimePeriod[toMinute]=0 \
-d allowedTimePeriod[abortOutside]=true \
-d parallelDBAndViewCompaction=false \
-d purgeInterval=3.0 \
-d indexCompactionMode=circular \
-d indexCircularCompaction[daysOfWeek]=Monday,Wednesday,Friday \
-d indexCircularCompaction[interval][fromHour]=6 \
-d indexCircularCompaction[interval][fromMinute]=0 \
-d indexCircularCompaction[interval][toHour]=9 \
-d indexCircularCompaction[interval][toMinute]=0 \
-d indexCircularCompaction[interval][abortOutside]=true

This example establishes fragmentation thresholds and sizes for database and view, and specifies the time-period during which compaction should occur. It specifies that compaction be aborted if it should overrun this time-period. Parallel compaction for database and view is switched off. The tombstone purge interval is set to 3 days; and circular standard compaction is specified for particular days and hours.