-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[improve] Support specifying multiple journalDirs for the bookie server start cmd options #4181
Open
zwOvO
wants to merge
9
commits into
apache:master
Choose a base branch
from
zwOvO:multiple_journalDirs_cmd
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ee29e28
Support specifying multiple journalDir as bookie start command parame…
zwOvO 839afd7
fix sJournalDirs is string array
zwOvO 3b535f0
update conf#journalDirectories for gke\docer bookkeeper
zwOvO 0ff1615
update conf#journalDirectories for gke\docer bookkeeper v2
zwOvO 02d637a
update conf#journalDirectories for gke\docer bookkeeper v3
zwOvO 2220764
fix getOptionValues
zwOvO 51489ca
Delete extra spaces
zwOvO f252258
Delete extra spaces
zwOvO 1e5a985
Iteration from BK_journalDirectory to BK_JohannalDirectories and ensu…
zwOvO File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,9 @@ public class Main { | |
BK_OPTS.addOption("m", "zkledgerpath", true, "Zookeeper ledgers root path"); | ||
BK_OPTS.addOption("p", "bookieport", true, "bookie port exported"); | ||
BK_OPTS.addOption("hp", "httpport", true, "bookie http port exported"); | ||
BK_OPTS.addOption("j", "journal", true, "bookie journal directory"); | ||
Option journalDirs = new Option ("j", "journaldirs", true, "bookie journal directories"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @eolivelli I didn't break the compatibility |
||
journalDirs.setArgs(10); | ||
BK_OPTS.addOption(journalDirs); | ||
Option indexDirs = new Option ("i", "indexdirs", true, "bookie index directories"); | ||
indexDirs.setArgs(10); | ||
BK_OPTS.addOption(indexDirs); | ||
|
@@ -82,7 +84,9 @@ private static void printUsage() { | |
+ "Options including:\n"; | ||
String footer = "Here is an example:\n" | ||
+ "\tBookieServer -c bookie.conf -z localhost:2181 -m /bookkeeper/ledgers " | ||
+ "-p 3181 -j /mnt/journal -i \"/mnt/index1 /mnt/index2\"" | ||
+ " -p 3181 " | ||
+ " -j \"/mnt/journal1 /mnt/journal2 \" " | ||
+ " -i \"/mnt/index1 /mnt/index2\" " | ||
+ " -l \"/mnt/ledger1 /mnt/ledger2 /mnt/ledger3\"\n"; | ||
hf.printHelp("BookieServer [options]\n", header, BK_OPTS, footer, true); | ||
} | ||
|
@@ -165,9 +169,12 @@ private static ServerConfiguration parseArgs(String[] args) | |
} | ||
|
||
if (cmdLine.hasOption('j')) { | ||
String sJournalDir = cmdLine.getOptionValue('j'); | ||
log.info("Get cmdline journal dir: {}", sJournalDir); | ||
conf.setJournalDirName(sJournalDir); | ||
String[] sJournalDirs = cmdLine.getOptionValue('j'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
log.info("Get cmdline journal dirs: "); | ||
for (String journal : sJournalDirs) { | ||
log.info("journalDir : {}", journal); | ||
} | ||
conf.setJournalDirsName(sJournalDirs); | ||
} | ||
|
||
if (cmdLine.hasOption('i')) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is a broken change? What happens if people still use BK_journalDirectory instead of BK_journalDirectories after upgrading?
We can retain the original parameters to ensure compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't break compatibility