Can we use different input and output format classes

0 votes

Can we use different i/p and o/p format classes- (say one TextInputFormat and another KeyValueTextInputFormat ) . here -

job.setInputFormatClass(TextInputFormat.class);
job.setOutputFormatClass(TextOutputFormat.class);

Can we use different i/p and o/p format classes?

Jul 22, 2019 in Big Data Hadoop by Tilak
655 views

1 answer to this question.

0 votes

Yes, InputFormatClass and OutputFormatClass are independent of each other.

InputFormatClass

InputFormat defines how the input files are split up and read in Hadoop.  Initially, the data for a MapReduce task is stored in input files, and input files typically reside in HDFS. Although these files format is arbitrary, line-based log files and binary format can be used. Using InputFormat we define how these input files are split and read. 

OutputFormatClass

The Hadoop Output Format checks the Output-Specification of the job. It determines how RecordWriter implementation is used to write output to output files. As we know, Reducer takes as input a set of an intermediate key-value pair produced by the mapper and runs a reducer function on them to generate output that is again zero or more key-value pairs.  RecordWriter writes these output key-value pairs from the Reducer phase to output files. OutputFormat instances provided by Hadoop are used to write to files on the HDFS or local disk. OutputFormat describes the output-specification for a Map-Reduce job.

answered Jul 22, 2019 by Jishan

Related Questions In Big Data Hadoop

0 votes
1 answer

Can we use different i/p and o/p format classes in mapreduce code?

Yes, InputFormatClass and OutputFormatClass are independent of ...READ MORE

answered Jul 10, 2019 in Big Data Hadoop by Jimmy
830 views
0 votes
1 answer
0 votes
1 answer

Can we use apache Mahout without Hadoop dependency?

There is a number of algorithm implementations ...READ MORE

answered Apr 26, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
1,129 views
0 votes
1 answer

Can we use HDFS to store git repositories?

Yes, it is possible to use HDFS ...READ MORE

answered May 7, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
1,418 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,032 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,540 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,852 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,350 points
4,615 views
0 votes
3 answers

Can we run Spark without using Hadoop?

No, you can run spark without hadoop. ...READ MORE

answered May 7, 2019 in Big Data Hadoop by pradeep
2,320 views
0 votes
1 answer

Why we need to install "ant -Dhadoopversion=23" ? What is the use of this?

Hi, We install ant to build pig, If the ...READ MORE

answered Apr 26, 2019 in Big Data Hadoop by Gitika
• 65,770 points
656 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP