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

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

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

RPC.getProtocolEngine介绍

暂无

代码示例

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

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

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

/**
  * Build the RPC Server. 
  * @throws IOException on error
  * @throws HadoopIllegalArgumentException when mandatory fields are not set
  */
 public Server build() throws IOException, HadoopIllegalArgumentException {
  if (this.conf == null) {
   throw new HadoopIllegalArgumentException("conf is not set");
  }
  if (this.protocol == null) {
   throw new HadoopIllegalArgumentException("protocol is not set");
  }
  if (this.instance == null) {
   throw new HadoopIllegalArgumentException("instance is not set");
  }
  
  return getProtocolEngine(this.protocol, this.conf).getServer(
    this.protocol, this.instance, this.bindAddress, this.port,
    this.numHandlers, this.numReaders, this.queueSizePerHandler,
    this.verbose, this.conf, this.secretManager, this.portRangeConfig);
 }
}

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

/**
 * A version mismatch for the RPC protocol.
 */
public static class VersionMismatch extends RpcServerException {
 private static final long serialVersionUID = 0;
 private String interfaceName;
 private long clientVersion;
 private long serverVersion;
 
 /**
  * Create a version mismatch exception
  * @param interfaceName the name of the protocol mismatch
  * @param clientVersion the client's version of the protocol
  * @param serverVersion the server's version of the protocol
  */
 public VersionMismatch(String interfaceName, long clientVersion,
             long serverVersion) {
  super("Protocol " + interfaceName + " version mismatch. (client = " +
     clientVersion + ", server = " + serverVersion + ")");
  this.interfaceName = interfaceName;
  this.clientVersion = clientVersion;
  this.serverVersion = serverVersion;
 }
 
 /**
  * Get the interface name
  * @return the java class name 
  *          (eg. org.apache.hadoop.mapred.InterTrackerProtocol)
  */

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

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

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

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

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

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

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

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

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

/**
  * Build the RPC Server. 
  * @throws IOException on error
  * @throws HadoopIllegalArgumentException when mandatory fields are not set
  */
 public Server build() throws IOException, HadoopIllegalArgumentException {
  if (this.conf == null) {
   throw new HadoopIllegalArgumentException("conf is not set");
  }
  if (this.protocol == null) {
   throw new HadoopIllegalArgumentException("protocol is not set");
  }
  if (this.instance == null) {
   throw new HadoopIllegalArgumentException("instance is not set");
  }
  
  return getProtocolEngine(this.protocol, this.conf).getServer(
    this.protocol, this.instance, this.bindAddress, this.port,
    this.numHandlers, this.numReaders, this.queueSizePerHandler,
    this.verbose, this.conf, this.secretManager, this.portRangeConfig);
 }
}

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

/**
 * A version mismatch for the RPC protocol.
 */
public static class VersionMismatch extends RpcServerException {
 private static final long serialVersionUID = 0;
 private String interfaceName;
 private long clientVersion;
 private long serverVersion;
 
 /**
  * Create a version mismatch exception
  * @param interfaceName the name of the protocol mismatch
  * @param clientVersion the client's version of the protocol
  * @param serverVersion the server's version of the protocol
  */
 public VersionMismatch(String interfaceName, long clientVersion,
             long serverVersion) {
  super("Protocol " + interfaceName + " version mismatch. (client = " +
     clientVersion + ", server = " + serverVersion + ")");
  this.interfaceName = interfaceName;
  this.clientVersion = clientVersion;
  this.serverVersion = serverVersion;
 }
 
 /**
  * Get the interface name
  * @return the java class name 
  *          (eg. org.apache.hadoop.mapred.InterTrackerProtocol)
  */

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

/**
  * Build the RPC Server. 
  * @throws IOException on error
  * @throws HadoopIllegalArgumentException when mandatory fields are not set
  */
 public Server build() throws IOException, HadoopIllegalArgumentException {
  if (this.conf == null) {
   throw new HadoopIllegalArgumentException("conf is not set");
  }
  if (this.protocol == null) {
   throw new HadoopIllegalArgumentException("protocol is not set");
  }
  if (this.instance == null) {
   throw new HadoopIllegalArgumentException("instance is not set");
  }
  
  return getProtocolEngine(this.protocol, this.conf).getServer(
    this.protocol, this.instance, this.bindAddress, this.port,
    this.numHandlers, this.numReaders, this.queueSizePerHandler,
    this.verbose, this.conf, this.secretManager, this.portRangeConfig);
 }
}

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

/**
  * Build the RPC Server. 
  * @throws IOException on error
  * @throws HadoopIllegalArgumentException when mandatory fields are not set
  */
 public Server build() throws IOException, HadoopIllegalArgumentException {
  if (this.conf == null) {
   throw new HadoopIllegalArgumentException("conf is not set");
  }
  if (this.protocol == null) {
   throw new HadoopIllegalArgumentException("protocol is not set");
  }
  if (this.instance == null) {
   throw new HadoopIllegalArgumentException("instance is not set");
  }
  
  return getProtocolEngine(this.protocol, this.conf).getServer(
    this.protocol, this.instance, this.bindAddress, this.port,
    this.numHandlers, this.numReaders, this.queueSizePerHandler,
    this.verbose, this.conf, this.secretManager, this.portRangeConfig);
 }
}

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

/**
  * Build the RPC Server. 
  * @throws IOException on error
  * @throws HadoopIllegalArgumentException when mandatory fields are not set
  */
 public Server build() throws IOException, HadoopIllegalArgumentException {
  if (this.conf == null) {
   throw new HadoopIllegalArgumentException("conf is not set");
  }
  if (this.protocol == null) {
   throw new HadoopIllegalArgumentException("protocol is not set");
  }
  if (this.instance == null) {
   throw new HadoopIllegalArgumentException("instance is not set");
  }
  
  return getProtocolEngine(this.protocol, this.conf).getServer(
    this.protocol, this.instance, this.bindAddress, this.port,
    this.numHandlers, this.numReaders, this.queueSizePerHandler,
    this.verbose, this.conf, this.secretManager, this.portRangeConfig);
 }
}

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

/**
 * A version mismatch for the RPC protocol.
 */
public static class VersionMismatch extends RpcServerException {
 private static final long serialVersionUID = 0;
 private String interfaceName;
 private long clientVersion;
 private long serverVersion;
 
 /**
  * Create a version mismatch exception
  * @param interfaceName the name of the protocol mismatch
  * @param clientVersion the client's version of the protocol
  * @param serverVersion the server's version of the protocol
  */
 public VersionMismatch(String interfaceName, long clientVersion,
             long serverVersion) {
  super("Protocol " + interfaceName + " version mismatch. (client = " +
     clientVersion + ", server = " + serverVersion + ")");
  this.interfaceName = interfaceName;
  this.clientVersion = clientVersion;
  this.serverVersion = serverVersion;
 }
 
 /**
  * Get the interface name
  * @return the java class name 
  *          (eg. org.apache.hadoop.mapred.InterTrackerProtocol)
  */

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

/**
 * A version mismatch for the RPC protocol.
 */
public static class VersionMismatch extends RpcServerException {
 private static final long serialVersionUID = 0;
 private String interfaceName;
 private long clientVersion;
 private long serverVersion;
 
 /**
  * Create a version mismatch exception
  * @param interfaceName the name of the protocol mismatch
  * @param clientVersion the client's version of the protocol
  * @param serverVersion the server's version of the protocol
  */
 public VersionMismatch(String interfaceName, long clientVersion,
             long serverVersion) {
  super("Protocol " + interfaceName + " version mismatch. (client = " +
     clientVersion + ", server = " + serverVersion + ")");
  this.interfaceName = interfaceName;
  this.clientVersion = clientVersion;
  this.serverVersion = serverVersion;
 }
 
 /**
  * Get the interface name
  * @return the java class name 
  *          (eg. org.apache.hadoop.mapred.InterTrackerProtocol)
  */

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

/**
 * A version mismatch for the RPC protocol.
 */
public static class VersionMismatch extends RpcServerException {
 private static final long serialVersionUID = 0;
 private String interfaceName;
 private long clientVersion;
 private long serverVersion;
 
 /**
  * Create a version mismatch exception
  * @param interfaceName the name of the protocol mismatch
  * @param clientVersion the client's version of the protocol
  * @param serverVersion the server's version of the protocol
  */
 public VersionMismatch(String interfaceName, long clientVersion,
             long serverVersion) {
  super("Protocol " + interfaceName + " version mismatch. (client = " +
     clientVersion + ", server = " + serverVersion + ")");
  this.interfaceName = interfaceName;
  this.clientVersion = clientVersion;
  this.serverVersion = serverVersion;
 }
 
 /**
  * Get the interface name
  * @return the java class name 
  *          (eg. org.apache.hadoop.mapred.InterTrackerProtocol)
  */

相关文章