Author: buildbot Date: Tue Oct 27 23:04:26 2020 New Revision: 1067221 Log: Staging update by buildbot for gora
Modified: websites/staging/gora/trunk/content/ (props changed) websites/staging/gora/trunk/content/current/gora-dynamodb.html Propchange: websites/staging/gora/trunk/content/ ------------------------------------------------------------------------------ --- cms:source-revision (original) +++ cms:source-revision Tue Oct 27 23:04:26 2020 @@ -1 +1 @@ -1866533 +1882929 Modified: websites/staging/gora/trunk/content/current/gora-dynamodb.html ============================================================================== --- websites/staging/gora/trunk/content/current/gora-dynamodb.html (original) +++ websites/staging/gora/trunk/content/current/gora-dynamodb.html Tue Oct 27 23:04:26 2020 @@ -161,19 +161,128 @@ under the License. } h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style> <h2 id="overview">Overview<a class="headerlink" href="#overview" title="Permanent link">¶</a></h2> -<p>This is the main documentation for the gora-dynamodb module. gora-dynamodb -module enables <a href="http://aws.amazon.com/dynamodb/">Amazon DynamoDB</a> backend support for Gora.</p> +<p>This is the main documentation for the gora-dynamodb module. +gora-dynamodb module enables <a href="http://aws.amazon.com/dynamodb/">Amazon DynamoDB</a> backend support for Gora.</p> <div class="toc"> <ul> <li><a href="#overview">Overview</a></li> -<li><a href="#goraproperties">gora.properties</a></li> -<li><a href="#gora-dynamodb-mappings">Gora DynamoDB mappings</a></li> +<li><a href="#gora-dynamodb-properties-goraproperties">Gora DynamoDB Properties - gora.properties</a><ul> +<li><a href="#accepted-list-of-endpoints">Accepted list of endpoints</a></li> +</ul> +</li> +<li><a href="#gora-dynamodb-mapppings-gora-dynamodb-mappingxml">Gora DynamoDB mapppings - gora-dynamodb-mapping.xml</a><ul> +<li><a href="#table">Table:</a></li> +<li><a href="#attributes">Attributes:</a></li> +</ul> +</li> </ul> </div> -<h2 id="goraproperties">gora.properties<a class="headerlink" href="#goraproperties" title="Permanent link">¶</a></h2> -<p>Coming soon</p> -<h2 id="gora-dynamodb-mappings">Gora DynamoDB mappings<a class="headerlink" href="#gora-dynamodb-mappings" title="Permanent link">¶</a></h2> -<p>Coming soon </p> +<h2 id="gora-dynamodb-properties-goraproperties">Gora DynamoDB Properties - gora.properties<a class="headerlink" href="#gora-dynamodb-properties-goraproperties" title="Permanent link">¶</a></h2> +<p><code>gora.datastore.default=org.apache.gora.dynamodb.store.DynamoDBStore +gora.datastore.autocreateschema=true +preferred.schema.name=Person +gora.dynamodb.mapping.file=/path/to/gora-dynamodb-mapping.xml +gora.dynamodb.client=sync +gora.dynamodb.consistent.reads=true +gora.dynamodb.endpoint=http://dynamodb.ap-northeast-1.amazonaws.com/ +gora.dynamodb.serialization.type=dynamo</code></p> +<table class="table"> +<thead> +<tr> +<th>Property Key</th> +<th>Property Value</th> +<th>Required</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td>gora.datastore.default</td> +<td>org.apache.gora.dynamodb.store.DynamoDBStore</td> +<td>Yes</td> +<td>Implementation of the storage class</td> +</tr> +<tr> +<td>gora.datastore.autocreateschema</td> +<td>true</td> +<td>No</td> +<td>Create the table if it doesnât exist</td> +</tr> +<tr> +<td>preferred.schema.name</td> +<td>Person</td> +<td>Yes</td> +<td>Name of the DynamoDB table/schema</td> +</tr> +<tr> +<td>gora.dynamodb.mapping.file</td> +<td>/path/to/gora-dynamodb-mapping.xml</td> +<td>No</td> +<td>The XML mapping file to be used. Defaults to gora-dynamodb-mapping.xml</td> +</tr> +<tr> +<td>gora.dynamodb.client</td> +<td>sync</td> +<td>No</td> +<td>DynamoDB client type. It could be sync or async.</td> +</tr> +<tr> +<td>gora.dynamodb.consistent.reads</td> +<td>true</td> +<td>No</td> +<td>Default is eventual consistence i.e. false.</td> +</tr> +<tr> +<td>gora.dynamodb.endpoint</td> +<td>http:\//dynamodb.us-east-1.amazonaws.com/</td> +<td>Yes</td> +<td>Set to geographically closest service endpoint. For accepted list, see <a href="#Accepted">here</a></td> +</tr> +<tr> +<td>gora.dynamodb.serialization.type</td> +<td>dynamo</td> +<td>No</td> +<td>Data store serialization type. It could be 'dynamo' or 'avro'</td> +</tr> +</tbody> +</table> +<h4 id="accepted-list-of-endpoints">Accepted list of endpoints<a class="headerlink" href="#accepted-list-of-endpoints" title="Permanent link">¶</a></h4> +<ul> +<li>http:\//dynamodb.ap-northeast-1.amazonaws.com/</li> +<li>http:\//dynamodb.ap-northeast-2.amazonaws.com/</li> +<li>http:\//dynamodb.eu-west-1.amazonaws.com/</li> +<li>http:\//dynamodb.us-east-1.amazonaws.com/</li> +<li>http:\//dynamodb.us-west-1.amazonaws.com/</li> +<li>http:\//dynamodb.us-west-2.amazonaws.com/</li> +</ul> +<h2 id="gora-dynamodb-mapppings-gora-dynamodb-mappingxml">Gora DynamoDB mapppings - gora-dynamodb-mapping.xml<a class="headerlink" href="#gora-dynamodb-mapppings-gora-dynamodb-mappingxml" title="Permanent link">¶</a></h2> +<p>Say we wished to map some user data and store it into DynamoDB.</p> +<p>``` +<gora-otd></p> +<p><table name="Person" readcunit="1" writecunit="1" package="org.apache.gora.dynamodb.example.generated"> + <attribute name="ssn" type="N" key="hash"/> + <attribute name="date" type="S" key="hashrange"/> + <attribute name="firstName" type="S"/> + <attribute name="lastName" type="S"/> + <attribute name="salary" type="N"/> + <attribute name="visitedplaces" type="SS"/> + </table></p> +<p></gora-otd> +```</p> +<p>Within the <code>gora-otd</code> mapping configuration, only the 'table' child element is required.</p> +<h3 id="table">Table:<a class="headerlink" href="#table" title="Permanent link">¶</a></h3> +<ul> +<li>a parameter containing the DynamoDB table <code>name</code> (String) e.g. Person</li> +<li>a parameter containing the read capacity - <code>readcunit</code> (Number) e.g. 1 More about them <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html#default-limits-throughput">here</a></li> +<li>a parameter containing the write capacity - <code>writecunit</code> (Number) e.g. 1 </li> +<li>a parameter containing the name of the <code>package</code> having the table (String)</li> +</ul> +<h3 id="attributes">Attributes:<a class="headerlink" href="#attributes" title="Permanent link">¶</a></h3> +<ul> +<li>a parameter containing the <code>name</code> e.g. name, dateOfBirth, ssn and salary </li> +<li>a parameter containing the column <code>type</code> to which they belong e.g. (B/L/M/N/S/SS). For more, refer <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html">here</a></li> +<li>an optional parameter <code>key</code>. The key can be a hash key (partition key/primary key) or a hashrange key (sort key) (in case of composite primary key). The key parameter is left blank for non-key attributes. For more, refer <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.CoreComponents.html#HowItWorks.CoreComponents.PrimaryKey">here</a></li> +</ul> </div> <!-- /container (main block) -->