[KYUUBI #3007] Bump scopt from 4.0.1 to 4.1.0
### _Why are the changes needed?_ close #3007 ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #3015 from lsm1/features/Bump_scopt. Closes #3007 876659ba [senmiaoliu] fix style e1a42033 [LSM] Merge pull request #1 from cxzl25/PR_3015_UT 9a34eedb [sychen] fix UT 46e1dff9 [senmiaoliu] uodate dependencyList 8481b14b [senmiaoliu] Bump scopt from 4.0.1 to 4.1.0 Lead-authored-by: senmiaoliu <senmiaoliu@trip.com> Co-authored-by: sychen <sychen@ctrip.com> Co-authored-by: LSM <senmiaoliu@trip.com> Signed-off-by: Fei Wang <fwang12@ebay.com>
This commit is contained in:
parent
a6499c6cb9
commit
c652bba4da
@ -132,7 +132,7 @@ okio/1.15.0//okio-1.15.0.jar
|
||||
osgi-resource-locator/1.0.3//osgi-resource-locator-1.0.3.jar
|
||||
paranamer/2.8//paranamer-2.8.jar
|
||||
scala-library/2.12.15//scala-library-2.12.15.jar
|
||||
scopt_2.12/4.0.1//scopt_2.12-4.0.1.jar
|
||||
scopt_2.12/4.1.0//scopt_2.12-4.1.0.jar
|
||||
simpleclient/0.14.1//simpleclient-0.14.1.jar
|
||||
simpleclient_common/0.14.1//simpleclient_common-0.14.1.jar
|
||||
simpleclient_dropwizard/0.14.1//simpleclient_dropwizard-0.14.1.jar
|
||||
|
||||
@ -21,15 +21,18 @@ import org.apache.kyuubi.ctl.util.DateTimeUtils._
|
||||
|
||||
class BatchCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
|
||||
val batchYamlFile: String = Thread.currentThread.getContextClassLoader
|
||||
.getResource("cli/batch.yaml").getFile
|
||||
|
||||
test("create/submit batch") {
|
||||
Seq("create", "submit").foreach { op =>
|
||||
val args = Seq(
|
||||
op,
|
||||
"batch",
|
||||
"-f",
|
||||
"src/test/resources/cli/batch.yaml")
|
||||
batchYamlFile)
|
||||
val opArgs = new ControlCliArguments(args)
|
||||
assert(opArgs.cliConfig.createOpts.filename == "src/test/resources/cli/batch.yaml")
|
||||
assert(opArgs.cliConfig.createOpts.filename == batchYamlFile)
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +42,7 @@ class BatchCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
op,
|
||||
"batch",
|
||||
"-f",
|
||||
"src/test/resources/cli/batch.yaml",
|
||||
batchYamlFile,
|
||||
"--hostUrl",
|
||||
"https://localhost:8440",
|
||||
"--username",
|
||||
@ -78,7 +81,7 @@ class BatchCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
"submit",
|
||||
"batch",
|
||||
"-f",
|
||||
"src/test/resources/cli/batch.yaml")
|
||||
batchYamlFile)
|
||||
val opArgs = new ControlCliArguments(args)
|
||||
assert(opArgs.cliConfig.batchOpts.waitCompletion == true)
|
||||
}
|
||||
@ -88,7 +91,7 @@ class BatchCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
"submit",
|
||||
"batch",
|
||||
"-f",
|
||||
"src/test/resources/cli/batch.yaml",
|
||||
batchYamlFile,
|
||||
"--waitCompletion",
|
||||
"false")
|
||||
val opArgs = new ControlCliArguments(args)
|
||||
|
||||
@ -56,6 +56,12 @@ class ControlCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
test("test basic kyuubi service arguments parser") {
|
||||
Seq("get", "list", "delete").foreach { op =>
|
||||
Seq("server", "engine").foreach { service =>
|
||||
val engineUser =
|
||||
if (service == "engine") {
|
||||
Seq("-u", user)
|
||||
} else {
|
||||
Seq.empty[String]
|
||||
}
|
||||
val args = Seq(
|
||||
op,
|
||||
service,
|
||||
@ -63,23 +69,23 @@ class ControlCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
zkQuorum,
|
||||
"--namespace",
|
||||
namespace,
|
||||
"--user",
|
||||
user,
|
||||
"--host",
|
||||
host,
|
||||
"--port",
|
||||
port,
|
||||
"--version",
|
||||
KYUUBI_VERSION)
|
||||
KYUUBI_VERSION) ++ engineUser
|
||||
val opArgs = new ControlCliArguments(args)
|
||||
assert(opArgs.cliConfig.action.toString.equalsIgnoreCase(op))
|
||||
assert(opArgs.cliConfig.resource.toString.equalsIgnoreCase(service))
|
||||
assert(opArgs.cliConfig.commonOpts.zkQuorum == zkQuorum)
|
||||
assert(opArgs.cliConfig.commonOpts.namespace == namespace)
|
||||
assert(opArgs.cliConfig.engineOpts.user == user)
|
||||
assert(opArgs.cliConfig.commonOpts.host == host)
|
||||
assert(opArgs.cliConfig.commonOpts.port == port)
|
||||
assert(opArgs.cliConfig.commonOpts.version == KYUUBI_VERSION)
|
||||
if (service == "engine") {
|
||||
assert(opArgs.cliConfig.engineOpts.user == user)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,6 +302,12 @@ class ControlCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
test("test use short options") {
|
||||
Seq("get", "list", "delete").foreach { op =>
|
||||
Seq("server", "engine").foreach { service =>
|
||||
val engineUser =
|
||||
if (service == "engine") {
|
||||
Seq("-u", user)
|
||||
} else {
|
||||
Seq.empty[String]
|
||||
}
|
||||
val args = Seq(
|
||||
op,
|
||||
service,
|
||||
@ -303,23 +315,23 @@ class ControlCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
zkQuorum,
|
||||
"-n",
|
||||
namespace,
|
||||
"-u",
|
||||
user,
|
||||
"-s",
|
||||
host,
|
||||
"-p",
|
||||
port,
|
||||
"-v",
|
||||
KYUUBI_VERSION)
|
||||
KYUUBI_VERSION) ++ engineUser
|
||||
val opArgs = new ControlCliArguments(args)
|
||||
assert(opArgs.cliConfig.action.toString.equalsIgnoreCase(op))
|
||||
assert(opArgs.cliConfig.resource.toString.equalsIgnoreCase(service))
|
||||
assert(opArgs.cliConfig.commonOpts.zkQuorum == zkQuorum)
|
||||
assert(opArgs.cliConfig.commonOpts.namespace == namespace)
|
||||
assert(opArgs.cliConfig.engineOpts.user == user)
|
||||
assert(opArgs.cliConfig.commonOpts.host == host)
|
||||
assert(opArgs.cliConfig.commonOpts.port == port)
|
||||
assert(opArgs.cliConfig.commonOpts.version == KYUUBI_VERSION)
|
||||
if (service == "engine") {
|
||||
assert(opArgs.cliConfig.engineOpts.user == user)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -343,7 +355,7 @@ class ControlCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
"when the batch is no longer in PENDING state."
|
||||
val helpString =
|
||||
s"""kyuubi $KYUUBI_VERSION
|
||||
|Usage: kyuubi-ctl [create|get|delete|list|log|submit] [options] <args>...
|
||||
|Usage: kyuubi-ctl [create|get|delete|list|log|submit] [options]
|
||||
|
|
||||
| -zk, --zk-quorum <value>
|
||||
| $zkHelpString
|
||||
@ -367,14 +379,14 @@ class ControlCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
|Command: create server
|
||||
|${"\t"}Expose Kyuubi server instance to another domain.
|
||||
|
|
||||
|Command: get [batch|server|engine] [options] [<batchId>]
|
||||
|Command: get [batch|server|engine] <args>...
|
||||
|${"\t"}Display information about the specified resources.
|
||||
|Command: get batch
|
||||
|Command: get batch [<batchId>]
|
||||
|${"\t"}Get batch by id.
|
||||
| <batchId> Batch id.
|
||||
|Command: get server
|
||||
|${"\t"}Get Kyuubi server info of domain
|
||||
|Command: get engine
|
||||
|Command: get engine [options]
|
||||
|${"\t"}Get Kyuubi engine info belong to a user.
|
||||
| -u, --user <value> The user name this engine belong to.
|
||||
| -et, --engine-type <value>
|
||||
@ -384,15 +396,15 @@ class ControlCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
| -esl, --engine-share-level <value>
|
||||
| The engine share level this engine belong to.
|
||||
|
|
||||
|Command: delete [batch|server|engine] [options] [<batchId>]
|
||||
|Command: delete [batch|server|engine] <args>...
|
||||
|${"\t"}Delete resources.
|
||||
|Command: delete batch
|
||||
|Command: delete batch [options] [<batchId>]
|
||||
|${"\t"}Close batch session.
|
||||
| <batchId> Batch id.
|
||||
| --hs2ProxyUser <value> The value of hive.server2.proxy.user config.
|
||||
|Command: delete server
|
||||
|${"\t"}Delete the specified service node for a domain
|
||||
|Command: delete engine
|
||||
|Command: delete engine [options]
|
||||
|${"\t"}Delete the specified engine node for user.
|
||||
| -u, --user <value> The user name this engine belong to.
|
||||
| -et, --engine-type <value>
|
||||
@ -402,9 +414,9 @@ class ControlCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
| -esl, --engine-share-level <value>
|
||||
| The engine share level this engine belong to.
|
||||
|
|
||||
|Command: list [batch|server|engine] [options]
|
||||
|Command: list [batch|server|engine]
|
||||
|${"\t"}List information about resources.
|
||||
|Command: list batch
|
||||
|Command: list batch [options]
|
||||
|${"\t"}List batch session info.
|
||||
| --batchType <value> Batch type.
|
||||
| --batchUser <value> Batch user.
|
||||
@ -415,7 +427,7 @@ class ControlCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
| --size <value> The max number of records returned in the query.
|
||||
|Command: list server
|
||||
|${"\t"}List all the service nodes for a particular domain
|
||||
|Command: list engine
|
||||
|Command: list engine [options]
|
||||
|${"\t"}List all the engine nodes for a user
|
||||
| -u, --user <value> The user name this engine belong to.
|
||||
| -et, --engine-type <value>
|
||||
@ -425,10 +437,10 @@ class ControlCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
| -esl, --engine-share-level <value>
|
||||
| The engine share level this engine belong to.
|
||||
|
|
||||
|Command: log [batch] [options] [<batchId>]
|
||||
|Command: log [batch] [options] <args>...
|
||||
|${"\t"}Print the logs for specified resource.
|
||||
| --forward If forward is specified, the ctl will block forever.
|
||||
|Command: log batch
|
||||
|Command: log batch [options] [<batchId>]
|
||||
|${"\t"}Get batch session local log.
|
||||
| <batchId> Batch id.
|
||||
| --from <value> Specify which record to start from retrieving info.
|
||||
@ -437,7 +449,7 @@ class ControlCliArgumentsSuite extends KyuubiFunSuite with TestPrematureExit {
|
||||
|Command: submit [batch] [options]
|
||||
|${"\t"}Combination of create, get and log commands.
|
||||
| -f, --filename <value> Filename to use to create the resource
|
||||
|Command: submit batch
|
||||
|Command: submit batch [options]
|
||||
|${"\t"}open batch session and wait for completion.
|
||||
| --waitCompletion <value>
|
||||
| ${waitBatchCompletionHelpString}
|
||||
|
||||
2
pom.xml
2
pom.xml
@ -158,7 +158,7 @@
|
||||
<scalacheck.version>3.2.9.0</scalacheck.version>
|
||||
<scalatest.version>3.2.9</scalatest.version>
|
||||
<scalatestplus.version>3.2.9.0</scalatestplus.version>
|
||||
<scopt.version>4.0.1</scopt.version>
|
||||
<scopt.version>4.1.0</scopt.version>
|
||||
<slf4j.version>1.7.35</slf4j.version>
|
||||
<snakeyaml.version>1.30</snakeyaml.version>
|
||||
<!--
|
||||
|
||||
Loading…
Reference in New Issue
Block a user