Commit a5fc5853 by 303514581@qq.com

2018/1/2 backup-es-192.168.0.120配置

parent 4d864df8
...@@ -30,11 +30,15 @@ public class ESConfig { ...@@ -30,11 +30,15 @@ public class ESConfig {
/** Es IP **/ /** Es IP **/
// public static final String ESIP = "1.119.44.201"; // public static final String ESIP = "1.119.44.201";
public static final String ESIP = "202.107.192.94"; // public static final String ESIP = "202.107.192.94";
public static final String ESIP = "192.168.0.120";
/** Es PORT **/ /** Es PORT **/
public static final int ESPORT = 9200; public static final int ESPORT = 9200;
/** Es 9300PORT **/ /** Es 9300PORT **/
public static final int ESTCPPORT = 9300; public static final int ESTCPPORT = 9300;
/** Es cluster.name **/
// public static final String CLUSTERNAME = "Media-University";
public static final String CLUSTERNAME = "my-test-es";
public static String getIp() { public static String getIp() {
......
...@@ -18,7 +18,7 @@ public class ESClient { ...@@ -18,7 +18,7 @@ public class ESClient {
private static class ESClientHolder { private static class ESClientHolder {
private static TransportClient getESClient() { private static TransportClient getESClient() {
Settings esSettings = Settings.builder().put("cluster.name", "Media-University") // 设置ES实例的名称 Settings esSettings = Settings.builder().put("cluster.name", ESConfig.CLUSTERNAME) // 设置ES实例的名称
.put("client.transport.sniff", false) // 自动嗅探整个集群的状态,把集群中其他ES节点的ip添加到本地的客户端列表中 .put("client.transport.sniff", false) // 自动嗅探整个集群的状态,把集群中其他ES节点的ip添加到本地的客户端列表中
// .put("client.transport.sniff", true) // .put("client.transport.sniff", true)
// .put("client.transport.ping_timeout", "15s") // .put("client.transport.ping_timeout", "15s")
......
#es.ip=192.168.1.75 #es.ip=192.168.1.75
#es.ip=1.119.44.201 #es.ip=1.119.44.201
es.ip=202.107.192.94 #es.ip=202.107.192.94
es.ip=192.168.0.120
#es.ip=192.168.0.234 #es.ip=192.168.0.234
#es.ip=115.231.214.234 #es.ip=115.231.214.234
#es.ip=192.168.0.11 #es.ip=192.168.0.11
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment