如何获取hadoop mapreduce job运行信息
1个回答
展开全部
需要获取mapreduce的运行信息,比如运行状态,map,reduce的执行进度. hadoop 50030端口提供web ui服务,没找到提供json或者xml的服务方式. 于是,查找hadoop 50030的加载: orgapachehadoopmapredJobTracker.java: JobTracker(final JobConf conf, String identifier, Clock clock, QueueManager qm) --> private void createInstrumentation() -->
...
String infoAddr =
NetUtils.getServerAddress(conf,"mapred.job.tracker.info.bindAddress",
"mapred.job.tracker.info.port",
"mapred.job.tracker.http.address");
InetSocketAddress infoSocAddr = NetUtils.createSocketAddr(infoAddr);
String infoBindAddress = infoSocAddr.getHostName();
int tmpInfoPort = infoSocAddr.getPort();
this.startTime = clock.getTime();
infoServer = new HttpServer("job", infoBindAddress, tmpInfoPort,
tmpInfoPort == 0, conf, aclsManager.getAdminsAcl());
infoServer.setAttribute("job.tracker", this);
...
...
String infoAddr =
NetUtils.getServerAddress(conf,"mapred.job.tracker.info.bindAddress",
"mapred.job.tracker.info.port",
"mapred.job.tracker.http.address");
InetSocketAddress infoSocAddr = NetUtils.createSocketAddr(infoAddr);
String infoBindAddress = infoSocAddr.getHostName();
int tmpInfoPort = infoSocAddr.getPort();
this.startTime = clock.getTime();
infoServer = new HttpServer("job", infoBindAddress, tmpInfoPort,
tmpInfoPort == 0, conf, aclsManager.getAdminsAcl());
infoServer.setAttribute("job.tracker", this);
...
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询