geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject [geode] branch feature/GEODE-3926_2 updated: Added callback arg to get for PartitionResolver
Date Tue, 13 Mar 2018 23:50:30 GMT
This is an automated email from the ASF dual-hosted git repository.

udo pushed a commit to branch feature/GEODE-3926_2
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/GEODE-3926_2 by this push:
     new 0c174e3  Added callback arg to get for PartitionResolver
0c174e3 is described below

commit 0c174e34e6de21d5ddf59dc551005598944598ea
Author: Udo <ukohlmeyer@pivotal.io>
AuthorDate: Tue Mar 13 16:50:21 2018 -0700

    Added callback arg to get for PartitionResolver
---
 .../org/apache/geode/cache/lucene/internal/InternalLuceneIndex.java   | 2 +-
 .../geode/cache/lucene/internal/LuceneIndexForPartitionedRegion.java  | 4 ++--
 .../java/org/apache/geode/cache/lucene/internal/LuceneRawIndex.java   | 2 +-
 .../geode/cache/lucene/internal/PartitionedRepositoryManager.java     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/InternalLuceneIndex.java
b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/InternalLuceneIndex.java
index 46243f7..d308a16 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/InternalLuceneIndex.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/InternalLuceneIndex.java
@@ -39,5 +39,5 @@ public interface InternalLuceneIndex extends LuceneIndex {
 
   void initialize();
 
-  boolean isIndexAvailable();
+  boolean isIndexAvailable(int id);
 }
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
index 9418801..f29e51f 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
@@ -230,11 +230,11 @@ public class LuceneIndexForPartitionedRegion extends LuceneIndexImpl
{
   }
 
   @Override
-  public boolean isIndexAvailable() {
+  public boolean isIndexAvailable(int id) {
     PartitionedRegion fileAndChunkRegion = getFileAndChunkRegion();
     if(fileAndChunkRegion != null)
     {
-      return fileAndChunkRegion.get(IndexRepositoryFactory.APACHE_GEODE_INDEX_COMPLETE) !=
null;
+      return fileAndChunkRegion.get(IndexRepositoryFactory.APACHE_GEODE_INDEX_COMPLETE,id)
!= null;
     }
     return false;
   }
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneRawIndex.java
b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneRawIndex.java
index df80a48..91011f3 100755
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneRawIndex.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneRawIndex.java
@@ -52,7 +52,7 @@ public class LuceneRawIndex extends LuceneIndexImpl {
   public void destroy(boolean initiator) {}
 
   @Override
-  public boolean isIndexAvailable() {
+  public boolean isIndexAvailable(int id) {
     return true;
   }
 }
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManager.java
b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManager.java
index 5d74ec0..a2e0f83 100755
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManager.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManager.java
@@ -78,7 +78,7 @@ public class PartitionedRepositoryManager implements RepositoryManager {
         throw new BucketNotFoundException(
             "User bucket was not found for region " + region + "bucket id " + bucketId);
       } else {
-        if (index.isIndexAvailable()) {
+        if (index.isIndexAvailable(userBucket.getId())) {
           repos.add(getRepository(userBucket.getId()));
         } else {
           throw new LuceneIndexCreationInProgressException(

-- 
To stop receiving notification emails like this one, please contact
udo@apache.org.

Mime
View raw message