Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1558,25 +1558,25 @@ public static boolean format(ServerConfiguration conf,
LOG.error("Formatting journal directory failed");
return false;
}
}

File[] ledgerDirs = conf.getLedgerDirs();
for (File dir : ledgerDirs) {
if (!cleanDir(dir)) {
LOG.error("Formatting ledger directory " + dir + " failed");
return false;
}
}

File[] ledgerDirs = conf.getLedgerDirs();
for (File dir : ledgerDirs) {
// Clean up index directories if they are separate from the ledger dirs
File[] indexDirs = conf.getIndexDirs();
if (null != indexDirs) {
for (File dir : indexDirs) {
if (!cleanDir(dir)) {
LOG.error("Formatting ledger directory " + dir + " failed");
return false;
}
}

// Clean up index directories if they are separate from the ledger dirs
File[] indexDirs = conf.getIndexDirs();
if (null != indexDirs) {
for (File dir : indexDirs) {
if (!cleanDir(dir)) {
LOG.error("Formatting ledger directory " + dir + " failed");
return false;
}
}
}
}

LOG.info("Bookie format completed successfully");
Expand Down
4 changes: 2 additions & 2 deletions site/_data/cli/shell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ commands:
use this command to update ledger metadata by replacing src-bookie to dest-bookie where data has been copied/moved.
Start the bookie process on dest-bookie and dest-bookie will serve copied ledger data from src-bookie.
options:
- flag: -srcBookie <bookie-id>
- flag: -srcBookie BOOKIE_ID
description: Source Bookie Id
- flag: -destBookie <bookie-id>
- flag: -destBookie BOOKIE_ID
description: Destination Bookie Id
- flag: -updatespersec N
description: Number of ledgers updating per second (default 5 per sec)
Expand Down