gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r911172 - in /websites/staging/gora/trunk/content: ./ current/gora-camel.html
Date Tue, 03 Jun 2014 21:37:18 GMT
Author: buildbot
Date: Tue Jun  3 21:37:17 2014
New Revision: 911172

Log:
Staging update by buildbot for gora

Modified:
    websites/staging/gora/trunk/content/   (props changed)
    websites/staging/gora/trunk/content/current/gora-camel.html

Propchange: websites/staging/gora/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Jun  3 21:37:17 2014
@@ -1 +1 @@
-1599801
+1599802

Modified: websites/staging/gora/trunk/content/current/gora-camel.html
==============================================================================
--- websites/staging/gora/trunk/content/current/gora-camel.html (original)
+++ websites/staging/gora/trunk/content/current/gora-camel.html Tue Jun  3 21:37:17 2014
@@ -155,61 +155,288 @@ under the License. 
   
   <div class="container" id="Gora_Gora Configuration">
 
-<h2 id="goraproperties">gora.properties</h2>
-<p>Gora reads necessary configuration from a properties file name 
-<code>gora.properties</code>. </p>
-<p>The file is searched in the classpath, which is 
-obtained using the <code>ClassLoader</code> of the <a href="http://gora.apache.org/current/api/apidocs-0.4/index.html?org/apache/gora/store/DataStoreFactory.html">DataStoreFactory</a>
- class.</p>
-<p>The following properties are recognized:</p>
-<h2 id="common-properties">Common Properties</h2>
-<p><table>
-  <tr><th align="left">Property</th> <th align="left">Required</th>
<th align="left">Default</th> <th align="left">Explanation</th></tr>
-  <tr><td><code>gora.datastore.default</code></td><td>No</td>
<td> – </td> <td>The full classname of the default data store implementation
to use </td></tr>
-  <tr><td><code>gora.datastore.autocreateschema</code></td><td>No</td><td>true</td><td>Whether
to create schemas automatically</td></tr>
-</table></p>
-<p><code>gora.datastore.default</code> is perhaps the most important property
in this file. 
-This property configures the default <a href="http://gora.apache.org/current/api/apidocs-0.4/index.html?org/apache/gora/store/DataStore.html">DataStore</a>
implementation to use. 
-However, other data stores can still be instantiated thorough the API. 
-Data store implementation in Gora distribution include:</p>
-<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><b>AvroStore</b></td> <td><code>org.apache.gora.avro.store.AvroStore</code></td>
<td>gora-core</td> <td>An adapter DataStore for binary-compatible Apache
Avro serializations. AvroDataStore supports Binary and JSON serializations. </td></tr>
-  <tr><td><b>DataFileAvroStore</b></td> <td><code>org.apache.gora.avro.store.DataFileAvroStore</code></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><b>AccumuloStore</b></td> <td><code>org.apache.gora.accumulo.store.AccumuloStore</code></td>
<td>gora-accumulo</td> <td> DataStore for Apache Accumulo. </td></tr>
-  <tr><td><b>HBaseStore</b></td> <td><code>org.apache.gora.hbase.store.HBaseStore</code></td>
<td>gora-hbase</td> <td> DataStore for Apache HBase. </td></tr>
-  <tr><td><b>CassandraStore</b></td> <td><code>org.apache.gora.cassandra.store.CasssandraStore</code></td>
<td>gora-cassandra</td> <td> DataStore for Apache Cassandra. </td></tr>
-  <tr><td><b>SolrStore</b></td> <td><code>org.apache.gora.solr.store.SolrStore</code></td>
<td>gora-solr</td> <td> A DataStore implementation for Apache Solr.</td></tr>
-  <tr><td><b>MemStore</b></td> <td><code>org.apache.gora.memory.store.MemStore</td>
<td>gora-core</td> <td> Memory based DataStore implementation for tests.
</td></tr>
-  <tr><td><b>Dynamodb</b></td> <td><code>org.apache.gora.dynamodb.store.DyanmoDBStore</td>
<td>gora-dynamodb</td> <td> Webservices-based datastore implementation for
Amazon's DynamoDB. </td></tr>
-</table>
-
-<p>Some of the properties can be customized per datastore. The format of these 
-properties is as follows: <code>gora.&lt;data_store_class&gt;.&lt;property_name&gt;</code>.</p>
-<p>Note that <code>&lt;data_store_class&gt;</code> is the classname
of the datastore 
-implementation w/o the package name, for example <code>HbaseStore</code>. 
-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.</p>
-<h2 id="per-datastore-properties">Per DataStore Properties</h2>
-<p><table>
-  <caption>DataStore Properties</caption>
-  <tr><th align="left">Property</th> <th align="left">Required</th>
<th align="left">Default Value</th> <th align="left">Explanation</th></tr>
-  <tr><td><code>gora.&lt;data_store_class&gt;.autocreateschema</code>
No true Whether to create schemas automatically for the specific data store</td></tr>
-  <tr><td><code>gora.&lt;data_store_class&gt;.mapping.file</code>
No gora-{accumulo|hbase|cassandra|sql|dynamodb}-mapping.xml The name of the mapping file</td></tr>
-</table></p>
-<h2 id="data-store-specific-settings">Data store specific settings</h2>
-<p>Other than the properties above, some of the data stores have their 
-own configurations. These properties are listed at the module documentations:</p>
-<ul>
-<li><a href="./gora-core.html">Gora Core Module</a> (incl. AvroStore, DataFileAvroStore
and MemStore)</li>
-<li><a href="./gora-hbase.html">Gora HBase Module</a></li>
-<li><a href="./gora-cassandra.html">Gora Cassandra Module</a></li>
-<li><a href="./gora-solr.html">Gora Solr Module</a></li>
-<li><a href="./gora-accumulo.html">Gora Accumulo Module</a></li>
-<li><a href="./gora-dynamodb.html">Gora DynamoDB Module</a></li>
-</ul>
+<h1 id="introduction">Introduction</h1>
+<p><strong>Camel-Gora</strong> is an <a href="http://camel.apache.org/">Apache
Camel</a> component that allows you to work with NoSQL databases using the 
+<a href="http://gora.apache.org/">Apache Gora</a> framework. </p>
+<p><strong>N.B.</strong> Camel-Gora is NOT a Gora module... but instead
a Camel one. This documentation exists to provide detail on how 
+Gora is being used in different settings.</p>
+<p><strong>Available as of Camel 2.14</strong></p>
+<p>Maven users will need to add the following dependency to their pom.xml for this
component:</p>
+<div class="codehilite"><pre><span class="nt">&lt;dependency&gt;</span>
+    <span class="nt">&lt;groupId&gt;</span>org.apache.camel<span class="nt">&lt;/groupId&gt;</span>
+    <span class="nt">&lt;artifactId&gt;</span>camel-gora<span class="nt">&lt;/artifactId&gt;</span>
+    <span class="nt">&lt;version&gt;</span>x.x.x<span class="nt">&lt;/version&gt;</span>
+    <span class="c">&lt;!-- use the same version as your Camel core version --&gt;</span>
+<span class="nt">&lt;/dependency&gt;</span>
+</pre></div>
+
+
+<h2 id="uri-format">URI format</h2>
+<div class="codehilite"><pre><span class="n">gora</span><span
class="o">:</span><span class="n">instanceName</span><span class="o">[?</span><span
class="n">options</span><span class="o">]</span>
+</pre></div>
+
+
+<p>Hbase examples with mandatory options : </p>
+<p><em>XML</em></p>
+<div class="codehilite"><pre><span class="o">&lt;</span><span
class="n">to</span> <span class="n">uri</span><span class="p">=</span>&quot;<span
class="n">gora</span><span class="p">:</span><span class="n">foobar</span>?<span
class="n">keyClass</span><span class="p">=</span><span class="n">java</span><span
class="p">.</span><span class="n">lang</span><span class="p">.</span><span
class="n">Long</span><span class="o">&amp;</span><span class="n">amp</span><span
class="p">;</span><span class="n">valueClass</span><span class="p">=</span><span
class="n">org</span><span class="p">.</span><span class="n">apache</span><span
class="p">.</span><span class="n">camel</span><span class="p">.</span><span
class="n">component</span><span class="p">.</span><span class="n">gora</span><span
class="p">.</span><span class="n">generated</span><span class="p">.</span><span
class="n">Pageview</span><span class="o">&amp;</span><span class="n">amp</span><span
class="p">;</span><span class="n">dataStoreClass</
 span><span class="p">=</span><span class="n">org</span><span
class="p">.</span><span class="n">apache</span><span class="p">.</span><span
class="n">gora</span><span class="p">.</span><span class="n">hbase</span><span
class="p">.</span><span class="n">store</span><span class="p">.</span><span
class="n">HBaseStore</span>&quot;<span class="o">/&gt;</span>
+</pre></div>
+
+
+<p><em>Java DSL</em></p>
+<div class="codehilite"><pre><span class="n">to</span><span class="p">(</span>&quot;<span
class="n">gora</span><span class="p">:</span><span class="n">foobar</span>?<span
class="n">keyClass</span><span class="p">=</span><span class="n">java</span><span
class="p">.</span><span class="n">lang</span><span class="p">.</span><span
class="n">Long</span><span class="o">&amp;</span><span class="n">valueClass</span><span
class="p">=</span><span class="n">org</span><span class="p">.</span><span
class="n">apache</span><span class="p">.</span><span class="n">camel</span><span
class="p">.</span><span class="n">component</span><span class="p">.</span><span
class="n">gora</span><span class="p">.</span><span class="n">generated</span><span
class="p">.</span><span class="n">Pageview</span><span class="o">&amp;</span><span
class="n">dataStoreClass</span><span class="p">=</span><span class="n">org</span><span
class="p">.</span><span class="n">apache</span><span class="p">.</span><span
class="n">gora</
 span><span class="p">.</span><span class="n">hbase</span><span
class="p">.</span><span class="n">store</span><span class="p">.</span><span
class="n">HBaseStore</span>&quot;<span class="o">/&gt;</span>
+</pre></div>
+
+
+<h2 id="configuratiion">Configuratiion</h2>
+<p>Using camel-gora needs some configuration. This mainly involve to configure the
<code>AvroStore</code> through the <code>gora.properties</code> file
and to define the relevant mappings as part of the <em><a href="http://gora.apache.org/current/gora-core.html">gora-core</a></em>
module.</p>
+<p>Extensive information for this configuration can be found in the apache <a href="./index.html">gora
documentation</a> and the <a href="./gora-conf.html">gora-conf</a> page.
</p>
+<h2 id="supported-gora-operations">Supported Gora Operations</h2>
+<p>Supported operations include : <strong><em>put<strong>, </strong>get<strong>,
</strong>delete<strong>, </strong>getSchemaName<strong>, </strong>deleteSchema<strong>,
</strong>createSchema<strong>, </strong>query<strong>, </strong>deleteByQuery<strong>,
</strong>schemaExists</em></strong>. </p>
+<p>Some of the operations require arguments while some others no. The arguments to
operations could be either the <em>body</em> of the <em>in</em> message
or defined in a header property. Below there is a list with some additional info for each
operation.</p>
+<table>
+  <thead><tr><th>Property</th><th>Description</th></tr></thead>
+  <tbody>
+
+   <tr>
+    <td><tt>put</tt> 
+    <td>*Inserts the persistent object with the given key.*</td>
+   </tr>
+   <tr>
+    <td><tt>get</tt> 
+    <td>*Returns the object corresponding to the given key fetching all the fields.*</td>
+   </tr>
+   <tr>
+    <td><tt>delete</tt> 
+    <td>*Deletes the object with the given key.*</td>
+   </tr>
+   <tr>
+    <td><tt>getSchemaName</tt> 
+    <td>*Returns the schema name given to this DataStore.*</td>
+   </tr>
+   <tr>
+    <td><tt>deleteSchema</tt> 
+    <td>*Deletes the underlying schema or table (or similar) in the datastore that
holds the objects.*</td>
+   </tr>
+   <tr>
+    <td><tt>createSchema</tt> 
+    <td>*Creates the optional schema or table (or similar) in the datastore to hold
the objects.*</td>
+   </tr>
+   <tr>
+    <td><tt>query</tt> 
+    <td>*Executes the given query and returns the results.*</td>
+   </tr>
+   <tr>
+    <td><tt>deleteByQuery</tt> 
+    <td>*Deletes all the objects matching the query.*</td>
+   </tr>
+   <tr>
+    <td><tt>schemaExists</tt> 
+    <td>*Returns whether the schema that holds the data exists in the datastore.*</td>
+   </tr>
+ <table> 
+
+## Options
+### Gora Headers
+<table>
+  <thead><tr><th>Property</th><th>Description</th></tr></thead>
+  <tbody>
+
+   <tr>
+    <td><tt>GoraOperation</tt> 
+    <td>*Used in order to define the operation to execute.*</td>
+   </tr>
+
+   <tr>
+    <tr>
+    <td><tt>GoraKey</tt> 
+    <td>*Used in order to define the datum key for the operations need it.*</td>
+   </tr>
+ <table>
+
+### Gora Configuration attributes
+
+<table>
+  <thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead>
+  <tbody>
+
+   <tr>
+    <td><tt>keyClass</tt> 
+    </td><td>_String_</td>
+    <td>*Key type.* *</td>
+   </tr>
+
+   <tr>
+    <td><tt>valueClass</tt> 
+    </td><td>_String_</td>
+    <td> *Value type.* *</td>
+   </tr>
+
+   <tr>
+    <td><tt>dataStoreClass</tt> 
+    </td><td>_String_</td>
+    <td> *DataStore type* *</td>
+   </tr>
+
+   <tr>
+    <td><tt>hadoopConfiguration</tt> 
+    </td><td>_Configuration_</td>
+    <td> *Hadoop Configuration*</td>
+   </tr>
+
+   <tr>
+    <td><tt>concurrentConsumers</tt> 
+    </td><td>_int_</td>
+    <td> *Concurrent Consumers (used only by consumers).*</td>
+   </tr>
+
+   <tr>
+    <td><tt>flushOnEveryOperation</tt> 
+    </td><td>_boolean_</td>
+    <td> *Flush on every operation (used only by producers).*</td>
+   </tr>
+<table>
+
+*NOTE: the gora configuration properties marked with asterisk are mandatory* 
+
+### Gora Query attributes
+
+<table>
+   <thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead>
+   <tbody>   
+
+   <tr>
+    <td><tt>startTime</tt> 
+    </td><td>_long_</td>
+    <td> *Start Time attribute.*</td>
+   </tr>
+
+   <tr>
+    <td><tt>endTime</tt> 
+    </td><td>_long_</td>
+    <td> *End Time attribute.*</td>
+   </tr>
+
+   <tr>
+    <td><tt>timeRangeFrom</tt> 
+    </td><td>_long_</td>
+    <td> *Time Range From attribute.*</td>
+   </tr>
+
+   <tr>
+    <td><tt>timeRangeTo</tt> 
+    </td><td>_long_</td>
+    <td> *Time Range To attribute.*</td>
+   </tr>
+
+   <tr>
+    <td><tt>limit</tt> 
+    </td><td>_long_</td>
+    <td> *Gora Query Limit attribute.*</td>
+   </tr>
+
+   <tr>
+    <td><tt>timestamp</tt> 
+    </td><td>_long_</td>
+    <td> *Timestamp attribute.*</td>
+   </tr>
+
+   <tr>
+    <td><tt>startKey</tt> 
+    </td><td>_Object_</td>
+    <td> *Start Key attribute.*</td>
+   </tr>
+
+   <tr>
+    <td><tt>endKey</tt> 
+    </td><td>_Object_</td>
+    <td> *End Key attribute.*</td>
+   </tr>
+
+   <tr>
+    <td><tt>keyRangeFrom</tt> 
+    </td><td>_Object_</td>
+    <td> *Key Range From attribute.*</td>
+   </tr>
+
+   <tr>
+    <td><tt>keyRangeTo</tt> 
+    </td><td>_Object_</td>
+    <td> *Key Range To attribute.*</td>
+   </tr>
+
+   <tr>
+    <td><tt>fields</tt> 
+    </td><td>_String_</td>
+    <td> *Fields attribute.*</td>
+   </tr>
+
+<table>
+
+### Usage examples
+
+
+**Create Schema** *(XML DSL)*:
+
+    <setHeader headerName="GoraOperation">
+       <constant>CreateSchema</constant>
+    </setHeader>
+
+    <to uri="gora:foobar?keyClass=java.lang.Long&amp;valueClass=org.apache.camel.component.gora.generated.Pageview&amp;dataStoreClass=org.apache.gora.hbase.store.HBaseStore"/>
+
+**SchemaExists** *(XML DSL)*:
+
+      <setHeader headerName="GoraOperation">
+        <constant>SchemaExists</constant>
+      </setHeader>
+
+      <to uri="gora:foobar?keyClass=java.lang.Long&amp;valueClass=org.apache.camel.component.gora.generated.Pageview&amp;dataStoreClass=org.apache.gora.hbase.store.HBaseStore"/>
+
+
+**Put** *(XML DSL)*:
+
+      <setHeader headerName="GoraOperation">
+        <constant>put</constant>
+      </setHeader>
+
+      <setHeader headerName="GoraKey">
+        <constant>22222</constant>
+      </setHeader>
+
+      <to uri="gora:foo?keyClass=java.lang.Long&amp;valueClass=org.apache.camel.component.gora.generated.Pageview&amp;dataStoreClass=org.apache.gora.hbase.store.HBaseStore"/>
+
+**Get** *(XML DSL)*:
+
+    <setHeader headerName="GoraOperation">
+       <constant>GET</constant>
+    </setHeader>
+
+    <setHeader headerName="GoraKey">
+       <constant>10101</constant>
+    </setHeader>
+
+    <to uri="gora:bar?keyClass=java.lang.Long&amp;valueClass=org.apache.camel.component.gora.generated.Pageview&amp;dataStoreClass=org.apache.gora.hbase.store.HBaseStore"/>
+
+**Delete** *(XML DSL)*:
+
+    <setHeader headerName="GoraOperation">
+      <constant>DELETE</constant>
+    </setHeader>
+
+    <setHeader headerName="GoraKey">
+      <constant>22222</constant>
+    </setHeader>
+
+    <to uri="gora:bar?keyClass=java.lang.Long&amp;valueClass=org.apache.camel.component.gora.generated.Pageview&amp;dataStoreClass=org.apache.gora.hbase.store.HBaseStore"/>
+
+**Query** *(XML DSL)*:
+
+    <to uri="gora:foobar?keyClass=java.lang.Long&amp;valueClass=org.apache.camel.component.gora.generated.Pageview&amp;dataStoreClass=org.apache.gora.hbase.store.HBaseStore"/>
+
+The full usage examples in the form of integration tests can be found at [camel-gora-examples](https://github.com/ipolyzos/camel-gora-examples/)
repository.
+
+### More resources
+
+For more please information and in depth configuration refer to the [Apache Gora Documentation](./overview.html)
and the [Apache Gora Tutorial](./tutorial.html).
 
   </div> <!-- /container (main block) -->
 



Mime
View raw message