@Override
    public OrcProto.StripeFooter readStripeFooter(StripeInformation stripe) throws IOException {
      if (!isOpen) {
        open();
      }
      long offset = stripe.getOffset() + stripe.getIndexLength() + stripe.getDataLength();
      int tailLength = (int) stripe.getFooterLength();

      InStream.StreamOptions compression = null;
      try (CompressionCodec codec = OrcCodecPool.getCodec(compressionKind)) {
        if (codec != null) {
          compression = InStream.options().withCodec(codec).withBufferSize(bufferSize);
        }
      }

      // read the footer
      ByteBuffer tailBuf = ByteBuffer.allocate(tailLength);
      file.readFully(offset, tailBuf.array(), tailBuf.arrayOffset(), tailLength);
      return OrcProto.StripeFooter.parseFrom(
          InStream.createCodedInputStream(
              InStream.create("footer",
                  new BufferChunk(tailBuf, 0), 0,
                  tailLength, compression)));
    }
Plans the list of disk ranges that the given stripe needs to read the
indexes. All of the positions are relative to the start of the stripe.
@param  fileSchema the schema for the file
@param footer the stripe footer
@param ignoreNonUtf8BloomFilter should the reader ignore non-utf8
                                encoded bloom filters
@param fileIncluded the columns (indexed by file columns) that should be
                    read
@param sargColumns true for the columns (indexed by file columns) that
                   we need bloom filters for
@param version the version of the software that wrote the file
@param bloomFilterKinds (output) the stream kind of the bloom filters
@return a list of merged disk ranges to read
llap-server/src/java/org/apache/hadoop/hive/llap/io/encoded/LlapRecordReaderUtils.java