"探秘藏经阁:Apache Hadoop 3.0中YARN的新变化"

需积分: 5 0 下载量 138 浏览量 更新于2024-01-17 收藏 1.72MB PDF 举报
Apache Hadoop 3.0是分布式计算和存储框架Apache Hadoop的最新版本。其中,YARN(Yet Another Resource Negotiator)是Hadoop的资源管理系统。本文将概述YARN在Apache Hadoop 3.0中的新功能和改进。 YARN是Hadoop的一个重要组件,主要负责集群资源的管理和任务的调度。在Apache Hadoop 3.0中,YARN有多项重要的改进,旨在提升性能、可伸缩性和用户体验。 首先,YARN在Apache Hadoop 3.0中引入了一种新的调度器,称为Capacity Scheduler。这个调度器改进了资源的分配策略,提供了更好的容量管理和任务调度。Capacity Scheduler支持动态队列,可以根据应用程序的需求动态地调整资源分配。 第二个重要的改进是YARN对容器的管理和隔离能力的增强。容器是YARN中最小的资源单位,用于执行任务。在Apache Hadoop 3.0中,YARN引入了基于容器的资源隔离,通过Linux cgroups技术,可以将容器与其他应用程序隔离开来,避免互相影响。这个改进提高了系统的稳定性和安全性。 另外,YARN在Apache Hadoop 3.0中还引入了Flex opportunities,这是一种新的资源调度机制。Flex opportunities可以根据资源的可用性动态地调整任务的执行,从而提供更好的性能和效率。 除了上述改进之外,YARN在Apache Hadoop 3.0中还增强了对长时间运行应用程序的支持。在以前的版本中,长时间运行的应用程序可能会被系统认为是失败的,并被终止。为了解决这个问题,YARN引入了容器保持(Container Reuse)机制,可以在任务完成后保持容器的状态,以便下次启动同样的任务时可以重新使用容器。 此外,YARN在Apache Hadoop 3.0中还改进了任务的调度策略。通过引入多级调度器,YARN可以将不同类型的任务划分为不同的优先级,并根据需要进行动态调整。 最后,值得一提的是,YARN在Apache Hadoop 3.0中实现了内存分配的改进。传统上,YARN使用静态分配的方式来管理内存,这会导致内存的浪费和低效的利用。在Apache Hadoop 3.0中,YARN引入了动态内存分配(Dynamic Resource Configuration),可以根据应用程序的需求动态地调整内存的分配。 综上所述,YARN在Apache Hadoop 3.0中经过多项改进,包括新的调度器、容器管理和隔离、Flex opportunities、容器保持、任务调度策略以及动态内存分配等。这些改进提高了YARN的性能、可伸缩性和用户体验,使其更适用于大规模分布式计算和存储环境。

[2023-07-04 17:11:29.952]Exception when trying to cleanup container container_e10_1661450914423_18596_01_000003: java.io.IOException: Problem signalling container 97181 with SIGTERM; output: null and exitCode: -1 at org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor.signalContainer(LinuxContainerExecutor.java:750) at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.sendSignal(ContainerLaunch.java:908) at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.signalProcess(ContainerLaunch.java:922) at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.cleanupContainer(ContainerLaunch.java:774) at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainersLauncher.handle(ContainersLauncher.java:173) at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainersLauncher.handle(ContainersLauncher.java:62) at org.apache.hadoop.yarn.event.AsyncDispatcher.dispatch(AsyncDispatcher.java:221) at org.apache.hadoop.yarn.event.AsyncDispatcher$1.run(AsyncDispatcher.java:143) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.hadoop.yarn.server.nodemanager.containermanager.runtime.ContainerExecutionException: Signal container failed at org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.runtime.DefaultLinuxContainerRuntime.signalContainer(DefaultLinuxContainerRuntime.java:163) at org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.runtime.DelegatingLinuxContainerRuntime.signalContainer(DelegatingLinuxContainerRuntime.java:159) at org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor.signalContainer(LinuxContainerExecutor.java:739) ... 8 more | org.apache.flink.yarn.YarnResourceManager (ResourceManager.java:822)

2023-07-12 上传

ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException java.lang.NullPointerException at org.json.JSONObject.<init>(JSONObject.java:144) at org.apache.sqoop.util.SqoopJsonUtil.getJsonStringforMap(SqoopJsonUtil.java:43) at org.apache.sqoop.SqoopOptions.writeProperties(SqoopOptions.java:867) at org.apache.sqoop.mapreduce.JobBase.putSqoopOptionsToConfiguration(JobBase.java:393) at org.apache.sqoop.mapreduce.JobBase.createJob(JobBase.java:379) at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:255) at org.apache.sqoop.manager.SqlManager.importQuery(SqlManager.java:747) at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:536) at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:633) at org.apache.sqoop.Sqoop.run(Sqoop.java:146) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:182) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:233) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:242) at org.apache.sqoop.Sqoop.main(Sqoop.java:251) Log Type: stdout Log Upload Time: Mon Jul 24 10:47:38 +0800 2023 Log Length: 74530 Showing 4096 bytes of 74530 total. Click here for the full log. 35517561_3806_01_000001: PRELAUNCH_OUT=/yarn/container-logs/application_1683335517561_3806/container_1683335517561_3806_01_000001/prelaunch.out: NM_AUX_SERVICE_mapreduce_shuffle=AAA0+gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=: NM_PORT=8041: HADOOP_YARN_HOME=/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hadoop-yarn: USER=admin: CLASSPATH=/yarn/nm/usercache/admin/appcache/application_1683335517561_3806/container_1683335517561_3806_01_000001:/yarn/nm/usercache/admin/appcache/application_1683335517561_3806/container_1683335517561_3806_01_000001/*:/etc/hadoop/conf.cloudera.yarn:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hadoop/*:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hadoop/lib/*:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hadoop-hdfs/*:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hadoop-hdfs/lib/*:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hadoop-yarn/*:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hadoop-yarn/lib/*:: PRELAUNCH_ERR=/yarn/container-logs/application_1683335517561_3806/container_1683335517561_3806_01_000001/prelaunch.err: HADOOP_TOKEN_FILE_LOCATION=/yarn/nm/usercache/admin/appcache/application_1683335517561_3806/container_1683335517561_3806_01_000001/container_tokens: LOCAL_USER_DIRS=/yarn/nm/usercache/admin/: OOZIE_ACTION_CONF_XML=/yarn/nm/usercache/admin/appcache/application_1683335517561_3806/container_1683335517561_3806_01_000001/action.xml: SHLVL=2: HOME=/home/: CONTAINER_ID=container_1683335517561_3806_01_000001: MALLOC_ARENA_MAX=4:怎么回事

2023-07-25 上传

Java对hdfs操作报如下错误,请问怎么解决?错误如下:Exception in thread "main" java.io.IOException: (null) entry in command string: null chmod 0700 I:\tmp\hadoop-22215\mapred\staging\222151620622033\.staging at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:770) at org.apache.hadoop.util.Shell.execCommand(Shell.java:866) at org.apache.hadoop.util.Shell.execCommand(Shell.java:849) at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:733) at org.apache.hadoop.fs.RawLocalFileSystem.mkOneDirWithMode(RawLocalFileSystem.java:491) at org.apache.hadoop.fs.RawLocalFileSystem.mkdirsWithOptionalPermission(RawLocalFileSystem.java:532) at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:509) at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:305) at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:133) at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:144) at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290) at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.mapreduce.Job.submit(Job.java:1287) at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1308) at com.sl.maxTemperature.main(maxTemperature.java:41)

2023-04-23 上传