mirror of https://github.com/apache/lucene.git
LUCENE-9662: Update concurrent index checking usage instructions and default thread count to CPU cores (#281)
This commit is contained in:
parent
42242b1745
commit
7f8607b59e
|
@ -489,8 +489,7 @@ public final class CheckIndex implements Closeable {
|
||||||
threadCount = tc;
|
threadCount = tc;
|
||||||
}
|
}
|
||||||
|
|
||||||
// capped threadCount at 4 for default
|
private int threadCount = Runtime.getRuntime().availableProcessors();
|
||||||
private int threadCount = Math.min(Runtime.getRuntime().availableProcessors(), 4);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set infoStream where messages should go. If null, no messages are printed. If verbose is true
|
* Set infoStream where messages should go. If null, no messages are printed. If verbose is true
|
||||||
|
@ -3984,7 +3983,7 @@ public final class CheckIndex implements Closeable {
|
||||||
if (opts.indexPath == null) {
|
if (opts.indexPath == null) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"\nERROR: index path not specified"
|
"\nERROR: index path not specified"
|
||||||
+ "\nUsage: java org.apache.lucene.index.CheckIndex pathToIndex [-exorcise] [-slow] [-segment X] [-segment Y] [-dir-impl X]\n"
|
+ "\nUsage: java org.apache.lucene.index.CheckIndex pathToIndex [-exorcise] [-slow] [-segment X] [-segment Y] [-threadCount X] [-dir-impl X]\n"
|
||||||
+ "\n"
|
+ "\n"
|
||||||
+ " -exorcise: actually write a new segments_N file, removing any problematic segments\n"
|
+ " -exorcise: actually write a new segments_N file, removing any problematic segments\n"
|
||||||
+ " -fast: just verify file checksums, omitting logical integrity checks\n"
|
+ " -fast: just verify file checksums, omitting logical integrity checks\n"
|
||||||
|
@ -3994,6 +3993,9 @@ public final class CheckIndex implements Closeable {
|
||||||
+ " -segment X: only check the specified segments. This can be specified multiple\n"
|
+ " -segment X: only check the specified segments. This can be specified multiple\n"
|
||||||
+ " times, to check more than one segment, eg '-segment _2 -segment _a'.\n"
|
+ " times, to check more than one segment, eg '-segment _2 -segment _a'.\n"
|
||||||
+ " You can't use this with the -exorcise option\n"
|
+ " You can't use this with the -exorcise option\n"
|
||||||
|
+ " -threadCount X: number of threads used to check index concurrently.\n"
|
||||||
|
+ " When not specified, this will default to the number of CPU cores.\n"
|
||||||
|
+ " When '-threadCount 1' is used, index checking will be performed sequentially.\n"
|
||||||
+ " -dir-impl X: use a specific "
|
+ " -dir-impl X: use a specific "
|
||||||
+ FSDirectory.class.getSimpleName()
|
+ FSDirectory.class.getSimpleName()
|
||||||
+ " implementation. "
|
+ " implementation. "
|
||||||
|
|
Loading…
Reference in New Issue