简体   繁体   中英

How to get Hadoop task tracker info from inside a mapper or reducer

Your Mapper and Reducer classes always run on a particular task tracker. But how do I get info on the task tracker? The only thing passed into the setup method is a TaskInputOutputContext. You can get the task attempt ID, but how do I map this to a TaskTracker object? (Eg to get the hostname, the corresponding job tracker, etc. Yes I know you can get the hostname through java.net.InetAddress.getLocalHost().getHostName() but this is outside of Hadoop entirely.)

您可以随时访问MapReduce网络用户界面,并查看所有这些信息。只需单击要分析的作业,然后您就可以看到几乎所有单个地图和简化任务的内容。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM