We have a code to which ingests data from one hbase table to another hbase table using mapreduce using hadoop jar in HDP. Now, we are migrating to CDH 7.1.5. Here when I'm trying to execute the same HBase Mapreduce program using hadoop jar, the code is failing with below error. Can someone help how to resolve this?
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/HBaseConfiguration
at com.hbase.HbaseTableIngestion.main(HbaseIngestion.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:318)
at org.apache.hadoop.util.RunJar.main(RunJar.java:232)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.HBaseConfiguration
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
I guess it's not picking up the hbase related jars. But, I'm not sure how to fix this. It would be really helpful if someone can help.