-
Notifications
You must be signed in to change notification settings - Fork 914
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
[TASK][EASY] Improve kyuubi-beeline
help message
#6251
Comments
take assign! |
@ShockleysxX thanks, assigned |
@ShockleysxX Do you have any progress on this task? An easy task typically costs a few hours to complete. |
Revoked as the assignor has no response |
Could I continue to do this task, may be in 3 days |
@liuxiaocs7 assigned, thanks |
Hi, I am also interested in this issue, and I have already made modifications about the help message of
|
@dupen01 thanks for your passion, let's wait for @liuxiaocs7's response for a while (one day) |
good luck and thanks for response @liuxiaocs7, I re-assigned this task to @dupen01 |
This pull request fixes #6251 As `kyuubi-beeline` is derived from Hive `beeline`, I haven't made extensive modifications to its help message, only adjusting some formatting to enhance its appearance. Below are the specific changes: 1. Replace `jdbc:hive2//` with `jdbc:kyuubi//`. 2. Replace `beeline` with `kyuubi-beeline`. 3. Capitalize the first letter. 4. If the comment for a parameter spans multiple lines, add an additional `\n` at the end of the comment to separate it from the following line. 5. Append the help information for `--python-mode` to the front of `--help`. 6. Add some examples. 7. Improved letter indentation. Here is the whole help message: ``` $ ./bin/kyuubi-beeline --help Usage: kyuubi-beeline <options>. Options: -u <database url> The JDBC URL to connect to. -c <named url> The named JDBC URL to connect to, which should be present in beeline-site.xml as the value of beeline.kyuubi.jdbc.url.<namedUrl>. -r Reconnect to last saved connect url (in conjunction with !save). -n <username> The username to connect as. -p <password> The password to connect as. -d <driver class> The driver class to use. -i <init file> Script file for initialization. -e <query> Query that should be executed. -f <exec file> Script file that should be executed. -w, --password-file <file> The password file to read password from. --hiveconf property=value Use value for given property. --hivevar name=value Hive variable name and value. This is Hive specific settings in which variables can be set at session level and referenced in Hive commands or queries. --property-file=<property file> The file to read connection properties (url, driver, user, password) from. --color=[true|false] Control whether color is used for display. --showHeader=[true|false] Show column names in query results. --escapeCRLF=[true|false] Show carriage return and line feeds in query results as escaped \r and \n. --headerInterval=ROWS; The interval between which heades are displayed. --fastConnect=[true|false] Skip building table/column list for tab-completion. --autoCommit=[true|false] Enable/disable automatic transaction commit. --verbose=[true|false] Show verbose error messages and debug info. --showWarnings=[true|false] Display connection warnings. --showDbInPrompt=[true|false] Display the current database name in the prompt. --showNestedErrs=[true|false] Display nested errors. --numberFormat=[pattern] Format numbers using DecimalFormat pattern. --force=[true|false] Continue running script even after errors. --maxWidth=MAXWIDTH The maximum width of the terminal. --maxColumnWidth=MAXCOLWIDTH The maximum width to use when displaying columns. --silent=[true|false] Be more silent. --autosave=[true|false] Automatically save preferences. --outputformat=<format mode> Format mode for result display. The available options ars [table|vertical|csv2|tsv2|dsv|csv|tsv|json|jsonfile]. Note that csv, and tsv are deprecated, use csv2, tsv2 instead. --incremental=[true|false] Defaults to false. When set to false, the entire result set is fetched and buffered before being displayed, yielding optimal display column sizing. When set to true, result rows are displayed immediately as they are fetched, yielding lower latency and memory usage at the price of extra display column padding. Setting --incremental=true is recommended if you encounter an OutOfMemory on the client side (due to the fetched result set size being large). Only applicable if --outputformat=table. --incrementalBufferRows=NUMROWS The number of rows to buffer when printing rows on stdout, defaults to 1000; only applicable if --incremental=true and --outputformat=table. --truncateTable=[true|false] Truncate table column when it exceeds length. --delimiterForDSV=DELIMITER Specify the delimiter for delimiter-separated values output format (default: |). --isolation=LEVEL Set the transaction isolation level. --nullemptystring=[true|false] Set to true to get historic behavior of printing null as empty string. --maxHistoryRows=MAXHISTORYROWS The maximum number of rows to store beeline history. --delimiter=DELIMITER Set the query delimiter; multi-char delimiters are allowed, but quotation marks, slashes, and -- are not allowed (default: ;). --convertBinaryArrayToString=[true|false] Display binary column data as string or as byte array. --python-mode Execute python code/script. -h, --help Display this message. Examples: 1. Connect using simple authentication to Kyuubi Server on localhost:10009. $ kyuubi-beeline -u jdbc:kyuubi://localhost:10009 -n username 2. Connect using simple authentication to Kyuubi Server on kyuubi.local:10009 using -n for username and -p for password. $ kyuubi-beeline -n username -p password -u jdbc:kyuubi://kyuubi.local:10009 3. Connect using Kerberos authentication with kyuubi/localhostmydomain.com as Kyuubi Server principal(kinit is required before connection). $ kyuubi-beeline -u "jdbc:kyuubi://kyuubi.local:10009/default;kyuubiServerPrincipal=kyuubi/localhostmydomain.com" 4. Connect using Kerberos authentication using principal and keytab directly. $ kyuubi-beeline -u "jdbc:kyuubi://kyuubi.local:10009/default;kyuubiClientPrincipal=usermydomain.com;kyuubiClientKeytab=/local/path/client.keytab;kyuubiServerPrincipal=kyuubi/localhostmydomain.com" 5. Connect using SSL connection to Kyuubi Server on localhost:10009. $ kyuubi-beeline -u "jdbc:kyuubi://localhost:10009/default;ssl=true;sslTrustStore=/usr/local/truststore;trustStorePassword=mytruststorepassword" 6. Connect using LDAP authentication. $ kyuubi-beeline -u jdbc:kyuubi://kyuubi.local:10009/default -n ldap-username -p ldap-password 7. Connect using the ZooKeeper address to Kyuubi HA cluster. $ kyuubi-beeline -u "jdbc:kyuubi://zk1:2181,zk2:2181,zk3:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=kyuubi" -n username ``` If you have any suggested revisions, I will promptly respond and make the necessary adjustments. - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) --- - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6300 from dupen01/issue-6251. Closes #6251 69f9b3d [dupeng] deleted usage() from KyuubiBeeLine.java;updated some examples 463bcfb [dupeng] update --delimiter description 95e13c0 [dupeng] update some example message 6625f99 [dupeng] update cmd-usage 6570ec2 [dupeng] update cmd-usage 59ea1a4 [dupeng] add kyuubi-beeline help message Authored-by: dupeng <dunett@163.com> Signed-off-by: Cheng Pan <chengpan@apache.org> (cherry picked from commit 37bf244) Signed-off-by: Cheng Pan <chengpan@apache.org>
This pull request fixes #6251 As `kyuubi-beeline` is derived from Hive `beeline`, I haven't made extensive modifications to its help message, only adjusting some formatting to enhance its appearance. Below are the specific changes: 1. Replace `jdbc:hive2//` with `jdbc:kyuubi//`. 2. Replace `beeline` with `kyuubi-beeline`. 3. Capitalize the first letter. 4. If the comment for a parameter spans multiple lines, add an additional `\n` at the end of the comment to separate it from the following line. 5. Append the help information for `--python-mode` to the front of `--help`. 6. Add some examples. 7. Improved letter indentation. Here is the whole help message: ``` $ ./bin/kyuubi-beeline --help Usage: kyuubi-beeline <options>. Options: -u <database url> The JDBC URL to connect to. -c <named url> The named JDBC URL to connect to, which should be present in beeline-site.xml as the value of beeline.kyuubi.jdbc.url.<namedUrl>. -r Reconnect to last saved connect url (in conjunction with !save). -n <username> The username to connect as. -p <password> The password to connect as. -d <driver class> The driver class to use. -i <init file> Script file for initialization. -e <query> Query that should be executed. -f <exec file> Script file that should be executed. -w, --password-file <file> The password file to read password from. --hiveconf property=value Use value for given property. --hivevar name=value Hive variable name and value. This is Hive specific settings in which variables can be set at session level and referenced in Hive commands or queries. --property-file=<property file> The file to read connection properties (url, driver, user, password) from. --color=[true|false] Control whether color is used for display. --showHeader=[true|false] Show column names in query results. --escapeCRLF=[true|false] Show carriage return and line feeds in query results as escaped \r and \n. --headerInterval=ROWS; The interval between which heades are displayed. --fastConnect=[true|false] Skip building table/column list for tab-completion. --autoCommit=[true|false] Enable/disable automatic transaction commit. --verbose=[true|false] Show verbose error messages and debug info. --showWarnings=[true|false] Display connection warnings. --showDbInPrompt=[true|false] Display the current database name in the prompt. --showNestedErrs=[true|false] Display nested errors. --numberFormat=[pattern] Format numbers using DecimalFormat pattern. --force=[true|false] Continue running script even after errors. --maxWidth=MAXWIDTH The maximum width of the terminal. --maxColumnWidth=MAXCOLWIDTH The maximum width to use when displaying columns. --silent=[true|false] Be more silent. --autosave=[true|false] Automatically save preferences. --outputformat=<format mode> Format mode for result display. The available options ars [table|vertical|csv2|tsv2|dsv|csv|tsv|json|jsonfile]. Note that csv, and tsv are deprecated, use csv2, tsv2 instead. --incremental=[true|false] Defaults to false. When set to false, the entire result set is fetched and buffered before being displayed, yielding optimal display column sizing. When set to true, result rows are displayed immediately as they are fetched, yielding lower latency and memory usage at the price of extra display column padding. Setting --incremental=true is recommended if you encounter an OutOfMemory on the client side (due to the fetched result set size being large). Only applicable if --outputformat=table. --incrementalBufferRows=NUMROWS The number of rows to buffer when printing rows on stdout, defaults to 1000; only applicable if --incremental=true and --outputformat=table. --truncateTable=[true|false] Truncate table column when it exceeds length. --delimiterForDSV=DELIMITER Specify the delimiter for delimiter-separated values output format (default: |). --isolation=LEVEL Set the transaction isolation level. --nullemptystring=[true|false] Set to true to get historic behavior of printing null as empty string. --maxHistoryRows=MAXHISTORYROWS The maximum number of rows to store beeline history. --delimiter=DELIMITER Set the query delimiter; multi-char delimiters are allowed, but quotation marks, slashes, and -- are not allowed (default: ;). --convertBinaryArrayToString=[true|false] Display binary column data as string or as byte array. --python-mode Execute python code/script. -h, --help Display this message. Examples: 1. Connect using simple authentication to Kyuubi Server on localhost:10009. $ kyuubi-beeline -u jdbc:kyuubi://localhost:10009 -n username 2. Connect using simple authentication to Kyuubi Server on kyuubi.local:10009 using -n for username and -p for password. $ kyuubi-beeline -n username -p password -u jdbc:kyuubi://kyuubi.local:10009 3. Connect using Kerberos authentication with kyuubi/localhostmydomain.com as Kyuubi Server principal(kinit is required before connection). $ kyuubi-beeline -u "jdbc:kyuubi://kyuubi.local:10009/default;kyuubiServerPrincipal=kyuubi/localhostmydomain.com" 4. Connect using Kerberos authentication using principal and keytab directly. $ kyuubi-beeline -u "jdbc:kyuubi://kyuubi.local:10009/default;kyuubiClientPrincipal=usermydomain.com;kyuubiClientKeytab=/local/path/client.keytab;kyuubiServerPrincipal=kyuubi/localhostmydomain.com" 5. Connect using SSL connection to Kyuubi Server on localhost:10009. $ kyuubi-beeline -u "jdbc:kyuubi://localhost:10009/default;ssl=true;sslTrustStore=/usr/local/truststore;trustStorePassword=mytruststorepassword" 6. Connect using LDAP authentication. $ kyuubi-beeline -u jdbc:kyuubi://kyuubi.local:10009/default -n ldap-username -p ldap-password 7. Connect using the ZooKeeper address to Kyuubi HA cluster. $ kyuubi-beeline -u "jdbc:kyuubi://zk1:2181,zk2:2181,zk3:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=kyuubi" -n username ``` If you have any suggested revisions, I will promptly respond and make the necessary adjustments. - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) --- - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6300 from dupen01/issue-6251. Closes #6251 69f9b3d [dupeng] deleted usage() from KyuubiBeeLine.java;updated some examples 463bcfb [dupeng] update --delimiter description 95e13c0 [dupeng] update some example message 6625f99 [dupeng] update cmd-usage 6570ec2 [dupeng] update cmd-usage 59ea1a4 [dupeng] add kyuubi-beeline help message Authored-by: dupeng <dunett@163.com> Signed-off-by: Cheng Pan <chengpan@apache.org> (cherry picked from commit 37bf244) Signed-off-by: Cheng Pan <chengpan@apache.org>
What's the level of this task?
EASY
Code of Conduct
Search before creating
Mentor
Skill requirements
Background and Goals
The current
kyuubi-beeline
output message has some errors and is not very pretty.Implementation steps
kyuubi-beeline
is derived from Hivebeeline
, we have made some changes since forking, some reference to Hive is improper now and we should remove themjdbc:hive2//
withjdbc:kyuubi//
Additional context
Introduction of 2024H1 Kyuubi Code Contribution Program
The text was updated successfully, but these errors were encountered: