Search in sources :

Example 1 with HeterogeneousLuceneSerializer

use of org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer in project geode by apache.

the class LuceneRawIndex method createRepositoryManager.

@Override
protected RepositoryManager createRepositoryManager() {
    HeterogeneousLuceneSerializer mapper = new HeterogeneousLuceneSerializer(getFieldNames());
    RawLuceneRepositoryManager rawLuceneRepositoryManager = new RawLuceneRepositoryManager(this, mapper);
    return rawLuceneRepositoryManager;
}
Also used : HeterogeneousLuceneSerializer(org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer)

Example 2 with HeterogeneousLuceneSerializer

use of org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer in project geode by apache.

the class LuceneIndexForPartitionedRegion method createRepositoryManager.

protected RepositoryManager createRepositoryManager() {
    HeterogeneousLuceneSerializer mapper = new HeterogeneousLuceneSerializer(getFieldNames());
    PartitionedRepositoryManager partitionedRepositoryManager = new PartitionedRepositoryManager(this, mapper);
    return partitionedRepositoryManager;
}
Also used : HeterogeneousLuceneSerializer(org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer)

Example 3 with HeterogeneousLuceneSerializer

use of org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer in project geode by apache.

the class PartitionedRepositoryManagerJUnitTest method setUp.

@Before
public void setUp() {
    cache = Fakes.cache();
    userRegion = Mockito.mock(PartitionedRegion.class);
    userDataStore = Mockito.mock(PartitionedRegionDataStore.class);
    when(userRegion.getDataStore()).thenReturn(userDataStore);
    when(cache.getRegion("/testRegion")).thenReturn(userRegion);
    serializer = new HeterogeneousLuceneSerializer(new String[] { "a", "b" });
    DLockService lockService = mock(DLockService.class);
    when(lockService.lock(any(), anyLong(), anyLong())).thenReturn(true);
    DLockService.addLockServiceForTests(PartitionedRegionHelper.PARTITION_LOCK_SERVICE_NAME, lockService);
    createIndexAndRepoManager();
}
Also used : PartitionedRegion(org.apache.geode.internal.cache.PartitionedRegion) HeterogeneousLuceneSerializer(org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer) DLockService(org.apache.geode.distributed.internal.locks.DLockService) PartitionedRegionDataStore(org.apache.geode.internal.cache.PartitionedRegionDataStore) Before(org.junit.Before)

Example 4 with HeterogeneousLuceneSerializer

use of org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer in project geode by apache.

the class LuceneIndexRecoveryHAIntegrationTest method setup.

@Before
public void setup() {
    indexedFields = new String[] { "txt" };
    mapper = new HeterogeneousLuceneSerializer(indexedFields);
    analyzer = new StandardAnalyzer();
    LuceneServiceImpl.registerDataSerializables();
    cache = new CacheFactory().set(MCAST_PORT, "0").create();
}
Also used : HeterogeneousLuceneSerializer(org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer) StandardAnalyzer(org.apache.lucene.analysis.standard.StandardAnalyzer) Before(org.junit.Before)

Example 5 with HeterogeneousLuceneSerializer

use of org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer in project geode by apache.

the class RawLuceneRepositoryManagerJUnitTest method setUp.

@Before
public void setUp() {
    cache = Fakes.cache();
    userRegion = Mockito.mock(PartitionedRegion.class);
    userDataStore = Mockito.mock(PartitionedRegionDataStore.class);
    when(userRegion.getDataStore()).thenReturn(userDataStore);
    when(cache.getRegion("/testRegion")).thenReturn(userRegion);
    serializer = new HeterogeneousLuceneSerializer(new String[] { "a", "b" });
    createIndexAndRepoManager();
}
Also used : PartitionedRegion(org.apache.geode.internal.cache.PartitionedRegion) HeterogeneousLuceneSerializer(org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer) PartitionedRegionDataStore(org.apache.geode.internal.cache.PartitionedRegionDataStore) Before(org.junit.Before)

Aggregations

HeterogeneousLuceneSerializer (org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer)6 Before (org.junit.Before)4 PartitionedRegion (org.apache.geode.internal.cache.PartitionedRegion)2 PartitionedRegionDataStore (org.apache.geode.internal.cache.PartitionedRegionDataStore)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 Region (org.apache.geode.cache.Region)1 LuceneIndexStats (org.apache.geode.cache.lucene.internal.LuceneIndexStats)1 RegionDirectory (org.apache.geode.cache.lucene.internal.directory.RegionDirectory)1 FileSystemStats (org.apache.geode.cache.lucene.internal.filesystem.FileSystemStats)1 DLockService (org.apache.geode.distributed.internal.locks.DLockService)1 BucketAdvisor (org.apache.geode.internal.cache.BucketAdvisor)1 BucketRegion (org.apache.geode.internal.cache.BucketRegion)1 StandardAnalyzer (org.apache.lucene.analysis.standard.StandardAnalyzer)1 IndexWriter (org.apache.lucene.index.IndexWriter)1 IndexWriterConfig (org.apache.lucene.index.IndexWriterConfig)1