Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-10546

Two scanner objects are open for each hbase map task but only one scanner object is closed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.96.2, 0.98.1, 0.99.0, 0.94.17
    • None
    • None
    • Reviewed

    Description

      Map reduce framework calls createRecordReader of the TableInputFormat/MultiTableInputFormat to get the record reader instance. In this method, we are initializing the TableRecordReaderImpl (restart method). This initializes the scanner object. After this, map reduce framework calls initialize on the RecordReader. In our case, this calls restart of the TableRecordReaderImpl again. Here, it doesn't close the first scanner. At the end of the task, only the second scanner object is closed. Because of this, the smallest read point of HRegion is affected.

      We don't need to initialize the RecordReader in the createRecordReader method and we need to close the scanner object in the restart method. (incase if the restart method is called because of exceptions in the nextKeyValue method)

      Attachments

        1. trunk-HBASE-10546.patch
          0.9 kB
          Vasu Mariyala
        2. 0.94-HBASE-10546.patch
          2 kB
          Vasu Mariyala

        Activity

          People

            vmariyala Vasu Mariyala
            vasu.mariyala@gmail.com Vasu Mariyala
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: