| <?xml version="1.0"?> |
| <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd"> |
| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <document> |
| <header> |
| <title>Gora Configuration</title> |
| </header> |
| |
| <body> |
| |
| <section> |
| <title> gora.properties </title> |
| |
| <p>Gora reads necessary configuration from a properties file name |
| <code>gora.properties</code>. The file is searched in the classpath, which is |
| obtained using the ClassLoader of the <code>DataStoreFactory</code> class. |
| |
| The following properties are recognized:</p> |
| <p><br/><table> |
| <caption>Common Properties</caption> |
| <tr><th align="left">Property</th> <th align="left">Required</th> <th align="left">Default</th> <th align="left">Explanation</th></tr> |
| <tr><td>gora.datastore.default</td><td>No</td> <td> – </td> <td>The full classname of the default data store implementation to use </td></tr> |
| <tr><td>gora.datastore.autocreateschema</td><td>No</td><td>true</td><td>Whether to create schemas automatically</td></tr> |
| </table><br/></p> |
| |
| <p> <code>gora.datastore.default</code> is perhaps the most important property in this file. |
| This property configures the default <code>DataStore</code> implementation to use. |
| However, other data stores can still be instantiated thorough the API. |
| Data store implementation in Gora distribution include:</p> |
| |
| <p><br/><table> |
| <caption>DataStore implementations</caption> |
| <tr><th align="left">DataStore Implementation</th> <th align="left">Full Class Name</th> <th align="left">Module Name</th> <th align="left">Explanation</th></tr> |
| <tr><td>AvroStore</td> <td>org.apache.gora.avro.store.AvroStore</td> <td>gora-core</td> <td>An adapter DataStore for binary-compatible Avro serializations. AvroDataStore supports Binary and JSON serializations. </td></tr> |
| <tr><td>DataFileAvroStore</td> <td>org.apache.gora.avro.store.DataFileAvroStore</td> <td>gora-core</td> <td>DataFileAvroStore is file based store which uses Avro's DataFile{Writer,Reader}'s as a backend. This datastore supports mapreduce.</td></tr> |
| <tr><td>HBaseStore</td> <td>org.apache.gora.hbase.store.HBaseStore</td> <td><a href="site:gora-hbase">gora-hbase</a></td> <td> DataStore for <a href="ext:hbase">HBase</a>. </td></tr> |
| <tr><td>CassandraStore</td> <td>org.apache.gora.cassandra.store.CasssandraStore</td> <td><a href="site:gora-cassandra">gora-cassandra</a></td> <td> DataStore for <a href="ext:cassandra">Cassandra</a>. </td></tr> |
| <tr><td>SqlStore</td> <td>org.apache.gora.sql.store.SqlStore</td> <td><a href="site:gora-sql">gora-sql</a></td> <td> A DataStore implementation for RDBMS with a SQL interface. SqlStore uses JDBC drivers to communicate with the DB. Mysql and Hsqldb are supported for now.</td></tr> |
| <tr><td>MemStore</td> <td>org.apache.gora.memory.store.MemStore</td> <td>gora-core</td> <td> Memory based DataStore implementation for tests. </td></tr> |
| </table><br/></p> |
| |
| <p>Some of the properties can be customized per datastore. The format of these |
| properties is as follows: <code>gora.<data_store_class>.<property_name></code>. |
| Note that <code><data_store_class></code> is the classname of the datastore |
| implementation w/o the package name, for example <code>hbasestore</code>. |
| You can also use the string <code>datastore</code> 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.</p> |
| |
| <p><br/><table> |
| <caption>Per DataStore Properties</caption> |
| <tr><th align="left">Property</th> <th align="left">Required</th> <th align="left">Default</th> <th align="left">Explanation</th></tr> |
| |
| <tr><td>gora.<data_store_class>.autocreateschema</td> <td>No</td> <td>true</td> <td>Whether to create schemas automatically for the specific data store</td></tr> |
| <tr><td>gora.<data_store_class>.mapping.file</td> <td>No</td> <td>gora-{hbase|cassandra|sql}-mapping.xml</td> <td>The name of the mapping file</td></tr> |
| </table><br/></p> |
| |
| <p> </p> |
| |
| </section> |
| |
| <!--TODO: Avro data store properties --> |
| |
| <section> |
| <title>Data store specific settings</title> |
| <p> Other than the properties above, some of the data stores have their |
| own configurations. These properties are listed at the module documentations: |
| <ul> |
| <li><a href="site:gora-hbase">Gora HBase Module</a></li> |
| <li><a href="site:gora-cassandra">Gora Cassandra Module</a></li> |
| <li><a href="site:gora-sql">Gora SQL Module</a></li> |
| </ul> |
| </p> |
| </section> |
| |
| <!-- |
| <section> |
| <title>Example gora.properties file </title> |
| |
| </section> |
| --> |
| </body> |
| </document> |