public void restart(byte[] firstRow) throws IOException {
    // Update counter metrics based on current scan before reinitializing it
    if (currentScan != null) {
      updateCounters();
    }
    currentScan = new Scan(scan);
    currentScan.withStartRow(firstRow);
    currentScan.setScanMetricsEnabled(true);
    if (this.scanner != null) {
      if (logScannerActivity) {
        LOG.info("Closing the previously opened scanner object.");
      }
      this.scanner.close();
    }
    this.scanner = this.htable.getScanner(currentScan);
    if (logScannerActivity) {
      LOG.info("Current scan=" + currentScan.toString());
      timestamp = EnvironmentEdgeManager.currentTime();
      rowcount = 0;
    }
  }
Restart from survivable exceptions by creating a new scanner.
@param firstRow The first row to start at.
@throws IOException When restarting fails.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java