AnsweredAssumed Answered

How do you pass external jars to map reduce job from application

Question asked by charanthota on Mar 28, 2016
Latest reply on Apr 19, 2016 by maprcommunity

I want to use DataFactory jar in my mapper class to generate some random data and load it in to hbase. So I came up with the below two classes:


I tried the Distributed Cache to load the jars in to classpath, but it still gives the same below error.


I am running the application below way.


java -cp `hbase classpath`:./myjar.jar:./datafactory-0.8.jar  BulkLoadCreditData /projects/hbase/Card /projects/poc


and I am getting the  below class not found exception.


2016-03-28 11:15:59,861 INFO  [main] mapreduce.Job: Task Id : attempt_1459152725435_0011_m_000003_2, Status : FAILED

Error: java.lang.ClassNotFoundException: org.fluttercode.datafactory.impl.DataFactory


        at java.lang.ClassLoader.loadClass(

        at sun.misc.Launcher$AppClassLoader.loadClass(

        at java.lang.ClassLoader.loadClass(

        at MyMapper.setup(


        at org.apache.hadoop.mapred.MapTask.runNewMapper(


        at org.apache.hadoop.mapred.YarnChild$

        at Method)



        at org.apache.hadoop.mapred.YarnChild.main(