我需要对一系列表格进行基准测试,有些是压缩的,有些不是。我通过设置压缩:
hive> SET hive.exec.compress.output=true;
hive> SET mapred.output.compression.codec=org.apache.hadoop.io.compress.SnappyCodec;
...并使用 INSERT OVERWRITE 填充表。有没有办法通过命令行(类似于 DESCRIBE EXTENDED)确认为特定表启用了输出压缩?
最佳答案
当您执行 describe formatted orc_with_compress_setting_table
时,会看到如下内容:
压缩:没有
并且感觉不舒服。
这里是答案:
The Compressed field is not a reliable indicator of whether the table contains compressed data. It typically always shows No, because the compression settings only apply during the session that loads data and are not stored persistently with the table metadata.
来自:https://www.cloudera.com/documentation/enterprise/5-5-x/topics/impala_describe.html
关于hadoop - 确认为特定 Hive 表启用了压缩,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21294629/