gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r912473 - in /websites/staging/gora/trunk/content: ./ current/tutorial.html
Date Fri, 13 Jun 2014 19:14:46 GMT
Author: buildbot
Date: Fri Jun 13 19:14:46 2014
New Revision: 912473

Log:
Staging update by buildbot for gora

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

Propchange: websites/staging/gora/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Jun 13 19:14:46 2014
@@ -1 +1 @@
-1602457
+1602500

Modified: websites/staging/gora/trunk/content/current/tutorial.html
==============================================================================
--- websites/staging/gora/trunk/content/current/tutorial.html (original)
+++ websites/staging/gora/trunk/content/current/tutorial.html Fri Jun 13 19:14:46 2014
@@ -175,7 +175,7 @@ analyzing the data with extensive Apache
 beans to hold the data and RPC interfaces are defined using a JSON 
 schema. In mapping the data beans to data store specific settings, 
 Gora depends on mapping files, which are specific to each data store. 
-Unlike other OTD (Object-to-Datastore) mapping implementations in Gora the data bean to data
store 
+Unlike other OTD (Object-to-Datastore) mapping implementations, in Gora the data bean to
data store 
 specific schema mapping is explicit. This has the advantage that, 
 when using data models such as HBase and Cassandra, you can always 
 know how the values are persisted.</p>
@@ -290,10 +290,10 @@ returned, Referrer, and User Agent.</p>
 <p>Data beans are the main way to hold the data in memory and persist in Gora. Gora

 needs to explicitly keep track of the status of the data in memory, so 
 we use <a href="http://avro.apache.org">Apache Avro</a> for defining the beans.
Using 
-Avro gives us the possibility to explicitly keep track object's persistent state, 
-and a way to serialize object's data. 
-Defining data beans is a very easy task, but for the exact syntax, please 
-consult to <a href="http://avro.apache.org/docs/current/spec.html">Avro Specification</a>.
+Avro gives us the possibility to explicitly keep track of an object's persistent state 
+and a way to serialize an object's data. 
+Defining data beans is a very easy task, but for the exact syntax please
+consult the <a href="http://avro.apache.org/docs/current/spec.html">Avro Specification</a>.
 First, we need to define the bean Pageview to hold a
 single URL access in the logs. Let's go over the class at <code>src/main/avro/pageview.json</code></p>
 <div class="codehilite"><pre> <span class="p">{</span>
@@ -322,7 +322,7 @@ are listed in the "fields" element. Each
 <h2 id="compiling-avro-schemas">Compiling Avro Schemas</h2>
 <p>The next step after defining the data beans is to compile the schemas 
 into Java classes. For that we will use the <a href="/current/compiler.html">GoraCompiler</a>.

-Invoking the Gora compiler by (from Gora top level directory)</p>
+Invoke the Gora compiler from the top-level Gora directory with:</p>
 <div class="codehilite"><pre>$ <span class="n">bin</span><span
class="o">/</span><span class="n">gora</span> <span class="n">goracompiler</span>
 </pre></div>
 
@@ -353,10 +353,10 @@ Invoking the Gora compiler by (from Gora
 <p>to compile the Pageview class into <code>gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java</code>.

 This will use the default license header which is ASLv2 for licensing the generated data
beans.
 However, the tutorial java classes are already committed and present within SVN, so you do
not need to do that now.</p>
-<p>Gora compiler extends Avro's SpecificCompiler to convert JSON definition 
+<p>The Gora compiler extends Avro's SpecificCompiler to convert a JSON definition 
 into a Java class. Generated classes extend the Persistent interface. 
 Most of the methods of the Persistent interface deal with bookkeeping for 
-persistence, and state tracking, so most of the time they are not used explicitly by the
+persistence and state tracking, so most of the time they are not used explicitly by the
 user. Now, let's look at the internals of the generated class Pageview.java.</p>
 <div class="codehilite"><pre><span class="n">public</span> <span
class="n">class</span> <span class="n">Pageview</span> <span class="n">extends</span>
<span class="n">PersistentBase</span> <span class="p">{</span>
 
@@ -399,9 +399,8 @@ user. Now, let's look at the internals o
 
 <p>We can see the actual field declarations in the class. Note that Avro uses Utf8

 class as a placeholder for string fields. We can also see the embedded Avro 
-Schema declaration and an inner enum named Field. This enum and 
-the _ALL_FIELDS field will come in handy when we will use them 
-to query the datastore for specific fields. </p>
+Schema declaration and an inner enum named Field. The enum and 
+the _ALL_FIELDS fields will come in handy when we query the datastore for specific fields.
 </p>
 <h2 id="defining-data-store-mappings">Defining data store mappings</h2>
 <p>Gora is designed to flexibly work with various types of data modeling, 
 including column stores(such as HBase, Cassandra, etc), SQL databases, flat files(binary,

@@ -413,7 +412,7 @@ are serialized and persisted to the data
 <h3 id="hbase-mappings">HBase mappings</h3>
 <p>HBase mappings are stored at file named <code>gora-hbase-mappings.xml</code>.

 For this tutorial we will be using the file <code>gora-tutorial/conf/gora-hbase-mappings.xml</code>.</p>
-<div class="codehilite"><pre><span class="nt">&lt;gora-orm&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;gora-otd&gt;</span>
   <span class="nt">&lt;table</span> <span class="na">name=</span><span
class="s">&quot;Pageview&quot;</span><span class="nt">&gt;</span>
<span class="c">&lt;!-- optional descriptors for tables --&gt;</span>
     <span class="nt">&lt;family</span> <span class="na">name=</span><span
class="s">&quot;common&quot;</span><span class="nt">&gt;</span>
<span class="c">&lt;!-- This can also have params like compression, bloom filters
--&gt;</span>
     <span class="nt">&lt;family</span> <span class="na">name=</span><span
class="s">&quot;http&quot;</span><span class="nt">/&gt;</span>
@@ -433,7 +432,7 @@ For this tutorial we will be using the f
 
   ...
 
-<span class="nt">&lt;/gora-orm&gt;</span>
+<span class="nt">&lt;/gora-otd&gt;</span>
 </pre></div>
 
 
@@ -919,7 +918,7 @@ demonstrate the SQL backend. </p>
 <p>Similar to what we have seen with HBase, gora-sql plugin reads configuration from
the 
 <code>gora-sql-mappings.xml</code> file. 
 Specifically, we will use the <code>gora-tutorial/conf/gora-sql-mappings.xml</code>
file.    </p>
-<div class="codehilite"><pre><span class="nt">&lt;gora-orm&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;gora-otd&gt;</span>
   ...
   <span class="nt">&lt;class</span> <span class="na">name=</span><span
class="s">&quot;org.apache.gora.tutorial.log.generated.MetricDatum&quot;</span>
<span class="na">keyClass=</span><span class="s">&quot;java.lang.String&quot;</span>
<span class="na">table=</span><span class="s">&quot;Metrics&quot;</span><span
class="nt">&gt;</span>
     <span class="nt">&lt;primarykey</span> <span class="na">column=</span><span
class="s">&quot;id&quot;</span> <span class="na">length=</span><span
class="s">&quot;512&quot;</span><span class="nt">/&gt;</span>
@@ -927,7 +926,7 @@ Specifically, we will use the <code>gora
     <span class="nt">&lt;field</span> <span class="na">name=</span><span
class="s">&quot;timestamp&quot;</span> <span class="na">column=</span><span
class="s">&quot;ts&quot;</span><span class="nt">/&gt;</span>
     <span class="nt">&lt;field</span> <span class="na">name=</span><span
class="s">&quot;metric&quot;</span> <span class="na">column=</span><span
class="s">&quot;metric/</span><span class="nt">&gt;</span>
   <span class="nt">&lt;/class&gt;</span>
-<span class="nt">&lt;/gora-orm&gt;</span>
+<span class="nt">&lt;/gora-otd&gt;</span>
 </pre></div>
 
 



Mime
View raw message