wuyunfeng commented on a change in pull request #5325:
URL: https://github.com/apache/incubator-doris/pull/5325#discussion_r580863477
##########
File path: be/src/exec/es/es_scan_reader.cpp
##########
@@ -103,6 +106,9 @@ Status ESScanReader::open() {
}
_network_client.set_basic_auth(_user_name, _passwd);
_network_client.set_content_type("application/json");
+ if (_use_ssl_client == "true") {
+ _network_client.set_ssl();
Review comment:
```suggestion
_network_client.use_ssl()
```
##########
File path:
fe/fe-core/src/main/java/org/apache/doris/external/elasticsearch/EsNodeInfo.java
##########
@@ -96,6 +101,31 @@ public EsNodeInfo(String id, Map<String, Object> map)
throws DorisEsException {
}
}
+ public EsNodeInfo(String id, String seed, boolean useSslClient) throws
DorisEsException {
+ this.id = id;
+ if (seed.startsWith("http://")) {
+ seed = seed.substring(7);
+ }
+ if (seed.startsWith("https://")) {
+ seed = seed.substring(8);
+ }
+ String[] scratch = seed.split(":");
+ int port = 80;
+ String remoteHost = (useSslClient ? "https://" : "http://") +
scratch[0];
+ if (scratch.length == 2) {
+ port = Integer.parseInt(scratch[1]);
+ }
+ LOG.info("--------------- remoteHost={}, port={} -------------",
remoteHost, port);
Review comment:
delete this info log
##########
File path: gensrc/thrift/Descriptors.thrift
##########
@@ -227,6 +227,7 @@ struct TOdbcTable {
}
struct TEsTable {
+ 1: required bool useSslClient
Review comment:
use `properties` to transfer this `flag` to be
##########
File path: be/src/exec/es/es_scan_reader.h
##########
@@ -63,6 +64,8 @@ class ESScanReader {
std::string _query;
// Elasticsearch shards to fetch document
std::string _shards;
+ // whether use ssl client
+ std::string _use_ssl_client;
Review comment:
```suggestion
bool _use_ssl_client;
```
convert string to bool?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]