Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chimpler/hive-solr

Hive Storage Handler for SOLR
https://github.com/chimpler/hive-solr

Last synced: 3 months ago
JSON representation

Hive Storage Handler for SOLR

Awesome Lists containing this project

README

        

Installation
============

To install:

$ git clone http://github.org/chimpler/hive-solr
$ cd hive-solr
$ mvn package
$ cp target/hive-solr-0.0.1-SNAPSHOT-jar-with-dependencies.jar `$HIVE_HOME/lib`

Usage
=====

If your SOLR schema is something like:






















id


name



You can create an external table as follows:

hive> create external table solr_items2 (
id INT,
item_id INT,
name STRING,
year INT,
month INT,
shipping_method INT,
us_sold INT,
ca_sold INT,
fr_sold INT,
uk_sold INT
) stored by "com.chimpler.hive.solr.SolrStorageHandler"
with serdeproperties ("solr.column.mapping"="id,item_id,name,year,month,shipping_method,us_sold,ca_sold,fr_sold,uk_sold")
tblproperties ("solr.url" = "http://localhost:8983/solr/core0","solr.buffer.input.rows"="10000","solr.buffer.output.rows"="10000");

Note that solr.buffer.input.rows and solr.buffer.output.rows are optional (default is 100000).

Acknowledgements
================

Thank you to yc-huang for his work on hive-mongo (https://github.com/yc-huang/Hive-mongo) that served as a base for hive-solr.