private BlockingInterface createProxyInternal() throws IOException { @SuppressWarnings("unchecked") ProtocolProxy<BlockingInterface> proxy = (ProtocolProxy<BlockingInterface>) RPC.getProtocolProxy(blockingInterfaceClass, 0, serverAddr, UserGroupInformation.getCurrentUser(), conf, socketFactory, 0, retryPolicy); return proxy.getProxy(); } }
/** Construct a client-side proxy object that implements the named protocol, * talking to a server at the named address. * @param <T>*/ public static <T> T getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, Configuration conf, SocketFactory factory) throws IOException { return getProtocolProxy( protocol, clientVersion, addr, conf, factory).getProxy(); }
/** Construct a client-side proxy object that implements the named protocol, * talking to a server at the named address. * @param <T>*/ public static <T> T getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory) throws IOException { return getProtocolProxy( protocol, clientVersion, addr, ticket, conf, factory).getProxy(); }
/** * Get a proxy connection to a remote server * * @param protocol protocol class * @param clientVersion client version * @param addr remote address * @param conf configuration to use * @param connTimeout time in milliseconds before giving up * @return the proxy * @throws IOException if the far end through a RemoteException */ public static <T> T waitForProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, Configuration conf, long connTimeout) throws IOException { return waitForProtocolProxy(protocol, clientVersion, addr, conf, connTimeout).getProxy(); }
/** * Construct a client-side proxy object with the default SocketFactory * @param <T> * * @param protocol * @param clientVersion * @param addr * @param conf * @return a proxy instance * @throws IOException */ public static <T> T getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, Configuration conf) throws IOException { return getProtocolProxy(protocol, clientVersion, addr, conf).getProxy(); }
private LlapProtocolBlockingPB createProxyInternal() throws IOException { ProtocolProxy<LlapProtocolBlockingPB> proxy = RPC.getProtocolProxy(LlapProtocolBlockingPB.class, 0, serverAddr, UserGroupInformation.getCurrentUser(), conf, NetUtils.getDefaultSocketFactory(conf), 0, retryPolicy); return proxy.getProxy(); } }
/** * Get a proxy connection to a remote server * * @param protocol protocol class * @param clientVersion client version * @param addr remote address * @param conf configuration to use * @return the proxy * @throws IOException if the far end through a RemoteException */ public static <T> T waitForProxy( Class<T> protocol, long clientVersion, InetSocketAddress addr, Configuration conf ) throws IOException { return waitForProtocolProxy(protocol, clientVersion, addr, conf).getProxy(); }
public LlapManagementProtocolPB createProxy() throws IOException { RPC.setProtocolEngine(conf, LlapManagementProtocolPB.class, ProtobufRpcEngine.class); ProtocolProxy<LlapManagementProtocolPB> proxy = RPC.getProtocolProxy(LlapManagementProtocolPB.class, 0, serverAddr, UserGroupInformation.getCurrentUser(), conf, socketFactory, 0, retryPolicy); return proxy.getProxy(); }
/** * Get a proxy connection to a remote server * * @param protocol protocol class * @param clientVersion client version * @param addr remote address * @param conf configuration to use * @param rpcTimeout timeout for each RPC * @param timeout time in milliseconds before giving up * @return the proxy * @throws IOException if the far end through a RemoteException */ public static <T> T waitForProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, Configuration conf, int rpcTimeout, long timeout) throws IOException { return waitForProtocolProxy(protocol, clientVersion, addr, conf, rpcTimeout, null, timeout).getProxy(); }
/** * Construct a client-side proxy that implements the named protocol, * talking to a server at the named address. * @param <T> * * @param protocol protocol * @param clientVersion client's version * @param addr server address * @param ticket security ticket * @param conf configuration * @param factory socket factory * @param rpcTimeout max time for each rpc; 0 means no timeout * @return the proxy * @throws IOException if any error occurs */ public static <T> T getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout) throws IOException { return getProtocolProxy(protocol, clientVersion, addr, ticket, conf, factory, rpcTimeout, null).getProxy(); }
private static ProtocolMetaInfoPB getProtocolMetaInfoProxy(Object proxy, Configuration conf) throws IOException { RpcInvocationHandler inv = (RpcInvocationHandler) Proxy .getInvocationHandler(proxy); return RPC .getProtocolEngine(ProtocolMetaInfoPB.class, conf) .getProtocolMetaInfoProxy(inv.getConnectionId(), conf, NetUtils.getDefaultSocketFactory(conf)).getProxy(); }
/** Construct a client-side proxy object that implements the named protocol, * talking to a server at the named address. * @param <T>*/ public static <T> T getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, Configuration conf, SocketFactory factory) throws IOException { return getProtocolProxy( protocol, clientVersion, addr, conf, factory).getProxy(); }
/** Construct a client-side proxy object that implements the named protocol, * talking to a server at the named address. * @param <T>*/ public static <T> T getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory) throws IOException { return getProtocolProxy( protocol, clientVersion, addr, ticket, conf, factory).getProxy(); }
/** Construct a client-side proxy object that implements the named protocol, * talking to a server at the named address. * @param <T>*/ public static <T> T getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory) throws IOException { return getProtocolProxy( protocol, clientVersion, addr, ticket, conf, factory).getProxy(); }
/** Construct a client-side proxy object that implements the named protocol, * talking to a server at the named address. * @param <T>*/ public static <T> T getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, Configuration conf, SocketFactory factory) throws IOException { return getProtocolProxy( protocol, clientVersion, addr, conf, factory).getProxy(); }
/** Construct a client-side proxy object that implements the named protocol, * talking to a server at the named address. * @param <T>*/ public static <T> T getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory) throws IOException { return getProtocolProxy( protocol, clientVersion, addr, ticket, conf, factory).getProxy(); }
/** Construct a client-side proxy object that implements the named protocol, * talking to a server at the named address. */ public static <T extends VersionedProtocol> T getProxy( Class<T> protocol, long clientVersion, InetSocketAddress addr, Configuration conf, SocketFactory factory) throws IOException { return getProtocolProxy(protocol, clientVersion, addr, conf, factory).getProxy(); }
/** Construct a client-side proxy object that implements the named protocol, * talking to a server at the named address. */ public static <T extends VersionedProtocol> T getProxy( Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory) throws IOException { return getProtocolProxy(protocol, clientVersion, addr, ticket, conf, factory).getProxy(); }
private static ProtocolMetaInfoPB getProtocolMetaInfoProxy(Object proxy, Configuration conf) throws IOException { RpcInvocationHandler inv = (RpcInvocationHandler) Proxy .getInvocationHandler(proxy); return RPC .getProtocolEngine(ProtocolMetaInfoPB.class, conf) .getProtocolMetaInfoProxy(inv.getConnectionId(), conf, NetUtils.getDefaultSocketFactory(conf)).getProxy(); }
private Version2Client() throws IOException { serverInfo = RPC.getProtocolProxy( TestProtocol2.class, TestProtocol2.versionID, addr, conf); proxy2 = serverInfo.getProxy(); }