Skip to content

Kundera with Kudu

Devender Yadav edited this page Mar 7, 2017 · 9 revisions

Apache Kudu

Kudu is a columnar storage manager developed for the Hadoop platform. Kudu shares the common technical properties of Hadoop ecosystem applications: it runs on commodity hardware, is horizontally scalable, and supports highly available operation.

Kudu tables have a structured data model similar to tables in a traditional RDBMS. 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.

Support

Being a JPA provider, Kundera provides support for Kudu. Kundera maps JPA Entity with Kudu Table.

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

<dependency>
     <groupId>com.impetus.kundera.client</groupId>
     <artifactId>kundera-kudu</artifactId>
     <version>${kundera.version}</version>
</dependency>

Persistence unit configuration

<persistence-unit name="kudu_pu">
	<provider>com.impetus.kundera.KunderaPersistence</provider>
	<properties>
		<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" />
	</properties>
</persistence-unit>

Features:

  • CRUD

  • User can Create, Read, Update and Delete data in Kudu Table using Kundera. Refer test-case.

  • Basic Select Queries

  • User can perform basic SELECT queries with WHERE clause. Refer test-case.

  • Schema Generation

  • User can automatically generate schema by using kundera.ddl.auto.prepare property in Persistence Unit. Check Schema Generation for more details.

  • Primary Key Auto Generation

  • User can generate primary keys automatically. Check Primary-Key Auto Generation for more details. Refer test-case.

  • Secondary indexes using elasticsearch

  • User can create secondary indexes using elasticsearch. Check Elasticsearch as a Index Store for more details. Refer test-case.

#Limitation:

  • CRUD on simple entities (without relationships, inheritance) is possible.
  • Only select Queries are allowed with WHERE clauses.
  • Only AND and IN operators can be used in WHERE clause.
Clone this wiki locally