gpt4 book ai didi

hadoop - Hive No files matching path file 和 file Exists

转载 作者:可可西里 更新时间:2023-11-01 14:38:37 25 4
gpt4 key购买 nike

我在让 hive 工作时遇到了很多麻烦。我正在使用 YARN 运行 CDH4.5,所有这些都是从 Cloudera 的 yum 存储库安装的。我按照他们的说明设置了配置单元,但出于某种原因,它无法识别我本地文件系统上的合法文件。

[msknapp@localhost data]$ pwd
/home/msknapp/data
[msknapp@localhost data]$ ll | grep county_insurance_pp.txt
-rw-rw-rw- 1 msknapp msknapp 162537 Jan 5 14:58 county_insurance_pp.txt
[msknapp@localhost data]$ sudo -u hive hive
Logging initialized using configuration in file:/etc/hive/conf.dist/hive-log4j.properties
Hive history file=/tmp/hive/hive_job_log_9e8bf55b-7ec8-4b79-be9b-cc2200a33f91_1795256456.txt
hive> describe count_insurance;
2014-01-08 02:42:59.000 GMT Thread[main,5,main] java.io.FileNotFoundException: derby.log (Permission denied)
----------------------------------------------------------------
2014-01-08 02:42:59.443 GMT:
Booting Derby version The Apache Software Foundation - Apache Derby - 10.4.2.0 - (689064): instance a816c00e-0143-6fbb-3f3a-000007a1d270
on database directory /var/lib/hive/metastore/metastore_db

Database Class Loader started - derby.database.classpath=''
OK
fips int
st string
stfips int
name string
a int
b int
c int
d int
e int
f int
total int
Time taken: 5.195 seconds
hive> LOAD DATA LOCAL INPATH 'county_insurance_pp.txt' OVERWRITE INTO TABLE count_insurance;
FAILED: SemanticException Line 1:23 Invalid path ''county_insurance_pp.txt'': No files matching path file:/home/msknapp/data/county_insurance_pp.txt

我要加载的文件确实存在。当我在我的加载语句中使用绝对路径时,我得到了同样的异常。

附带说明一下,我仍然不知道为什么它总是给我一个带有权限警告的 derby 日志的 FileNotFoundException。很久以前我去了/var/lib/hive 并做了 'sudo chmod -R 777 ./*',所以权限应该不是问题。

顺便说一句,我在伪分布式模式下运行 hadoop,并让所有三个 hive 守护进程在本地运行。我使用的是 hive-server2 而不是 1。

有人请让我知道我在这里做错了什么,或者如何调试它。

最佳答案

我是小智。我最近遇到了同样的问题。

运行Hadoop 服务器的hive 脚本。如果文件 county_insurance_pp.txt 在 Hadoop 服务器上不存在,则找不到该文件。

在运行脚本之前,您必须将目标文件发送到 Hadoop 服务器。有两种处理方法:

  1. 使用scp
  2. 使用 webhdfs ( http://hadoop.apache.org/docs/r1.0.4/webhdfs.html )

关于hadoop - Hive No files matching path file 和 file Exists,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20986175/

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