You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by fe...@apache.org on 2022/11/03 04:40:12 UTC
[incubator-kyuubi] branch branch-1.6 updated: [KYUUBI #3746] Support to specify multiple config items with `--conf` in kyuubi command line
This is an automated email from the ASF dual-hosted git repository.
feiwang pushed a commit to branch branch-1.6
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/branch-1.6 by this push:
new 426e23e22 [KYUUBI #3746] Support to specify multiple config items with `--conf` in kyuubi command line
426e23e22 is described below
commit 426e23e22baa41a9762a988b0a2e173575638883
Author: Fei Wang <fw...@ebay.com>
AuthorDate: Thu Nov 3 12:34:34 2022 +0800
[KYUUBI #3746] Support to specify multiple config items with `--conf` in kyuubi command line
Using `unbounded()` for `--conf`.
- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
Closes #3746 from turboFei/ctl_config.
Closes #3746
1cc58605c [Fei Wang] use unbounded
41c0d1a34 [Fei Wang] Revert "Support to multiple config items"
1d5afb7ea [Fei Wang] Revert "fix style"
c1d8ff8d1 [Fei Wang] fix style
67411367c [Fei Wang] Support to multiple config items
Authored-by: Fei Wang <fw...@ebay.com>
Signed-off-by: Fei Wang <fw...@ebay.com>
---
kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/CommandLine.scala | 1 +
.../test/scala/org/apache/kyuubi/ctl/ControlCliArgumentsSuite.scala | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/CommandLine.scala b/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/CommandLine.scala
index 56c381848..6d1ca00cb 100644
--- a/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/CommandLine.scala
+++ b/kyuubi-ctl/src/main/scala/org/apache/kyuubi/ctl/CommandLine.scala
@@ -87,6 +87,7 @@ object CommandLine {
.action((v, c) => c.copy(commonOpts = c.commonOpts.copy(spnegoHost = v)))
.text("Spnego host for spnego authentication."),
opt[String]("conf")
+ .unbounded()
.action((v, c) => {
v.split("=", 2).toSeq match {
case Seq(k, v) => c.copy(conf = c.conf ++ Map(k -> v))
diff --git a/kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl/ControlCliArgumentsSuite.scala b/kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl/ControlCliArgumentsSuite.scala
index 037f26aa1..d83e5609c 100644
--- a/kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl/ControlCliArgumentsSuite.scala
+++ b/kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl/ControlCliArgumentsSuite.scala
@@ -490,12 +490,14 @@ class ControlCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
"--hostUrl",
"https://kyuubi.test.com",
"--conf",
- s"${CtlConf.CTL_REST_CLIENT_CONNECT_TIMEOUT.key}=5000")
+ s"${CtlConf.CTL_REST_CLIENT_CONNECT_TIMEOUT.key}=5000",
+ "--conf",
+ s"${CtlConf.CTL_REST_CLIENT_REQUEST_MAX_ATTEMPTS.key}=1")
val opArgs = new ControlCliArguments(args)
withKyuubiRestClient(opArgs.cliConfig, null, opArgs.command.conf) { kyuubiRestClient =>
assert(kyuubiRestClient.getConf.getConnectTimeout == 5000)
assert(kyuubiRestClient.getConf.getSocketTimeout == 120000)
- assert(kyuubiRestClient.getConf.getMaxAttempts == 3)
+ assert(kyuubiRestClient.getConf.getMaxAttempts == 1)
assert(kyuubiRestClient.getConf.getAttemptWaitTime == 3000)
}
}