Skip to content

Commit

Permalink
Fix helix-vcr tool to parse namespaces (#2613)
Browse files Browse the repository at this point in the history
* Fix helix-vcr tool to parse namespaces

Helix/ZK pathnames have 3 parts: zk_conn_string/namespace/znode.
But the tool is old and expects only 2 parts.
This patch fixes that.

* fix log
  • Loading branch information
snalli authored Oct 12, 2023
1 parent 68fa757 commit d878bb7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public static void main(String[] args) throws IOException {
OptionSet options = parser.parse(args);

String[] destZkAndCluster = options.valueOf(destOpt).split(HelixVcrUtil.SEPARATOR);
if (destZkAndCluster.length != 2) {
errorAndExit("dest argument must have form 'zkString/clusterName'");
if (destZkAndCluster.length != 3) {
errorAndExit("dest argument must have form 'zkString/namespace/clusterName'");
}
String destZkString = destZkAndCluster[0];
String destClusterName = destZkAndCluster[1];
Expand All @@ -88,8 +88,8 @@ public static void main(String[] args) throws IOException {
boolean dryRun = options.has(dryRunOpt);
if (options.has(srcOpt)) {
String[] srcZkAndCluster = options.valueOf(srcOpt).split(SEPARATOR);
if (srcZkAndCluster.length != 2) {
errorAndExit("src argument must have form 'zkString/clusterName'");
if (srcZkAndCluster.length != 3) {
errorAndExit("src argument must have form 'zkString/namespace/clusterName'");
}
String srcZkString = srcZkAndCluster[0];
String srcClusterName = srcZkAndCluster[1];
Expand Down

0 comments on commit d878bb7

Please sign in to comment.