Github user nabarunnag commented on a diff in the pull request:

    https://github.com/apache/geode/pull/481#discussion_r114175681
  
    --- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
 ---
    @@ -78,17 +87,9 @@ protected RepositoryManager createRepositoryManager() {
         // create PR fileAndChunkRegion, but not to create its buckets for now
         final String fileRegionName = createFileRegionName();
         PartitionAttributes partitionAttributes = 
dataRegion.getPartitionAttributes();
    -
    -
    -    // create PR chunkRegion, but not to create its buckets for now
    -
    -    // we will create RegionDirectories on the fly when data comes in
    -    HeterogeneousLuceneSerializer mapper = new 
HeterogeneousLuceneSerializer(getFieldNames());
    -    PartitionedRepositoryManager partitionedRepositoryManager =
    -        new PartitionedRepositoryManager(this, mapper);
         DM dm = 
this.cache.getInternalDistributedSystem().getDistributionManager();
         LuceneBucketListener lucenePrimaryBucketListener =
    -        new LuceneBucketListener(partitionedRepositoryManager, dm);
    +        new LuceneBucketListener((PartitionedRepositoryManager) 
partitionedRepositoryManager, dm);
    --- End diff --
    
    I made createLuceneListenerAndFileChunkRegion method take in 
PartitionedRepositoryManager
    which removed all the casting in the LuceneIndexForPartitionRegion.java but 
I would like a suggestion on how to remove the casting in 
createLuceneListenersAndFileChunkRegions(  (PartitionedRepositoryManager) 
repositoryManager); in the LuceneIndexImpl.java file. As the repositoryManager 
is being created by createRepositoryManager() which creates  repository manager 
for both RawLuceneIndex as well as LuceneIndexForPartitionRegion


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to