Class AwsCompact.Builder
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.aws.tool.AwsCompact.Builder
-
- Enclosing class:
- AwsCompact
public static class AwsCompact.Builder extends Object
Collect options for theCompact
command.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AwsCompact
build()
Create an executable version of theCompact
command.AwsCompact.Builder
withCompactorType(SegmentGCOptions.CompactorType compactorType)
The compactor type to be used by compaction.AwsCompact.Builder
withConcurrency(int concurrency)
The number of threads to be used for compaction.AwsCompact.Builder
withForce(boolean force)
Whether to fail if run on an older version of the store of force upgrading its format.AwsCompact.Builder
withGCLogInterval(long gcLogInterval)
The number of nodes after which an update about the compaction process is logged.AwsCompact.Builder
withGCType(SegmentGCOptions.GCType gcType)
The garbage collection type used.AwsCompact.Builder
withPath(String path)
The path (URI) to an existing segment store.AwsCompact.Builder
withSegmentCacheSize(int segmentCacheSize)
The size of the segment cache in MB.
-
-
-
Method Detail
-
withPath
public AwsCompact.Builder withPath(String path)
The path (URI) to an existing segment store. This parameter is required.- Parameters:
path
- the path to an existing segment store.- Returns:
- this builder.
-
withForce
public AwsCompact.Builder withForce(boolean force)
Whether to fail if run on an older version of the store of force upgrading its format.- Parameters:
force
- upgrade ifftrue
- Returns:
- this builder.
-
withSegmentCacheSize
public AwsCompact.Builder withSegmentCacheSize(int segmentCacheSize)
The size of the segment cache in MB. The default ofSegmentCache.DEFAULT_SEGMENT_CACHE_MB
when this method is not invoked.- Parameters:
segmentCacheSize
- cache size in MB- Returns:
- this builder
- Throws:
IllegalArgumentException
- ifsegmentCacheSize
is not a positive integer.
-
withGCLogInterval
public AwsCompact.Builder withGCLogInterval(long gcLogInterval)
The number of nodes after which an update about the compaction process is logged. Set to a negative number to disable progress logging. If not specified, it defaults to 150,000 nodes.- Parameters:
gcLogInterval
- The log interval.- Returns:
- this builder.
-
withGCType
public AwsCompact.Builder withGCType(SegmentGCOptions.GCType gcType)
The garbage collection type used. If not specified it defaults to full compaction- Parameters:
gcType
- the GC type- Returns:
- this builder
-
withCompactorType
public AwsCompact.Builder withCompactorType(SegmentGCOptions.CompactorType compactorType)
The compactor type to be used by compaction. If not specified it defaults to "parallel" compactor- Parameters:
compactorType
- the compactor type- Returns:
- this builder
-
withConcurrency
public AwsCompact.Builder withConcurrency(int concurrency)
The number of threads to be used for compaction. This only applies to the "parallel" compactor- Parameters:
concurrency
- the number of threads- Returns:
- this builder
-
build
public AwsCompact build()
Create an executable version of theCompact
command.- Returns:
- an instance of
Runnable
.
-
-