本文整理了Java中org.apache.avro.ipc.HttpServer.getPort()
方法的一些代码示例,展示了HttpServer.getPort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpServer.getPort()
方法的具体详情如下:
包路径:org.apache.avro.ipc.HttpServer
类名称:HttpServer
方法名:getPort
暂无
代码示例来源:origin: apache/avro
/** Sends RPCs and returns nanos elapsed. */
private static long sendRpcs(boolean withPlugin) throws IOException {
HttpServer server = createServer(withPlugin);
Transceiver t =
new HttpTransceiver(new URL("http://127.0.0.1:"+server.getPort()+"/"));
GenericRequestor requestor = new GenericRequestor(NULL_PROTOCOL, t);
long now = System.nanoTime();
for (int i = 0; i < COUNT; ++i) {
requestor.request("null", null);
}
long elapsed = System.nanoTime() - now;
t.close();
server.close();
return elapsed;
}
代码示例来源:origin: org.apache.hadoop/avro
out.println("Port: " + server.getPort());
return 0;
代码示例来源:origin: org.apache.cassandra.deps/avro
server = new HttpServer(new SinkResponder(protocol), uri.getPort());
server.start();
out.println("Port: " + server.getPort());
return 0;
内容来源于网络,如有侵权,请联系作者删除!