VMware GemFire

 View Only

 Im using @EnableDiskstore to create my custom diskstore , When i create the partitionRegion using paritionRegionFactoryBean and setDiskstore it says disk store not found

Vaidhyanathan Pranatharthiharan's profile image
Vaidhyanathan Pranatharthiharan posted Aug 12, 2019 04:46 PM

 

Vaidhyanathan Pranatharthiharan's profile image
Vaidhyanathan Pranatharthiharan

Here's an Example

@EnableDiskstore(name="testDiskStore")

 

@Bean

PartitiontionRegionFactoryBean bean=new PartitionRegionFactoryBean()

bean.setRegion("testDiskstore") .

 

It gives an error testDiskstore not found , However if i dont do the above setting it works fine .

Juan Cassella's profile image
Juan Cassella

Hello Vaidhyanathan,

 

Thanks for contacting the Pivotal Support Community!.

That said, this is probably not working because you're incorrectly referencing a disk-store within your configuration, maybe the id is not correct or the actual disk-store hasn't been created yet according to the default Spring lifecycle management. I'd suggest to follow the official examples and make sure your custom partitionRegionFactoryBean has an explicit dependency on the disk-store you want to use.

Best regards.

Vaidhyanathan Pranatharthiharan's profile image
Vaidhyanathan Pranatharthiharan

The actual diskstore is created with this id . I see all the entries in the directory location , Just that when i set the partitionRegionFactoryBean with this id its giving me this error . If i create the diskstores with Geode API's its working fine .

Juan Cassella's profile image
Juan Cassella

Hello Vaidhyanathan,

 

The problem is probably related to the fact that you're using annotations to configure the disk-store and java configuration to configure the actual region, at the time the PartitiontionRegionFactoryBean is created and configured the disk-store probably doesn't exist yet and, as such, the region creation fails. Can you try to use the same configuration approach and see if that works?.

Best regards.

Vaidhyanathan Pranatharthiharan's profile image
Vaidhyanathan Pranatharthiharan

Csn u let me know the doc that tells how to create regions using annotation.i thought its only through @bean and creste new instance of parttionregionfactorybean​

Juan Cassella's profile image
Juan Cassella

Hello Vaidhyanathan,

 

The different options are all explained in Data Access with GemfireTemplate [1].

Hope this helps. Cheers.

 

[1]: https://docs.spring.io/autorepo/docs/spring-boot-data-geode-build/1.0.0.RELEASE/reference/htmlsingle/#geode-data-access-region-templates