Author: mduerig
Date: Fri Jan 19 13:52:03 2018
New Revision: 1821656
URL: http://svn.apache.org/viewvc?rev=1821656&view=rev
Log:
OAK-7075: Document oak-run compact arguments and system properties
Merged r1821361
Modified:
jackrabbit/oak/branches/1.8/ (props changed)
jackrabbit/oak/branches/1.8/oak-doc/src/site/markdown/nodestore/segment/overview.md
Propchange: jackrabbit/oak/branches/1.8/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 19 13:52:03 2018
@@ -1,3 +1,3 @@
/jackrabbit/oak/branches/1.0:1665962
-/jackrabbit/oak/trunk:1820660-1820661,1820859,1820861,1820878,1820888,1820947,1821130,1821140-1821141,1821240,1821258,1821325,1821358,1821362,1821370,1821375,1821477,1821487,1821516
+/jackrabbit/oak/trunk:1820660-1820661,1820859,1820861,1820878,1820888,1820947,1821130,1821140-1821141,1821240,1821258,1821325,1821358,1821361-1821362,1821370,1821375,1821477,1821487,1821516
/jackrabbit/trunk:1345480
Modified:
jackrabbit/oak/branches/1.8/oak-doc/src/site/markdown/nodestore/segment/overview.md
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.8/oak-doc/src/site/markdown/nodestore/segment/overview.md?rev=1821656&r1=1821655&r2=1821656&view=diff
==============================================================================
---
jackrabbit/oak/branches/1.8/oak-doc/src/site/markdown/nodestore/segment/overview.md
(original)
+++
jackrabbit/oak/branches/1.8/oak-doc/src/site/markdown/nodestore/segment/overview.md
Fri Jan 19 13:52:03 2018
@@ -561,12 +561,55 @@ This option is optional and is disabled
### <a name="compact"/> Compact
```
-java -jar oak-run.jar compact PATH
+java -jar oak-run.jar compact [--force] [--mmap] PATH
```
-The `compact` command performs offline compaction on the Segment Store at
`PATH`.
+The `compact` command performs offline compaction of the Segment Store at
`PATH`.
`PATH` must be a valid path to an existing Segment Store.
+If the optional `--force [Boolean]` argument is set to `true` the tool ignores
a non
+matching Segment Store version. *CAUTION*: this will upgrade the Segment Store
to the
+latest version, which is incompatible with older versions. *There is no way to
downgrade
+an accidentally upgraded Segment Store*.
+
+The optional `--mmap [Boolean]` argument can be used to control the file
access mode. Set
+to `true` for memory mapped access and `false` for file access. If not
specified, memory
+mapped access is used on 64 bit systems and file access is used on 32 bit
systems. On
+Windows, regular file access is always enforced and this option is ignored.
+
+To enable logging during offline compaction a Logback configuration file has
to be injected
+via the `logback.configurationFile` property. In addition the
`compaction-progress-log`
+property controls the number of compacted nodes that will be logged. The
default value is 150000.
+
+##### Example
+
+The following command uses `logback-compaction.xml` to configure Logback
logging compaction
+progress every 1000 nodes to the console.
+
+```
+java -Dlogback.configurationFile=logback-compaction.xml
-Dcompaction-progress-log=1000 -jar oak-run.jar compact /path/to/segmenstore
+```
+
+logback-compaction.xml:
+
+```
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true">
+
+ <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
%msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <logger name="org.apache.jackrabbit.oak.segment.file.FileStore"
level="INFO"/>
+
+ <root level="warn">
+ <appender-ref ref="console" />
+ </root>
+</configuration>
+```
+
### <a name="debug"/> Debug
```