org.apache.hadoop.ipc.RPC.waitForProtocolProxy()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(10.7k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中org.apache.hadoop.ipc.RPC.waitForProtocolProxy方法的一些代码示例,展示了RPC.waitForProtocolProxy的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RPC.waitForProtocolProxy方法的具体详情如下:
包路径:org.apache.hadoop.ipc.RPC
类名称:RPC
方法名:waitForProtocolProxy

RPC.waitForProtocolProxy介绍

[英]Get a protocol proxy that contains a proxy connection to a remote server and a set of methods that are supported by the server
[中]获取一个协议代理,该代理包含到远程服务器的代理连接以及服务器支持的一组方法

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-common

/**
 * Get a protocol proxy that contains a proxy connection to a remote server
 * and a set of methods that are supported by the server
 * 
 * @param protocol protocol class
 * @param clientVersion client version
 * @param addr remote address
 * @param conf configuration to use
 * @return the protocol proxy
 * @throws IOException if the far end through a RemoteException
 */
public static <T> ProtocolProxy<T> waitForProtocolProxy(Class<T> protocol,
              long clientVersion,
              InetSocketAddress addr,
              Configuration conf) throws IOException {
 return waitForProtocolProxy(
   protocol, clientVersion, addr, conf, Long.MAX_VALUE);
}

代码示例来源:origin: org.apache.hadoop/hadoop-common

/**
 * 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();
}

代码示例来源:origin: org.apache.hadoop/hadoop-common

/**
 * 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();
}

代码示例来源:origin: org.apache.hadoop/hadoop-common

/**
 * Get a protocol proxy that contains a proxy connection to a remote server
 * and a set of methods that are supported by the 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 protocol proxy
 * @throws IOException if the far end through a RemoteException
 */
public static <T> ProtocolProxy<T> waitForProtocolProxy(Class<T> protocol,
              long clientVersion,
              InetSocketAddress addr, Configuration conf,
              long connTimeout) throws IOException { 
 return waitForProtocolProxy(protocol, clientVersion, addr, conf,
   getRpcTimeout(conf), null, connTimeout);
}

代码示例来源:origin: org.apache.hadoop/hadoop-common

/**
 * 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();
}

代码示例来源:origin: com.facebook.hadoop/hadoop-core

public static <T extends VersionedProtocol> ProtocolProxy<T> waitForProtocolProxy(
  Class<T> protocol,
  long clientVersion,
  InetSocketAddress addr,
  Configuration conf,
  long timeout
  ) throws IOException {
 return waitForProtocolProxy(protocol, clientVersion, addr, conf, timeout, 0);
}

代码示例来源:origin: com.facebook.hadoop/hadoop-core

public static <T extends VersionedProtocol> ProtocolProxy<T> waitForProtocolProxy(
  Class<T> protocol,
  long clientVersion,
  InetSocketAddress addr,
  Configuration conf
  ) throws IOException {
 return waitForProtocolProxy(protocol, clientVersion, addr, conf, Long.MAX_VALUE);
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/**
 * Get a protocol proxy that contains a proxy connection to a remote server
 * and a set of methods that are supported by the server
 * 
 * @param protocol protocol class
 * @param clientVersion client version
 * @param addr remote address
 * @param conf configuration to use
 * @return the protocol proxy
 * @throws IOException if the far end through a RemoteException
 */
public static <T> ProtocolProxy<T> waitForProtocolProxy(Class<T> protocol,
              long clientVersion,
              InetSocketAddress addr,
              Configuration conf) throws IOException {
 return waitForProtocolProxy(
   protocol, clientVersion, addr, conf, Long.MAX_VALUE);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-common

/**
 * Get a protocol proxy that contains a proxy connection to a remote server
 * and a set of methods that are supported by the server
 * 
 * @param protocol protocol class
 * @param clientVersion client version
 * @param addr remote address
 * @param conf configuration to use
 * @return the protocol proxy
 * @throws IOException if the far end through a RemoteException
 */
public static <T> ProtocolProxy<T> waitForProtocolProxy(Class<T> protocol,
              long clientVersion,
              InetSocketAddress addr,
              Configuration conf) throws IOException {
 return waitForProtocolProxy(
   protocol, clientVersion, addr, conf, Long.MAX_VALUE);
}

代码示例来源:origin: com.facebook.hadoop/hadoop-core

public static <T extends VersionedProtocol> T waitForProxy(
  Class<T> protocol,
  long clientVersion,
  InetSocketAddress addr,
  Configuration conf
  ) throws IOException {
 return waitForProtocolProxy(protocol, clientVersion, addr, conf).getProxy();
}

代码示例来源:origin: com.facebook.hadoop/hadoop-core

public static <T extends VersionedProtocol> T waitForProxy(
  Class<T> protocol,
  long clientVersion,
  InetSocketAddress addr,
  Configuration conf,
  long timeout
  ) throws IOException {
 return waitForProtocolProxy(protocol, clientVersion, addr, conf, timeout).
        getProxy();
}

代码示例来源:origin: io.hops/hadoop-common

/**
 * 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();
}

代码示例来源:origin: ch.cern.hadoop/hadoop-common

/**
 * 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();
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/**
 * 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();
}

代码示例来源:origin: io.hops/hadoop-common

/**
 * Get a protocol proxy that contains a proxy connection to a remote server
 * and a set of methods that are supported by the 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 protocol proxy
 * @throws IOException if the far end through a RemoteException
 */
public static <T> ProtocolProxy<T> waitForProtocolProxy(Class<T> protocol,
              long clientVersion,
              InetSocketAddress addr, Configuration conf,
              long connTimeout) throws IOException { 
 return waitForProtocolProxy(protocol, clientVersion, addr, conf,
   getRpcTimeout(conf), null, connTimeout);
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

/**
 * Get a protocol proxy that contains a proxy connection to a remote server
 * and a set of methods that are supported by the 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 protocol proxy
 * @throws IOException if the far end through a RemoteException
 */
public static <T> ProtocolProxy<T> waitForProtocolProxy(Class<T> protocol,
              long clientVersion,
              InetSocketAddress addr, Configuration conf,
              long connTimeout) throws IOException { 
 return waitForProtocolProxy(protocol, clientVersion, addr, conf,
   getRpcTimeout(conf), null, connTimeout);
}

代码示例来源:origin: io.hops/hadoop-common

/**
 * 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();
}

代码示例来源:origin: ch.cern.hadoop/hadoop-common

/**
 * 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();
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

/**
 * 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();
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/**
 * 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();
}

相关文章