Example usage for org.apache.hadoop.yarn.conf YarnConfiguration RM_BIND_HOST

List of usage examples for org.apache.hadoop.yarn.conf YarnConfiguration RM_BIND_HOST

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.conf YarnConfiguration RM_BIND_HOST.

Prototype

String RM_BIND_HOST

To view the source code for org.apache.hadoop.yarn.conf YarnConfiguration RM_BIND_HOST.

Click Source Link

Document

The actual bind address for the RM.

Usage

From source file:io.hops.util.GroupMembershipService.java

License:Apache License

@Override
public synchronized void serviceInit(Configuration conf) throws Exception {

    this.conf = conf;
    groupMembershipServiceAddress = conf.getSocketAddr(YarnConfiguration.RM_BIND_HOST,
            YarnConfiguration.RM_GROUP_MEMBERSHIP_ADDRESS,
            YarnConfiguration.DEFAULT_RM_GROUP_MEMBERSHIP_ADDRESS,
            YarnConfiguration.DEFAULT_RM_GROUP_MEMBERSHIP_PORT);
    adminAcl = new AccessControlList(
            conf.get(YarnConfiguration.YARN_ADMIN_ACL, YarnConfiguration.DEFAULT_YARN_ADMIN_ACL));
    if (HAUtil.isHAEnabled(conf)) {
        this.rmId = HAUtil.getRMHAId(conf);
    }//from www .ja  v  a  2s .  co  m
    daemonUser = UserGroupInformation.getCurrentUser();
    authorizer = YarnAuthorizationProvider.getInstance(conf);
    authorizer.setAdmins(getAdminAclList(conf), UserGroupInformation.getCurrentUser());

    LOG.info("init groupMembershipService " + this.rmId);
}

From source file:io.hops.util.GroupMembershipService.java

License:Apache License

@Override
protected synchronized void serviceStart() throws Exception {
    startServer();/* w  w  w  .j a va2 s. c o m*/
    LOG.info("Started GMS on " + rmId + " port: " + server.getPort());

    groupMembershipServiceAddress = getConfig().updateConnectAddr(YarnConfiguration.RM_BIND_HOST,
            YarnConfiguration.RM_GROUP_MEMBERSHIP_ADDRESS,
            YarnConfiguration.DEFAULT_RM_GROUP_MEMBERSHIP_ADDRESS, server.getListenerAddress());

    startGroupMembership();
    LOG.info("Started GMS: " + rmId + " on " + groupMembershipServiceAddress.getAddress().getHostAddress() + ":"
            + groupMembershipServiceAddress.getPort());
    super.serviceStart();
}