gora.properties

Gora reads necessary configuration from a properties file name gora.properties.

The file is searched in the classpath, which is obtained using the ClassLoader of the DataStoreFactory class.

The following properties are recognized:

Common Properties

Property Required Default Explanation
gora.datastore.defaultNo The full classname of the default data store implementation to use
gora.datastore.autocreateschemaNotrueWhether to create schemas automatically

gora.datastore.default is perhaps the most important property in this file. This property configures the default DataStore implementation to use. However, other data stores can still be instantiated thorough the API. Data store implementation in Gora distribution include:

DataStore implementations
DataStore Implementation Full Class Name Module Name Explanation
AvroStore org.apache.gora.avro.store.AvroStore gora-core An adapter DataStore for binary-compatible Apache Avro serializations. AvroDataStore supports Binary and JSON serializations.
DataFileAvroStore org.apache.gora.avro.store.DataFileAvroStore gora-core DataFileAvroStore is file based store which uses Avro's DataFile{Writer,Reader}'s as a backend. This datastore supports mapreduce.
AccumuloStore org.apache.gora.accumulo.store.AccumuloStore gora-accumulo DataStore for Apache Accumulo.
HBaseStore org.apache.gora.hbase.store.HBaseStore gora-hbase DataStore for Apache HBase.
CassandraStore org.apache.gora.cassandra.store.CasssandraStore gora-cassandra DataStore for Apache Cassandra.
SolrStore org.apache.gora.solr.store.SolrStore gora-solr A DataStore implementation for Apache Solr.
MemStore org.apache.gora.memory.store.MemStore gora-core Memory based DataStore implementation for tests.
Dynamodb org.apache.gora.dynamodb.store.DyanmoDBStore gora-dynamodb Webservices-based datastore implementation for Amazon's DynamoDB.
MongoStore org.apache.gora.mongodb.store.MongoStore gora-mongodb A DataStore implementation for MongoDB document storage.

Some of the properties can be customized per datastore. The format of these properties is as follows: gora.<data_store_class>.<property_name>.

Note that <data_store_class> is the classname of the datastore implementation w/o the package name, for example HbaseStore. You can also use the string datastore instead of the specific data store class name, in which case, the property setting is effective to all data stores. The following properties can be set per data store.

Per DataStore Properties

DataStore Properties
Property Required Default Value Explanation
gora.<data_store_class>.autocreateschema No true Whether to create schemas automatically for the specific data store
gora.<data_store_class>.mapping.file No gora-{accumulo|hbase|cassandra|sql|dynamodb}-mapping.xml The name of the mapping file

Data store specific settings

Other than the properties above, some of the data stores have their own configurations. These properties are listed at the module documentations: