MRUnit
  1. MRUnit
  2. MRUNIT-65

return better error message when mapper or reducer is null for MapDriver or ReduceDriver

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Labels:
      None

      Description

      Currently if you use the default constructor for MapDriver or ReduceDriver you just get a nullpointer exception instead of a more meaningful error stating that you did not specify a mapper or reducer class

      1. MRUNIT-65-1.patch
        16 kB
        Jim Donofrio

        Activity

        Hide
        Brock Noland added a comment -

        Committed to trunk in 1293865. Thank you for your contribution!

        Show
        Brock Noland added a comment - Committed to trunk in 1293865. Thank you for your contribution!
        Hide
        Jim Donofrio added a comment -

        add log warning message to MapReduceDriver to notify user that they have added no inputs
        add checks in old and new api Map and ReduceDriver to check for null mapper or reducer, throw IllegalStateExcpetion if null with message such as "No Mapper class was provided"
        this exception carries over to the MapReduceDriver class in the old and new api and the Pipeline class. The Pipeline class will also catch and rethrow the exception to state which stage there was no mapper or reducer

        Show
        Jim Donofrio added a comment - add log warning message to MapReduceDriver to notify user that they have added no inputs add checks in old and new api Map and ReduceDriver to check for null mapper or reducer, throw IllegalStateExcpetion if null with message such as "No Mapper class was provided" this exception carries over to the MapReduceDriver class in the old and new api and the Pipeline class. The Pipeline class will also catch and rethrow the exception to state which stage there was no mapper or reducer
        Hide
        Brock Noland added a comment -

        This is a great jira.

        Show
        Brock Noland added a comment - This is a great jira.

          People

          • Assignee:
            Jim Donofrio
            Reporter:
            Jim Donofrio
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development