Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you give me the demo to connect elasticsearch? #30

Closed
sunyizhen opened this issue Dec 7, 2016 · 4 comments
Closed

Can you give me the demo to connect elasticsearch? #30

sunyizhen opened this issue Dec 7, 2016 · 4 comments

Comments

@sunyizhen
Copy link

such as the file of hive.properties
and more the elasticsearch plugin needs some jars ?
Thank you !

@FlavioF
Copy link
Collaborator

FlavioF commented Dec 13, 2016

Hi

You must configure two files:

/myPath/myschemafile.json

{
    "mySchema": [
        {
            "name": "TableName1",
            "sources": [
                {
                    "hostAddress": "__ES_HOST__",
                    "port": __ES_PORT__,
                    "clusterName": "__ES_CLUSTER_NAME__",
                    "type": "__ES_TYPE__",
		    "index": "__ES_INDEX_PATTERN__"
                }
            ]
        },
        {
            "name": "TableName2",
            "sources": [
               {
                    "hostAddress": "__ES_HOST__",
                    "port": __ES_PORT__,
                    "clusterName": "__ES_CLUSTER_NAME__",
                    "type": "__ES_TYPE_2__",
		    "index": "__ES_INDEX_PATTERN_2__"
                }
            ]
        },
        {
             .........
        }
    ]
}

.../presto/etc/catalog/es.properties

connector.name=elasticsearch
elasticsearch.metadata-uri=file:///myPath/myschemafile.json

Is this enough for you?

@sunyizhen
Copy link
Author

sunyizhen commented Dec 15, 2016 via email

@sunyizhen
Copy link
Author

Yes, this is enough for me ,but i want to connect elasticsearch 2.3 ,can you give me some suggesttions?

@albertocsm
Copy link
Owner

the connector is tested and known to be working with ES 1.6
2.x or 4.x was not tested, but i suspect there'r a few breaking changes to address. I would start by forking and updating ES mvn reference and start fixing whatever it breaks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants