Can we pass output of one reducer as input to anothor mapper ?

Free Online Certification Courses – Learn Today. Lead Tomorrow. Forums Apache Hadoop Can we pass output of one reducer as input to anothor mapper ?

Viewing 1 reply thread
  • Author
    Posts
    • #5142
      DataFlair TeamDataFlair Team
      Spectator

      Can we pass output of one reducer as input to anothor mapper ? And is it correct way to do it ? Or we should first write mapreduce program seperatly and then write program to read output file of mapreduce ??

    • #5143
      DataFlair TeamDataFlair Team
      Spectator

      Yes we can pass output of one reducer to another mapper. While executing the application through command line we have to give the correct sequence of input and output files.This is exactly we have to do when we have multiple mapper and reducer classes.If you are using TextInputFormat to read the file then reducer output will be treated as key value pair for your mapper where each line offset from beginning of the file will be key and entire line will be value.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.