Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the problem of HDFS permission after Hadoop restart

Shulou Source: shulou.com Published: 2022-05-31 21:16:21 10月22日 Update

This article is to share with you about how to solve the problem of HDFS permissions after Hadoop restart. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Restart the Hadoop cluster and report an error when debugging hdfs api with Eclipse:

[WARNING] java.lang.NullPointerException at org.conan.kafka.HdfsUtil.batchWrite (HdfsUtil.java:50) at org.conan.kafka.SingleTopicConsumer.run (SingleTopicConsumer.java:144) at java.lang.Thread.run (Thread.java:745) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617) at java.lang.Thread.run (Thread.java:745)

Find line 50 of HdfsUtil.java

Os.write (buff, 0, buff.length)

I found that I reported an error when I was writing, and then I messed around for a while, but I didn't find the reason. Later, I wondered if it might be a permission problem (the computer is not an administrator, but the hadoop cluster runs as root), but I have previously changed the permissions of the hdfs folder to 777. Anyway, try again, hdfs dfs-chmod-R 777 / input, and then debug again, OK again.

So the question is, does the Hadoop cluster have to modify the permissions of files (folders) after each restart (without namenode format)?

According to practice, it should be.

Thank you for reading! This is the end of this article on "how to solve the problem of HDFS permissions after Hadoop restart". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Tags: Permissions questions clusters content files time more articles identity good practical again reasons folders articles yes computer look knowledge administrator Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MySQL Huawei OPPO Reno Redmi