Hive 配置单元计数(*)查询显示Map和Reduce的100%,但未显示正确的结果

Hive 配置单元计数(*)查询显示Map和Reduce的100%,但未显示正确的结果,hive,mapreduce,hiveql,hadoop2,Hive,Mapreduce,Hiveql,Hadoop2,下面是我执行的一组查询 hive> CREATE external TABLE IF NOT EXISTS hive_table5(id int, name string) row format delimited fields terminated by ','; OK Time taken: 0.128 seconds hive> load data inpath 'hdfs://localhost:54310/usr/hive/warehouse/hive_table4'

下面是我执行的一组查询

hive> CREATE external TABLE IF NOT EXISTS hive_table5(id int, name 
string) row format delimited fields terminated by ',';
OK
Time taken: 0.128 seconds

hive> load data inpath 
'hdfs://localhost:54310/usr/hive/warehouse/hive_table4' into table 
hive_table5;
Loading data to table default.hive_table5
Table default.hive_table5 stats: [numFiles=1, totalSize=23]
OK
Time taken: 0.193 seconds

hive> select count(*) from hive_table5;
Query ID = hduser_20170804180531_0f533fc3-4ce5-44d2-9501-68f168115ae0
Total jobs = 1
Launching Job 1 out of 1
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
 set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
 set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
 set mapreduce.job.reduces=<number>
Job running in-process (local Hadoop)
2017-08-04 18:05:32,654 Stage-1 map = 100%,  reduce = 100%
Ended Job = job_local1227119137_0037
MapReduce Jobs Launched: 
Stage-Stage-1:  HDFS Read: 70974 HDFS Write: 104 SUCCESS
Total MapReduce CPU Time Spent: 0 msec
OK
0
Time taken: 1.255 seconds, Fetched: 1 row(s)
hive> 
hive>创建外部表如果不存在hive\u表5(id int,name
字符串)以“,”结尾的行格式分隔字段;
好啊
所用时间:0.128秒
配置单元>在路径中加载数据
'hdfs://localhost:54310/usr/hive/warehouse/hive_table4“到桌子上
蜂巢表5;
正在将数据加载到表default.hive\u表5
表default.hive_表5统计:[numFiles=1,totalSize=23]
好啊
所用时间:0.193秒
配置单元>从配置单元表5中选择计数(*);
查询ID=hduser_20170804180531_0f533fc3-4ce5-44d2-9501-68f168115ae0
职位总数=1
正在启动作业1/1
编译时确定的reduce任务数:1
要更改减速器的平均负载(以字节为单位):
设置hive.exec.reducers.bytes.per.reducer=
为了限制减速器的最大数量:
设置hive.exec.reducers.max=
为了设置恒定数量的减速器:
设置mapreduce.job.reduces=
进程内运行的作业(本地Hadoop)
2017-08-04 18:05:32654第一阶段地图=100%,减少=100%
结束作业=Job_local1227119137_0037
推出MapReduce作业:
第1阶段:HDFS读取:70974 HDFS写入:104成功
花费的MapReduce CPU总时间:0毫秒
好啊
0
所用时间:1.255秒,获取:1行
蜂巢>
它显示map和REDUCT作业均已100%完成。
但当表中加载了1行时,它仍然在count(*)中给出结果0

这可能是相关的:如果从表中运行select*,您看到了吗?顺便说一句,你的位置似乎错了。。只是为了确保在仓库外创建外部表并在那里加载数据。。