CDH5.5.1版HBase安装使用LZO压缩

1.安装

    
RHEL/CentOS/Oracle 5Navigate to this link and save the file in the /etc/yum.repos.d/ directory.
RHEL/CentOS/Oracle 6Navigate to this link and save the file in the /etc/yum.repos.d/ directory.
RHEL/CentOS/Oracle 7Navigate to this link and save the file in the /etc/yum.repos.d/ directory.
    下载对应系统的的repo文件

yum install -y hadoop-lzo

2.配置

    修改 hdfs-site.xml
    添加一下配置
    <property>
  <name>io.compression.codecs</name>
  <value>org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.GzipCodec,
org.apache.hadoop.io.compress.BZip2Codec,com.hadoop.compression.lzo.LzoCodec,
com.hadoop.compression.lzo.LzopCodec,org.apache.hadoop.io.compress.SnappyCodec</value>
   </property>

3.重启

    重启HDFS集群
        for s in `chkconfig | grep -E "namenode|datanode" | awk  '{print $1}'`;do service $s restart; done
    重启HBase集群
        for s in `chkconfig | grep hbase | awk  '{print $1}'`;do service $s restart; done

4.测试

    #进入hbase shell
    create 'tysci:t1',{NAME => 'f1',COMPRESSION => 'LZO'}

    #Web页面查看
    





原文地址:https://www.cnblogs.com/luguoyuanf/p/1230720a55493e42a349a7495547d6b3.html