0

I have crawled some data via Nutch 2.3.1. Data is stored in Hbase 0.98 table. I have created an external table that import data from hbase table. Now I have to index this data to solr 4.10.3. For that I have followed this well known tutorial. I have created hive table like

create external table if not exists solr_items (
    id STRING,
    content STRING,
    url STRING,
    title STRING
) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' 
stored by "com.chimpler.hive.solr.SolrStorageHandler"
with serdeproperties ("solr.column.mapping"="id,content,url,title")
tblproperties ("solr.url" = "http://localhost:8983/solr/collection1") ;

There was some problem when I tried to copy data from hbase posted here. Then I just decide to first index some dummy data. For that I have decided to load data from a file like

LOAD DATA LOCAL INPATH 'data.csv3' OVERWRITE INTO TABLE solr_items;

But it gave following error

FAILED: SemanticException [Error 10101]: A non-native table cannot be used as target for LOAD

Where is the problem HADOOP version is 1.2.1

Community
  • 1
  • 1
Hafiz Muhammad Shafiq
  • 8,168
  • 12
  • 63
  • 121

1 Answers1

1

You can't use LOAD DATA for external tables. Hive LanguageManual DML:

Hive does not do any transformation while loading data into tables. Load operations are currently pure copy/move operations that move datafiles into locations corresponding to Hive tables.

Hive obviously can't just copy data in case of Solr external table because Solr uses it's own internal data presentation.

You can insert though:

insert into table solr_items select * from tempTable;
MaxNevermind
  • 2,784
  • 2
  • 25
  • 31