一、Hive-The server time zone value ‘EDT’ is unrecognized or represents more than one time zone.
(1)使用 server mysql start命令启动mysql
(2)在mysql中执行show variables like ‘%time_zone%’;
(3)输入select nows();
(4)在终端执行date命令
此时发现终端显示的时间和MySql中显示的时间不一致,这就是问题所在。
(5)在mysql中执行 set time_zone=SYSTEM;
(6)再次在mysql中执行select now();
(7)执行 set global time_zone=‘+8:00’;
(8)执行 flush privileges;
(9)再次执行hive命令,问题解决。
二、FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
- yarn.app.mapreduce.am.command-opts=-Xmx512m(默认参数,表示jvm堆内存,设置小一点)
- yarn.app.mapreduce.am.resource.mb=512(container的内存,设置小一点)
注意在Hive ETL里面,按照如下方式设置:
set mapreduce.map.child.java.opts=“-Xmx512m”(注:-Xmx设置时一定要用引号,不加引号各种错误)
set mapreduce.map.memory.mb=512