Camel-Gora is an Apache Camel component that allows you to work with NoSQL databases using the Apache Gora framework.
Available as of Camel 2.14
Maven users will need to add the following dependency to their pom.xml for this component:
Apache Gora Overview
The Apache Gora open source framework provides an in-memory data model and persistence for big data. Gora supports persisting to column stores, key value stores, document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop™ MapReduce support. Gora uses the Apache Software License v2.0 and graduated from the Apache Incubator in Janauary 2012 to become a top-level Apache project.
Apache Gora currently supports the following datastores: Apache HBase, Apache Cassandra, Apache Accumulo, Amazon DynamoDB and SQL databases such as hsqldb, MySQL and more.
Hbase examples with mandatory options :
Using camel-gora needs some configuration. This mainly involve to configure the AvroStore through the gora.properties file and to define the relevant mappings as part of the gora-core module.
Extensive information for this configuration can be found in the apache gora documentation and the gora-conf page.
Supported Gora Operations
Supported operations include : put, get, delete, getSchemaName, deleteSchema, createSchema, query, deleteByQuery, schemaExists.
Some of the operations require arguments while some others no. The arguments to operations could be either the body of the in message or defined in a header property. Below there is a list with some additional info for each operation.
Inserts the persistent object with the given key.
Returns the object corresponding to the given key fetching all the fields.
Deletes the object with the given key.
Returns the schema name given to this DataStore.
Deletes the underlying schema or table (or similar) in the datastore that holds the objects.
Creates the optional schema or table (or similar) in the datastore to hold the objects.
Executes the given query and returns the results.
Deletes all the objects matching the query.
Returns whether the schema that holds the data exists in the datastore.
Used in order to define the operation to execute.
Used in order to define the datum key for the operations need it.
Gora Configuration attributes
Key type. *
Value type. *
DataStore type *
Concurrent Consumers (used only by consumers).
Flush on every operation (used only by producers).
NOTE: the gora configuration properties marked with asterisk are mandatory
Gora Query attributes
Start Time attribute.
End Time attribute.
Time Range From attribute.
Time Range To attribute.
Gora Query Limit attribute.
Start Key attribute.
End Key attribute.
Key Range From attribute.
Key Range To attribute.
Create Schema (XML DSL):
SchemaExists (XML DSL):
Put (XML DSL):
Get (XML DSL):
Delete (XML DSL):
Query (XML DSL):
The full usage examples in the form of integration tests can be found at camel-gora-examples repository.
For more please information and in depth configuration refer to the Apache Gora Documentation and the Apache Gora Tutorial.