【发布时间】:2016-04-07 07:50:04
【问题描述】:
我们定义了很多 impala 表,并假设我们正在使用 Snappy 压缩。 (镶木地板文件)
然而,没有人真正知道我们在现有表上实际使用的压缩类型。
impala 文档似乎没有指定如何从现有表中获取压缩类型。
有没有办法通过 impala 找到使用的压缩类型?
【问题讨论】:
-
同意,在镶木地板上它只会显示“不”
我们定义了很多 impala 表,并假设我们正在使用 Snappy 压缩。 (镶木地板文件)
然而,没有人真正知道我们在现有表上实际使用的压缩类型。
impala 文档似乎没有指定如何从现有表中获取压缩类型。
有没有办法通过 impala 找到使用的压缩类型?
【问题讨论】:
截至目前,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 元命令的输出将显示在行组输出下使用的压缩类型。
【讨论】: