Over a million developers have joined DZone.

JPA Layer Over Kudu Using Kundera

See how to set up and configure Kundera, an object mapper that supports a variety of databases and database tools.

· Database Zone

Build fast, scale big with MongoDB Atlas, a hosted service for the leading NoSQL database. Try it now! Brought to you in partnership with MongoDB.

Kundera is a "Polyglot Object Mapper" with a JPA interface. Kundera currently supports Cassandra, MongoDB, HBase, Redis, OracleNoSQL, Neo4j, CouchDB, Kudu, Relational databases, and Apache Spark.

New folks should read Getting Started in 5 minutes.

Apache Kudu

Kudu is a columnar storage manager developed for the Hadoop platform. Kudu tables have a structured data model similar to tables in a traditional RDBMS.

Just like SQL, every table has a primary key made up of one or more columns. Rows can be efficiently read, updated, or deleted by their primary key. Kudu's simple data model makes it easy to port legacy applications. Tables are self-describing, so you can use standard tools like SQL engines (e.g. Drill) or Spark to analyze your data.

This new open source complement to HDFS and Apache HBase is designed to fill gaps in Hadoop's storage layer that have given rise to stitched-together, hybrid architectures.

JPA Over Kudu

Kudu is a new addition (in 3.4) to Kundera family. Kundera maps JPA Entity with Kudu Table.

How to Use 

To use it, user needs to add the following dependency in pom.xml:


Check out the latest Kundera version here.

Persistence Unit Configuration

<persistence-unit name="kudu_pu">
        <property name="kundera.nodes" value="quickstart.cloudera" />
        <property name="kundera.port" value="7051" />
        <property name="kundera.keyspace" value="kudutest" />
        <property name="kundera.client" value="kudu" />
        <property name="kundera.ddl.auto.prepare" value="create" />
        <property name="kundera.client.lookup.class" value="com.impetus.client.kudu.KuduDBClientFactory" />



Users can Create, Read, Update, and Delete data in Kudu Table using Kundera. Refer to the test-case for details.


Users can perform basic  SELECT  queries with  WHERE  clause. Refer to the test-case for details.

Schema Generation

Users can automatically generate schema using kundera.ddl.auto.prepare property in Persistence Unit. 

Check Kundera documentation for more details about Kundera with Kudu. 


Kundera, being JPA compliant, makes it easier to work with NoSQL databases. Irrespective of the database used, the user needs to write the same JPA query.  Also, if a user wants to switch databases (say from HBase to Kudu), there is no need to rewrite the code — just change some configurations in the persistence.xml  file. 

Now it's easier than ever to get started with MongoDB, the database that allows startups and enterprises alike to rapidly build planet-scale apps. Introducing MongoDB Atlas, the official hosted service for the database on AWS. Try it now! Brought to you in partnership with MongoDB.

kundera,big data,hadoop,kudu,orm,jpa

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}