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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.99.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: