Allow to re-index in verbose mode during NoteDB migration
This makes it easier to see which changes just got indexed and correlate performance graphs with what is going on. Change-Id: Ic3131c997102bfd476326e84dba8cc7206592bbc
This commit is contained in:
@@ -101,6 +101,9 @@ public class MigrateToNoteDb extends SiteProgram {
|
||||
handler = ExplicitBooleanOptionHandler.class)
|
||||
private Boolean reindex;
|
||||
|
||||
@Option(name = "--verbose", usage = "Output more detailed information when reindexing")
|
||||
private boolean verbose;
|
||||
|
||||
private Injector dbInjector;
|
||||
private Injector sysInjector;
|
||||
private LifecycleManager dbManager;
|
||||
@@ -164,14 +167,18 @@ public class MigrateToNoteDb extends SiteProgram {
|
||||
}
|
||||
// Reindex all indices, to save the user from having to run yet another program by hand while
|
||||
// their server is offline.
|
||||
List<String> reindexArgs =
|
||||
ImmutableList.of(
|
||||
"--site-path",
|
||||
getSitePath().toString(),
|
||||
"--threads",
|
||||
Integer.toString(threads),
|
||||
"--index",
|
||||
ChangeSchemaDefinitions.NAME);
|
||||
ImmutableList.Builder<String> reindexArgsBuilder = ImmutableList.builder();
|
||||
reindexArgsBuilder.add(
|
||||
"--site-path",
|
||||
getSitePath().toString(),
|
||||
"--threads",
|
||||
Integer.toString(threads),
|
||||
"--index",
|
||||
ChangeSchemaDefinitions.NAME);
|
||||
if (verbose) {
|
||||
reindexArgsBuilder.add("--verbose");
|
||||
}
|
||||
List<String> reindexArgs = reindexArgsBuilder.build();
|
||||
System.out.println("Migration complete, reindexing changes with:");
|
||||
System.out.println(" reindex " + reindexArgs.stream().collect(joining(" ")));
|
||||
Reindex reindexPgm = new Reindex();
|
||||
|
Reference in New Issue
Block a user