You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gora.apache.org by al...@apache.org on 2018/02/27 12:07:56 UTC

[4/5] gora git commit: GORA-530: Fixed bug at AccumuloStore#deleteSchema() failing when the schema does not exist

GORA-530: Fixed bug at AccumuloStore#deleteSchema() failing when the schema does not exist


Project: http://git-wip-us.apache.org/repos/asf/gora/repo
Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/73db5970
Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/73db5970
Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/73db5970

Branch: refs/heads/master
Commit: 73db5970c0248433d25be914308f76b03fdef175
Parents: b06da5f
Author: Alfonso Nishikawa Muñumer <al...@gmail.com>
Authored: Sat Jan 20 14:52:00 2018 -0100
Committer: Alfonso Nishikawa Muñumer <al...@gmail.com>
Committed: Sat Jan 20 14:52:00 2018 -0100

----------------------------------------------------------------------
 .../main/java/org/apache/gora/accumulo/store/AccumuloStore.java  | 4 +++-
 gora-core/src/main/java/org/apache/gora/store/DataStore.java     | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/73db5970/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
----------------------------------------------------------------------
diff --git a/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java b/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
index 6737dbb..3500733 100644
--- a/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
+++ b/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
@@ -497,7 +497,9 @@ public class AccumuloStore<K,T extends PersistentBase> extends DataStoreBase<K,T
         batchWriter.close();
       batchWriter = null;
       conn.tableOperations().delete(mapping.tableName);
-    } catch (AccumuloException | AccumuloSecurityException | TableNotFoundException e) {
+    } catch (TableNotFoundException e) {
+      // Ignore. Delete a non existant schema is a success
+    } catch (AccumuloException | AccumuloSecurityException e) {
       LOG.error(e.getMessage(), e);
       throw new GoraException(e);
     }

http://git-wip-us.apache.org/repos/asf/gora/blob/73db5970/gora-core/src/main/java/org/apache/gora/store/DataStore.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/store/DataStore.java b/gora-core/src/main/java/org/apache/gora/store/DataStore.java
index b36476d..4830ab0 100644
--- a/gora-core/src/main/java/org/apache/gora/store/DataStore.java
+++ b/gora-core/src/main/java/org/apache/gora/store/DataStore.java
@@ -97,6 +97,7 @@ public interface DataStore<K, T extends Persistent> {
    * Deletes the underlying schema or table (or similar) in the datastore
    * that holds the objects. This also deletes all the data associated with
    * the schema.
+   * If the schema does not exists, this operation is ignored.
    */
   void deleteSchema() throws GoraException;