gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject [1/3] gora git commit: Fixed issue GORA-443
Date Thu, 23 Feb 2017 16:46:49 GMT
Repository: gora
Updated Branches:
  refs/heads/master d1a12514f -> 9a253e365


Fixed issue GORA-443


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

Branch: refs/heads/master
Commit: 5664dc6791d97116f7613e9bb8407583b411b457
Parents: 560704c
Author: Kiyonari Harigae <lakshmi@cloudysunny14.org>
Authored: Thu Feb 16 23:24:40 2017 +0900
Committer: Kiyonari Harigae <lakshmi@cloudysunny14.org>
Committed: Thu Feb 16 23:24:40 2017 +0900

----------------------------------------------------------------------
 .../java/org/apache/gora/store/DataStoreTestUtil.java  | 13 ++++---------
 .../apache/gora/hbase/store/HBaseTableConnection.java  |  2 +-
 2 files changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/5664dc67/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java
----------------------------------------------------------------------
diff --git a/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java b/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java
index 0b4fed4..30792cd 100644
--- a/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java
+++ b/gora-core/src/test/java/org/apache/gora/store/DataStoreTestUtil.java
@@ -1039,11 +1039,9 @@ public class DataStoreTestUtil {
 
     assertNumResults(store.newQuery(), URLS.length);
     store.deleteByQuery(query);
-    store.deleteByQuery(query);
-    store.deleteByQuery(query);//don't you love that HBase sometimes does not delete arbitrarily
-    
+
     store.flush();
-    
+
     assertNumResults(store.newQuery(), URLS.length);
 
     //assert that data is deleted
@@ -1076,16 +1074,13 @@ public class DataStoreTestUtil {
 
     assertNumResults(store.newQuery(), URLS.length);
     store.deleteByQuery(query);
-    store.deleteByQuery(query);
-    store.deleteByQuery(query);//don't you love that HBase sometimes does not delete arbitrarily
-    
-    assertNumResults(store.newQuery(), URLS.length);
 
+    store.flush();
 
+    assertNumResults(store.newQuery(), URLS.length);
 
     //assert that data is deleted
     for (int i = 0; i < URLS.length; i++) {
-      store.flush();
       WebPage page = store.get(URLS[i]);
       assertNotNull(page);
       if( URLS[i].compareTo(startKey) < 0 || URLS[i].compareTo(endKey) >= 0) {

http://git-wip-us.apache.org/repos/asf/gora/blob/5664dc67/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseTableConnection.java
----------------------------------------------------------------------
diff --git a/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseTableConnection.java
b/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseTableConnection.java
index 9f5b7c4..c3c7009 100644
--- a/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseTableConnection.java
+++ b/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseTableConnection.java
@@ -112,9 +112,9 @@ public class HBaseTableConnection {
     for (ConcurrentLinkedQueue<Mutation> buffer : bPool) {
       for (Mutation m: buffer) {
         bufMutator.mutate(m);
+        bufMutator.flush();
       }
     }
-    bufMutator.flush();
     bufMutator.close();
   }
 


Mime
View raw message