gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1337191 - /gora/trunk/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
Date Fri, 11 May 2012 14:48:27 GMT
Author: kturner
Date: Fri May 11 14:48:27 2012
New Revision: 1337191

URL: http://svn.apache.org/viewvc?rev=1337191&view=rev
Log:
GORA-130 cleare tablet location cache before computing partition queries for accumulo

Modified:
    gora/trunk/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java

Modified: gora/trunk/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java?rev=1337191&r1=1337190&r2=1337191&view=diff
==============================================================================
--- gora/trunk/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
(original)
+++ gora/trunk/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java
Fri May 11 14:48:27 2012
@@ -691,6 +691,7 @@ public class AccumuloStore<K,T extends P
       
       Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<String,Map<KeyExtent,List<Range>>>();
       
+      tl.invalidateCache();
       while (tl.binRanges(Collections.singletonList(createRange(query)), binnedRanges).size()
> 0) {
         // TODO log?
         if (!Tables.exists(conn.getInstance(), Tables.getTableId(conn.getInstance(), mapping.tableName)))
@@ -698,6 +699,7 @@ public class AccumuloStore<K,T extends P
         else if (Tables.getTableState(conn.getInstance(), Tables.getTableId(conn.getInstance(),
mapping.tableName)) == TableState.OFFLINE)
           throw new TableOfflineException(conn.getInstance(), Tables.getTableId(conn.getInstance(),
mapping.tableName));
         UtilWaitThread.sleep(100);
+        tl.invalidateCache();
       }
       
       List<PartitionQuery<K,T>> ret = new ArrayList<PartitionQuery<K,T>>();



Mime
View raw message