-
Notifications
You must be signed in to change notification settings - Fork 964
[improve] Support specifying multiple journalDirs for the bookie server start cmd options #4181
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
base: master
Are you sure you want to change the base?
Conversation
| 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 comment
The reason will be displayed to describe this comment to others. Learn more.
cmdLine.getOptionValues('j')?
| 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"); |
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
…ring compatibility
| 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"); |
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
| export BK_httpServerEnabled=${BK_httpServerEnabled:-"true"} | ||
| export BK_httpServerPort=${BK_httpServerPort:-${BOOKIE_HTTP_PORT}} | ||
| export BK_journalDirectory=${BK_journalDirectory:-${BK_DATA_DIR}/journal} | ||
| export BK_journalDirectories=${BK_journalDirectories:-${BK_journalDirectory:-${BK_DATA_DIR}/journal}} |
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.
@liangyuanpeng PTAL
| 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 comment
The reason will be displayed to describe this comment to others. Learn more.
@eolivelli I didn't break the compatibility
Motivation
Start the bookie server by cmd and specify multiple journalDir
such as: docker/k8s pod
Changes
Master Issue: #4180
Support specifying multiple journalDirs for the bookie server start cmd options