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

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

    XMLWordPrintableJSON

Details

    • 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

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

              Dates

                Created:
                Updated:
                Resolved: