Skip to content

Kundera with Kudu

Devender Yadav edited this page Oct 10, 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

  • 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

  • Secondary indexes using elasticsearch

Limitations:

  • 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