[ 
https://issues.apache.org/jira/browse/CALCITE-3335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16925865#comment-16925865
 ] 

Shikha Somani edited comment on CALCITE-3335 at 9/9/19 4:18 PM:
----------------------------------------------------------------

Fix for it:

https://github.com/apache/calcite/pull/1447

Description: In model pass an additional config in operand with name "scheme" 
and supply value in this.

>{
  "version": "1.0",
  "defaultSchema": "elasticsearch",
  "schemas": [
    {
      "type": "custom",
      "name": "elasticsearch",
      "factory": 
"org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory",
      "operand": {
        "coordinates": "{'vpc.xxx': 443}",
        "userConfig": "{'admin': 'admin'}",
        "index":"member"
      }
    }
  ]
}


was (Author: shikhasomani20):
Fix for it:

https://github.com/apache/calcite/pull/1447

Description: In model pass an additional config in operand with name "scheme" 
and supply value in this.

{
  "version": "1.0",
  "defaultSchema": "elasticsearch",
  "schemas": [
    {
      "type": "custom",
      "name": "elasticsearch",
      "factory": 
"org.apache.calcite.adapter.elasticsearch.ElasticsearchSchemaFactory",
      "operand": {
        "coordinates": "{'vpc.xxx': 443}",
        "userConfig": "{'admin': 'admin'}",
        "index":"member"
      }
    }
  ]
}

> Connecting on ElasticSearch server on HTTPS
> -------------------------------------------
>
>                 Key: CALCITE-3335
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3335
>             Project: Calcite
>          Issue Type: Improvement
>          Components: elasticsearch-adapter
>            Reporter: Shikha Somani
>            Assignee: Andrei Sereda
>            Priority: Major
>              Labels: aws, elasticsearch
>
> Currently Calcite assumes that elasticsearch server will be exposed on HTTP 
> only. So, it initializes HTTP host with default scheme i.e. HTTP. 
> [Code|https://github.com/apache/calcite/blob/master/elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchSchemaFactory.java#L86]
> If a ElasticSearch server is on HTTPS, connection to it fails with below 
> exception:
> Caused by: java.net.UnknownHostException
>  
> This is evident when trying to connect on AWS ElasticSearchService which is 
> exposed only on HTTPS.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to