千家信息网

Hadoop环境如何配置及启动

发表于:2025-02-08 作者:千家信息网编辑
千家信息网最后更新 2025年02月08日,这篇文章主要介绍Hadoop环境如何配置及启动,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!core-site.xmlfs.defaultFShdfs://slave2.had
千家信息网最后更新 2025年02月08日Hadoop环境如何配置及启动

这篇文章主要介绍Hadoop环境如何配置及启动,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

core-site.xml

fs.defaultFShdfs://slave2.hadoop:8020truehadoop.tmp.dirfile:/home/hadoop/hadoop-root/tmp fs.checkpoint.period 300 The number of seconds between two periodic checkpoints.   fs.checkpoint.size 67108864 The size of the current edit log (in bytes) that triggers a periodic checkpoint even if the fs.checkpoint.period hasn't expired.     fs.checkpoint.dir ${hadoop.tmp.dir}/dfs/namesecondary Determines where on the local filesystem the DFS secondary namenode should store the temporary images to merge.If this is a comma-delimited list of directories then the image is replicated in all of the directories for redundancy.  

hdfs-site.xml

dfs.namenode.name.dir/home/hadoop/hadoop-root/dfs/nametruedfs.datanode.data.dir/home/hadoop/hadoop-root/dfs/datatruedfs.replication3dfs.permissionsfalse  dfs.namenode.secondary.http-addressslave1:50090 

mapred-site.xml

    mapreduce.framework.name   yarn     mapred.system.dir    /home/hadoop/hadoop-root/mapred/system    true    mapred.local.dir    /home/hadoop/hadoop-root/mapred/local    true    mapreduce.tasktracker.map.tasks.maximum    2    mapreduce.tasktracker.reduce.tasks.maximum    1    mapreduce.job.maps    2    mapreduce.job.reduces    1mapreduce.tasktracker.http.threads50io.sort.factor20mapred.child.java.opts-Xmx400mmapreduce.task.io.sort.mb200mapreduce.map.sort.spill.percent0.8mapreduce.map.output.compresstruemapreduce.map.output.compress.codecorg.apache.hadoop.io.compress.DefaultCodecmapreduce.reduce.shuffle.parallelcopies10

一、恢复hadoop
1、停止所有服务
2、删除/home/hadoop/hadoop-root/dfs下的data和name,并且重新建立
3、删除/home/hadoop/hadoop-root/tmp下的文件
4、在namenode节点执行 hadoop namenode -format
5、启动hadoop服务

-----自此hadoop恢复----
6、停止hbase服务,停不掉就杀掉
7、(多个节点)进入/tmp/hbase-root/zookeeper 删除所有文件
8、启动hbase服务

以上是"Hadoop环境如何配置及启动"这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注行业资讯频道!

0