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

ScanMetrics counter update may not happen in case of exception in TableRecordReaderImpl

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0, 2.3.0, 2.2.1, 2.1.7
    • Component/s: mapreduce
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      ScanMetrics counter update may not happen in case of exception in TableRecordReaderImpl.nextKeyValue(),

      There are multiple cases as below,

      1. In case of DoNotRetryIOException

       // do not retry if the exception tells us not to do so
       if (e instanceof DoNotRetryIOException) {
       throw e;
       }
      

      2. While creating a new scanner,

       if (lastSuccessfulRow == null) {
       restart(scan.getStartRow());
       } else {
       restart(lastSuccessfulRow);
       scanner.next(); // skip presumed already mapped row
       }
      

      3. In case of IOException

       catch (IOException ioe) {
       if (logScannerActivity) {
       long now = System.currentTimeMillis();
       LOG.info("Mapper took " + (now-timestamp)
       + "ms to process " + rowcount + " rows");
       LOG.info(ioe.toString(), ioe);
       String lastRow = lastSuccessfulRow == null ?
       "null" : Bytes.toStringBinary(lastSuccessfulRow);
       LOG.info("lastSuccessfulRow=" + lastRow);
       }
       throw ioe;
       }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pankaj2461 Pankaj Kumar
                Reporter:
                pankaj2461 Pankaj Kumar
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: