本文整理汇总了Java中org.apache.hadoop.oncrpc.RpcProgram.RPCB_PORT属性的典型用法代码示例。如果您正苦于以下问题:Java RpcProgram.RPCB_PORT属性的具体用法?Java RpcProgram.RPCB_PORT怎么用?Java RpcProgram.RPCB_PORT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.hadoop.oncrpc.RpcProgram
的用法示例。
在下文中一共展示了RpcProgram.RPCB_PORT属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
public static void main(String[] args) {
StringUtils.startupShutdownMessage(Portmap.class, args, LOG);
final int port = RpcProgram.RPCB_PORT;
Portmap pm = new Portmap();
try {
pm.start(DEFAULT_IDLE_TIME_MILLISECONDS,
new InetSocketAddress(port), new InetSocketAddress(port));
} catch (Throwable e) {
LOG.fatal("Failed to start the server. Cause:", e);
pm.shutdown();
System.exit(-1);
}
}
示例2: RpcProgramPortmap
RpcProgramPortmap(ChannelGroup allChannels) {
this.allChannels = allChannels;
PortmapMapping m = new PortmapMapping(PROGRAM, VERSION,
PortmapMapping.TRANSPORT_TCP, RpcProgram.RPCB_PORT);
PortmapMapping m1 = new PortmapMapping(PROGRAM, VERSION,
PortmapMapping.TRANSPORT_UDP, RpcProgram.RPCB_PORT);
map.put(PortmapMapping.key(m), m);
map.put(PortmapMapping.key(m1), m1);
}
示例3: startUDPServer
private static void startUDPServer(RpcProgramPortmap rpcProgram) {
rpcProgram.register(PortmapMapping.TRANSPORT_UDP);
SimpleUdpServer udpServer = new SimpleUdpServer(RpcProgram.RPCB_PORT,
rpcProgram, 1);
udpServer.run();
}
示例4: startTCPServer
private static void startTCPServer(final RpcProgramPortmap rpcProgram) {
rpcProgram.register(PortmapMapping.TRANSPORT_TCP);
SimpleTcpServer tcpServer = new SimpleTcpServer(RpcProgram.RPCB_PORT,
rpcProgram, 1);
tcpServer.run();
}