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

Null check in TableSnapshotInputFormat#TableSnapshotRegionRecordReader#initialize() is redundant

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.99.0
    • None
    • None
    • Reviewed

    Description

      Here is related code:

          public void initialize(InputSplit split, TaskAttemptContext context) throws IOException,
              InterruptedException {
      
            Configuration conf = context.getConfiguration();
      ...
            if (context != null) {
              this.context = context;
              getCounter = TableRecordReaderImpl.retrieveGetCounterWithStringsParams(context);
            }
      

      context was dereferenced first, leaving the null check ineffective.

      Attachments

        1. 10968-v1.txt
          1 kB
          Ted Yu

        Activity

          People

            yuzhihong@gmail.com Ted Yu
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: