Hello I have a question about Hive(2.0.0) and HDFS(2.7.2). I met many Hive failure with "No files matching path". The script like:
hadoop fs -test -e $hdfspath if [ $? -ne 0 ]; then echo "Directory not exists!" hadoop fs -mkdir $hdfspath else echo "Directory exists!" fi hadoop distcp oss://${bucket}/${filename} ${hdfspath} hdfsname = $hdfspath/$filename hadoop fs -test -e $hdfsname if [ $? -ne 0 ]; then echo "File not exists!" else echo "File exists!" fi sql=" LOAD DATA INPATH '${hdfspath}' OVERWRITE INTO TABLE {output} PARTITION (pt='${time}');" echo $sql; hive -e "$sql" if [ $? -ne 0 ]; then echo "Hive unsuccessful!" else echo "Hive successful!" fi The log is: Directory not exists! File exists! Hive unsuccessful! FAILED: SemanticException Line 2:19 Invalid path 'xxxx': No files matching path 'xxxx' But rerun this script, everything is OK. Any idea what is this about? Thanks & Regards