进入hive客户端,操作HDFS上数据,如将HDFS数据导入Hive表中
例如:使用load导入HDFS数据到hive中
load data inpath '/data/student.log' into table test.table_student;
出现
FAILED: SemanticException Line Invalid path ''xxx'': No files matching path hdfs:xxx
可能原因如下:
1.使用的hive数据库并不是default,而是自定义数据库,如示例中的test数据库,进入时没有切换至test,切换至自定义数据库
use test;
2.hive中的表未创建,如示例中的table_student
新建表之后,再导入数据
3.检查源数据是否存在,如示例中/data/student.log
总结:数据路径不对,导致程序无法找到