shikhasomani commented on a change in pull request #1447: Calcite-3335: Getting 
new parameter from model to set it in HTTP host…
URL: https://github.com/apache/calcite/pull/1447#discussion_r322894605
 
 

 ##########
 File path: 
elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchSchemaFactory.java
 ##########
 @@ -75,18 +92,15 @@ public ElasticsearchSchemaFactory() {
 
   /**
    * Builds elastic rest client from user configuration
-   * @param coordinates list of {@code hostname/port} to connect to
+   * @param hostSet set of ES HTTP Hosts to connect to
    * @return newly initialized low-level rest http client for ES
    */
-  private static RestClient connect(Map<String, Integer> coordinates) {
-    Objects.requireNonNull(coordinates, "coordinates");
-    Preconditions.checkArgument(!coordinates.isEmpty(), "no ES coordinates 
specified");
-    final Set<HttpHost> set = new LinkedHashSet<>();
-    for (Map.Entry<String, Integer> entry: coordinates.entrySet()) {
-      set.add(new HttpHost(entry.getKey(), entry.getValue()));
-    }
+  private static RestClient connect(Set<HttpHost> hostSet) throws 
MalformedURLException {
 
 Review comment:
   Done.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to