示例#1
0
文件: NameNode.java 项目: imace/hops
  /** Start the services common to active and standby states */
  private void startCommonServices(Configuration conf) throws IOException {
    startHttpServer(conf);

    startLeaderElectionService();

    namesystem.startCommonServices(conf);

    rpcServer.start();
    plugins = conf.getInstances(DFS_NAMENODE_PLUGINS_KEY, ServicePlugin.class);
    for (ServicePlugin p : plugins) {
      try {
        p.start(this);
      } catch (Throwable t) {
        LOG.warn("ServicePlugin " + p + " could not be started", t);
      }
    }
    LOG.info(getRole() + " RPC up at: " + rpcServer.getRpcAddress());
    if (rpcServer.getServiceRpcAddress() != null) {
      LOG.info(getRole() + " service RPC up at: " + rpcServer.getServiceRpcAddress());
    }
  }
示例#2
0
文件: NameNode.java 项目: imace/hops
 /** @return NameNode service RPC address if configured, the NameNode RPC address otherwise */
 public InetSocketAddress getServiceRpcAddress() {
   final InetSocketAddress serviceAddr = rpcServer.getServiceRpcAddress();
   return serviceAddr == null ? rpcServer.getRpcAddress() : serviceAddr;
 }