1

hadoop支持LZO压缩配置

[atguigu@hadoop102 common]$ xsync hadoop-lzo-0.4.20.jar

 

先下载

https://github.com/twitter/hadoop-lzo/archive/master.zip

2)下载后的文件名是hadoop-lzo-master,它是一个zip格式的压缩包,先进行解压,然后用maven编译。生成hadoop-lzo-0.4.20.jar

 

3)将编译好后的hadoop-lzo-0.4.20.jar 放入  

[atguigu@hadoop102 common]$ pwd
/opt/module/hadoop-2.7.2/share/hadoop/common
[atguigu@hadoop102 common]$ ls
hadoop-lzo-0.4.20.jar

4)同步hadoop-lzo-0.4.20.jarhadoop103hadoop104

 

 5core-site.xml增加配置支持LZO压缩

 

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>

<property>
<name>io.compression.codecs</name>
<value>
org.apache.hadoop.io.compress.GzipCodec,
org.apache.hadoop.io.compress.DefaultCodec,
org.apache.hadoop.io.compress.BZip2Codec,
org.apache.hadoop.io.compress.SnappyCodec,
com.hadoop.compression.lzo.LzoCodec,
com.hadoop.compression.lzo.LzopCodec
</value>
</property>

<property>
    <name>io.compression.codec.lzo.class</name>
    <value>com.hadoop.compression.lzo.LzoCodec</value>
</property>
</configuration>

5)同步core-site.xmlhadoop103hadoop104

[atguigu@hadoop102 hadoop]$ xsync core-site.xml

 

6)启动及查看集群

[atguigu@hadoop102 hadoop-2.7.2]$ sbin/start-dfs.sh
[atguigu@hadoop103 hadoop-2.7.2]$ sbin/start-yarn.sh

 

 

1web和进程查看

2)当启动发生错误的时候:

  • 看日志:/home/atguigu/module/hadoop-2.7.2/logs
  • 如果进入安全模式,可以通过hdfs dfsadmin -safemode leave
  • 停止所有进程,删除datalog文件然后hdfs namenode -format 来格式化

 

posted @ 2020-05-27 10:48  萌哥-爱学习  阅读(654)  评论(0编辑  收藏  举报