class ThemisRegionObserver extends BaseRegionObserver {

  @Override
  public InternalScanner preCompactScannerOpen(final ObserverContext<RegionCoprocessorEnvironment> c,
      final Store store, List<? extends KeyValueScanner> scanners, final ScanType scanType,
      final long earliestPutTs, final InternalScanner s, CompactionRequest request)
      throws IOException {
    if (expiredDataCleanEnable
        && (ThemisMasterObserver.isThemisEnableFamily(store.getFamily()) || ColumnUtil
            .isCommitFamily(store.getFamily().getName()))) {
      InternalScanner scanner = getScannerToCleanExpiredThemisData(store, store.getScanInfo(),
        scanners, scanType, store.getHRegion().getSmallestReadPoint(), earliestPutTs, true);
      if (scanner != null) {
        return scanner;
      }
    }
    return s;
  }

}