use of com.pamirs.pradar.internal.config.ShadowEsServerConfig in project LinkAgent by shulieTech.
the class ShadowEsClientHolder method createShadowTransportClient.
private static TransportClient createShadowTransportClient(TransportClient target) {
List<String> nodesAddressAsString = getNodesAddressAsString(target);
ShadowEsServerConfig shadowEsServerConfig = findMatchShadowEsServerConfig(nodesAddressAsString);
if (shadowEsServerConfig == null) {
throw new PressureMeasureError(String.format("影子集群未配置,业务节点:%s", StringUtils.join(nodesAddressAsString, ",")));
}
TransportClientDefinition transportClientDefinition = TransportClientDefinitionStrategy.match(target);
return transportClientDefinition.solve(target, shadowEsServerConfig);
}
use of com.pamirs.pradar.internal.config.ShadowEsServerConfig in project LinkAgent by shulieTech.
the class ShadowEsClientHolder method createShadowRestClient.
private static RestClient createShadowRestClient(RestClient target) {
List<String> nodesAddressAsString = getNodesAddressAsString(target);
ShadowEsServerConfig shadowEsServerConfig = findMatchShadowEsServerConfig(nodesAddressAsString);
if (shadowEsServerConfig == null) {
throw new PressureMeasureError(String.format("影子集群未配置,业务节点:%s", StringUtils.join(nodesAddressAsString, ",")));
}
RestClientDefinition restClientDefinition = RestClientDefinitionStrategy.match(target);
return restClientDefinition.solve(target, shadowEsServerConfig);
}
Aggregations