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

Issue in connecting hive with elasticsearch #701

Closed
Anish841 opened this issue Feb 17, 2016 · 2 comments
Closed

Issue in connecting hive with elasticsearch #701

Anish841 opened this issue Feb 17, 2016 · 2 comments

Comments

@Anish841
Copy link

I am trying to pull data from elasticsearch to hive .I did configuration in hive classpath using:
bin/hive -hiveconf hive.aux.jars.path=/users/mjuttuba/elasticsearch-hadoop-2.1.0.jar

Elasticsearch data json:
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": "testindex",
"_type": "test",
"_id": "1",
"_score": 1,
"_source": {
"field1": "value1"
}
}
]
}
}

i am using following to create external table on hive:
CREATE EXTERNAL TABLE testserver1 (
field1 STRING
)
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES('es.resource' = 'testindex/test','es.nodes'='http://173.36.45.170',
'es.port' = '9200',
'es.index.auto.create' = 'false')

When i hit
desc testserver1;
i am successfully getting schema description.

But I am getting following error when i hit select query:
select * from testserver1;

Error:
Failed with exception java.io.IOException:org.elasticsearch.hadoop.rest.EsHadoopNoNodesLeftException: Connection error (check network and/or proxy settings)- all nodes failed; tried [[http://173.36.45.170]]

Need somebody help in the community.

@costin
Copy link
Member

costin commented Feb 18, 2016

Please use the forum not the issue tracker for
questions.

The error is likely caused by the hive server not having access to the
actual ES nodes.
On Feb 17, 2016 3:05 AM, "Anish Ratnawat" notifications@github.com wrote:

I am trying to pull data from elasticsearch to hive .I did configuration
in hive classpath using:
bin/hive -hiveconf
hive.aux.jars.path=/users/mjuttuba/elasticsearch-hadoop-2.1.0.jar

Elasticsearch data json:
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": "testindex",
"_type": "test",
"_id": "1",
"_score": 1,
"_source": {
"field1": "value1"
}
}
]
}
}

i am using following to create external table on hive:
CREATE EXTERNAL TABLE testserver1 (
field1 STRING
)
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES('es.resource' = 'testindex/test','es.nodes'='
http://173.36.45.170',
'es.port' = '9200',
'es.index.auto.create' = 'false')

When i hit
desc testserver1;
i am successfully getting schema description.

But I am getting following error when i hit select query:
select * from testserver1;

Error:
Failed with exception
java.io.IOException:org.elasticsearch.hadoop.rest.EsHadoopNoNodesLeftException:
Connection error (check network and/or proxy settings)- all nodes failed;
tried [[http://173.36.45.170]]

Need somebody help in the community.


Reply to this email directly or view it on GitHub
#701.

@costin
Copy link
Member

costin commented Apr 8, 2016

As mentioned before - for questions, please use the dedicated forum not the issue tracker.

Closing the issue.

@costin costin closed this as completed Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants