gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject svn commit: r1490480 - in /gora/branches/GORA_174: CHANGES.txt gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
Date Fri, 07 Jun 2013 00:20:29 GMT
Author: lewismc
Date: Fri Jun  7 00:20:29 2013
New Revision: 1490480

URL: http://svn.apache.org/r1490480
Log:
GORA-239 Add null checks and better message in AccumuloStore (David Medinets via hsaputra)

Modified:
    gora/branches/GORA_174/CHANGES.txt
    gora/branches/GORA_174/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java

Modified: gora/branches/GORA_174/CHANGES.txt
URL: http://svn.apache.org/viewvc/gora/branches/GORA_174/CHANGES.txt?rev=1490480&r1=1490479&r2=1490480&view=diff
==============================================================================
--- gora/branches/GORA_174/CHANGES.txt (original)
+++ gora/branches/GORA_174/CHANGES.txt Fri Jun  7 00:20:29 2013
@@ -4,7 +4,10 @@
 
 Gora Change Log
 
-trunk (current development)
+* GORA-239 Add null checks and better message in AccumuloStore (David Medinets via hsaputra)
+
+0.3 release: 05/03/2013 (mm/dd/yyyy)
+Release Report: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311172&version=12317954Gora
Change Log
 
 * GORA-191 Support multiple Avro Schemas within GoraCompiler (Udesh Liyanaarachchi, rmarroquin,
lewismc) 
 

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=1490480&r1=1490479&r2=1490480&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
Fri Jun  7 00:20:29 2013
@@ -93,6 +93,7 @@ import org.apache.gora.query.impl.Partit
 import org.apache.gora.store.DataStoreFactory;
 import org.apache.gora.store.impl.DataStoreBase;
 import org.apache.gora.util.AvroUtils;
+import org.apache.gora.util.GoraException;
 import org.apache.hadoop.io.Text;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -322,6 +323,10 @@ public class AccumuloStore<K,T extends P
         }
 
       }
+
+      if (mapping.tableName == null) {
+        throw new GoraException("Please define the gora to accumulo mapping in " + filename
+ " for " + persistentClass.getCanonicalName());
+      }
       
       nl = root.getElementsByTagName("table");
       for (int i = 0; i < nl.getLength(); i++) {
@@ -536,6 +541,11 @@ public class AccumuloStore<K,T extends P
         
         Object o = val.get(i);
         Pair<Text,Text> col = mapping.fieldMap.get(field.name());
+
+        if (col == null) {
+          throw new GoraException("Please define the gora to accumulo mapping for field "
+ field.name());
+        }
+
   
         switch (field.schema().getType()) {
           case MAP:



Mime
View raw message