stalary commented on a change in pull request #5325: URL: https://github.com/apache/incubator-doris/pull/5325#discussion_r581757278
########## File path: fe/fe-core/src/main/java/org/apache/doris/catalog/EsTable.java ########## @@ -186,36 +200,40 @@ private void validate(Map<String, String> properties) throws DdlException { // enable doc value scan for Elasticsearch if (properties.containsKey(DOC_VALUE_SCAN)) { - try { - enableDocValueScan = Boolean.parseBoolean(properties.get(DOC_VALUE_SCAN).trim()); - } catch (Exception e) { - throw new DdlException("fail to parse enable_docvalue_scan, enable_docvalue_scan= " - + properties.get(VERSION).trim() + " ,`enable_docvalue_scan`" - + " should be like 'true' or 'false', value should be double quotation marks"); - } + enableDocValueScan = EsUtil.getBooleanProperty(properties, DOC_VALUE_SCAN); } if (properties.containsKey(KEYWORD_SNIFF)) { - try { - enableKeywordSniff = Boolean.parseBoolean(properties.get(KEYWORD_SNIFF).trim()); - } catch (Exception e) { - throw new DdlException("fail to parse enable_keyword_sniff, enable_keyword_sniff= " - + properties.get(VERSION).trim() + " ,`enable_keyword_sniff`" - + " should be like 'true' or 'false', value should be double quotation marks"); + enableKeywordSniff = EsUtil.getBooleanProperty(properties, KEYWORD_SNIFF); + } + + if (properties.containsKey(ES_NODES_DISCOVERY)) { + esNodesDiscovery = EsUtil.getBooleanProperty(properties, ES_NODES_DISCOVERY); + } + + if (properties.containsKey(USE_SSL_CLIENT)) { Review comment: in 96 line ########## File path: fe/fe-core/src/main/java/org/apache/doris/catalog/EsTable.java ########## @@ -186,36 +200,40 @@ private void validate(Map<String, String> properties) throws DdlException { // enable doc value scan for Elasticsearch if (properties.containsKey(DOC_VALUE_SCAN)) { - try { - enableDocValueScan = Boolean.parseBoolean(properties.get(DOC_VALUE_SCAN).trim()); - } catch (Exception e) { - throw new DdlException("fail to parse enable_docvalue_scan, enable_docvalue_scan= " - + properties.get(VERSION).trim() + " ,`enable_docvalue_scan`" - + " should be like 'true' or 'false', value should be double quotation marks"); - } + enableDocValueScan = EsUtil.getBooleanProperty(properties, DOC_VALUE_SCAN); } if (properties.containsKey(KEYWORD_SNIFF)) { - try { - enableKeywordSniff = Boolean.parseBoolean(properties.get(KEYWORD_SNIFF).trim()); - } catch (Exception e) { - throw new DdlException("fail to parse enable_keyword_sniff, enable_keyword_sniff= " - + properties.get(VERSION).trim() + " ,`enable_keyword_sniff`" - + " should be like 'true' or 'false', value should be double quotation marks"); + enableKeywordSniff = EsUtil.getBooleanProperty(properties, KEYWORD_SNIFF); + } + + if (properties.containsKey(ES_NODES_DISCOVERY)) { + esNodesDiscovery = EsUtil.getBooleanProperty(properties, ES_NODES_DISCOVERY); + } + + if (properties.containsKey(USE_SSL_CLIENT)) { Review comment: in 96 line private boolean useSslClient = false; ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org