hadoophivecompressionzliborc

How to check if ZLIB compression is enabled in hive tables?


I see compression attribute set as no in desc.

How I created table:

create table temp (.....) stored as orc tblproperties("orc.compress"="ZLIB")


Solution

  • You can use orcfiledump utility:

    hive --orcfiledump hdfs://table_location 
    

    It will print orc file metadata, statistics, compression information.

    Compression information looks like this:

    Rows: 95
    Compression: SNAPPY
    Compression size: 262144
    

    See manual here: ORC File Dump Utility

    Also hive command describe formatted table_name prints Table Parameters and there is orc.compress parameter.