예제 #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;
 }