Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Compilation issues when RCFileInputFormat is set as InputFormatClass in new mapreduce API

Highlighted

Compilation issues when RCFileInputFormat is set as InputFormatClass in new mapreduce API

Explorer

I am trying to read RCFiles in the mapper phase. I was successful in achieving this using old mapred API's.

 

 

import org.apache.hadoop.mapred.JobConf;

JobConf conf = new JobConf(config, MRDriver.class); conf.setInputFormat(RCFileInputFormat.class);

 

 

Refactored the code to use new mapreduce API's as below, 

 

 

import org.apache.hadoop.mapreduce.Job;

Job job = new Job(config, "Triplets join"); job.setJarByClass(MRDriver.class); job.setInputFormatClass(RCFileInputFormat.class);

 

 

i'm getting compilation issues in the below line :

 

 

job.setInputFormatClass(RCFileInputFormat.class);

 

 

ERROR:

 

The method setInputFormatClass(Class<? extends InputFormat>) in the type Job is not applicable for the arguments (Class<RCFileInputFormat>)

 

 

Also, RCFileInputFormat.setInputPaths(JobConf conf, String commaSeparatedPaths) doesn't seem to accept Job as argument. Instead, it uses deprecated JobConf.

 

Why am I facing compilation issues when trying to use new API's. RCFileInputFormat is not implemented using new mapreduce API's ?? I need some suggestions on how to proceed with this.