[improve] Support specifying multiple journalDirs for the bookie server start cmd options#4181
Open
zwOvO wants to merge 9 commits intoapache:masterfrom
Open
[improve] Support specifying multiple journalDirs for the bookie server start cmd options#4181zwOvO wants to merge 9 commits intoapache:masterfrom
zwOvO wants to merge 9 commits intoapache:masterfrom
Conversation
hangc0276
approved these changes
Feb 21, 2024
hangc0276
reviewed
Feb 21, 2024
| String sJournalDir = cmdLine.getOptionValue('j'); | ||
| log.info("Get cmdline journal dir: {}", sJournalDir); | ||
| conf.setJournalDirName(sJournalDir); | ||
| String[] sJournalDirs = cmdLine.getOptionValue('j'); |
Contributor
There was a problem hiding this comment.
cmdLine.getOptionValues('j')?
hangc0276
approved these changes
Feb 21, 2024
| 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.
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.
Contributor
There was a problem hiding this comment.
please don't break compatibility
…ring compatibility
eolivelli
requested changes
Mar 5, 2024
| 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"); |
Contributor
There was a problem hiding this comment.
please don't break compatibility
zwOvO
commented
Mar 10, 2024
| 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}} |
| 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"); |
Contributor
Author
There was a problem hiding this comment.
@eolivelli I didn't break the compatibility
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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