Reply
HJ
Explorer
Posts: 12
Registered: ‎07-05-2018
Accepted Solution

Apache kudu

hi,I am woking on kudu and oracle. I have more than 5 million records and i have been asked to read them from oracle and write into kudu table.what i did was,one way i did a ojdbc connection,got the records from oracle and insert into kudu table using partial row and insert menthod. i just want to know if i could do bulk inserts to avoid more time on writes 

HJ
Explorer
Posts: 12
Registered: ‎07-05-2018

Re: Apache kudu

can i do bulk insert, if so please tell me how to 

Highlighted
HJ
Explorer
Posts: 12
Registered: ‎07-05-2018

Re: Apache kudu

if i do the writes as per the program given in https://github.com/cloudera/kudu-examples/tree/master/java/java-sample/src/main/java/org/kududb/exam...

 

it takes an hour to insert the data in kudu table.

 

How can i insert the records in lesser time 

 

Cloudera Employee
Posts: 64
Registered: ‎04-08-2014

Re: Apache kudu

One option is to export to Parquet on HDFS using Sqoop, then use Impala to CREATE TABLE AS SELECT * FROM your parquet table into your Kudu table.

 

Unfortunately Sqoop does not have support for Kudu at this time.

Cloudera Employee
Posts: 64
Registered: ‎04-08-2014

Re: Apache kudu

Another option is to write a Spark job that uses multiple tasks to read from Oracle and write to Kudu in parallel, or something equivalent using multiple processes or threads.

HJ
Explorer
Posts: 12
Registered: ‎07-05-2018

Re: Apache kudu

thank you but i just want to use java and do batch insert,is tere any way to perfrom faster writes on kudu table using java 

Cloudera Employee
Posts: 64
Registered: ‎04-08-2014

Re: Apache kudu

Are you sure the bottleneck is Kudu? Maybe the bottleneck is reading from Oracle?

 

Using the Kudu AUTO_FLUSH_BACKGROUND mode should give pretty fast throughput when writing. See https://kudu.apache.org/apidocs/org/apache/kudu/client/SessionConfiguration.FlushMode.html

 

You can also try increasing the KuduSession.setMutationBufferSpace() value, also consider your partitioning scheme.

 

If you want more parallelism you can also consider scanning different ranges in Oracle with different processes or threads on the same or different client machine and perform more parallelized writes to Kudu.

Announcements