public void dumpBucket(int bucketId, final LocalRegion bucket) {
    Integer buckId = bucketId;
    visitBucket(buckId, bucket, new EntryVisitor() {
      final StringBuilder buf = new StringBuilder("Entries in bucket ").append(bucket).append("\n");

      @Override
      public void visit(Integer bid, Entry re) {
        buf.append(re.getKey()).append(" => ").append(re.getValue()).append("\n");
      }

      @Override
      public void finishedVisiting() {
        logger.debug(buf.toString());
      }
    });

  }
<i>Test Method</i> Dump the entries in this given bucket to the logger

@param bucketId the id of the bucket to dump
@param bucket the Region containing the bucket data
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java