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

group by error #331

Closed
lu4nx opened this issue Nov 25, 2014 · 4 comments
Closed

group by error #331

lu4nx opened this issue Nov 25, 2014 · 4 comments

Comments

@lu4nx
Copy link

lu4nx commented Nov 25, 2014

My env:

Hive: 0.13
elasticsearch-hadoop-hive: 2.0.2:

Similar to the following HQL:

from(select ip,site from logs) output         
INSERT OVERWRITE TABLE count_logs                             
select ip,site group by ip, site;

running and Hive Thrown a error:

Caused by: java.lang.ArithmeticException: / by zero                 
        at org.elasticsearch.hadoop.mr.EsOutputFormat$EsRecordWrite\
r.initSingleIndex(EsOutputFormat.java:230)                          
        at org.elasticsearch.hadoop.mr.EsOutputFormat$EsRecordWrite\
r.init(EsOutputFormat.java:199)                                     
        at org.elasticsearch.hadoop.hive.EsHiveOutputFormat$EsHiveR\
ecordWriter.write(EsHiveOutputFormat.java:58)                       
        at org.apache.hadoop.hive.ql.exec.FileSinkOperator.processO\
p(FileSinkOperator.java:621)                                        
        at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator\
.java:796)                                                          
        at org.apache.hadoop.hive.ql.exec.SelectOperator.processOp(\
SelectOperator.java:87)                                             

I think EsHiveOutputFormat has a bug?

@costin
Copy link
Member

costin commented Nov 25, 2014

Indeed, it looks like it. Anything special about your configuration? How are you running Hive - what distro? Is it MR or Tez by any chance?
Anything shows up in the logs with respect to Elasticsearch shards?

@lu4nx
Copy link
Author

lu4nx commented Nov 26, 2014

I using distro is CDH, and the version is 5.1.1

ElasticSearch is default settings, I just change the server's IP.

@costin
Copy link
Member

costin commented Dec 10, 2014

@1u4nx Can you post your query (assuming it was created on a fresh index)? It looks like Hive is passing an invalid state to the underlying HiveOutputFormat which leads to the error you are seeing. Logs would also come in handy.

Thanks!

@costin
Copy link
Member

costin commented Apr 28, 2015

Since there hasn't been any update, I'm closing the issue. Please open a new one if it appears again.

@costin costin closed this as completed Apr 28, 2015
@costin costin added the invalid label Apr 28, 2015
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