Hadoop 2.2.0源码浏览:4. NodeManager
基本流程
public static void main(String[] args) {
Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
StringUtils.startupShutdownMessage(NodeManager.class, args, LOG);
NodeManager nodeManager = new NodeManager();
Configuration conf = new YarnConfiguration();
setHttpPolicy(conf);
nodeManager.initAndStartNodeManager(conf, false);
Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
StringUtils.startupShutdownMessage(NodeManager.class, args, LOG);
NodeManager nodeManager = new NodeManager();
Configuration conf = new YarnConfiguration();
setHttpPolicy(conf);
nodeManager.initAndStartNodeManager(conf, false);
}
结构
继承自CompositeService
ServiceInit(conf):