Author: lewismc
Date: Fri Jun 13 19:14:38 2014
New Revision: 1602500

URL: http://svn.apache.org/r1602500
Log:
https://issues.apache.org/jira/browse/GORA-340

Modified:
    gora/site/trunk/content/current/tutorial.md

Modified: gora/site/trunk/content/current/tutorial.md
URL: 
http://svn.apache.org/viewvc/gora/site/trunk/content/current/tutorial.md?rev=1602500&r1=1602499&r2=1602500&view=diff
==============================================================================
--- gora/site/trunk/content/current/tutorial.md (original)
+++ gora/site/trunk/content/current/tutorial.md Fri Jun 13 19:14:38 2014
@@ -23,7 +23,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.
@@ -138,10 +138,10 @@ returned, Referrer, and User Agent.
 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 [Apache Avro](http://avro.apache.org) 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 [Avro Specification](http://avro.apache.org/docs/current/spec.html).
+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 [Avro 
Specification](http://avro.apache.org/docs/current/spec.html).
 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>
 
@@ -170,7 +170,7 @@ are listed in the "fields" element. Each
 ##Compiling Avro Schemas
 The next step after defining the data beans is to compile the schemas 
 into Java classes. For that we will use the 
[GoraCompiler](/current/compiler.html). 
-Invoking the Gora compiler by (from Gora top level directory)
+Invoke the Gora compiler from the top-level Gora directory with:
 
     $ bin/gora goracompiler
 
@@ -200,10 +200,10 @@ to compile the Pageview class into <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.
     
-Gora compiler extends Avro's SpecificCompiler to convert JSON definition 
+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.
 
     public class Pageview extends PersistentBase {
@@ -245,9 +245,8 @@ user. Now, let's look at the internals o
 
 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. 
+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.  
 
 ##Defining data store mappings
 Gora is designed to flexibly work with various types of data modeling, 
@@ -262,7 +261,7 @@ are serialized and persisted to the data
 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>.
       
-    <gora-orm>
+    <gora-otd>
       <table name="Pageview"> <!-- optional descriptors for tables -->
         <family name="common"> <!-- This can also have params like 
compression, bloom filters -->
         <family name="http"/>
@@ -282,7 +281,7 @@ For this tutorial we will be using the f
   
       ...
   
-    </gora-orm>  
+    </gora-otd>  
 
 Every mapping file starts with the top level element <code><gora-orm></code>. 
 Gora HBase mapping files can have two type of child elements, table and 
@@ -769,7 +768,7 @@ Similar to what we have seen with HBase,
 <code>gora-sql-mappings.xml</code> file. 
 Specifically, we will use the 
<code>gora-tutorial/conf/gora-sql-mappings.xml</code> file.    
 
-    <gora-orm>
+    <gora-otd>
       ...
       <class name="org.apache.gora.tutorial.log.generated.MetricDatum" 
keyClass="java.lang.String" table="Metrics">
         <primarykey column="id" length="512"/>
@@ -777,7 +776,7 @@ Specifically, we will use the <code>gora
         <field name="timestamp" column="ts"/>
         <field name="metric" column="metric/>
       </class>
-    </gora-orm>
+    </gora-otd>
      
 SQL mapping files contain one or more class elements as the children of 
gora-orm. 
 The key value pair is declared in the class element. The name attribute is the 


Reply via email to