GemFire Custom Partitioning considerations
search cancel

GemFire Custom Partitioning considerations

book

Article ID: 294046

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

GemFire Custom Partitioning considerations. This KB is applicable to all supported versions of both PCC and GemFire.


Resolution

It is not recommended to override the equals or hashCode methods in a custom partition resolver. GemFire relies on the equals producing consistent results for any two instances of given PartitionResolver as it uses this to compare PartitionResolvers between servers and they are required to be equal for the same region. The PartitionResolver should have an equals method, but it should only compare getName().
 

References:

https://github.com/Pivotal-Field-Engineering/gemfire-fe/tree/master/gemfire-examples/gemfire-data/src/main/java/io/pivotal/bds/gemfire/data/securities