在windows上的配置单元/hadoop上选择计数(*)失败
在windows上的配置单元/hadoop上选择计数(*)失败,hadoop,hive,Hadoop,Hive,hive>从test_db.cust中选择count(*) Query ID = EMMAdmin_20200106222630_32064e30-7ae6-4e0a-bf1b-b0979e297102 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 b
hive>从test_db.cust中选择count(*)代码>
Query ID = EMMAdmin_20200106222630_32064e30-7ae6-4e0a-bf1b-b0979e297102
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>
Kill Command = C:\hadoop-2.10.0\bin\mapred job -kill job_1578366054556_0003
Hadoop job information for Stage-1: number of mappers: 0; number of reducers: 0
2020-01-06 22:26:40,010 Stage-1 map = 0%, reduce = 0%
Ended Job = job_1578366054556_0003 with errors
Error during job, obtaining debugging information...
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
MapReduce Jobs Launched:
Stage-Stage-1: HDFS Read: 0 HDFS Write: 0 FAIL
Total MapReduce CPU Time Spent: 0 msec
hive>
正常的select查询工作正常
hive>从test_db.cust中选择国家/地区,第一个名称如“S%”代码>
OK
USA
USA
USA
USA
USA
USA
USA
USA
Time taken: 0.229 seconds, Fetched: 8 row(s)
hive>
问题出在指挥官身上
为了将结果输出到文件中,可以使用下一种语法:
hive -e "your query" > ~/sample_output.txt
问题来自指挥官
为了将结果输出到文件中,可以使用下一种语法:
hive -e "your query" > ~/sample_output.txt
cust表有多大?cust表有多大?