parquet4s未返回所有记录

发布于 2025-01-19 18:24:54 字数 886 浏览 4 评论 0原文

我有一个简单的 Scala 应用程序,它使用 parquet4s 和 fs2 来读取一组分区记录(分布在目录中,由 Spark 作业生成)。

当我运行该应用程序时,它仅返回分区目录中的一小部分记录。没有错误......它只是在特定数字后停止。

控制台输出没有有用的信息:

2022-04-07 18:32:29,231 |-INFO org.apache.parquet.hadoop.InternalParquetRecordReader [io-compute-4] RecordReader initialized will read a total of 83 records.
2022-04-07 18:32:29,231 |-INFO org.apache.parquet.hadoop.InternalParquetRecordReader [io-compute-4] at row 0. reading next block
2022-04-07 18:32:29,231 |-INFO org.apache.parquet.hadoop.InternalParquetRecordReader [io-compute-4] block read in memory in 0 ms. row count = 83

使用 Python 中的 pyArrow 编写的等效应用程序能够检索所有记录。

感谢您对调试此问题的任何帮助。

谢谢。

PS - 作为参考,这是我使用的示例程序: https://mjakubowski84.github.io/parquet4s/docs/partitioning/

I have a simple Scala application that uses parquet4s with fs2 to read a set of partitioned records (spread across directories, generated by a Spark job).

When I run the app, it only returns a fraction of the records from the partitioned directories. There are no errors ... it just stops after a specific number.

The console output has no useful information:

2022-04-07 18:32:29,231 |-INFO org.apache.parquet.hadoop.InternalParquetRecordReader [io-compute-4] RecordReader initialized will read a total of 83 records.
2022-04-07 18:32:29,231 |-INFO org.apache.parquet.hadoop.InternalParquetRecordReader [io-compute-4] at row 0. reading next block
2022-04-07 18:32:29,231 |-INFO org.apache.parquet.hadoop.InternalParquetRecordReader [io-compute-4] block read in memory in 0 ms. row count = 83

An equivalent app written using pyArrow in Python is able to retrieve all records.

Any help in debugging this issue is appreciated.

Thank you.

PS - For reference, this is the sample program I use:
https://mjakubowski84.github.io/parquet4s/docs/partitioning/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

和影子一齐双人舞 2025-01-26 18:24:54

看起来包含分区数据的目录的名称具有不可允许的字符,从而导致读者跳过它们,从而返回较少的记录。

It looks like names of directories containing the partitioned data had characters that are not admissible, causing the reader to skip them, thereby returning fewer records.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文