/** * Return a region that is the root for all Partitioned Region metadata on this node */ public static LocalRegion getPRRoot(final InternalCache cache) { return getPRRoot(cache, true); }
/** * Initializes the PartitionedRegion - create the Global regions for storing the * PartitiotnedRegion configs. */ private void initializePartitionedRegion() { this.prRoot = PartitionedRegionHelper.getPRRoot(getCache()); }
logger.debug("Cleaning PartitionedRegion meta data for memberId={}", failedMemId); Region rootReg = PartitionedRegionHelper.getPRRoot(cache, false); if (rootReg == null) { return;
/** * Utility method to print warning when nodeList in b2n region is found empty. This will signify * potential data loss scenario. * * @param bucketId Id of Bucket whose nodeList in b2n is empty. * @param callingMethod methodName of the calling method. */ public static void logForDataLoss(PartitionedRegion partitionedRegion, int bucketId, String callingMethod) { if (!Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PRDebug")) { return; } Region root = PartitionedRegionHelper.getPRRoot(partitionedRegion.getCache()); // Region allPartitionedRegions = PartitionedRegionHelper.getPRConfigRegion( // root, partitionedRegion.getCache()); PartitionRegionConfig prConfig = (PartitionRegionConfig) root.get(partitionedRegion.getRegionIdentifier()); if (prConfig == null) return; Set members = partitionedRegion.getDistributionManager().getDistributionManagerIds(); logger.warn( "DATALOSS ( {} ) :: Size of nodeList After verifyBucketNodes for bucket ID, {} is 0", callingMethod, bucketId); logger.warn("DATALOSS ( {} ) :: NodeList from prConfig, {}", callingMethod, printCollection(prConfig.getNodes())); logger.warn("DATALOSS ( {} ) :: Current Membership List, {}", callingMethod, printCollection(members)); }
Region prRoot = PartitionedRegionHelper.getPRRoot(prRegion.getCache()); PartitionRegionConfig config = (PartitionRegionConfig) prRoot.get(prRegion.getRegionIdentifier());
List<PartitionRegionConfig> colocatedRegions = new ArrayList<PartitionRegionConfig>(); List<PartitionRegionConfig> tempcolocatedRegions = new ArrayList<PartitionRegionConfig>(); Region prRoot = PartitionedRegionHelper.getPRRoot(partitionedRegion.getCache()); PartitionRegionConfig regionConfig = (PartitionRegionConfig) prRoot.get(partitionedRegion.getRegionIdentifier());
PartitionedRegion partitionedRegion) { List<PartitionedRegion> colocatedChildRegions = new ArrayList<PartitionedRegion>(); Region prRoot = PartitionedRegionHelper.getPRRoot(partitionedRegion.getCache()); PartitionRegionConfig prConf = null;
/** * A utility to check to see if a region has been created on all of the VMs that host the regions * this region is colocated with. */ public static boolean isColocationComplete(PartitionedRegion region) { Region prRoot = PartitionedRegionHelper.getPRRoot(region.getCache()); PartitionRegionConfig config = (PartitionRegionConfig) prRoot.get(region.getRegionIdentifier()); // Fix for bug 40075. There is race between this call and the region being concurrently // destroyed. if (config == null) { Assert.assertTrue(region.isDestroyed() || region.isClosed, "Region is not destroyed, but there is no entry in the prRoot for region " + region); return false; } return config.isColocationComplete(); }
try { final PartitionRegionConfig prConf; Region rootReg = PartitionedRegionHelper.getPRRoot(cache, false); if (rootReg == null) { return;
Region root = PartitionedRegionHelper.getPRRoot(cache, false); if (root == null) { return; // no partitioned region info to clean up
Region prRoot = PartitionedRegionHelper.getPRRoot(partitionedRegion.getCache()); PartitionRegionConfig prConf = (PartitionRegionConfig) prRoot.get(getRegionIdentifier(colocatedWith));
public IndexRepository computeIndexRepository(final Integer bucketId, LuceneSerializer serializer, InternalLuceneIndex index, PartitionedRegion userRegion, final IndexRepository oldRepository, PartitionedRepositoryManager partitionedRepositoryManager) throws IOException { LuceneIndexForPartitionedRegion indexForPR = (LuceneIndexForPartitionedRegion) index; final PartitionedRegion fileRegion = indexForPR.getFileAndChunkRegion(); // We need to ensure that all members have created the fileAndChunk region before continuing Region prRoot = PartitionedRegionHelper.getPRRoot(fileRegion.getCache()); PartitionRegionConfig prConfig = (PartitionRegionConfig) prRoot.get(fileRegion.getRegionIdentifier()); LuceneFileRegionColocationListener luceneFileRegionColocationCompleteListener = new LuceneFileRegionColocationListener(partitionedRepositoryManager, bucketId); fileRegion.addColocationListener(luceneFileRegionColocationCompleteListener); IndexRepository repo = null; if (prConfig.isColocationComplete()) { repo = finishComputingRepository(bucketId, serializer, userRegion, oldRepository, index); } return repo; }
(DistributedRegion) PartitionedRegionHelper.getPRRoot(pr.getCache(), false); if (prRoot == null) { return;
LocalRegion rootRegion = PartitionedRegionHelper.getPRRoot(this.partitionedRegion.getCache()); BucketRegion bucketRegion = null;