• 159-170-Hadoop-调优-hdfs-yran-综合


    159-Hadoop-调优-hdfs故障排查:

    HDFS**—故障排除**(此处了解,一般使用HA)

    NameNode 故障处理

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ArobkKAK-1669214102298)(png/1625032232051.png)]

    1)需求:

    NameNode 进程挂了并且存储的数据也丢失了,如何恢复 NameNode

    2)故障模拟

    (1)kill -9 NameNode 进程

    [root@hadoop102 hadoop-3.1.4]#kill -9 19886

    (2)删除 NameNode 存储的数据(/opt/module/hadoop-3.1.4/data/tmp/dfs/name)

    [root@hadoop102 hadoop-3.1.4]# rm -rf /opt/module/hadoop-3.1.4/data/dfs/name/*

    3)问题解决

    (1)拷贝 SecondaryNameNode 中数据到原 NameNode 存储数据目录

    [root@hadoop102 hadoop-3.1.4]# scp -r root@hadoop104:/opt/module/hadoop-3.1.4/data/dfs/namesecondary/* ./name/

    (2)重新启动 NameNode

    [root@hadoop102 hadoop-3.1.4]#hdfs --daemon start namenode

    (3)向集群上传一个文件测试ok

    集群安全模式&磁盘修复

    1)安全模式:文件系统只接受读数据请求,而不接受删除、修改等变更请求

    2)进入安全模式场景

    ➢ NameNode 在加载镜像文件和编辑日志期间处于安全模式;

    ➢ NameNode 再接收 DataNode 注册时,处于安全模式 (启动时注册,间隔6h时候注册汇报)

    3)退出安全模式条件

    dfs.namenode.safemode.min.datanodes:最小可用 datanode 数量,默认 0

    dfs.namenode.safemode.threshold-pct:副本数达到最小要求的 block 占系统总 block 数的

    百分比,默认 0.999f。(只允许丢一个块)

    dfs.namenode.safemode.extension:稳定时间,默认值 30000 毫秒,即 30 秒

    4)基本语法

    集群处于安全模式,不能执行重要操作(写操作)。集群启动完成后,自动退出安全模 式

    (1)bin/hdfs dfsadmin -safemode get (功能描述:查看安全模式状态) 
    (2)bin/hdfs dfsadmin -safemode enter (功能描述:进入安全模式状态) 
    (3)bin/hdfs dfsadmin -safemode leave(功能描述:离开安全模式状态) 
    (4)bin/hdfs dfsadmin -safemode wait (功能描述:等待安全模式状态)
    
    • 1
    • 2
    • 3
    • 4

    5)测试1:启动集群进入安全模式

    (1)重新启动集群

    [root@hadoop102 hadoop-3.1.4]# myhadoop.sh stop

    [root@hadoop102 hadoop-3.1.4]# myhadoop.sh start

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-4QQL9jgG-1669214102299)(png/1625151676906.png)]

    6)测试2:磁盘修复

    需求:数据块损坏,进入安全模式,如何处理

    ( 1 ) 分 别 进 入 hadoop102 、 hadoop103 、 hadoop104 的 /opt/module/hadoop-

    3.1.4/data/dfs/data/current/BP-1015489500-192.168.10.104-

    1611909480872/current/finalized/subdir0/subdir0 目录,统一删除某 2 个块信息

    (2)重新启动集群

    (3)观察 http://hadoop102:9870/dfshealth.html#tab-overview

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Zz9AzdJA-1669214102299)(png/1625151739648.png)]

    说明:安全模式已经打开,块的数量没有达到要求

    (4)离开安全模式

    [root@hadoop102 hadoop-3.1.4]# hdfs dfsadmin -safemode get

    [root@hadoop102 hadoop-3.1.4]# hdfs dfsadmin -safemode leave

    (5)观察

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-vsYG0LpG-1669214102300)(png/1625151772817.png)]

    (6)将元数据删除(上图提示的路径下),观察或者重启则正常

    7)案例 3

    需求:模拟等待安全模式

    1)查看当前模式

    [root@hadoop102 hadoop-3.1.4]#hdfs dfsadmin -safemode get

    Safe mode is OFF

    2)先进入安全模式

    [root@hadoop102 hadoop-3.1.4]# bin/hdfs dfsadmin -safemode

    3)创建并执行下面的脚本

    在/opt/module/hadoop-3.1.4 路径上,编辑一个脚本 safemode.sh

    [root@hadoop102 hadoop-3.1.4]# vim safemode.sh

    #!/bin/bash

    hdfs dfsadmin -safemode wait

    hdfs dfs -put /opt/module/hadoop-3.1.4/README.txt /

    [root@hadoop102 hadoop-3.1.4]#chmod 777 safemode.sh

    [root@hadoop102 hadoop-3.1.4]#./safemode.sh

    4)再打开一个窗口,执行

    [root@hadoop102 hadoop-3.1.4]#bin/hdfs dfsadmin -safemode leave

    5)再观察上一个窗口

    Safe mode is OFF

    6)HDFS集群上已经有上传的数据了,已经执行脚本

    慢磁盘监控 (了解如何定位满磁盘,了解测试磁盘性能)

    “慢磁盘”指的时写入数据非常慢的一类磁盘。其实慢性磁盘并不少见,当机器运行时 间长了,上面跑的任务多了,磁盘的读写性能自然会退化,严重时就会出现写入数据延时的问题。

    如何发现慢磁盘?

    正常在 HDFS 上创建一个目录,只需要不到 1s 的时间。如果你发现创建目录超过 1 分 钟及以上,而且这个现象并不是每次都有。只是偶尔慢了一下,就很有可能存在慢磁盘。 可以采用如下方法找出是哪块磁盘慢:

    1)通过心跳未联系时间。(页面心跳)

    一般出现慢磁盘现象,会影响到 DataNode 与 NameNode 之间的心跳。正常情况心跳时

    间间隔是 3s。超过 3s 说明有异常。

    2)fio 命令,测试磁盘的读写性能

    (1)顺序读测试

    [root@hadoop102 ~]# yum install -y fio

    [root@hadoop102 ~]# sudo fio -filename=/opt/software/hadoop-3.1.4.tar.gz -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=16k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=test_r

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-PpNuH59i-1669214102300)(png/1625152039105.png)]

    (2)顺序写测试

    [root@hadoop102 ~]#sudo fio -filename=/home/atguigu/test.log -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=16k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=test_w

    (3)随机写测试

    [root@hadoop102 ~]#sudo fio -filename=/home/atguigu/test.log -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=16k -size=2G -numjobs=10 -runtime=60 -group_reporting -name=test_randw

    (4)混合随机读写:

    [root@hadoop102 ~]# sudo fio -filename=/home/atguigu/test.log -direct=1 -iodepth 1 -thread - rw=randrw -rwmixread=70 -ioengine=psync -bs=16k -size=2G - numjobs=10 -runtime=60 -group_reporting -name=test_r_w -ioscheduler=noop

    小文件归档

    1)HDFS 存储小文件弊端

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-84fwIlB9-1669214102301)(png/1625732249239.png)]

    每个文件均按块存储,每个块的元数据存储在 NameNode 的内存中,因此 HDFS 存储 小文件会非常低效。因为大量的小文件会耗尽 NameNode 中的大部分内存。但注意,存储小 文件所需要的磁盘容量和数据块的大小无关。例如,一个 1MB 的文件设置为 128MB 的块 存储,实际使用的是 1MB 的磁盘空间,而不是 128MB。

    2)解决存储小文件办法之一

    HDFS 存档文件或 HAR 文件,是一个更高效的文件存档工具,它将文件存入 HDFS 块, 在减少 NameNode 内存使用的同时,允许对文件进行透明的访问。具体说来,HDFS 存档文 件对内还是一个一个独立文件,对 NameNode 而言却是一个整体,减少了 NameNode 的内存。

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-12AM6xa2-1669214102301)(png/1625732384206.png)]

    3)案例

    (1)需要启动 YARN 进程

    [root@hadoop102 hadoop-3.1.3]$ start-yarn.sh

    (2)归档文件

    把/input 目录里面的所有文件归档成一个叫 input.har 的归档文件,并把归档后文件存储

    到/output 路径下。

    [root@hadoop102 hadoop-3.1.3]$ hadoop archive -archiveName

    input.har -p /input /output

    (3)查看归档

    [root@hadoop102 hadoop-3.1.3]$ hadoop fs -ls

    /output/input.har

    [root@hadoop102 hadoop-3.1.3]$ hadoop fs -ls

    har:///output/input.har

    (4)解归档文件

    [root@hadoop102 hadoop-3.1.3]$ hadoop fs -cp

    har:///output/input.har/* /

    MapReduce 生产(了解)

    MapReduce** 跑的慢的原因

    MapReduce 程序效率的瓶颈在于两点:

    1)计算机性能

    CPU、内存、磁盘、网络

    2I/O 操作优化

    (1)数据倾斜

    (2)Map 运行时间太长,导致 Reduce 等待过久

    (3)小文件过多

    图片截取自哔哩哔哩尚硅谷教学视频

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-s38l616k-1669214102302)(png/1625732506943.png)]

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-f9SRrexF-1669214102302)(png/1625732540902.png)]

    Hadoop 综合调优

    Hadoop 小文件弊端

    HDFS 上每个文件都要在 NameNode 上创建对应的元数据,这个元数据的大小约为 150byte,这样当小文件比较多的时候,就会产生很多的元数据文件,一方面会大量占用 NameNode 的内存空间,另一方面就是元数据文件过多,使得寻址索引速度变慢。 小文件过多,在进行 MR 计算时,会生成过多切片,需要启动过多的 MapTask。每个 MapTask 处理的数据量小,导致 MapTask 的处理时间比启动时间还小,白白消耗资源。

    Hadoop 小文件解决方案

    1)在数据采集的时候,就将小文件或小批数据合成大文件再上传** HDFS**(数据源头)**

    2Hadoop Archive(存储方向)

    是一个高效的将小文件放入 HDFS 块中的文件存档工具,能够将多个小文件打包成一 个 HAR 文件,从而达到减少 NameNode 的内存使用

    3)CombineTextInputFormat(计算方向)

    CombineTextInputFormat 用于将多个小文件在切片过程中生成一个单独的切片或者少

    量的切片。

    4)开启 uber 模式,实现 JVM 重用(计算方向)

    默认情况下,每个 Task 任务都需要启动一个 JVM 来运行,如果 Task 任务计算的数据 量很小,我们可以让同一个 Job 的多个 Task 运行在一个 JVM 中,不必为每个 Task 都开启一个 JVM。

    (1)未开启 uber 模式,在/input 路径上上传多个小文件并执行 wordcount 程序

    [root@hadoop102 hadoop-3.1.4]$ hadoop jar

    share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar

    wordcount /input /output2

    (2)观察控制台

    2021-02-14 16:13:50,607 INFO mapreduce.Job: Job job_1613281510851_0002

    running in uber mode : false

    (3)观察 http://hadoop103:8088/cluster

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-BD57W8I0-1669214102303)(png/1625732682903.png)]

    (4)开启 uber 模式,在 mapred-site.xml 中添加如下配置

    
    
    	mapreduce.job.ubertask.enable
    	true
    
     
    
    	mapreduce.job.ubertask.maxmaps
    	9
    
    
    
    	mapreduce.job.ubertask.maxreduces
    	1
    
    
    
    	mapreduce.job.ubertask.maxbytes
    	
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20

    (5)分发配置

    [root@hadoop102 hadoop]$ xsync mapred-site.xml

    (6)再次执行 wordcount 程序

    [root@hadoop102 hadoop-3.1.3]$ hadoop jar

    share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar

    wordcount /input /output2

    (7)观察控制台

    2021-02-14 16:28:36,198 INFO mapreduce.Job: Job

    job_1613281510851_0003 running in uber mode : true

    (8)观察 http://hadoop103:8088/cluster

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-wz69Aokw-1669214102303)(png/1625732760722.png)]

    测试 MapReduce 计算性能 (了解,为实践)案例尚硅谷

    使用 Sort 程序评测 MapReduce

    注:一个虚拟机不超过 150G 磁盘尽量不要执行这段代码

    (1)使用 RandomWriter 来产生随机数,每个节点运行 10 个 Map 任务,每个 Map 产

    生大约 1G 大小的二进制随机数

    [root@hadoop102 mapreduce]$ hadoop jar /opt/module/hadoop-

    3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-examples-

    3.1.3.jar randomwriter random-data

    (2)执行 Sort 程序

    [root@hadoop102 mapreduce]$ hadoop jar /opt/module/hadoop-

    3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-examples-

    3.1.3.jar sort random-data sorted-data

    (3)验证数据是否真正排好序了

    [root@hadoop102 mapreduce]$ hadoop jar /opt/module/hadoop-

    3.1.3/share/hadoop/mapreduce/hadoop-mapreduce-client

    jobclient-3.1.3-tests.jar testmapredsort -sortInput random-data

    -sortOutput sorted-data

    尚硅谷案例调优

    需求

    (1)需求:从 1G 数据中,统计每个单词出现次数。服务器 3 台,每台配置 4G 内存,

    4 核 CPU,4 线程。

    (2)需求分析:

    1G / 128m = 8 个 MapTask;1 个 ReduceTask;1 个 mrAppMaster

    平均每个节点运行 10 个 / 3 台 ≈ 3 个任务(4 3 3)

    HDFS 参数调优

    (1)修改:hadoop-env.sh

    export HDFS_NAMENODE_OPTS="-Dhadoop.security.logger=INFO,RFAS -
    Xmx1024m"
    export HDFS_DATANODE_OPTS="-Dhadoop.security.logger=ERROR,RFAS
    -Xmx1024m"
    
    • 1
    • 2
    • 3
    • 4

    (2)修改 hdfs-site.xml

    
    
     dfs.namenode.handler.count
     21
    
    
    • 1
    • 2
    • 3
    • 4
    • 5

    (3)修改 core-site.xml

    
    
     fs.trash.interval
     60
    
    
    • 1
    • 2
    • 3
    • 4
    • 5

    (4)分发配置

    xsync hadoop-env.sh hdfs-site.xml core-site.xml

    MapReduce 参数调优

    (1)修改 mapred-site.xml

    
    
     mapreduce.task.io.sort.mb
     100
    
    
    
     mapreduce.map.sort.spill.percent
     0.80
    
    
    
     mapreduce.task.io.sort.factor
     10
    
    
    
     mapreduce.map.memory.mb
     -1
     The amount of memory to request from the 
    scheduler for each map task. If this is not specified or is 
    non-positive, it is inferred from mapreduce.map.java.opts and 
    mapreduce.job.heap.memory-mb.ratio. If java-opts are also not 
    specified, we set it to 1024.
     
    
    
    
     mapreduce.map.cpu.vcores
     1
    
    
    
     mapreduce.map.maxattempts
     4
    
    
    
     mapreduce.reduce.shuffle.parallelcopies
     5
    
    
    
     mapreduce.reduce.shuffle.input.buffer.percent
     0.70
    
    
    
     mapreduce.reduce.shuffle.merge.percent
     0.66
    
    
    
     mapreduce.reduce.memory.mb
     -1
     The amount of memory to request from the 
    scheduler for each reduce task. If this is not specified or 
    is non-positive, it is inferred
     from mapreduce.reduce.java.opts and 
    mapreduce.job.heap.memory-mb.ratio.
     If java-opts are also not specified, we set it to 1024.
     
    
    
    
     	mapreduce.reduce.cpu.vcores
     	2
    
    
    
     	mapreduce.reduce.maxattempts
     	4
    
    
    
     	mapreduce.job.reduce.slowstart.completedmaps
     	0.05
    
    
    
     	mapreduce.task.timeout
     	600000
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85

    分发配置 xsync mapred-site.xml

    Yarn 参数调优

    (1)修改 yarn-site.xml 配置参数如下:

    
    
    The class to use as the resource scheduler.
    yarn.resourcemanager.scheduler.class
    org.apache.hadoop.yarn.server.resourcemanager.scheduler.capaci
    ty.CapacityScheduler
    
    
    
    Number of threads to handle scheduler 
    interface.
    yarn.resourcemanager.scheduler.client.thread-count
    8
    
    
    
    Enable auto-detection of node capabilities such as
    memory and CPU.
    
    yarn.nodemanager.resource.detect-hardware-capabilities
    false
    
    
    
    Flag to determine if logical processors(such as
    hyperthreads) should be counted as cores. Only applicable on Linux
    when yarn.nodemanager.resource.cpu-vcores is set to -1 and
    yarn.nodemanager.resource.detect-hardware-capabilities is true.
    
    yarn.nodemanager.resource.count-logical-processors-ascores
    false
    
    
    
    Multiplier to determine how to convert phyiscal cores to
    vcores. This value is used if yarn.nodemanager.resource.cpu-vcores
    is set to -1(which implies auto-calculate vcores) and
    yarn.nodemanager.resource.detect-hardware-capabilities is set to true. 
    The number of vcores will be calculated as number of CPUs * multiplier.
    
    yarn.nodemanager.resource.pcores-vcores-multiplier
    1.0
    
    
    
    Amount of physical memory, in MB, that can be allocated 
    for containers. If set to -1 and
    yarn.nodemanager.resource.detect-hardware-capabilities is true, it is
    automatically calculated(in case of Windows and Linux).
     尚硅谷大数据技术之 Hadoop(生产调优手册) 
    ———————————————————————————————————————
    更多 Java –大数据 –前端 –python 人工智能资料下载,可百度访问:尚硅谷官网
    In other cases, the default is 8192MB.
    
    yarn.nodemanager.resource.memory-mb
    4096
    
    
    
    Number of vcores that can be allocated
    for containers. This is used by the RM scheduler when allocating
    resources for containers. This is not used to limit the number of
    CPUs used by YARN containers. If it is set to -1 and
    yarn.nodemanager.resource.detect-hardware-capabilities is true, it is
    automatically determined from the hardware in case of Windows and Linux.
    In other cases, number of vcores is 8 by default.
    yarn.nodemanager.resource.cpu-vcores
    4
    
    
    
    The minimum allocation for every container request at the 
    RM in MBs. Memory requests lower than this will be set to the value of 
    this property. Additionally, a node manager that is configured to have 
    less memory than this value will be shut down by the resource manager.
    
    yarn.scheduler.minimum-allocation-mb
    1024
    
    
    
    The maximum allocation for every container request at the 
    RM in MBs. Memory requests higher than this will throw an
    InvalidResourceRequestException.
    
    yarn.scheduler.maximum-allocation-mb
    2048
    
    
    
    The minimum allocation for every container request at the 
    RM in terms of virtual CPU cores. Requests lower than this will be set to 
    the value of this property. Additionally, a node manager that is configured 
    to have fewer virtual cores than this value will be shut down by the 
    resource manager.
    
    yarn.scheduler.minimum-allocation-vcores
    1
    
    
    
    The maximum allocation for every container request at the 
    RM in terms of virtual CPU cores. Requests higher than this will throw an
    InvalidResourceRequestException.
    yarn.scheduler.maximum-allocation-vcores
    2
    
    
    Whether virtual memory limits will be enforced for
    containers.
    yarn.nodemanager.vmem-check-enabled
    false
    
    
    
    Ratio between virtual memory to physical memory when
    setting memory limits for containers. Container allocations are
    expressed in terms of physical memory, and virtual memory usage is 
    allowed to exceed this allocation by this ratio.
    
    yarn.nodemanager.vmem-pmem-ratio
    2.1
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125

    分发配置 xsync yarn-site.xml

    执行程序

    (1)重启集群

    [root@hadoop102 hadoop-3.1.4]$ sbin/stop-yarn.sh

    [root@hadoop103 hadoop-3.1.4]$ sbin/start-yarn.sh

    (2)执行 WordCount 程序

    [root@hadoop102 hadoop-3.1.4]$ hadoop jar

    share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.4.jar

    wordcount /input /output

    (3)观察 Yarn 任务执行页面

    2.1 -->

    Ratio between virtual memory to physical memory when
    setting memory limits for containers. Container allocations are
    expressed in terms of physical memory, and virtual memory usage is
    allowed to exceed this allocation by this ratio.

    yarn.nodemanager.vmem-pmem-ratio
    2.1

    
    分发配置 xsync yarn-site.xml
    
    **执行程序** 
    
    (1)重启集群 
    
    [root@hadoop102 hadoop-3.1.4]$ sbin/stop-yarn.sh 
    
    [root@hadoop103 hadoop-3.1.4]$ sbin/start-yarn.sh 
    
    (2)执行 WordCount 程序 
    
    [root@hadoop102 hadoop-3.1.4]$ hadoop jar  
    
    share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.4.jar  
    
    wordcount /input /output 
    
    (3)观察 Yarn 任务执行页面 
    
    http://hadoop103:8088/cluster/apps
    
    
    学习路径:https://space.bilibili.com/302417610/,如有侵权,请联系q进行删除:3623472230
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
  • 相关阅读:
    Spring面试大全——(有这一篇就够了)
    【mcuclub】舵机-SG90
    简单讲解冒泡排序算法
    0719~分布式锁
    javaScript 数组对象取出某一列
    VC编译错误:error LNK2019: 无法解析的外部符号 __imp__qsort,
    3dmax如何在渲染完之后加载VFB的参数和LUT文件?
    智慧城市中的数字孪生:数字孪生技术助力智慧城市提高公共服务水平
    在Xamarin.Android项目中调用自己写的java jar包
    深度学习实战02-卷积神经网络(CNN)实现服装图像分类
  • 原文地址:https://blog.csdn.net/qq_37171694/article/details/128009311