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

A boolean may be set error in the Word Count v2.0 in MapReduce Tutorial

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • None
    • java version 1.8.0_11 hostspot 64-bit

    • Reviewed

    Description

      As a beginner, when I learned about the basic of the mr, I found that I cound't run the WordCount2 using the command "bin/hadoop jar wc.jar WordCount2 /user/joe/wordcount/input /user/joe/wordcount/output" in the Tutorial. The VM throwed the NullPoniterException at the line 47. In the line 45, the returned default value of "conf.getBoolean" is true. That is to say when "wordcount.skip.patterns" is not set ,the WordCount2 will continue to execute getCacheFiles.. Then patternsURIs gets the null value. When the "-skip" option dosen't exist, "wordcount.skip.patterns" will not be set. Then a NullPointerException come out.
      At all, the block after the if-statement in line no. 45 shoudn't be executed when the "-skip" option dosen't exist in command. Maybe the line 45 should like that "if (conf.getBoolean("wordcount.skip.patterns", false)) { "
      .Just change the boolean.

      Attachments

        1. MAPREDUCE-6038.2.patch
          1.0 kB
          Christopher Douglas
        2. MAPREDUCE-6038.1.patch
          1.0 kB
          Tsuyoshi Ozawa

        Activity

          People

            ozawa Tsuyoshi Ozawa
            myfly537 Pei Ma
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: