LoadBalancingLog4jAppender.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:flume-release-1.7.0 作者:
/**
 * Activate the options set using <tt>setHosts()</tt>, <tt>setSelector</tt>
 * and <tt>setMaxBackoff</tt>
 *
 * @throws FlumeException
 *           if the LoadBalancingRpcClient cannot be instantiated.
 */
@Override
public void activateOptions() throws FlumeException {
  try {
    final Properties properties = getProperties(hosts, selector, maxBackoff, getTimeout());
    rpcClient = RpcClientFactory.getInstance(properties);
    if (layout != null) {
      layout.activateOptions();
    }
    configured = true;
  } catch (Exception e) {
    String errormsg = "RPC client creation failed! " + e.getMessage();
    LogLog.error(errormsg);
    if (getUnsafeMode()) {
      return;
    }
    throw new FlumeException(e);
  }

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号