Windows配置本地Hadoop运行环境
2021-03-29 02:26
标签:span ecs apr name override 命令 ram mission res 很多人喜欢用Windows本地开发Hadoop程序,这里是一个在Windows下配置Hadoop的教程。 首先去官网下载hadoop,这里需要下载一个工具winutils,这个工具是编译hadoop用的,下载完之后解压hadoop文件,然后把winutils.exe放到hadoop文件的bin目录下面 然后在hadoop/etc/hadoop下修改以下文件: core-site.xml: hdfs-site.xml: mapred-site.xml: 然后cmd到hadoop的bin目录下执行: hdfs namenode -format 然后在sbin目录下执行: start-all.cmd 然后浏览器打开http://localhost:8088: 执行hadoop命令:hadoop fs -ls / 空的,新建一个文件夹:hadoop fs -mkdir /data 然后查看:hadoop fs -ls / 这样就hadoop的本地伪分布式环境就配置好了。 Windows配置本地Hadoop运行环境 标签:span ecs apr name override 命令 ram mission res 原文地址:https://www.cnblogs.com/Kaivenblog/p/9311328.htmlxml version="1.0" encoding="UTF-8"?>
xml-stylesheet type="text/xsl" href="http://www.soscw.com/configuration.xsl"?>
configuration>
property>
name>fs.defaultFSname>
value>hdfs://localhost:9000/value>
property>
property>
name>io.native.lib.availablename>
value>falsevalue>
property>
property>
name>hadoop.native.libname>
value>falsevalue>
property>
property>
name>io.compression.codecsname>
value>org.apache.hadoop.io.compress.GzipCodec,
org.apache.hadoop.io.compress.DefaultCodec,
com.hadoop.compression.lzo.LzoCodec,
com.hadoop.compression.lzo.LzopCodec,
org.apache.hadoop.io.compress.BZip2Codec,
org.apache.hadoop.io.compress.SnappyCodec
value>
property>
property>
name>io.compression.codec.lzo.classname>
value>com.hadoop.compression.lzo.LzoCodecvalue>
property>
configuration>
xml version="1.0" encoding="UTF-8"?>
xml-stylesheet type="text/xsl" href="http://www.soscw.com/configuration.xsl"?>
configuration>
property>
name>dfs.replicationname>
value>1value>
property>
property>
name>dfs.namenode.name.dirname>
value>file:///D:/Hadoop/namenodevalue>
property>
property>
name>dfs.datanode.data.dirname>
value>file:///D:/Hadoop/datanodevalue>
property>
configuration>
xml version="1.0"?>
xml-stylesheet type="text/xsl" href="http://www.soscw.com/configuration.xsl"?>
configuration>
property>
name>mapreduce.framework.namename>
value>yarnvalue>
property>
property>
name>mapred.compress.map.outputname>
value>truevalue>
property>
property>
name>mapred.map.output.compression.codecname>
value>com.hadoop.compression.lzo.LzoCodecvalue>
property>
property>
name>mapred.child.envname>
value>LD_LIBRARY_PATH=value>
name>mapreduce.framework.namename>
value>yarnvalue>
property>
property>
name>mapred.compress.map.outputname>
value>truevalue>
property>
property>
name>mapred.map.output.compression.codecname>
value>com.hadoop.compression.lzo.LzoCodecvalue>
property>
property>
name>mapred.child.envname>
value>LD_LIBRARY_PATH=D:\hadoop-2.7.3-win64\libvalue>
property>
configuration>
上一篇:Win10(64位)下安装Tensorflow GPU
下一篇:WPF转换器
文章标题:Windows配置本地Hadoop运行环境
文章链接:http://soscw.com/index.php/essay/69322.html