Overview

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

Gora Ignite Properties - gora.properties

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 value Description
BINARY Store as Byte[]
BOOLEAN Store as Boolean
INT Store as Integer
TINYINT Store as Byte
SMALLINT Store as Short
BIGINT Store as Long
DECIMAL Store as BigDecimal
DOUBLE Store as Double
REAL Store as Float
VARCHAR Store as Unicode string

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