Title: Gora Ignite Module

Overview

This is the main documentation for the gora-ignite module. gora-ignite module enables Apache Ignite backend support for Gora.

[TOC]

Gora Ignite Properties - gora.properties

  • gora.datastore.default=org.apache.gora.ignite.store.IgniteStore - Implementation of the persistent Java storage class for Ignite
  • gora.datastore.ignite.schema=PUBLIC - Property pointing to the Schema of the Ignite instance
  • gora.datastore.ignite.host=localhost - Property pointing to the host where the server is running
  • gora.datastore.ignite.port=10800 - Property pointing to the port where the server is running
  • gora.datastore.ignite.user=username - An optional property defining the username of the server if available
  • gora.datastore.ignite.password=password - An optional property defining the password of the server if available
  • gora.datastore.ignite.additionalConfigurations= - An optional property defining additional configurations for the Ignite connection, format and available parameters: Ignite JDBC Parameters

Gora Ignite mappings - gora-ignite-mapping.xml

You should then create a gora-ignite-mapping.xml which will describe how you want to store each of your Gora persistent objects and which primary keys you want to use:

<gora-otd>
  <class name="org.apache.gora.examples.generated.Employee" keyClass="java.lang.String" table="Employee">
    <primarykey column="pkssn" type="VARCHAR" />
    <field name="ssn" column="ssn" type="VARCHAR"/>
    <field name="name" column="name" type="VARCHAR"/>
    <field name="dateOfBirth" column="dateOfBirth" type="BIGINT"/>
    <field name="salary" column="salary" type="INT"/>
    <field name="boss" column="boss" type="BINARY"/>
    <field name="webpage" column="webpage" type="BINARY"/>
  </class>
</gora-otd>

Here you can see that we require the definition of child elements within the gora-otd mapping configuration.

Each class element should contain the following elements;

  1. a parameter defining the Persistent class name e.g. org.apache.gora.examples.generated.Employee,

  2. a parameter defining the keyClass e.g. java.lang.String which specifies the key which maps to the field values,

  3. a parameter defining the table e.g. Employee which will be used to persist each Gora object

In addition, within the class element we should define two type of child elements: a primary key (primarykey tag) and some fields (field tag).

The primary key element defines which column is used by Ignite to identify the records stored in the DataStore. It has two costumizable parameters: column which defines the column's name of the table to be used as identifier for the records. And type which defines the data type of the aforementioned column.

The fields elements define the actual mapping between persistent object‘s attributes and the table’s columns. These mapping have three customizable parameters: name which correspond to the object attribute‘s name. column which defines the column’s name of the table to be assosiated with the attribute. And type which defines the data type of that column.

Notice that complex structures such 3-union fields are mapped using Binary fields through Avro serialization.

Supported Data types

Description of supported type values:

Type valueDescription
BINARYStore as Byte[]
BOOLEANStore as Boolean
INTStore as Integer
TINYINTStore as Byte
SMALLINTStore as Short
BIGINTStore as Long
DECIMALStore as BigDecimal
DOUBLEStore as Double
REALStore as Float
VARCHARStore as Unicode string

A more detailed list of data types supported by Ignite and its equivalents in Java refer to Ignite JDBC Data types