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

Partially initialized SnapshotHFileCleaner leads to NPE during TestHFileArchiving

    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0-alpha-1
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      TestHFileArchiving#testCleaningRace creates HFileCleaner instance within the test.
      When SnapshotHFileCleaner.init() is called, there is no master parameter passed in params.

      When the chore runs the cleaner during the test, NPE comes out of this line in getDeletableFiles():

            return cache.getUnreferencedFiles(files, master.getSnapshotManager());
      

      since master is null.

      We should either check for the null master or, pass master instance properly when constructing the cleaner instance.

        Attachments

        1. HBASE-21175.v01.patch
          4 kB
          Artem Ervits
        2. HBASE-21175.v04.patch
          6 kB
          Artem Ervits
        3. HBASE-21175.v05.patch
          9 kB
          Artem Ervits
        4. HBASE-21175.v07.patch
          9 kB
          Artem Ervits

          Activity

            People

            • Assignee:
              dbist13 Artem Ervits
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: