Balancer wont start
Hi,
I am a hadoop newbie and currently have a running cluster that has had new nodes added to it.
I want to balance but the balancer is failing. I get the following:
# hadoop balancer
09/08/28 14:48:05 ERROR dfs.Balancer: java.lang.NullPointerException
at org.apache.hadoop.dfs.Balancer.run(Balancer.java:1458)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.dfs.Balancer.main(Balancer.java:791)
I have googled this but there is nothing distinct about the error.
Does anyone know why this is happening ?
Vince Allen
I am a hadoop newbie and currently have a running cluster that has had new nodes added to it.
I want to balance but the balancer is failing. I get the following:
# hadoop balancer
09/08/28 14:48:05 ERROR dfs.Balancer: java.lang.NullPointerException
at org.apache.hadoop.dfs.Balancer.run(Balancer.java:1458)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.dfs.Balancer.main(Balancer.java:791)
I have googled this but there is nothing distinct about the error.
Does anyone know why this is happening ?
Vince Allen
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Hi Vince,
This might be a configuration issue. Can you confirm that performing operations like "hadoop fs -ls /" and "hadoop jar /usr/lib/hadoop/hadoop*examples.jar pi 10 100" are working for you?
We'll sort this out. Thanks,
Alex -
Inappropriate?Hi Alex,
Yes, I can access the hdfs locations with fsShell. And had ran the example jar when I first created the cluster.
I will try the example again.
Vince
-
Inappropriate?Hi Vince,
What version of Hadoop are you using, and are you installing from RPMs or DEBs? I suspect your Hadoop is misconfigured, but knowing a little more will help me debug better.
Keep me posted.
Thanks!
Alex -
Inappropriate?I believe it is 0.8. I had used Cloudera's EC2 ami distro 20090623.
Very little was changed in hadoop-site.xml aside from some changes to mapred.map.tasks and mapred.reduce.tasks.
Vince -
Inappropriate?Hey Vince,
I can confirm that the balancer does produce a NPE on a fresh EC2 cluster. Let me do some digging and figure out why this is the case.
Sorry for not responding to you over the weekend. I'll get to the bottom of this.
Thanks for being patient while I figure this out,
Alex -
Inappropriate?Hey Vince,
You should modify /etc/hadoop/conf/hadoop-site.xml and change fs.default.name to have a port at the end of the URI. fs.default.name looks something like this for now:
hdfs://ec2-a-b-c-d.compute-1.amazonaws.com
You should change it to look like this:
hdfs://ec2-a-b-c-d.compute-1.amazonaws.com:8020
You've found a bug in Hadoop, where FileSystem.java does not respect default ports correctly. Adding ":8020" to fs.default.name in /etc/hadoop/conf/hadoop-site.xml will fix this issue for you.
Also, be sure to run the balancer as the "hadoop" user: "sudo -u hadoop hadoop balancer"
Thanks for finding that bug :). Let us know if you run into any other issues.
Alex -
Inappropriate?Thanks Alex - I had this exact same issue trying to do remove nodes, then add nodes on a cluster running on EC2. It look like adding that :8020 to hadoop-site.xml cleared it up.
Loading Profile...



EMPLOYEE
