【问题标题】:Parquet compression type via Impala通过 Impala 的 Parquet 压缩类型
【发布时间】:2016-04-07 07:50:04
【问题描述】:

我们定义了很多 impala 表,并假设我们正在使用 Snappy 压缩。 (镶木地板文件)

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

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

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

【问题讨论】:

标签: impala parquet


【解决方案1】:

截至目前,Impala 中没有命令可以告诉您存储为镶木地板的表中使用的压缩类型,但有一种变通方法。您可以做的是查看表中的 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 元命令的输出将显示在行组输出下使用的压缩类型。

【讨论】:

    猜你喜欢
    • 2018-12-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-24
    • 1970-01-01
    相关资源
    最近更新 更多