在没有 Spark 的 Scala 中使用 parquet-mr [英] Using parquet-mr in Scala without Spark

查看:58
本文介绍了在没有 Spark 的 Scala 中使用 parquet-mr的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在不使用 Spark 的情况下在 Scala 中读取 .parquet 文件.

I'm trying to read a .parquet file in Scala without using Spark.

我找到了这篇SO帖子,但到目前为止一直无法找到如何使用 parquet-mr 库 来实际读取文件(包括获取架构).有像 RecordReader.java 和 RecordReaderImplementation.java(它扩展 RecordReader)这样的东西,但我很难理解如何在我的 Scala 代码中使用这些.我对 Scala 和 Parquet 格式非常陌生,但希望在不使用 Spark 的情况下完成此操作.

I found this SO post, but so far have been unable to find how to use the parquet-mr library to actually read from a file (including getting the schema). There are things like RecordReader.java and RecordReaderImplementation.java (which extends RecordReader), but I'm struggling to understand how to use these in my Scala code. I'm very new to Scala and the Parquet format, but would like to accomplish this without using Spark.

我在这里错过了什么?

推荐答案

在没有找到其他东西之后,我最终自己构建了一些东西.万一其他人在未来遇到这个问题:https://github.com/jmd1011/parquet-readers

After not finding anything else, I ended up building something myself. In case anyone else struggles with this in the future: https://github.com/jmd1011/parquet-readers

这篇关于在没有 Spark 的 Scala 中使用 parquet-mr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆