NoSuchMethodError with Mapreduce for Hbase

I want to start a MapReducer Job on my Hbase 2.1.1 Instance.

I am getting the following Error, when I execute the Code below:

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.mapreduce.Job.getArchiveSharedCacheUploadPolicies(Lorg/apache/hadoop/conf/Configuration;)Ljava/util/Map;

at org.apache.hadoop.mapreduce.v2.util.MRApps.setupDistributedCache(MRApps.java:491)

at org.apache.hadoop.mapred.LocalDistributedCacheManager.setup(LocalDistributedCacheManager.java:92)

at org.apache.hadoop.mapred.LocalJobRunner$Job.(LocalJobRunner.java:172)

at org.apache.hadoop.mapred.LocalJobRunner.submitJob(LocalJobRunner.java:788)

at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:240)

at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290)

at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Subject.java:422)

at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1762)

at org.apache.hadoop.mapreduce.Job.submit(Job.java:1287)

at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1308)

at MapReduce.main(MapReduce.java:49)

I really dont know what I am doing wrong.

public class MapReduce {

public static void main(String[] args) {

String tableName = "actors";

Configuration config = HBaseConfiguration.create();

try {

Job job = new Job(config);

job.setJarByClass(MapReduce.class); // class that contains mapper and reducer

Scan scan = new Scan();

scan.setCaching(500); // 1 is the default in Scan, which will...

Read More »

By: StackOverFlow - 5 days ago

Related Posts