Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException at "NewTrackingRecordReader.initialize(MapTask.java:548)" #35

Open
TheWall89 opened this issue May 17, 2016 · 0 comments

Comments

@TheWall89
Copy link

Hi, I'm trying to use hadoop-pcap to work with some pcap files on hadoop, but I get the issue in the title.

Here follows my configuration.

I'm using cloudera 5.5 virtual machine and I compiled hadoop-pcap by cloning the repo and issuing the following command:
mvn -Dskip-tests clean package
This produced the file hadoop-pcap-lib-1.2-SNAPSHOT.jar.

I imported this file in Eclipse and I rewrote your example found here to respect new hadoop standards. Here is my code (I had to attach .txt files because github doesn't accept .java)
PcapCount.txt
PcapMapper.txt
PcapReducer.txt

With Eclipse I created a jar file (pcapcount.jar) and I tried to execute it in hadoop with the following commands:

export HADOOP_CLASSPATH=/home/cloudera/pcap-tests/hadoop-pcap-lib-1.2-SNAPSHOT.jar
hadoop jar /home/cloudera/pcap-tests/pcapcount.jar mypkg.PcapCount -libjars /home/cloudera/pcap-tests/hadoop-pcap-lib-1.2-SNAPSHOT.jar /user/cloudera/pcapcount/input /user/cloudera/pcapcount/output

The mapreduce job can't start and this is the error trace: ErrorTrace.txt.

I searched for the error in the web and I found this useful information:

  1. This should be the class where the NullPointerException happens (line 548): org.apache.hadoop.mapred.MapTask
  2. I think the problem is in your class PcapInputFormat.java. As stated in this thread, Hadoop: NullPointerException with Custom InputFormat, your custom InputFormat should set the backend variable.

It would be great if you can look into this or give me some advice. I am quite new to hadoop.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant