resource_management.libraries.providers.hdfs_resource.WebHDFSCallException: Execution of 'curl -sS -L -w '%{http_code}' -X PUT -d '' -H 'Content-Length: 0' 'http://ambria-server-qhk28:50070/webhdfs/v1/user/hive?op=MKDIRS&user.name=hdfs'' returned status_code=403. { "RemoteException": { "exception": "SafeModeException", "javaClassName": "org.apache.hadoop.hdfs.server.namenode.SafeModeException", "message": "Cannot create directory /user/hive. Name node is in safe mode.\nThe reported blocks 1 has reached the threshold 1.0000 of total blocks 1. The minimum number of live datanodes is not required. Name node detected blocks with generation stamps in future. This means that Name node metadata is inconsistent. This can happen if Name node metadata files have been manually replaced. Exiting safe mode will cause loss of 3289805637 byte(s). Please restart name node with right metadata or use \"hdfs dfsadmin -safemode forceExit\" if you are certain that the NameNode was started
时间: 2024-03-14 17:49:00 浏览: 388
这个错误提示显示了在执行curl命令创建HDFS目录/user/hive时返回了状态码403,即无权限访问。原因是HDFS的namenode处于安全模式(Safe Mode)下,无法创建目录。同时,日志中还提示说,由于namenode元数据不一致,可能是由于手动更改了namenode元数据文件导致的。
要解决这个问题,需要解除HDFS的安全模式。可以使用以下命令来解除安全模式:
```
hdfs dfsadmin -safemode leave
```
解除安全模式后,再次尝试创建目录即可。如果问题仍然存在,可能需要通过其他方式来修复namenode元数据。
阅读全文