Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-1128

MRUnit Allows Iteration Twice

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.20.1
    • 0.21.0
    • contrib/mrunit
    • None
    • Java 1.6, Hadoop 0.21.1+133 (cloudera distribution for hadoop)

    • Reviewed

    Description

      MRUnit allows one to iterate over a collection of values twice (ie.

      reduce(Key key, Iterable<Value> values, Context context){
      for(Value : values ) /* iterate once */;
      for(Value : values ) /* iterate again */;
      }

      Hadoop will allow this as well, however the second iterator will be empty. MRUnit should either match hadoop's behavior or warn the user that their code is likely flawed.

      Attachments

        1. MAPREDUCE-1128.patch
          6 kB
          Aaron Kimball

        Activity

          People

            kimballa Aaron Kimball
            ekohlwey Ed Kohlwey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified