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(

at org.apache.hadoop.mapred.LocalDistributedCacheManager.setup(

at org.apache.hadoop.mapred.LocalJobRunner$Job.(

at org.apache.hadoop.mapred.LocalJobRunner.submitJob(

at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(

at org.apache.hadoop.mapreduce.Job$

at org.apache.hadoop.mapreduce.Job$

at Method)



at org.apache.hadoop.mapreduce.Job.submit(

at org.apache.hadoop.mapreduce.Job.waitForCompletion(

at MapReduce.main(

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