List of usage examples for org.apache.hadoop.security SaslRpcServer init
public static void init(Configuration conf)
From source file:org.apache.hama.ipc.RPC.java
License:Apache License
/** * Construct a client-side proxy object that implements the named protocol, * talking to a server at the named address. *//*from w w w. java 2 s. c o m*/ public static VersionedProtocol getProxy(Class<? extends VersionedProtocol> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy, boolean checkVersion) throws IOException { if (UserGroupInformation.isSecurityEnabled()) { SaslRpcServer.init(conf); } final Invoker invoker = new Invoker(protocol, addr, ticket, conf, factory, rpcTimeout, connectionRetryPolicy); VersionedProtocol proxy = (VersionedProtocol) Proxy.newProxyInstance(protocol.getClassLoader(), new Class[] { protocol }, invoker); if (checkVersion) { checkVersion(protocol, clientVersion, proxy); } return proxy; }