Running MapReduce code that uses zooKeeper

I want to ask about how to execute a MapReduce java code that uses zooKeeper.

My first code is just to create a variable (znode) and to modify it by each mapper. So I modified the wordCount code just to test zookeeper for the first time. When I run it using the eclipse console, everything goes well, so I can see the changes on the value of the znode, etc.

However, I was trying to execute it using linux command line:

**bin/hadoop jar ./myjar.jar algo.WordCount /input.txt /out

I got the following error

**Error: java.lang.ClassNotFoundException: org.apache.zookeeper.Watcher

Although that I added the path of the jar file using conf.set("mapred.jar","...."); in the mapreduce code but I don't know why it did not recognize the classes of zookeeper.

Any idea?


Check this blog from Cloudera on how to include 3rd party libraries in MR jobs.

Need Your Help

How to use Object.create for inheritance within modules in node.js

node.js inheritance prototypal-inheritance object-create

I have a module Vehicle that contains general vehicle info. I have another module Car, which adds more functionality to Vehicle object.