@Override
      public boolean seekBefore(ExtendedCell key) throws IOException {
        if (top) {
          Optional<ExtendedCell> fk = getFirstKey();
          if (
            fk.isPresent()
              && PrivateCellUtil.compareKeyIgnoresMvcc(getComparator(), key, fk.get()) <= 0
          ) {
            return false;
          }
        } else {
          // The equals sign isn't strictly necessary just here to be consistent
          // with seekTo
          if (PrivateCellUtil.compareKeyIgnoresMvcc(getComparator(), key, splitCell) >= 0) {
            boolean ret = this.delegate.seekBefore(splitCell);
            if (ret) {
              atEnd = false;
            }
            return ret;
          }
        }
        boolean ret = this.delegate.seekBefore(key);
        if (ret) {
          atEnd = false;
        }
        return ret;
      }
Creates a half file reader for a hfile referred to by an hfilelink.
@param context   Reader context info
@param fileInfo  HFile info
@param cacheConf CacheConfig
@param r         original reference file (contains top or bottom)
@param conf      Configuration
hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java