1.安装
RHEL/CentOS/Oracle 5 | Navigate to this link and save the file in the /etc/yum.repos.d/ directory. |
RHEL/CentOS/Oracle 6 | Navigate to this link and save the file in the /etc/yum.repos.d/ directory. |
RHEL/CentOS/Oracle 7 | Navigate to this link and save the file in the /etc/yum.repos.d/ directory. 来源: http://www.cloudera.com/documentation/enterprise/latest/topics/cdh_ig_cdh5_install.html |
下载对应系统的的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页面查看
时间: 2024-12-17 15:31:41