gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alfonsonishik...@apache.org
Subject svn commit: r1463761 - in /gora/branches/GORA_174/gora-accumulo/src: main/java/org/apache/gora/accumulo/store/AccumuloStore.java test/resources/gora-accumulo-mapping.xml
Date Tue, 02 Apr 2013 21:20:02 GMT
Author: alfonsonishikawa
Date: Tue Apr  2 21:20:02 2013
New Revision: 1463761

URL: http://svn.apache.org/r1463761
Log:
GORA-216: Patch of Keith Turner for gora-accumulo for unions.

Modified:
    gora/branches/GORA_174/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
    gora/branches/GORA_174/gora-accumulo/src/test/resources/gora-accumulo-mapping.xml

Modified: gora/branches/GORA_174/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
URL: http://svn.apache.org/viewvc/gora/branches/GORA_174/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java?rev=1463761&r1=1463760&r2=1463761&view=diff
==============================================================================
--- gora/branches/GORA_174/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
(original)
+++ gora/branches/GORA_174/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
Tue Apr  2 21:20:02 2013
@@ -94,11 +94,11 @@ import org.apache.gora.store.DataStoreFa
 import org.apache.gora.store.impl.DataStoreBase;
 import org.apache.gora.util.AvroUtils;
 import org.apache.hadoop.io.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * 
@@ -455,6 +455,7 @@ public class AccumuloStore<K,T extends P
 
           break;
         case RECORD:
+        case UNION:
           SpecificDatumReader reader = new SpecificDatumReader(field.schema());
           byte[] val = entry.getValue().get();
           // TODO reuse decoder
@@ -578,6 +579,7 @@ public class AccumuloStore<K,T extends P
             }
             break;
           case RECORD:
+          case UNION:
             SpecificDatumWriter writer = new SpecificDatumWriter(field.schema());
             ByteArrayOutputStream os = new ByteArrayOutputStream();
             BinaryEncoder encoder = new BinaryEncoder(os);

Modified: gora/branches/GORA_174/gora-accumulo/src/test/resources/gora-accumulo-mapping.xml
URL: http://svn.apache.org/viewvc/gora/branches/GORA_174/gora-accumulo/src/test/resources/gora-accumulo-mapping.xml?rev=1463761&r1=1463760&r2=1463761&view=diff
==============================================================================
--- gora/branches/GORA_174/gora-accumulo/src/test/resources/gora-accumulo-mapping.xml (original)
+++ gora/branches/GORA_174/gora-accumulo/src/test/resources/gora-accumulo-mapping.xml Tue
Apr  2 21:20:02 2013
@@ -38,6 +38,8 @@
     <field name="dateOfBirth" family="info" qualifier="db"/>
     <field name="ssn" family="info" qualifier="sn"/>
     <field name="salary" family="info" qualifier="sl"/>
+    <field name="boss" family="info" qualifier="bs"/>
+    <field name="webpage" family="info" qualifier="wp"/>
   </class>
   
   <class name="org.apache.gora.examples.generated.WebPage" keyClass="java.lang.String"
table="WebPage">
@@ -51,4 +53,4 @@
   <class name="org.apache.gora.examples.generated.TokenDatum" keyClass="java.lang.String">
     <field name="count" family="common" qualifier="count"/>
   </class>  
-</gora-orm>  
\ No newline at end of file
+</gora-orm>  



Mime
View raw message