in flink-connector-flume/src/main/java/org/apache/flink/streaming/connectors/flume/FlumeUtils.java [34:58]
public static RpcClient getRpcClient(String clientType, String hostname, Integer port, Integer batchSize) {
Properties props;
RpcClient client;
switch(clientType.toUpperCase()) {
case "THRIFT":
client = RpcClientFactory.getThriftInstance(hostname, port, batchSize);
break;
case "DEFAULT":
client = RpcClientFactory.getDefaultInstance(hostname, port, batchSize);
break;
case "DEFAULT_FAILOVER":
props = getDefaultProperties(hostname, port, batchSize);
props.put(CLIENT_TYPE_KEY, CLIENT_TYPE_DEFAULT_FAILOVER);
client = RpcClientFactory.getInstance(props);
break;
case "DEFAULT_LOADBALANCE":
props = getDefaultProperties(hostname, port, batchSize);
props.put(CLIENT_TYPE_KEY, CLIENT_TYPE_DEFAULT_LOADBALANCING);
client = RpcClientFactory.getInstance(props);
break;
default:
throw new IllegalStateException("Unsupported client type - cannot happen");
}
return client;
}