问题随记 —— Cannot create directory /tmp/hive. Name node is in safe mode.

2023-05-07 19:28:53 浏览数 (1)

问题描述

Hive 启动时出现以下问题:

代码语言:javascript复制
Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.SafeModeException): Cannot create directory /tmp/hive. Name node is in safe mode.
The reported blocks 51 has reached the threshold 0.9990 of total blocks 51. The number of live datanodes 2 has reached the minimum number 0. In safe mode extension. Safe mode will be turned off automatically in 2 seconds.

解决方法

输入以下命令关闭 HDFS 的安全模式即可。

代码语言:javascript复制
hdfs dfsadmin -safemode leave

0 人点赞