You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Dinesh Akhand <di...@amdocs.com> on 2018/10/17 12:09:38 UTC
need to find out number of lost bucket info & bucket ID when 2 JVM
goes down when hosting partition region with redundency 2
Hi Team,
I am trying to get the information in geode code when we have partition region with redundancy =2 .
Total JVM are 5 and 2 JVM goes down same time.
Then it comes with bucket loss.
I want to print this information in log.
Kindly suggest why below code do't give correct information. Using geode version 1.2
if(region.getFullPath().equals("/CUSTOMER_1"))
{
PartitionedRegion pr=(PartitionedRegion)region;
logger.info("akhand2="+ region.getFullPath());
Iterator bucketIdsWithStorage = pr.getRegionAdvisor().getBucketSet().iterator();
while (bucketIdsWithStorage.hasNext()) { // bucketId loop
Integer bucketId = ((Integer) bucketIdsWithStorage.next()).intValue();
try {
//List owners = pr.getBucketOwnersForValidation(bucketId);
Set<InternalDistributedMember> bucketOwners = pr.getRegionAdvisor().getBucketOwners(bucketId.intValue());
for(InternalDistributedMember dm :bucketOwners)
{
logger.info("getBucketRedundancy"+pr.getRegionAdvisor().getBucketRedundancy(bucketId.intValue())+"bucketid="+bucketId.intValue()+",bucketOwners"+bucketOwners.size()+", dmName:"+dm.getName()+",Primary:"+pr.getRegionAdvisor().getBucket(bucketId.intValue()).isPrimary()+", isHosted:"+pr.getRegionAdvisor().getBucket(bucketId.intValue()).isHosting()+", isPrimaryHosting:"+pr.getRegionAdvisor().getBucket(bucketId.intValue()).getprimaryStateToString());
}
} catch (Exception e) {
logger.info("akhand1 pr " + pr, e);
}
}
}//end if
}//end partition region
}
Thanks,
Dinesh Akhand
“Amdocs’ email platform is based on a third-party, worldwide, cloud-based system. Any emails sent to Amdocs will be processed and stored using such system and are accessible by third party providers of such system on a limited basis. Your sending of emails to Amdocs evidences your consent to the use of such system and such processing, storing and access”.