|
@ -94,6 +94,8 @@ public class ElasticSearch7Pool {
|
|
|
public ResultSet restHighLevelClientStream(String sql) throws Exception {
|
|
|
// Connection connection = DriverManager.getConnection("jdbc:es://http://172.26.0.55:9200","elastic","elastic");
|
|
|
// Connection connection = DriverManager.getConnection("jdbc:es://http://172.26.0.168:9200/","elastic","elastic");
|
|
|
System.out.println("连接地址==>hosts:"+hosts);
|
|
|
System.out.println("es账号密码==>userName:"+userName+" ------------- password:"+password);
|
|
|
Connection connection = DriverManager.getConnection("jdbc:es://" + hosts, userName, password);
|
|
|
Statement statement = connection.createStatement();
|
|
|
ResultSet resultSet = statement.executeQuery(sql);
|