设为首页 收藏本站
查看: 721|回复: 0

[经验分享] install hadoop-2.5 without HDFS HA /Federation

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2016-12-11 10:20:06 | 显示全部楼层 |阅读模式
  I. installation mode
  same as hadoop 1.x ,there are several mode to install hadoop:
  1.standalone
  just run it on one machine,includes running of mapreduce.
  2.pseudo 
  setup it with hdfs mode,and this case contains two types:
   a.run hdfs only 
  in this case,mapreds also run in local mode ,yes ,you can see the job name called as job_localxxxxxx
  b.run hdfs with yarn
  yes ,this is same as the distributed mode
  3.distributed mode/cluster mode
  compare to item 2,this item only has some more configures and more than one  nodes. 
  II.configures for cluster mode
fileproperty
  value
default val  summary
core-site.xmlhadoop.tmp.dir
  /usr/local/hadoop/data-2.5.1/tmp
/tmp/hadoop-${user.name}
  path to a tmp dir, some sub dirs will be
  filecache,usercache,nmPrivate.so thisdir shoult not set todir 'tmp' for productenvironment;
 fs.defaultFS
  hdfs://host1:9000
file:///
  the name of the default file system.this will determine the installation mode ;the correspondent deprecated one is: fs.default.name;
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.
hdfs-site.xmldfs.nameservices
hadoop-cluster1 Comma-separated list of nameservices.here is single NN only but HA
 dfs.namenode.secondary.http-address
host1:50090
0.0.0.0:50090
The secondary namenode http server address and port.
 dfs.namenode.name.dir
file:///usr/local/hadoop/data-2.5.1/dfs/name
file://${hadoop.tmp.dir}/dfs/name
Determines where on the local filesystem the DFS name node
      should store the name table(fsimage).  If this is a comma-delimited list
      of directories then the name table is replicated in all of the
      directories, for redundancy.
 dfs.datanode.data.dir
file:///usr/local/hadoop/data-2.5.1/dfs/datafile://${hadoop.tmp.dir}/dfs/data
Determines where on the local filesystem an DFS data node
  should store its blocks.  If this is a comma-delimited
  list of directories, then data will be stored in all named
  directories, typically on different devices.
  Directories that do not exist are ignored.
 dfs.replication
13the replication factor to assign data blocks
 dfs.webhdfs.enabled
truetrueEnable WebHDFS (REST API) in Namenodes and Datanodes.
yarn-site.xml yarn.nodemanager.aux-services mapreduce_shuffle the auxiliary service name the valid service name should only contain a-zA-Z0-9_ and can not start with numbers 
  yarn.resourcemanager.address host1:8032 ${yarn.resourcemanager.hostname}:8032 The address of the applications manager interface in the RM
  yarn.resourcemanager.scheduler.address host1:8030 ${yarn.resourcemanager.hostname}:8030 the scheduler address of RM
  yarn.resourcemanager.resource-tracker.addresshost1:8031  ${yarn.resourcemanager.hostname}:8031 
  yarn.resourcemanager.admin.address host1:8033 ${yarn.resourcemanager.hostname}:8033 admin addr
  yarn.resourcemanager.webapp.address host1:50030 ${yarn.resourcemanager.hostname}:8088 the webp ui addr for RM ;here is set to job tracker addr that same as hadoop 1.x 
 mapred-site.xmlmapreduce.framework.name yarn  localThe runtime framework for executing MapReduce jobs.
  Can be one of local, classic or yarn. 
  mapreduce.jobhistory.address host1:10020 0.0.0.0:10020 MapReduce JobHistory Server IPC host:port
  mapreduce.jobhistory.webapp.addresshost1:19888 0.0.0.0:19888 MapReduce JobHistory Server Web UI host:port
     
  III.the results of running MR in yarn
  below are logs from mapreduce run with pseudo mode:
  hadoop@ubuntu:/usr/local/hadoop/hadoop-2.5.1$ hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.1.jar wordcount wc wc-out
  14/11/05 18:19:23 INFO client.RMProxy: Connecting to ResourceManager at namenode/192.168.1.25:8032
  14/11/05 18:19:24 INFO input.FileInputFormat: Total input paths to process : 22
  14/11/05 18:19:24 INFO mapreduce.JobSubmitter: number of splits:22
  14/11/05 18:19:24 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1415182439385_0001
  14/11/05 18:19:25 INFO impl.YarnClientImpl: Submitted application application_1415182439385_0001
  14/11/05 18:19:25 INFO mapreduce.Job: The url to track the job: http://namenode:50030/proxy/application_1415182439385_0001/
  14/11/05 18:19:25 INFO mapreduce.Job: Running job: job_1415182439385_0001
  14/11/05 18:19:32 INFO mapreduce.Job: Job job_1415182439385_0001 running in uber mode : false
  14/11/05 18:19:32 INFO mapreduce.Job:  map 0% reduce 0%
  14/11/05 18:19:44 INFO mapreduce.Job:  map 9% reduce 0%
  14/11/05 18:19:45 INFO mapreduce.Job:  map 27% reduce 0%
  14/11/05 18:19:54 INFO mapreduce.Job:  map 32% reduce 0%
  14/11/05 18:19:55 INFO mapreduce.Job:  map 45% reduce 0%
  14/11/05 18:19:56 INFO mapreduce.Job:  map 50% reduce 0%
  14/11/05 18:20:02 INFO mapreduce.Job:  map 55% reduce 17%
  14/11/05 18:20:03 INFO mapreduce.Job:  map 59% reduce 17%
  14/11/05 18:20:05 INFO mapreduce.Job:  map 68% reduce 20%
  14/11/05 18:20:06 INFO mapreduce.Job:  map 73% reduce 20%
  14/11/05 18:20:08 INFO mapreduce.Job:  map 73% reduce 24%
  14/11/05 18:20:11 INFO mapreduce.Job:  map 77% reduce 24%
  14/11/05 18:20:12 INFO mapreduce.Job:  map 82% reduce 24%
  14/11/05 18:20:13 INFO mapreduce.Job:  map 91% reduce 24%
  14/11/05 18:20:14 INFO mapreduce.Job:  map 95% reduce 30%
  14/11/05 18:20:16 INFO mapreduce.Job:  map 100% reduce 30%
  14/11/05 18:20:17 INFO mapreduce.Job:  map 100% reduce 100%
  14/11/05 18:20:18 INFO mapreduce.Job: Job job_1415182439385_0001 completed successfully
  14/11/05 18:20:18 INFO mapreduce.Job: Counters: 49
  File System Counters
  FILE: Number of bytes read=54637
  FILE: Number of bytes written=2338563
  FILE: Number of read operations=0
  FILE: Number of large read operations=0
  FILE: Number of write operations=0
  HDFS: Number of bytes read=59677
  HDFS: Number of bytes written=28233
  HDFS: Number of read operations=69
  HDFS: Number of large read operations=0
  HDFS: Number of write operations=2
  Job Counters 
  Launched map tasks=22
  Launched reduce tasks=1
  Data-local map tasks=22
  Total time spent by all maps in occupied slots (ms)=185554
  Total time spent by all reduces in occupied slots (ms)=30206
  Total time spent by all map tasks (ms)=185554
  Total time spent by all reduce tasks (ms)=30206
  Total vcore-seconds taken by all map tasks=185554
  Total vcore-seconds taken by all reduce tasks=30206
  Total megabyte-seconds taken by all map tasks=190007296
  Total megabyte-seconds taken by all reduce tasks=30930944
  Map-Reduce Framework
  Map input records=1504
  Map output records=5727
  Map output bytes=77326
  Map output materialized bytes=54763
  Input split bytes=2498
  Combine input records=5727
  Combine output records=2838
  Reduce input groups=1224
  Reduce shuffle bytes=54763
  Reduce input records=2838
  Reduce output records=1224
  Spilled Records=5676
  Shuffled Maps =22
  Failed Shuffles=0
  Merged Map outputs=22
  GC time elapsed (ms)=1707
  CPU time spent (ms)=14500
  Physical memory (bytes) snapshot=5178937344
  Virtual memory (bytes) snapshot=22517506048
  Total committed heap usage (bytes)=3882549248
  Shuffle Errors
  BAD_ID=0
  CONNECTION=0
  IO_ERROR=0
  WRONG_LENGTH=0
  WRONG_MAP=0
  WRONG_REDUCE=0
  File Input Format Counters 
  Bytes Read=57179
  File Output Format Counters 
  Bytes Written=28233
  FAQs
  1.2014-01-22 09:38:20,733 INFO  [AsyncDispatcher event handler] rmapp.RMAppImpl (RMAppImpl.java:transition(788)) - Application application_1390354688375_0001 failed 2 times due to AM Container for appattempt_1390354688375_0001_000002 exited with  exitCode: 127 due to: Exception from container-launch: 
    this maybe occur if you dont setup a JAVA_HOME in yarn-env.sh and hadoop-env.sh,and remember to restart yarn:)
  2.occurs two jobs by running 'grep' example
  it's normal!at first ,i think it's some wrong,but when i run wordcount again,the result shows one job only .so i think it's the nature of this example.
  ref:
  apache install hadoop 2

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-312677-1-1.html 上篇帖子: 分别使用Hadoop MapReduce、hive统计手机流量 下篇帖子: 在对HDFS格式化,执行hadoop namenode -format命令时
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表