You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/10/31 06:06:23 UTC

[GitHub] [calcite] CoderZJ commented on a change in pull request #1518: [CALCITE-3434]ElasticSearch schema with pathPrefix

CoderZJ commented on a change in pull request #1518: [CALCITE-3434]ElasticSearch schema with pathPrefix
URL: https://github.com/apache/calcite/pull/1518#discussion_r340972183
 
 

 ##########
 File path: elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchSchemaFactory.java
 ##########
 @@ -101,12 +102,16 @@ public ElasticsearchSchemaFactory() {
    * @param hosts list of ES HTTP Hosts to connect to
    * @return newly initialized low-level rest http client for ES
    */
-  private static RestClient connect(List<HttpHost> hosts) {
+  private static RestClient connect(List<HttpHost> hosts, String pathPrefix) {
 
     Objects.requireNonNull(hosts, "hosts or coordinates");
     Preconditions.checkArgument(!hosts.isEmpty(), "no ES hosts specified");
 
-    return RestClient.builder(hosts.toArray(new HttpHost[hosts.size()])).build();
+    RestClientBuilder builder = RestClient.builder(hosts.toArray(new HttpHost[hosts.size()]));
+    if (pathPrefix != null && pathPrefix.length() > 0) {
 
 Review comment:
   ok, I had replace this code. tks.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services