Search in sources :

Example 1 with PartitionResponse

use of org.apache.geode.internal.cache.partitioned.PartitionMessage.PartitionResponse in project geode by apache.

the class PartitionedRegion method validateAllBuckets.

/**
   * Send a message to all PartitionedRegion participants, telling each member of the
   * PartitionedRegion with a datastore to validate that the meta-data for buckets agrees with the
   * data store's perspective
   * 
   * @see #dumpAllBuckets(boolean)
   */
public void validateAllBuckets() throws ReplyException {
    PartitionResponse response = DumpBucketsMessage.send(getRegionAdvisor().adviseAllPRNodes(), this, true, /* only validate */
    false);
    response.waitForRepliesUninterruptibly();
    if (this.dataStore != null) {
        this.dataStore.dumpEntries(true);
    }
}
Also used : PartitionResponse(org.apache.geode.internal.cache.partitioned.PartitionMessage.PartitionResponse)

Example 2 with PartitionResponse

use of org.apache.geode.internal.cache.partitioned.PartitionMessage.PartitionResponse in project geode by apache.

the class PartitionedRegion method sendDumpB2NRegionForBucket.

/**
   * Sends a message to all the {@code PartitionedRegion} participants, telling each member of the
   * PartitionedRegion to dump the nodelist in bucket2node metadata for specified bucketId.
   */
public void sendDumpB2NRegionForBucket(int bucketId) {
    getRegionAdvisor().dumpProfiles("dumpB2NForBucket");
    try {
        PartitionResponse response = DumpB2NRegion.send(this.getRegionAdvisor().adviseAllPRNodes(), this, bucketId, false);
        response.waitForRepliesUninterruptibly();
        this.dumpB2NForBucket(bucketId);
    } catch (ReplyException re) {
        if (logger.isDebugEnabled()) {
            logger.debug("sendDumpB2NRegionForBucket got ReplyException", re);
        }
    } catch (CancelException e) {
        if (logger.isDebugEnabled()) {
            logger.debug("sendDumpB2NRegionForBucket got CacheClosedException", e);
        }
    } catch (RegionDestroyedException e) {
        if (logger.isDebugEnabled()) {
            logger.debug("sendDumpB2RegionForBucket got RegionDestroyedException", e);
        }
    }
}
Also used : PartitionResponse(org.apache.geode.internal.cache.partitioned.PartitionMessage.PartitionResponse) RegionDestroyedException(org.apache.geode.cache.RegionDestroyedException) CancelException(org.apache.geode.CancelException) ReplyException(org.apache.geode.distributed.internal.ReplyException)

Example 3 with PartitionResponse

use of org.apache.geode.internal.cache.partitioned.PartitionMessage.PartitionResponse in project geode by apache.

the class PartitionedRegion method dumpAllBuckets.

/**
   * Send a message to all PartitionedRegion participants, telling each member of the
   * PartitionedRegion with a datastore to dump the contents of the buckets to the system.log and
   * validate that the meta-data for buckets agrees with the data store's perspective
   * 
   * @param distribute true will distributed a DumpBucketsMessage to PR nodes
   * @see #validateAllBuckets()
   */
public void dumpAllBuckets(boolean distribute) throws ReplyException {
    if (logger.isDebugEnabled()) {
        logger.debug("[dumpAllBuckets] distribute={} {}", distribute, this);
    }
    getRegionAdvisor().dumpProfiles("dumpAllBuckets");
    if (distribute) {
        PartitionResponse response = DumpBucketsMessage.send(getRegionAdvisor().adviseAllPRNodes(), this, false, /* only validate */
        false);
        response.waitForRepliesUninterruptibly();
    }
    if (this.dataStore != null) {
        this.dataStore.dumpEntries(false);
    }
}
Also used : PartitionResponse(org.apache.geode.internal.cache.partitioned.PartitionMessage.PartitionResponse)

Example 4 with PartitionResponse

use of org.apache.geode.internal.cache.partitioned.PartitionMessage.PartitionResponse in project geode by apache.

the class PartitionedRegion method sendDumpAllPartitionedRegions.

/**
   * Send a message to all PartitionedRegion participants, telling each member of the
   * PartitionedRegion with a datastore to dump the contents of the allPartitionedRegions for this
   * PartitionedRegion.
   */
public void sendDumpAllPartitionedRegions() throws ReplyException {
    getRegionAdvisor().dumpProfiles("dumpAllPartitionedRegions");
    PartitionResponse response = DumpAllPRConfigMessage.send(getRegionAdvisor().adviseAllPRNodes(), this);
    response.waitForRepliesUninterruptibly();
    dumpSelfEntryFromAllPartitionedRegions();
}
Also used : PartitionResponse(org.apache.geode.internal.cache.partitioned.PartitionMessage.PartitionResponse)

Aggregations

PartitionResponse (org.apache.geode.internal.cache.partitioned.PartitionMessage.PartitionResponse)4 CancelException (org.apache.geode.CancelException)1 RegionDestroyedException (org.apache.geode.cache.RegionDestroyedException)1 ReplyException (org.apache.geode.distributed.internal.ReplyException)1