nytlabs/hive

Importing Data error

nohaimo opened this issue · 1 comments

I have elastic search running and started hive..

When i run this command:
curl -XPOST localhost:8080/admin/setup -d@samples/example.json
I get this response:
{"error":"record not found"}

logs
2014/12/14 19:11:47 running hive-server on port 8080 storing data in elasticsearch under index hive
2014/12/14 19:12:47 {"error":"record not found"}

Any ideas ?

This was a confusing error to debug, but I was able to resolve it... eventually.

Hive's setup first checks if an index exists in elasticsearch before reconfiguring and possibly losing existing data. The golang package we're using to talk to the database isn't checking the response in this 'IndicesExist' function correctly, so it always returns true, sometimes with an error... only the error is the correct 404 Not Found from elasticsearch when the index does not actually exist.

Long story short, I just pushed a fix to accommodate this problem and will issue a release now. Thanks for reporting.