private void closeScanner() {
    incRPCCallsMetrics(scanMetrics, regionServerRemote);
    resetController(controller, rpcTimeoutNs, HConstants.HIGH_QOS, loc.getRegion().getTable());
    ScanRequest req = RequestConverter.buildScanRequest(this.scannerId, 0, true, false);
    stub.scan(controller, req, resp -> {
      if (controller.failed()) {
        LOG.warn("Call to " + loc.getServerName() + " for closing scanner id = " + scannerId
          + " for " + loc.getRegion().getEncodedName() + " of " + loc.getRegion().getTable()
          + " failed, ignore, probably already closed", controller.getFailed());
      }
    });
  }
This method is used when {@link ScanControllerImpl#suspend} had ever been called to get a
{@link ScanResumerImpl}, but now user stops scan and does not need any more scan results.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncScanSingleRegionRpcRetryingCaller.java