public static RPC.Server startProtocolServer(int srvPort, int numHandlers,
      AtomicReference<InetSocketAddress> bindAddress, Configuration conf,
      BlockingService impl, Class<?> protocolClass, SecretManager<?> secretManager,
      PolicyProvider provider, ConfVars... aclVars) {
    InetSocketAddress addr = new InetSocketAddress(srvPort);
    RPC.Server server;
    try {
      server = createRpcServer(protocolClass, addr, conf,
          numHandlers, impl, secretManager, provider, aclVars);
      server.start();
    } catch (IOException e) {
      LOG.error("Failed to run RPC Server on port: " + srvPort, e);
      throw new RuntimeException(e);
    }

    InetSocketAddress serverBindAddress = NetUtils.getConnectAddress(server);
    InetSocketAddress bindAddressVal = NetUtils.createSocketAddrForHost(
        serverBindAddress.getAddress().getCanonicalHostName(),
        serverBindAddress.getPort());
    if (bindAddress != null) {
      bindAddress.set(bindAddressVal);
    }
    LOG.info("Instantiated " + protocolClass.getSimpleName() + " at " + bindAddressVal);
    return server;
  }
Login using kerberos and also updates the current logged in user

@param principal  - kerberos principal
@param keytabFile - keytab file
@throws IOException - if keytab file cannot be found
llap-common/src/java/org/apache/hadoop/hive/llap/LlapUtil.java