You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Peter Vary (Jira)" <ji...@apache.org> on 2022/04/27 06:46:00 UTC

[jira] [Updated] (HIVE-26114) Fix jdbc connection hiveserver2 using dfs command with prefix space will cause exception

     [ https://issues.apache.org/jira/browse/HIVE-26114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Vary updated HIVE-26114:
------------------------------
    Summary: Fix jdbc connection hiveserver2 using dfs command with prefix space will cause exception  (was: jdbc connection hivesrerver2 using dfs command with prefix space will cause exception)

> Fix jdbc connection hiveserver2 using dfs command with prefix space will cause exception
> ----------------------------------------------------------------------------------------
>
>                 Key: HIVE-26114
>                 URL: https://issues.apache.org/jira/browse/HIVE-26114
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 2.3.8, 3.1.2
>            Reporter: shezm
>            Assignee: shezm
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.2.0
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> {code:java}
>         Connection con = DriverManager.getConnection("jdbc:hive2://10.214.35.115:10000/");
>         Statement stmt = con.createStatement();
>         // dfs command with prefix space or "\n"
>         ResultSet res = stmt.executeQuery(" dfs -ls /");
>         //ResultSet res = stmt.executeQuery("\ndfs -ls /"); {code}
> it will cause exception
> {code:java}
> Exception in thread "main" org.apache.hive.service.cli.HiveSQLException: Error while processing statement: null
>     at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:231)
>     at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:217)
>     at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:244)
>     at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:375)
>     at com.ne.gdc.whitemane.shezm.TestJdbc.main(TestJdbc.java:30)
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while processing statement: null
>     at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:380)
>     at org.apache.hive.service.cli.operation.HiveCommandOperation.runInternal(HiveCommandOperation.java:118)
>     at org.apache.hive.service.cli.operation.Operation.run(Operation.java:320)
>     at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:530)
>     at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:517)
>     at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78)
>     at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36)
>     at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at javax.security.auth.Subject.doAs(Subject.java:422)
>     at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
>     at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59)
>     at com.sun.proxy.$Proxy43.executeStatementAsync(Unknown Source)
>     at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:310)
>     at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:530)
>     at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437)
>     at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422)
>     at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
>     at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
>     at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:605)
>     at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>     at java.lang.Thread.run(Thread.java:748)
>  {code}
> But when I execute sql with prefix "\n" it works fine
> {code:java}
> ResultSet res = stmt.executeQuery("\n select 1"); {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)