You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Hive QA (JIRA)" <ji...@apache.org> on 2017/11/22 04:19:00 UTC

[jira] [Commented] (HIVE-18127) Do not strip '--' comments from shell commands issued from CliDriver

    [ https://issues.apache.org/jira/browse/HIVE-18127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16261953#comment-16261953 ] 

Hive QA commented on HIVE-18127:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12898769/HIVE-18127.1.patch

{color:green}SUCCESS:{color} +1 due to 3 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 13 failed/errored test(s), 11413 tests executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[add_jar_with_file_removed] (batchId=67)
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[dbtxnmgr_showlocks] (batchId=77)
org.apache.hadoop.hive.cli.TestCliDriverMethods.testThatCliDriverDoesNotStripComments (batchId=182)
org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[unionDistinct_1] (batchId=146)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[hybridgrace_hashjoin_2] (batchId=154)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[insert_values_orig_table_use_metadata] (batchId=162)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[optimize_nullscan] (batchId=165)
org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[explainanalyze_2] (batchId=102)
org.apache.hadoop.hive.cli.TestSparkPerfCliDriver.testCliDriver[query39] (batchId=246)
org.apache.hadoop.hive.ql.parse.TestReplicationScenarios.testConstraints (batchId=224)
org.apache.hive.jdbc.TestSSL.testConnectionMismatch (batchId=230)
org.apache.hive.jdbc.TestSSL.testConnectionWrongCertCN (batchId=230)
org.apache.hive.jdbc.TestSSL.testMetastoreConnectionWrongCertCN (batchId=230)
{noformat}

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/7952/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/7952/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-7952/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 13 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12898769 - PreCommit-HIVE-Build

> Do not strip '--' comments from shell commands issued from CliDriver
> --------------------------------------------------------------------
>
>                 Key: HIVE-18127
>                 URL: https://issues.apache.org/jira/browse/HIVE-18127
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Andrew Sherman
>            Assignee: Andrew Sherman
>         Attachments: HIVE-18127.1.patch
>
>
> CLiDriver has the ability to run shell commands by prefixing them with '!".
> This behavior is not widely used (there are only 3 examples in .q files).
> Since HIVE-16935 started stripping comments starting with '\-\-', a shell command containing '--' will not work correctly.
> Fix this by using the unstripped command for shell commands.
> Note that it would be a security hole for HS2 to allow execution of arbitrary shell commands from a client command.
> Add tests to nail down correct behavior with '--' comments:
> * CliDriver should not strip strings starting with '--' in a shell command (FIXED in this change).
> * HiveCli should strip '--' comments.
> * A Jdbc program should allow commands starting with "!" but these will fail in the sql parser.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)