@Override
  public void seek(long targetPos) throws IOException {
    this.position = (int)targetPos;
    targetPos -= FAKE_PREFIX_LENGTH;
    // Not efficient, but we don't expect this to be called frequently.
    for (int i = 1; i <= positions.length; ++i) {
      int endPos = (i == positions.length) ? (length - FAKE_PREFIX_LENGTH) : positions[i];
      if (endPos > targetPos) {
        bufferIx = i - 1;
        bufferPos = (int) (targetPos - positions[i - 1]);
        return;
      }
    }
    throw new IOException("Incorrect seek " + targetPos + "; footer length " + footerLength
        + Arrays.toString(positions));
  }
The Parquet InputFile implementation that allows the reader to
read the footer from cache without being aware of the latter.
This implements both InputFile and the InputStream that the reader gets from InputFile.
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/ParquetFooterInputFromCache.java