Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-7940

method clear() in org.apache.hadoop.io.Text does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.20.205.0
    • 2.0.0-alpha
    • io
    • Ubuntu, hadoop cloudera CDH3U2, Oracle SUN JDK 6U30

    Description

      LineReader reader = new LineReader(in, 4096);
      ...

      Text text = new Text();
      while((reader.readLine(text)) > 0) {
      ...
      text.clear();
      }
      }

      Even the clear() method is called each time, some bytes are still not filled as zero.
      So, when reader.readLine(text) is called in a loop, some bytes are dirty which was from last call.

      Attachments

        1. HADOOP-7940.patch
          1 kB
          Csaba Miklos

        Issue Links

          Activity

            People

              mikcsabee Csaba Miklos
              sohu0011 Aaron,
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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