Open vishnucg opened 7 years ago
Can you share the schema of the hive table?
I suggest you to use Solr dynamic field for the hive table.
Example
CREATE EXTERNAL TABLE solr (id string, string_field_s string, int_field_i int, ...)
See https://cwiki.apache.org/confluence/display/solr/Dynamic+Fields
I was trying this one:
CREATE EXTERNAL TABLE sales_table (id string, vin string, make_nm string,series_nm string,business_month string,msrp string,inctv_amt string )
STORED BY 'com.lucidworks.hadoop.hive.LWStorageHandler'
LOCATION "
you can try changing the schema of the table,
CREATE EXTERNAL TABLE sales_table (id string, vin_s string, make_nm_s string,series_nm_s string,business_month_s string,msrp_s string,inctv_amt_s string )
I suspect that the business_month
is an Integer and that is why you got that error.
Tried this dynamic fields approach, but throwing the same exception.
I am able to load data into solr external table from another managed hive table. I can see the data got indexed and do a serach on it using HUE interface. But when I try to retrieve data from the solr table, it is throwing "Failed with exception java.io.IOException:java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String". I am using solr-hive-serde-2.2.6.jar (using com.lucidworks.hadoop.hive.LWStorageHandler) on Hive 1.1.0-cdh5.4.5