Hbase启动源码

Hbase 1.2

HMaster的启动采用了ToolRunner:

  1. 将conf和args封装成GenericOptionsParser对象parser, 根据parser获取toolArgs
  2. 返回tool.run(toolArgs); 返回tool.run(toolArgs);

@see HMasterCommandLine#run
各种参数检查

 if ("start".equals(command)) {
      return startMaster();
    } else if ("stop".equals(command)) {
      return stopMaster();
    } else if ("clear".equals(command)) {
      return (ZNodeClearer.clear(getConf()) ? 0 : 1);
    } else {
      usage("Invalid command: " + command);
      return 1;
    }

@see HMaster#startActiveMasterManager

猜你喜欢

转载自blog.csdn.net/m0_37039331/article/details/85058785