morningman commented on code in PR #13969: URL: https://github.com/apache/doris/pull/13969#discussion_r1014552099
########## fe/fe-core/src/main/java/org/apache/doris/datasource/EsExternalCatalog.java: ########## @@ -74,61 +76,45 @@ public class EsExternalCatalog extends ExternalCatalog { /** * Default constructor for EsExternalCatalog. */ - public EsExternalCatalog(long catalogId, String name, Map<String, String> props) throws DdlException { + public EsExternalCatalog(long catalogId, String name, Map<String, String> props) { this.id = catalogId; this.name = name; this.type = "es"; - validate(props); + setProperties(props); this.catalogProperty = new CatalogProperty(); this.catalogProperty.setProperties(props); } - private void validate(Map<String, String> properties) throws DdlException { - if (properties == null) { - throw new DdlException( - "Please set properties of elasticsearch table, " + "they are: hosts, user, password, index"); - } - - if (StringUtils.isBlank(properties.get(PROP_HOSTS))) { - throw new DdlException("Hosts of ES table is null."); - } - nodes = properties.get(PROP_HOSTS).trim().split(","); - // check protocol - for (String seed : nodes) { - if (!seed.startsWith("http")) { - throw new DdlException("the protocol must be used"); - } + private void setProperties(Map<String, String> properties) { Review Comment: Fixed -- 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. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org 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