hive-solr
hive-solr copied to clipboard
Cannot index data with Hive
Hello,
I have an issue when insert data with Hive (on top of Tez).
After having created a collection in solr, I created an external table in Hive successfully and I am have to query it and get the data I have inserted through Solr.
create external table solr_tbl (id string, descrip string) stored by "com.chimpler.hive.solr.SolrStorageHandler" with serdeproperties ("solr.column.mapping"="id,descrip") tblproperties ("solr.url" = "http://****:8983/solr/mycollection","solr.buffer.input.rows"="10000","solr.buffer.output.rows"="10000");
SELECT * FROM solr_tbl;
However when I try to insert (index) data through Hive, I get following error: INSERT INTO solr_tbl VALUES ("2", "test_hive");
[...] more Caused by: java.lang.ClassNotFoundException: com.chimpler.hive.solr.SolrInputFormat at java.net.URLClassLoader.findClass(URLClassLoader.java:381) [...]
The class 'SolrInputFormat' seems to be missing. But JAR are located in HIVE_HOME/lib and hadoop classpath.
Thank you in advance for help.