首页 文章 精选 留言 我的

精选列表

搜索[mapreduce],共3589篇文章
优秀的个人博客,低调大师

mapreduce出现大量task被KILLED_UNCLEAN的3个原因

Request received to kill task 'attempt_201411191723_2827635_r_000009_0' by user ------- Task has been KILLED_UNCLEAN by the user 原因如下: 1.An impatient user (armed with "mapred job -kill-task" command) 2.JobTracker (to kill a speculative duplicate, or when a whole job fails) 3.Fair Scheduler (but diplomatically, it calls it “preemption”) 一篇老外的文章说的更详细: This is one of the most bloodcurling (and my favorites) stories, that we have recently seen in our 190-square-meter Hadoopland. In a nutshell, some jobs were surprisingly running extremely long, because thousands of their tasks were constantly being killed for some unknown reasons by someone (or something). For example, a photo, taken by our detectives, shows a job running for 12hrs:20min that spawned around 13,000 tasks until that moment. However (only) 4,118 of map tasks had finished successfully, while 8,708 were killed (!) and … surprisingly only 1 task failed (?) – obviously spreading panic in the Hadoopland. When murdering, the killer was leaving the same message each time: "KILLED_UNCLEAN by the user" (however, even our uncle competitor Google does not know too much what it exactly means ;)). Who is “the user”? Does the killer want to impersonate someone? More Traces Of Crime The detectives started looking for more traces of crime. They have noticed the killed tasks belong to ad-hoc Hive queries which are quite resource-intensive. When looking at timestamps in log files from JobTracker, TaskTracker and map tasks, they figured out that JobTracker got a request to murder the tasks… They have also noticed that tasks were usually killed young, quickly after the start (within 6-16 minutes), while the surviving tasks are running fine long hours.. The killer is unscrupulous! Killer’s Identity Who can actually send a kill request to JobTracker to murder thousands of tasks? Detectives quickly selected there main candidates: An impatient user (armed with "mapred job -kill-task" command) JobTracker (to kill a speculative duplicate, or when a whole job fails) Fair Scheduler (but diplomatically, it calls it “preemption”) When looking at log messages saying that a task is "KILLED UNCLEAN by the user", one could think that some user is a prime candidate to be the serial killer. However, the citizens of our Hadoopland are friendly, patient and respective to others, so that it would be unfair to assume that somebody killed, in cold blood, 8,708 tasks from a single jobs. JobTracker also seems to have a good alibi, because the job itself had not failed yet and the speculative execution was disabled (surprisingly Hive has own setting, hive.mapred.reduce.tasks.speculative.execution, for disabling speculative execution for reduce tasks, which is not overwritten by Hadoop’s mapred.reduce.tasks.speculative.execution). FairScheduler Accused For some company-specific reasons, the ad-hoc Hive queries are running as hive user in our Hadoopland. Moreover FairScheduler is configured with the default value of mapred.fairscheduler.poolnameproperty (which is user.name), so that the pools are created dynamically based on the username of user submitting the job to the cluster (“hive” in case of our ad-hoc Hive queries). When browsing one presentation about Hadoop 2 years ago, one of the detectives just remembered that FairScheduler is usually preempting the newest tasks in an over-share pool to forcibly make some room for starved pools. Eureka! ;) At this movement everything became clear and a quick look at FairScheduler webpage confirmed it. “Hive” pool was running over its minimum and fair shares for a long time, while the other pools are constantly running under their minimum and fair shares. In such a case, Fair Scheduler was killing Hive tasks from time to time to reassign slots to tasks from other pools. Less Violence, More Peace Having the evidence, we could put Fair Scheduler in prison, and use Capacity Scheduler instead. Maybe in the future, we will do that! Today, we believe that Fair Scheduler has not committed the crimes really intentionally – we feel that we have educated it badly and gave it too much power. Today, Fair Scheduler gets the suspended sentence – we want to give it a chance to rehabilitate and become more friendly and less aggressive… How to dignify the personality of Fair Scheduler? Obviously tuning settings like minSharePreemptionTimeout, fairSharePreemptionTimeout, minMaps and minReduces based on the current workload could be a good way to control the aggressiveness of the preemption of Fair Scheduler. Easier said, than done, because it requires a deep understanding of and knowledge about your workload (which later may change or not). There is a setting called mapred.fairscheduler.preemption that disables or enables preemption. However disabling preemption (or rather killing, to be precise), in our case, would just partially solve the problem. Only partially, because this issue exposed another problem in the Hadoopland – ad-hoc Hive queries are overloading the cluster.. Finally, we have not disabled preemption, because we were worrying a bit about SLA not being enforced without “any” preemption. Having this said, the two problems to solve are: stop mass killing Hive tasks stop overloading the cluster by ad-hoc Hive queries We simply limited the number of map and reduce tasks that Fair Scheduler can run in Hive pool (by setting maxMaps and maxReduces for that pool). In consequence, Hive pool could not contain too many task, so that Fair Scheduler could not kill too many of them ;) (because Hive pool’s will not be operating (too much) above its min and fair share level). Limiting the number of tasks prevents also from overloading the cluster by Hive queries (additionally one could also set the maximum number of concurrent jobs running in Hive pool using maxRunningJobs). A nice thing to say is that Fair Scheduler is eager to cooperate, because changing the FairScheduler’s allocation file, does not require restarting of JobTracker. This file is automatically polled for changes every 10 seconds and if it has changed, it is reloaded and the pool configurations are updated on the fly. Thanks to that you can easily learn and change the personality of Fair Scheduler better. ;) No related posts found.

优秀的个人博客,低调大师

windows下使用Eclipse编译运行MapReduce程序 Hadoop2.6.0/Ubuntu

一、环境介绍 宿主机:windows8 虚拟机:Ubuntu14.04 hadoop2.6伪分布:搭建教程http://blog.csdn.net/gamer_gyt/article/details/46793731 Eclipse:eclipse-jee-luna-SR2-win32-x86_64 二、准备阶段 网上下载hadoop-eclipse-plugin-2.6.0.jar (点击下载) 也可以自行编译(网上教程挺多的,可以自己百度 or Google) 三、begin 复制编译好的jar到eclipse插件目录(如果是从ubuntu自带的软件中心安装elcipse的话,则安装目录为:/usr/share/eclipse/dropins/sdk/plugins/不是在/usr/share/eclipse/plugin),进入eclipse目录,执行sudo chmod 777 * -R,重启eclipse 这一步特别重要网上好多资料都不是这样写的,所以配置一直不成功。 配置 hadoop 安装目录 window ->preference -> hadoop Map/Reduce -> Hadoop installation directory 配置Map/Reduce 视图 window ->Open Perspective -> other->Map/Reduce -> 点击“OK” windows →show view →other->Map/Reduce Locations-> 点击“OK” 控制台会多出一个“Map/Reduce Locations”的Tab页 在“Map/Reduce Locations” Tab页 点击图标<大象+>或者在空白的地方右键,选择“New Hadoop location…”,弹出对话框“New hadoop location…”,配置如下内容:将ha1改为自己的hadoop用户 接着再切换到 Advanced parameters 选项面板,这边有详细的配置,切记需要与 Hadoop 的配置(/usr/local/hadoop/etc/hadoop中的配置文件)一致,如我配置了 hadoop.tmp.dir ,就要进行修改。 网上几乎所有的教程都是如此,的确按这个教程配置完成后会在eclipse左上角出现DFS Locations,如下图 但其实还会碰见各种各样的问题,小编只将本人遇到的和解决办法呈现 (1)注意:将虚拟机的hadoop下修改的配置文件(core-site.xml hdfs-site.xml log4j.properties复制到程序的src目录下) (2)DFS下一些文件加载不出来,提示 permission denied错误 解决办法:给HDFS目录文件添加权限,hdfs dfs -chmod -R 777 / 附:推荐一篇不错的文章http://www.aboutyun.com/thread-8780-1-1.html 参考:www.tuicool.com/articles/BRBzquj www.cnblogs.com/aijianiula/p/4546021.html 常见错误和解决办法参考:http://blog.csdn.net/gamer_gyt/article/details/47252671

优秀的个人博客,低调大师

hive在E-MapReduce集群的实践(二)集群hive参数优化

本文介绍一些常见的集群跑hive作业参数优化,可以根据业务需要来使用。 提高hdfs性能 修改hdfs-site,注意重启hdfs服务 dfs.client.read.shortcircuit=true //直读 dfs.client.read.shortcircuit.streams.cache.size=4096 //直读缓存 dfs.datanode.balance.bandwidthPerSec=30048576 //提高balance带宽,一般扩容后调整 dfs.datanode.max.transfer.threads=16384 //提高线程数 dfs.namenode.checkpoint.period=21600 //延长checkpoint时间 dfs.namenode.handler.count=100 //并发数,大集

资源下载

更多资源
腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册