`

hadoop pseudo-cluster install

阅读更多

vvvvvvvvvvvv config vvvvvvvvvvvvvvv

安装jdk:
sudo -s ./jdk.bin

set environments:
/etc/profile     #global
~/.profile       #personalize

#optional
sudo addgroup hadoopgrp
sudo adduser --ingroup hadoopgrp hadoop    #psw:hadoop

#switch,and let the hadoop user machine have a confidence to the requester(localhost)

#THIS STEP IS TO LET THE MASTER TO SSH TO SLAVE WITHOUT PASSWORD,SO IT IS NEEDNESS TO COPY IT'S RSA INFO TO SLAVES ;DO IT OPPOSITELY IF SLAVE ssh TO MASTER ALSO.


su - hadoop
ssh-keygen -t rsa -P ""
cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys

#optional:add use privilege for modify files in /usr/local/hadoop-*.*/*.*
sudo chown -R hadoop:hadoopgrp hadoop-0.20.2

## test connect by no password
ssh localhost #if show can not open port 22,this maybe no installed sshd,use this to install:sudo apt-get install openssh-server

#modify config files
#core-site.xml
<property>
  <name>hadoop.tmp.dir</name>
  <value>/your/path/to/hadoop/tmp/dir/hadoop-${user.name}</value>
  <description>A base for other temporary directories.</description>
</property>

<property>
  <name>fs.default.name</name>
  <value>hdfs://localhost:54310</value>
  <description>The name of the default file system.  A URI whose
  scheme and authority determine the FileSystem implementation.  The
  uri's scheme determines the config property (fs.SCHEME.impl) naming
  the FileSystem implementation class.  The uri's authority is used to
  determine the host, port, etc. for a filesystem.</description>
</property>

#mapred-site.xml
<property>
  <name>mapred.job.tracker</name>
  <value>localhost:54311</value>
  <description>The host and port that the MapReduce job tracker runs
  at.  If "local", then jobs are run in-process as a single map
  and reduce task.
  </description>
</property>

#hdfs-site.xml
<property>
  <name>dfs.replication</name>
  <value>1</value>
  <description>Default block replication.
  The actual number of replications can be specified when the file is created.
  The default is used if replication is not specified in create time.
  </description>
</property>

hadoop namenode -format

bin/start-all.sh
#test run info
jps
sudo netstat -plten | grep java

#demo run command:
hadoop jar hadoop-0.20.2-examples.jar wordcount  input/data-file output/wc

bin/stop-all.sh

^^^^^^^^^ config ^^^^^^^^^^^^

 

output:

input:3 files(use 32s)
hadoop@leibnitz-laptop:~/hadoop/hadoop-0.20.2$ hadoop jar hadoop-0.20.2-examples.jar wordcount  input output/wordcount
11/02/24 23:45:58 INFO input.FileInputFormat: Total input paths to process : 3
11/02/24 23:45:58 INFO mapred.JobClient: Running job: job_201102242334_0001
11/02/24 23:45:59 INFO mapred.JobClient:  map 0% reduce 0%
11/02/24 23:46:13 INFO mapred.JobClient:  map 66% reduce 0%
11/02/24 23:46:19 INFO mapred.JobClient:  map 100% reduce 0%
11/02/24 23:46:22 INFO mapred.JobClient:  map 100% reduce 33%
11/02/24 23:46:28 INFO mapred.JobClient:  map 100% reduce 100%
11/02/24 23:46:30 INFO mapred.JobClient: Job complete: job_201102242334_0001
11/02/24 23:46:30 INFO mapred.JobClient: Counters: 17
11/02/24 23:46:30 INFO mapred.JobClient:   Job Counters
11/02/24 23:46:30 INFO mapred.JobClient:     Launched reduce tasks=1
11/02/24 23:46:30 INFO mapred.JobClient:     Launched map tasks=3
11/02/24 23:46:30 INFO mapred.JobClient:     Data-local map tasks=3
11/02/24 23:46:30 INFO mapred.JobClient:   FileSystemCounters
11/02/24 23:46:30 INFO mapred.JobClient:     FILE_BYTES_READ=2214725
11/02/24 23:46:30 INFO mapred.JobClient:     HDFS_BYTES_READ=3671479
11/02/24 23:46:30 INFO mapred.JobClient:     FILE_BYTES_WRITTEN=3689100
11/02/24 23:46:30 INFO mapred.JobClient:     HDFS_BYTES_WRITTEN=880802
11/02/24 23:46:30 INFO mapred.JobClient:   Map-Reduce Framework
11/02/24 23:46:30 INFO mapred.JobClient:     Reduce input groups=82331
11/02/24 23:46:30 INFO mapred.JobClient:     Combine output records=102317
11/02/24 23:46:30 INFO mapred.JobClient:     Map input records=77931
11/02/24 23:46:30 INFO mapred.JobClient:     Reduce shuffle bytes=1474279
11/02/24 23:46:30 INFO mapred.JobClient:     Reduce output records=82331
11/02/24 23:46:30 INFO mapred.JobClient:     Spilled Records=255947
11/02/24 23:46:30 INFO mapred.JobClient:     Map output bytes=6076039
11/02/24 23:46:30 INFO mapred.JobClient:     Combine input records=629167
11/02/24 23:46:30 INFO mapred.JobClient:     Map output records=629167
11/02/24 23:46:30 INFO mapred.JobClient:     Reduce input records=102317

分享到:
评论

相关推荐

    Hadoop-Cluster-Install-.zip_hadoop_hadoop cluster

    Hadoop在centOS系统下的安装文档,系统是虚拟机上做出来的,一个namenode,两个datanode,详细讲解了安装过程。

    hadoop最新版本3.1.1全量jar包

    hadoop-annotations-3.1.1.jar hadoop-common-3.1.1.jar hadoop-mapreduce-client-core-3.1.1.jar hadoop-yarn-api-3.1.1.jar hadoop-auth-3.1.1.jar hadoop-hdfs-3.1.1.jar hadoop-mapreduce-client-hs-3.1.1.jar ...

    hadoop-eclipse-plugin1.2.1 and hadoop-eclipse-plugin2.8.0

    为了方便开发者在Eclipse或MyEclipse这样的集成开发环境中高效地进行Hadoop应用开发,Hadoop-Eclipse-Plugin应运而生。这个插件允许开发者直接在IDE中对Hadoop集群进行操作,如创建、编辑和运行MapReduce任务,极大...

    hbase-hadoop2-compat-1.2.12-API文档-中文版.zip

    赠送jar包:hbase-hadoop2-compat-1.2.12.jar; 赠送原API文档:hbase-hadoop2-compat-1.2.12-javadoc.jar; 赠送源代码:hbase-hadoop2-compat-1.2.12-sources.jar; 赠送Maven依赖信息文件:hbase-hadoop2-compat-...

    Hadoop pseudo-distributed environment (1).mp4

    Hadoop分布式环境搭建教程一

    hadoop插件apache-hadoop-3.1.0-winutils-master.zip

    标题中的"apache-hadoop-3.1.0-winutils-master.zip"是一个针对Windows用户的Hadoop工具包,它包含了运行Hadoop所需的特定于Windows的工具和配置。`winutils.exe`是这个工具包的关键组件,它是Hadoop在Windows上的一...

    hadoop-yarn-client-2.6.5-API文档-中文版.zip

    赠送jar包:hadoop-yarn-client-2.6.5.jar; 赠送原API文档:hadoop-yarn-client-2.6.5-javadoc.jar; 赠送源代码:hadoop-yarn-client-2.6.5-sources.jar; 赠送Maven依赖信息文件:hadoop-yarn-client-2.6.5.pom;...

    hadoop-eclipse-plugin-2.10.0.jar

    必须注意对于不同的hadoop版本,` HADDOP_INSTALL_PATH/share/hadoop/common/lib`下的jar包版本都不同,需要一个个调整 - `hadoop2x-eclipse-plugin-master/ivy/library.properties` - `hadoop2x-eclipse-plugin-...

    hadoop-eclipse-plugin-3.1.1.tar.gz

    Hadoop-Eclipse-Plugin-3.1.1是一款专为Eclipse集成开发环境设计的插件,用于方便地在Hadoop分布式文件系统(HDFS)上进行开发和调试MapReduce程序。这款插件是Hadoop生态系统的组成部分,它使得Java开发者能够更加...

    hadoop2.6-common-bin.zip

    标题 "hadoop2.6-common-bin.zip" 指示这是一个包含Hadoop 2.6版本通用二进制文件的压缩包。这个压缩包主要针对Windows用户,旨在解决在该操作系统上运行Hadoop时可能遇到的"Could not locate executable"错误。这个...

    hadoop-mapreduce-client-jobclient-2.6.5-API文档-中文版.zip

    赠送jar包:hadoop-mapreduce-client-jobclient-2.6.5.jar; 赠送原API文档:hadoop-mapreduce-client-jobclient-2.6.5-javadoc.jar; 赠送源代码:hadoop-mapreduce-client-jobclient-2.6.5-sources.jar; 赠送...

    hadoop-auth-2.5.1-API文档-中文版.zip

    赠送jar包:hadoop-auth-2.5.1.jar; 赠送原API文档:hadoop-auth-2.5.1-javadoc.jar; 赠送源代码:hadoop-auth-2.5.1-sources.jar; 赠送Maven依赖信息文件:hadoop-auth-2.5.1.pom; 包含翻译后的API文档:hadoop...

    hadoop3.3.0-winutils所有bin文件

    Hadoop是Apache软件基金会开发的一个开源分布式计算框架,它允许在大规模集群上处理海量数据。Hadoop 3.3.0是该框架的一个版本,它带来了许多改进和新特性,旨在提升性能、稳定性和可扩展性。WinUtils是Hadoop在...

    hadoop-eclipse-plugin-2.7.3和2.7.7

    hadoop-eclipse-plugin-2.7.3和2.7.7的jar包 hadoop-eclipse-plugin-2.7.3和2.7.7的jar包 hadoop-eclipse-plugin-2.7.3和2.7.7的jar包 hadoop-eclipse-plugin-2.7.3和2.7.7的jar包

    hadoop-eclipse-plugin三个版本的插件都在这里了。

    hadoop-eclipse-plugin-2.7.4.jar和hadoop-eclipse-plugin-2.7.3.jar还有hadoop-eclipse-plugin-2.6.0.jar的插件都在这打包了,都可以用。

    hbase-hadoop2-compat-1.1.3-API文档-中文版.zip

    赠送jar包:hbase-hadoop2-compat-1.1.3.jar; 赠送原API文档:hbase-hadoop2-compat-1.1.3-javadoc.jar; 赠送源代码:hbase-hadoop2-compat-1.1.3-sources.jar; 赠送Maven依赖信息文件:hbase-hadoop2-compat-...

    apache-hadoop-3.1.3-winutils-master.zip

    在这个"apache-hadoop-3.1.3-winutils-master.zip"压缩包中,包含了在Windows环境下配置Hadoop HDFS客户端所需的组件,特别是`hadoop-winutils`和`hadoop.dll`这两个关键文件,它们对于在Windows系统上运行Hadoop...

    hadoop-common-2.6.0-bin-master.zip

    `hadoop-common-2.6.0-bin-master.zip` 是一个针对Hadoop 2.6.0版本的压缩包,特别适用于在Windows环境下进行本地开发和测试。这个版本的Hadoop包含了对Windows系统的优化,比如提供了`winutils.exe`,这是在Windows...

    flink-shaded-hadoop-3-uber-3.1.1.7.1.1.0-565-9.0.jar.tar.gz

    在这个特定的兼容包中,我们可以看到两个文件:flink-shaded-hadoop-3-uber-3.1.1.7.1.1.0-565-9.0.jar(实际的兼容库)和._flink-shaded-hadoop-3-uber-3.1.1.7.1.1.0-565-9.0.jar(可能是Mac OS的元数据文件,通常...

    hadoop-lzo-master

    1.安装 Hadoop-gpl-compression 1.1 wget http://hadoop-gpl-compression.apache-extras.org.codespot.com/files/hadoop-gpl-compression-0.1.0-rc0.tar.gz 1.2 mv hadoop-gpl-compression-0.1.0/lib/native/Linux-...

Global site tag (gtag.js) - Google Analytics