Hive启动错误:
[hadoop@data001 hive]$ hive
which: no hbase in (/home/hadoop/app/hadoop/bin:/home/hadoop/app/hadoop/sbin:/usr/java/jdk1.8.0_221/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/home/hadoop/app/hadoop/bin:/home/hadoop/app/hadoop/sbin:/home/hadoop/app/hive/bin:/home/hadoop/app/hive/sbin)
20/07/15 19:15:58 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Logging initialized using configuration in jar:file:/home/hadoop/app/hive-1.1.0-cdh5.16.2/lib/hive-common-1.1.0-cdh5.16.2.jar!/hive-log4j.properties
Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.SafeModeException): Cannot create directory /tmp/hive/hadoop/86147fb9-c5bf-4ab6-996f-9bfa131bbbca. Name node is in safe mode.
Resources are low on NN. Please add or free up more resources then turn off safe mode manually. NOTE: If you turn off safe mode before addi
原因:
HDFS进入安全模式,需要推出安全模式
解决方法:
cd app/hadoop
hdfs dfsadmin -safemode get #查看安全模式状态
hdfs dfsadmin -safemode leave #强制离开安全模式