本文整理汇总了Java中org.apache.hadoop.oncrpc.RpcProgram类的典型用法代码示例。如果您正苦于以下问题:Java RpcProgram类的具体用法?Java RpcProgram怎么用?Java RpcProgram使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RpcProgram类属于org.apache.hadoop.oncrpc包,在下文中一共展示了RpcProgram类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.apache.hadoop.oncrpc.RpcProgram; //导入依赖的package包/类
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
import org.apache.hadoop.oncrpc.RpcProgram; //导入依赖的package包/类
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: getRpcProgram
import org.apache.hadoop.oncrpc.RpcProgram; //导入依赖的package包/类
public RpcProgram getRpcProgram() {
return rpcProgram;
}
示例4: Nfs3Base
import org.apache.hadoop.oncrpc.RpcProgram; //导入依赖的package包/类
protected Nfs3Base(RpcProgram rpcProgram, Configuration conf) {
this.rpcProgram = rpcProgram;
LOG.info("NFS server port set to: " + rpcProgram.getPort());
}
示例5: Nfs3Base
import org.apache.hadoop.oncrpc.RpcProgram; //导入依赖的package包/类
protected Nfs3Base(MountdBase mountd, RpcProgram program) {
this.mountd = mountd;
this.rpcProgram = program;
}
示例6: startUDPServer
import org.apache.hadoop.oncrpc.RpcProgram; //导入依赖的package包/类
private static void startUDPServer(RpcProgramPortmap rpcProgram) {
rpcProgram.register(PortmapMapping.TRANSPORT_UDP);
SimpleUdpServer udpServer = new SimpleUdpServer(RpcProgram.RPCB_PORT,
rpcProgram, 1);
udpServer.run();
}
示例7: startTCPServer
import org.apache.hadoop.oncrpc.RpcProgram; //导入依赖的package包/类
private static void startTCPServer(final RpcProgramPortmap rpcProgram) {
rpcProgram.register(PortmapMapping.TRANSPORT_TCP);
SimpleTcpServer tcpServer = new SimpleTcpServer(RpcProgram.RPCB_PORT,
rpcProgram, 1);
tcpServer.run();
}
示例8: Nfs3Base
import org.apache.hadoop.oncrpc.RpcProgram; //导入依赖的package包/类
protected Nfs3Base(MountdBase mountd, RpcProgram program, Configuration conf) {
this.mountd = mountd;
this.rpcProgram = program;
this.nfsPort = conf.getInt("nfs3.server.port", Nfs3Constant.PORT);
LOG.info("NFS server port set to: "+nfsPort);
}