本文整理了Java中java.net.BindException.getCause()
方法的一些代码示例,展示了BindException.getCause()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BindException.getCause()
方法的具体详情如下:
包路径:java.net.BindException
类名称:BindException
方法名:getCause
暂无
代码示例来源:origin: apache/hbase
protected RpcServerInterface createRpcServer(Server server, Configuration conf,
RpcSchedulerFactory rpcSchedulerFactory, InetSocketAddress bindAddress, String name)
throws IOException {
boolean reservoirEnabled = conf.getBoolean(RESERVOIR_ENABLED_KEY, true);
try {
return RpcServerFactory.createRpcServer(server, name, getServices(),
bindAddress, // use final bindAddress for this server.
conf, rpcSchedulerFactory.create(conf, this, server), reservoirEnabled);
} catch (BindException be) {
throw new IOException(be.getMessage() + ". To switch ports use the '"
+ HConstants.REGIONSERVER_PORT + "' configuration property.",
be.getCause() != null ? be.getCause() : be);
}
}
代码示例来源:origin: apache/hbase
@Override
protected RpcServerInterface createRpcServer(Server server, Configuration conf,
RpcSchedulerFactory rpcSchedulerFactory, InetSocketAddress bindAddress, String name)
throws IOException {
// RpcServer at HM by default enable ByteBufferPool iff HM having user table region in it
boolean reservoirEnabled = conf.getBoolean(RESERVOIR_ENABLED_KEY,
LoadBalancer.isMasterCanHostUserRegions(conf));
try {
return RpcServerFactory.createRpcServer(server, name, getServices(),
bindAddress, // use final bindAddress for this server.
conf, rpcSchedulerFactory.create(conf, this, server), reservoirEnabled);
} catch (BindException be) {
throw new IOException(be.getMessage() + ". To switch ports use the '"
+ HConstants.MASTER_PORT + "' configuration property.",
be.getCause() != null ? be.getCause() : be);
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-hdfs
private static BindException appendMessageToBindException(BindException e,
String msg) {
BindException newBe = new BindException(e.getMessage() + " " + msg);
newBe.initCause(e.getCause());
newBe.setStackTrace(e.getStackTrace());
return newBe;
}
}
代码示例来源:origin: harbby/presto-connectors
HConstants.REGIONSERVER_PORT;
throw new IOException(be.getMessage() + ". To switch ports use the '" + configName +
"' configuration property.", be.getCause() != null ? be.getCause() : be);
内容来源于网络,如有侵权,请联系作者删除!