关于弃用的方法 ParquetFileReader.readFooter

about deprecated method ParquetFileReader.readFooter

我看到 ParquetFileReader.readFooterparquet-hadoop-1.11.0.jar 中被弃用了。应该用什么class或者用什么方法代替?

根据代码注释,您应该使用ParquetFileReader#open(InputFile, ParquetReadOptions)

  /**
   * Reads the meta data block in the footer of the file
   * @param configuration a configuration
   * @param file the parquet File
   * @return the metadata blocks in the footer
   * @throws IOException if an error occurs while reading the file
   * @deprecated will be removed in 2.0.0;
   *             use {@link ParquetFileReader#open(InputFile, ParquetReadOptions)}
   */
  @Deprecated
  public static final ParquetMetadata readFooter(Configuration configuration, Path file) throws IOException {