impala - 通过 Impala 的 Parquet 压缩类型

标签 impala parquet

我们定义了相当多的 impala 表,并假设我们使用 Snappy 压缩。 ( Parquet 文件)

然而,没有人真正知道我们在现有表上实际使用的压缩类型。

impala 文档似乎没有指定如何从现有表中获取压缩类型。

有没有办法通过impala找到使用的压缩类型?

最佳答案

到目前为止,Impala 中没有命令可以告诉您存储为 parquet 的表中使用的压缩类型,但有一个解决方法。您可以做的是查看表中的 parquet 文件之一,然后使用 parquet-tools 元命令来查看正在使用的压缩。

-- step1) run hdfs dfs -ls to determine the location and name for a parquet file
hdfs dfs -ls /yourTableLocationPath
-- step2) parquet-tools really only works locally right now so you will need to copy the file to a local directory
hdfs dfs -get /yourTableLocationPath/yourFileName /yourLocalPath
-- step3) run parquet-tools meta command
parquet-tools meta /yourLocalPath/yourFileName

parquet-tools 元命令的输出将显示行组输出下使用的压缩类型。

关于impala - 通过 Impala 的 Parquet 压缩类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36469888/

相关文章:

python-3.x - Py4JJavaError : An error occurred while calling o26. Parquet 。 (阅读 Parquet 文件)

hadoop - 在没有 Sentry 的情况下授权 Hadoop 用户

amazon-web-services - 从 AWS Glue 中的动态框架覆盖 Parquet 文件

Mysql - 需要 IMPALA 查询帮助

hadoop - 如何在 Impala 中获得与 Hives from_unixtime 相同的结果?

parquet - 如何使用 parquet-avro 在 parquet 文件中创建日期类型列

python - 使用 dask 将单个 16M 行 csv 并行转换为 Parquet

apache-spark - EMR 5.28 无法在 s3 上加载 Parquet 文件

mysql - SQL 从表 1 中查找不在表 2 中或在表 2 中的记录(带条件)

bash - 使用 shell 脚本捕获 Impala 中的错误