You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gora.apache.org by le...@apache.org on 2013/06/18 01:55:19 UTC

svn commit: r1493978 - /gora/site/trunk/content/current/tutorial.md

Author: lewismc
Date: Mon Jun 17 23:55:19 2013
New Revision: 1493978

URL: http://svn.apache.org/r1493978
Log:
CMS commit to gora by lewismc

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=1493978&r1=1493977&r2=1493978&view=diff
==============================================================================
--- gora/site/trunk/content/current/tutorial.md (original)
+++ gora/site/trunk/content/current/tutorial.md Mon Jun 17 23:55:19 2013
@@ -264,50 +264,49 @@ HBase mappings are stored at file named 
 For this tutorial we will be using the file gora-tutorial/conf/gora-hbase-mappings.xml.
       
       <!--  This is gora-sql-mapping.xml
- <source>
- &lt;gora-orm&gt;
-  &lt;class name="org.apache.gora.tutorial.log.generated.Pageview" keyClass="java.lang.Long" table="AccessLog"&gt;
-    &lt;primarykey column="line"/&gt;
-    &lt;field name="url" column="url" length="512" primarykey="true"/&gt;
-    &lt;field name="timestamp" column="timestamp"/&gt;
-    &lt;field name="ip" column="ip" length="16"/&gt;
-    &lt;field name="httpMethod" column="httpMethod" length="6"/&gt;
-    &lt;field name="httpStatusCode" column="httpStatusCode"/&gt;
-    &lt;field name="responseSize" column="responseSize"/&gt;
-    &lt;field name="referrer" column="referrer" length="512"/&gt;
-    &lt;field name="userAgent" column="userAgent" length="512"/&gt;
-  &lt;/class&gt;
 
-  ...
+    <gora-orm>
+      <class name="org.apache.gora.tutorial.log.generated.Pageview" keyClass="java.lang.Long" table="AccessLog">
+       <primarykey column="line"/>
+      <field name="url" column="url" length="512" primarykey="true"/>
+      <field name="timestamp" column="timestamp"/>
+      <field name="ip" column="ip" length="16"/>
+      <field name="httpMethod" column="httpMethod" length="6"/>
+      <;field name="httpStatusCode" column="httpStatusCode"/>
+      <field name="responseSize" column="responseSize"/>
+      <field name="referrer" column="referrer" length="512"/>
+      <field name="userAgent" column="userAgent" length="512"/>
+      </class&gt;
 
-&lt;/gora-orm&gt;
+     ...
+
+    </gora-orm>
 
-      </source>
       -->
      
-    &lt;gora-orm&gt;
-      &lt;table name="Pageview"&gt; &lt;!-- optional descriptors for tables --&gt;
-        &lt;family name="common"/&gt; &lt;!-- This can also have params like compression, bloom filters --&gt;
-        &lt;family name="http"/&gt;
-        &lt;family name="misc"/&gt;
-      &lt;/table&gt;
-
-      &lt;class name="org.apache.gora.tutorial.log.generated.Pageview" keyClass="java.lang.Long" table="AccessLog"&gt;
-        &lt;field name="url" family="common" qualifier="url"/&gt;
-        &lt;field name="timestamp" family="common" qualifier="timestamp"/&gt;
-        &lt;field name="ip" family="common" qualifier="ip" /&gt;
-        &lt;field name="httpMethod" family="http" qualifier="httpMethod"/&gt;
-        &lt;field name="httpStatusCode" family="http" qualifier="httpStatusCode"/&gt;
-        &lt;field name="responseSize" family="http" qualifier="responseSize"/&gt;
-        &lt;field name="referrer" family="misc" qualifier="referrer"/&gt;
-        &lt;field name="userAgent" family="misc" qualifier="userAgent"/&gt;
-      &lt;/class&gt;
+    <gora-orm&gt;
+      <table name="Pageview"> <!-- optional descriptors for tables -->
+        <family name="common"> <!-- This can also have params like compression, bloom filters -->
+        <family name="http"/>
+        <family name="misc"/>
+      </table>
+
+      <class name="org.apache.gora.tutorial.log.generated.Pageview" keyClass="java.lang.Long" table="AccessLog">
+       <field name="url" family="common" qualifier="url"/>
+       <field name="timestamp" family="common" qualifier="timestamp"/>
+       <field name="ip" family="common" qualifier="ip" />
+       <field name="httpMethod" family="http" qualifier="httpMethod"/>
+       <field name="httpStatusCode" family="http" qualifier="httpStatusCode"/>
+       <field name="responseSize" family="http" qualifier="responseSize"/>
+       <field name="referrer" family="misc" qualifier="referrer"/>
+       <field name="userAgent" family="misc" qualifier="userAgent"/>
+      </class>
   
       ...
   
-    &lt;/gora-orm&gt;  
+    </gora-orm>  
 
-Every mapping file starts with the top level element &lt;gora-orm&gt;. 
+Every mapping file starts with the top level element <gora-orm>. 
 Gora HBase mapping files can have two type of child elements, table and 
 class declarations. All of the table and class definitions should be 
 listed at this level.
@@ -316,7 +315,7 @@ table declaration is optional and most o
 declaration from the class sub elements. However, some of the HBase 
 specific table configuration such as compression, blockCache, etc can be given here, 
 if Gora is used to auto-create the tables. The exact syntax for the file can be found 
-[here](/gora-hbase.html).
+[here](/current/gora-hbase.html).
       
 In Gora, data store access is always 
 done in a key-value data model, since most of the target backends support this model.
@@ -333,7 +332,7 @@ of the HBase data model. If the qualifie
 as the column qualifier. Note that map and array type fields are stored in unique column 
 families, so the configuration should be list unique column families for each map and 
 array type, and no qualifier should be given. The exact data model is discussed further 
-at the [gora-hbase](/gora-hbase.html) documentation. 
+at the [gora-hbase](/current/gora-hbase.html) documentation. 
 
 ##Basic API </title>