DATAES-105 - support for IP6

This commit is contained in:
Artur Konczak 2016-04-04 10:31:32 +01:00
parent b2f0300856
commit ef0831fa33
2 changed files with 6 additions and 2 deletions

View File

@ -89,8 +89,8 @@ public class TransportClientFactoryBean implements FactoryBean<TransportClient>,
client = TransportClient.builder().settings(settings()).build();
Assert.hasText(clusterNodes, "[Assertion failed] clusterNodes settings missing.");
for (String clusterNode : split(clusterNodes, COMMA)) {
String hostName = substringBefore(clusterNode, COLON);
String port = substringAfter(clusterNode, COLON);
String hostName = substringBeforeLast(clusterNode, COLON);
String port = substringAfterLast(clusterNode, COLON);
Assert.hasText(hostName, "[Assertion failed] missing host name in 'clusterNodes'");
Assert.hasText(port, "[Assertion failed] missing port in 'clusterNodes'");
logger.info("adding transport node : " + clusterNode);

View File

@ -9,6 +9,10 @@
http-enabled="false" path-data="target/elasticsearchTestData" path-home="src/test/resources/test-home-dir"
path-configuration="node-client-configuration.yml"/>
<!-- ip4 -->
<!--<elasticsearch:transport-client id="client" cluster-name="elasticsearch" cluster-nodes="127.0.0.1:9300" />-->
<!-- ip6 -->
<!--<elasticsearch:transport-client id="client" cluster-name="elasticsearch" cluster-nodes="[::1]:9300" />-->
</beans>