gpt4 book ai didi

hadoop - 配置单元:dfs copyToLocal 给出 "org.apache.hive.service.cli.HiveSQLException: Error while processing statement: null"

转载 作者:可可西里 更新时间:2023-11-01 16:40:43 25 4
gpt4 key购买 nike

我正在尝试从 .hql 文件执行“copyToLocal”,如下所示:

dfs -copyToLocal hdfs://nameservice1/HDFS_FOLDER1/HDFS_FOLDER2/file_name.dat /LOCAL_FOLDER1/LOCAL_FOLDER2/;

但是我得到了下面提到的异常:

Error: Error while processing statement: null (state=,code=1)
org.apache.hive.service.cli.HiveSQLException: Error while processing statement: null
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:239)
at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:225)
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:244)
at org.apache.hive.beeline.Commands.executeInternal(Commands.java:902)
at org.apache.hive.beeline.Commands.execute(Commands.java:1089)
at org.apache.hive.beeline.Commands.sql(Commands.java:985)
at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1085)
at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:917)
at org.apache.hive.beeline.BeeLine.executeFile(BeeLine.java:895)
at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:837)
at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:482)
at org.apache.hive.beeline.BeeLine.main(BeeLine.java:465)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while processing statement: null
at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:385)
at org.apache.hive.service.cli.operation.HiveCommandOperation.runInternal(HiveCommandOperation.java:116)
at org.apache.hive.service.cli.operation.Operation.run(Operation.java:327)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:424)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:401)
at sun.reflect.GeneratedMethodAccessor18.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:1709)
at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59)
at com.sun.proxy.$Proxy21.executeStatementAsync(Unknown Source)
at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:258)
at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:500)
at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1313)
at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1298)
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:746)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

但是当我在一段时间后使用相同的 .hql 文件执行相同的语句时,它会按预期复制到本地。 谁能帮我理解为什么会这样发生了什么?

Version: Hive 1.1.0-cdh5.8.3

更新 1:我使用“get”而不是“copyToLocal”并得到了相同的异常。

更新 2:此文件具有粘性位:

-rwxrwxrwt .....  /HDFS_FOLDER1/HDFS_FOLDER2/file_name.dat

我是创建该文件的用户,我正在尝试使用 HQL 文件中的 dfs 选项将其从 HDFS 复制到本地文件夹。

最佳答案

HADOOP 命令 用于复制到本地文件位置。

hdfs dfs -copyToLocal <input> <output>

这是您的确切示例:

hdfs dfs -copyToLocal /nameservice1/HDFS_FOLDER1/HDFS_FOLDER2/file_name.dat /LOCAL_FOLDER1/LOCAL_FOLDER2;

这是弃用的版本:

hadoop fs -copyToLocal /nameservice1/HDFS_FOLDER1/HDFS_FOLDER2/file_name.dat /LOCAL_FOLDER1/LOCAL_FOLDER2;

HIVE COMMAND 用于将文件复制到本地文件位置。

 INSERT OVERWRITE LOCAL DIRECTORY '/your/directory/in/local' SELECT * FROM myTable

关于hadoop - 配置单元:dfs copyToLocal 给出 "org.apache.hive.service.cli.HiveSQLException: Error while processing statement: null",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41224222/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com