Example usage for org.apache.hadoop.yarn.ipc YarnRPC create

List of usage examples for org.apache.hadoop.yarn.ipc YarnRPC create

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.ipc YarnRPC create.

Prototype

public static YarnRPC create(Configuration conf) 

Source Link

Usage

From source file:org.springframework.yarn.rpc.YarnRpcAccessor.java

License:Apache License

/**
 * Creates the proxy. If {@link #getUser()} returns
 * a non null {@link UserGroupInformation user}, that
 * will be used to request the proxy with
 * a {@link PrivilegedAction}.//from  ww w  .  ja v  a 2  s .c o  m
 *
 * @return the proxy
 * @throws IOException
 */
@SuppressWarnings("unchecked")
protected P createProxy() throws IOException {
    return getUser().doAs(new PrivilegedAction<P>() {
        @Override
        public P run() {
            return (P) YarnRPC.create(configuration).getProxy(protocolClazz, address, configuration);
        }
    });
}