Hadoop reduce task stuck at 0% - hadoop

I'm following some guide to set up the pseudo distributed mode, I ran start-all.sh and the daemons are all good (6 of them), then I launch my WordCount example which runs well in standalone mode, but stuck at map 100%, reduce 0%.
Looking at the jobtracker, the reduce task is at status reduce > copy.
The only error log locates in secondarynamenode.log:
2013-02-27 23:29:59,555 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:my_user_name cause:java.net.ConnectException: Connection refused
2013-02-27 23:29:59,555 ERROR org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Exception in doCheckpoint:
2013-02-27 23:29:59,555 ERROR org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: java.net.ConnectException: Connection refused
I can ssh localhost without password. Hadoop version is 1.1.1. I launch a jar file from commande line.
Really no idea what's wrong, some help?
Thanks in advance.

How much data are you running the word count on? If you are running on a large data set in standalone mode without using a combiner, then it's going to cause some trouble. Try
job.setMapperClass(<Mapper_Class>);
job.setCombinerClass(<Reducer_Class>);
job.setReducerClass(<Reducer_Class>);
in the main method containing the driver in your program. This might help you out.

Related

UnsupportedOperationException: Not implemented by the KosmosFileSystem FileSystem implementation

I'd like to know your input as to why this error is happening. On production environment onshore, we're using CDH4. On our local testing environment, we're just using Apache Hadoop v2.2.0. When I run the same jar compiled on CDH4, the MR jobs are executed fine. But when I run the jar on Hadoop v2.2.0 (YARN enabled), I get this error:
INFO mapreduce.Job: Task Id : attempt_1391062333435_0001_m_000000_0, Status : FAILED
Error: java.lang.UnsupportedOperationException: Not implemented by the KosmosFileSystem FileSystem implementation
The log showed Map jobs ran successfully, but the Reduce jobs - all of them failed - with the above error. There's not too many hits on Google regarding this error so I'm kind of nowhere to run but here.
Any thoughts guys? Thanks.
Sorry for the lateness of this reply.
This problem was solved when we synched our environment with the one onshore. That is, instead of using plain Apache Hadoop, we used the Cloudera distribution.

Hadoop dfs put fails

I am getting this error (hadoop dfs -put) when the process is triggered from a shell script (run by Jenkins) during the nigh, however, it runs OK if I try manually later.
put: Lease mismatch on /shared/file1.tsv._COPYING_ owned by DFSClient_NONMAPREDUCE_-2031300157_1 but is accessed by DFSClient_NONMAPREDUCE_-1375175076_1
13/08/07 07:11:39 ERROR hdfs.DFSClient: Failed to close file /shared/epg/programs/programs/20130812/programs__20130812_20130807.tsv._COPYING_
any suggestion why this might happen?

Hadoop multinode stepup Connection reset by peer

i do got this error in my master task tracker log , Extension to Hadoop webuser: No such user
2013-07-25 15:23:54,236 ERROR org.apache.hadoop.mapred.TaskTracker:
Caught exception: java.io.IOException: Call to
master/192.168.0.1:54311 failed on local exception:
java.io.IOException: Connection reset by peer
Make sure JobTracker is running fine, and is running at port 54311. Showing us the TT logs would be helpful. Also, make sure there is no port or any other network related issue.

Error: Failed to create Data Storage while running embedded pig in java

I wrote a simple program to test the embedded pig in java to run in mapreduce mode.
The hadoop version in the server I am running is 0.20.2-cdh3u4a, and pig version is 0.10.0-cdh3u4a.
When I try to run in local mode, it runs successfully. But when I try to run in mapreduce mode, it gives me the error.
I run my program using the following commands as shown in http://pig.apache.org/docs/r0.9.1/cont.html#embed-java
javac -cp pig.jar EmbedPigTest.java
javac -cp pig.jar:.:/etc/hadoop/conf EmbedPigTest.java input.txt
My program gives error as:
Exception in thread "main" java.lang.RuntimeException: Failed to create DataStorage
at org.apache.pig.backend.hadoop.datastorage.HDataStorage.init(HDataStorage.java:75)
at org.apache.pig.backend.hadoop.datastorage.HDataStorage.<init>(HDataStorage.java:58)
at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.init(HExecutionEngine.java:214)
at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.init(HExecutionEngine.java:134)
at org.apache.pig.impl.PigContext.connect(PigContext.java:183)
at org.apache.pig.PigServer.<init>(PigServer.java:226)
at org.apache.pig.PigServer.<init>(PigServer.java:215)
at org.apache.pig.PigServer.<init>(PigServer.java:211)
at org.apache.pig.PigServer.<init>(PigServer.java:207)
at WordCount.main(EmbedPigTest.java:9)
In some online resources they say that this problem occurs due to different hadoop version. But, I didn't understand what I should do. Suggestions please !!
This is happening because you are linking to the wrong jar, Please see the link below it describes this issue very well.
http://localsteve.wordpress.com/2012/09/30/embedding-pig-for-cdh4-java-apps-fer-realz/
I was faced same kind of issue when I tried to use pig in map reduce mode without starting the services.
Please check all services using jps before using pig in map reduce mode.

Error in Hadoop MapReduce

When I run a mapreduce program using Hadoop, I get the following error.
10/01/18 10:52:48 INFO mapred.JobClient: Task Id : attempt_201001181020_0002_m_000014_0, Status : FAILED
java.io.IOException: Task process exit with nonzero status of 1.
at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:418)
10/01/18 10:52:48 WARN mapred.JobClient: Error reading task outputhttp://ubuntu.ubuntu-domain:50060/tasklog?plaintext=true&taskid=attempt_201001181020_0002_m_000014_0&filter=stdout
10/01/18 10:52:48 WARN mapred.JobClient: Error reading task outputhttp://ubuntu.ubuntu-domain:50060/tasklog?plaintext=true&taskid=attempt_201001181020_0002_m_000014_0&filter=stderr
What is this error about?
One reason Hadoop produces this error is when the directory containing the log files becomes too full. This is a limit of the Ext3 Filesystem which only allows a maximum of 32000 links per inode.
Check how full your logs directory is in hadoop/userlogs
A simple test for this problem is to just try and create a directory from the command-line for example: $ mkdir hadoop/userlogs/testdir
If you have too many directories in userlogs the OS should fail to create the directory and report there are too many.
I was having the same issue when I run out of space on disk with log directory.
Another cause can be, JVM Error when you try to allocate some dedicated space to JVM and it is not present on your machine.
sample code:
conf.set("mapred.child.java.opts", "-Xmx4096m");
Error message:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Solution: Replace -Xmx with dedicated memory value that you can provide to JVM on your machine(e.g. "-Xmx1024m")
Increase your ulimit to unlimited. or alternate solution reduce the allocated memory.
If you create a runnable jar file in eclipse, it gives that error on hadoop system. You should extract runnable part. That solved my problem.

Resources