在hive中遇到的错误

1:如果在将文件导入到hive表时,查询结果为null(下图)


这个是因为在创建表的时候没有指定列分隔符,hive的默认分隔符是ctrl+a(/u0001)
 
2.当我复制好几行sql到hive命令行时,会出现下面情况,导致复制失败
这个是因为我的sql中有tab的缩进,将tab的空格去掉即可
 
3.当我在使用load加载数据是,抛出filad
hive> LOAD DATA LOCAL INPATH '/home/node4/Desktop/sutdent.txt' OVERWRITE INTO TABLE student_3;
FAILED: SemanticException Unable to load data to destination table. Error: The file that you are trying to load does not match the file format of the destination table.
这是因为SequenceFile的表不能使用load来加载数据
 
 
4.如果在从hdfs上导出数据到hive表报如下错误:
FAILED: SemanticException Line 1:17 Invalid path ''hdfs://Master:9000/user/test/qar_test'': No files matching path hdfs://Master:9000/user/test/qar_test
这个是说路径错误,可以去mysql中查看一下
查询hive下的DBSDB_LOCATION_URI列:select DB_LOCATION_URI from DBS; 
+----------------------------------------+
| DB_LOCATION_URI |
+----------------------------------------+
| hdfs://10.1.51.200:9000/hive/warehouse |
+----------------------------------------+
 
5.
在使用eclipse链接hive时,总是报time out connection,这个是因为我服务器的防火墙没关闭
 
6.报一下错误,需要配置hadoop-core.xml文件
Caused by: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): Unauthorized connection for super-user: root from IP 192.168.177.124
添加如下配置
<property>
<name>hadoop.proxyuser.root.groups</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.root.hosts</name>
<value>*</value>
</property>
 
 
 
原文地址:https://www.cnblogs.com/zhangXingSheng/p/6223425.html