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

x33g5p2x  于2022-01-30 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(147)

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

Server.get介绍

[英]Returns the server instance called under or null. May be called under #call(Writable,long) implementations, and under Writablemethods of paramters and return values. Permits applications to access the server context.
[中]返回在下调用的服务器实例或null。可以在#call(Writable,long)实现下调用,也可以在参数和返回值的Writable方法下调用。允许应用程序访问服务器上下文。

代码示例

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

public void testServerGet() throws IOException {
 if (!(Server.get() instanceof RPC.Server)) {
  throw new IOException("Server.get() failed");
 }
}

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

public long getProtocolVersion(String protocol, 
                long clientVersion) throws IOException {
 InetSocketAddress requestAddress = Server.get().getListenerAddress();
 boolean dnRequest = false, clientRequest = false;

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

@Override
public void testServerGet() throws IOException {
 if (!(Server.get() instanceof RPC.Server)) {
  throw new IOException("Server.get() failed");
 }
}

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

@Override
public void testServerGet() throws IOException {
 if (!(Server.get() instanceof RPC.Server)) {
  throw new IOException("Server.get() failed");
 }
}

相关文章

微信公众号

最新文章

更多