Reply
Explorer
Posts: 10
Registered: ‎04-12-2018

Error inserting data into Kudu table

I get the following error when trying to insert data into a kudu table

 

Error while compiling statement: FAILED: RuntimeException java.lang.ClassNotFoundException: org.apache.kudu.mapreduce.KuduTableOutputFormat

 

insert into db.my_kudu_table select ..... from db.another_table 

 

 

Cloudera Employee
Posts: 30
Registered: ‎02-22-2017

Re: Error inserting data into Kudu table

Hi Rams,

 

By looking at the error messages, it seems the KuduTableOutputFormat class is not loaded in the classpath. Can you provide more information on how you are inserting the data? Are you using Kudu-Mapreduce util tool? If so, you can follow ImportCsv.java as an example to load data from other data store.

Explorer
Posts: 10
Registered: ‎04-12-2018

Re: Error inserting data into Kudu table

Hi Hao,

I am using HUE via browser. Also tried hive and beeline commandline utilities. Same error in all 3 instances. 

Cloudera Employee
Posts: 30
Registered: ‎02-22-2017

Re: Error inserting data into Kudu table

Hi Rams,

 

Kudu doesn't support Hive integration yet so I would use Impala shell instead. 

 

Explorer
Posts: 10
Registered: ‎04-12-2018

Re: Error inserting data into Kudu table

Hi Hao

THe query does not compile in Impala Shell. Impala is unable to parse LATERAL VIEW EXPLODE

Cloudera Employee
Posts: 30
Registered: ‎02-22-2017

Re: Error inserting data into Kudu table

Hi Rams,

 

If you have to use 'LATERAL VIEW EXPLODE' then maybe other person who is more familiar with Impala can chime in, to see if there is anything equivalent or similar. Otherwise, query such as 'INSERT INTO my_kudu_table SELECT * FROM legacy_data_import_table' should work (check https://kudu.apache.org/docs/kudu_impala_integration.html#kudu_impala_insert_bulk).