Hive
文章目录
- Hive
- 错误日志
- 错误
- SessionHiveMetaStoreClient
- ql.Driver: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
- error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster Please check whether your etc/hadoop/mapred-site.xml contains the below configuration:
- Cannot run job locally: Input Size (= 460974586) is larger than hive.exec.mode.local.auto.inputbytes.max (= 134217728)
错误日志
-
hive运行日志
-
hadoop日志
错误
SessionHiveMetaStoreClient
FAILED: HiveException java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
删除一个文件一个目录: derby.log和metastore_db
然后再重新初始化:
bin/schematool -dbType derby -initSchema
ql.Driver: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
查询hadoop日子:/bin/bash: /bin/java: No such file or directory
- 解决:
修改hadoop下的hadoop-env.sh文件里面的: export JAVA_HOME
error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster Please check whether your etc/hadoop/mapred-site.xml contains the below configuration:
解决:
-
停止集群:
myhodoop.sh stop
-
修改
/opt/module/hadoop-3.1.3/etc/hadoop/mapred-site.xml
为以下内容:
<property><name>yarn.app.mapreduce.am.env</name><value>HADOOP_MAPRED_HOME=/opt/module/hadoop-3.1.3</value>
</property>
<property><name>mapreduce.map.env</name><value>HADOOP_MAPRED_HOME=/opt/module/hadoop-3.1.3</value>
</property>
<property><name>mapreduce.reduce.env</name><value>HADOOP_MAPRED_HOME=/opt/module/hadoop-3.1.3</value>
</property>
注意:用hadoop的完整地址,不能使用 ${HADOOP_HOME}
-
分发到各个集群
xsync /opt/module/hadoop-3.1.3/etc/hadoop/mapred-site.xml
-
重启hadoop集群:
myhadoop.sh start
Cannot run job locally: Input Size (= 460974586) is larger than hive.exec.mode.local.auto.inputbytes.max (= 134217728)
export HADOOP_OPTS=“$HADOOP_OPTS -Djava.library.path=/opt/module/hadoop-3.1.3/lib/native”