Skip to content
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
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

zwOvO
Copy link
Contributor

@zwOvO zwOvO commented Jan 18, 2024

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

@zwOvO zwOvO changed the title [improve] Support specifying multiple journalDir as bookie start command parameters [improve] Support specifying multiple journalDirs for the bookie server start cmd options Jan 19, 2024
String sJournalDir = cmdLine.getOptionValue('j');
log.info("Get cmdline journal dir: {}", sJournalDir);
conf.setJournalDirName(sJournalDir);
String[] sJournalDirs = cmdLine.getOptionValue('j');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmdLine.getOptionValues('j')?

@@ -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");

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.

Copy link
Contributor

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

@@ -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");
Copy link
Contributor

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

@@ -36,7 +36,7 @@ export BK_metadataServiceUri=${BK_metadataServiceUri:-"zk://${BK_zkServers}${BK_
export BK_bookiePort=${BK_bookiePort:-${PORT0}}
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}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -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");
Copy link
Contributor Author

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

@eolivelli eolivelli modified the milestones: 4.17.0, 4.18.0 Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants