You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ji...@apache.org on 2022/03/07 21:33:12 UTC

[geode] branch feature/GEODE-7665 updated (583e06b -> a66dde8)

This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a change to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git.


 discard 583e06b  Revert "Rebase on GEODE develop (#7372)"
 discard cd94f07  Rebase on GEODE develop (#7372)
    omit 6754d1a  GEODE-9194: Feature/region stats update (#6430)
    omit 83e2e3b  GEODE-9194: Missing file is causing trouble (#6574)
    omit a4e1128  GEODE-9195: Remove PR clear local locking (#6410)
    omit 58049af  GEODE-9132: Fix locking in PRClearCreateIndexDUnitTest
    omit e3e262d  GEODE-9132: Use factory method to avoid escaped reference
    omit cd192d7  GEODE-9132: Always acquire write lock for PR clear
    omit d43efe3  GEODE-9132: Fix assertion in ResourceUtils
    omit 28b998c  GEODE-9132: PartitionedRegionClearWithConcurrentOperationsDUnitTest cleanup 3
    omit a259a58  GEODE-9132: PartitionedRegionClearWithConcurrentOperationsDUnitTest cleanup 2
    omit 65830e5  GEODE-9132: PartitionedRegionClearWithConcurrentOperationsDUnitTest cleanup 1
    omit 1e56990  Fixup AnalyzeCoreSerializablesJUnitTest for PartitionedRegionPartialClearException
    omit acb891a  GEODE-9132: Remove ClearPRMessage from sanctionedDataSerializables.txt
    omit d322de7  GEODE-9132: Cleanup PartitionedRegionPartialClearException
    omit f283162  GEODE-9132: Undelete unnecessary uses of final
    omit 1c05fa1  GEODE-9132: Remove unused DSFID constants
    omit 8df95fe  GEODE-9132: Cleanup PartitionedRegionClearMessage
    omit 96bebe7  GEODE-9132: Fixup PartitionResponse constructors
    omit 2a133cf  GEODE-9132: Delete ClearPRMessage
    omit c4eb3a0  GEODE-7674: Clear on PR with lucene index should throw exception (#6317)
    omit 77e17d6  GEODE-7683: introduce BR.cmnClearRegion
     add 354619b  GEODE-9255: Remove remaining uses of ByteArrayWrapper (#6530)
     add 8cd5009  GEODE-9317: handle infinity as valid score in zadd (#6555)
     add 4d94526  GEODE-9344: Add ignored exception in RollingUpgradeDUnitTest (#6559)
     add 7289b77  GEODE-9248: Server hosting CQ queue uneccessary fills bucketToTempQue… (#6477)
     add 7a2fee9  GEODE-9202: implement PUBSUB CHANNELS subcommand (#6493)
     add 16c90df  GEODE-9285: Implement accurate sizeable for RedisSet (#6531)
     add 158bbd0  GEODE-9363: Bump spring from 5.3.6 to 5.3.7 (#6582)
     add 3aa6553  GEODE-9168: Remove radish function execution (#6560)
     add 82775bd  GEODE-9362: Implement zadd with INCR option. (#6573)
     add 8e18e81  GEODE-9366: Redis SynchronizedStripeExecutor can throw IndexOutOfBoundsException (#6588)
     add f0d918e  GEODE-8772: Fix ClusterComms test port conflicts (#6583)
     add 32d7498  Revert "GEODE-9248: Server hosting CQ queue uneccessary fills bucketToTempQue… (#6477)" (#6603)
     add 0bd4be0  GEODE-8825: Modified test to wait for proxies to be created (#6591)
     add 0ffa98e  GEODE‑9298: update badge link after jobs were renamed (#6581)
     add 193cddc  GEODE-8980: bumps deps (#6600)
     add 5df584b  GEODE-9103: Fix failures in PutAllClientServerDistributedTest (#6542)
     add 7a886b7  GEODE-9371: Change stress-new-test to non-required (#6602)
     add d360405  Adds some queue and map JMH benchmarks. (#6540)
     add 5936e4f  GEODE-9373: add testEventIdOutOfOrderInPartitionRegionSingleHopFromCl… (#6609)
     add f0e6e0d  GEODE-9372: Added createSenderTime and createSenderInProgress stats (#6608)
     add 3de464e  GEODE-8481: validate java version and vendor earlier (#6612)
     add 790176f  GEODE-9165: User Guide - Add "getting started with clients" (#6597)
     add 31bb9b9  GEODE-9295: Reply sent always  while processing LatestLastAccessTimeMessage
     add c9d4f68  GEODE-9295: Added dunit test
     add f408b6c  GEODE-7968: UG - Fix region shortcut table format issues (#6566)
     add 2271b7f  GEODE-9287: Always use Coder for Radish String/byte[] conversion (#6599)
     add ecaf313  [GEODE-9386] Fix windows builder cleanup (#6630)
     add 8333d60  GEODE-7967: User Guide - gfsh start locator - reformat oversize table (#6552)
     add 4f106c6  GEODE-9329: Implement radish leaderboard data structs (#6548)
     add 1f25bbc  GEODE-9301: Implement accurate sizeable for RedisHash (#6590)
     add 86a8b1e  Revert "GEODE-8971: Add grace period when stopping gateway sender with group-… (#6052)" (#6634)
     add dd273db  GEODE-9203: Implement Radish PUBSUB NUMSUB subcommand (#6616)
     add f4c2b80  GEODE-9166: Implement radish MOVED response (#6595)
     add 1b97c7c  GEODE-9380: Replace sleep()s from Nio.SslEngine replace with yields
     add bedc116  Merge pull request #6615 from kamilla1201/GEODE-9380
     add c0ca9ec  GEODE-9258: Move implementations out of NullRedisString and NullRedisSet (#6639)
     add 5b57483  add 1.13.3 to old versions and set as Benchmarks baseline on develop (#6644)
     add 8fcf7f8  Temporarily remove sabbey37 from Radish CODEOWNERs (#6647)
     add 396f213  GEODE-9400: Do not use Coder conversion methods in tests (#6643)
     add bc08aa0  GEODE-9400: Use positive bytes to create random strings (#6652)
     add cdc7fd8  Return 'inf' and '-inf' like Redis does, add Coder tests (#6658)
     add 963ef6e  GEODE-8870: Removes GFE_70.
     add 02d8910  GEODE-6588: Cleanup CacheClientNotifier
     add bf140d0  GEODE-6588: Cleanup ClientTombstoneMessage
     add 1f679d4  GEODE-6588: Cleanup DiskInitFile
     add 2bf77f4  GEODE-6588: Cleanup DiskStoreImpl
     add 570ee1e  GEODE-6588: Cleanup OpLog
     add 459d405  GEODE-6588: Cleanup TXCommitMessage
     add cc6f2c3  GEODE-6588: Cleanup DataSerializableJUnitTest
     add 5a75bf1  GEODE-9303: Implement Radish DUMP/RESTORE commands (#6605)
     add 91cddb0  Enabling only rebase and squash buttons in GitHub PRs (#6661)
     add 0ea005d  GEODE-9205: Implement Radish PUBSUB NUMPAT subcommand (#6642)
     add f52c593  Add smgoller to codeowners. (#6664)
     add 6f2cad3  add 1.12.3 to old versions on develop (#6666)
     add b037f2f  GEODE-9403: use a better keyserver in Dockerfile (#6648)
     add 9c55efe  GEODE-9410: User Guide - resolve inconsistencies in gfsh import cluster-configuration command description (#6669)
     add 7e75db9  GEODE-8980: bump deps (#6675)
     add 3c43081  Geode-9375: Implement ZRANGE command (#6670)
     add e20567b  GEODE-9411: Do not close channel on IOException processing Redis command (#6673)
     add 7b3693d  GEODE-9374: Use await() in RestoreRedundancyOperationDUnitTest (#6649)
     add b12b8f6  GEODE-9248: Server hosting CQ queue uneccessary fills bucketToTempQueue (#6646)
     add 52afbbc  GEODE-8870: Removes GFE_701.
     add a292879  GEODE-6588: Cleanup GetAll70
     add 6dbc99b  GEODE-6588: Cleanup CacheClientProxy
     add d81496a  GEODE-6588: Cleanup GatewaySenderEventImpl
     add 25d8e34  GEODE-6588: Cleanup RemoteParallelGatewaySenderEventProcessor
     add 996d24b  GEODE-9187: Implement Radish ZREVRANK command (#6674)
     add 2c502d0  GEODE-9384: Fix exception messages in PdxToJSON and JsonWriter (#6629)
     add 6ba9a82  GEODE-9407: Handle exception getting region names (#6665)
     add 11e4c3a  GEODE-9346: When client received incorrect byte array of PdxType due … (#6561)
     add ea19ff0  GEODE-9182: Implement Radish ZCOUNT command (#6680)
     add f0e328b  GEODE-9404: Do not log error message if sender is not configured. (#6659)
     add d361a99  GEODE-9421: Remove BatchRemoval NPE logs from JUnit tests (#6683)
     add 4f3c2e7  GEODE-8282: Improve disk-store dir sizes constraints handling in gfsh (#6638)
     add 3115e8b  GEODE-9209: Complete test in DistributionConfigJUnitTest (#6393)
     add b585039  GEODE-9350: MemberJoinedEvent should be triggered after new view is installed (#6598)
     add 90bc5b7  Revert "GEODE-9411: Do not close channel on IOException processing Redis command (#6673)" (#6693)
     add be569ea  GEODE-9377 - Removed deploymentName field from Deployment config object. (#6610)
     add 8b7a1a2  GEODE-9376: Implement Radish ZREVRANGE command (#6689)
     add e3457ff  GEODE-8870: Removes GFE_7099
     add 9704979  GEODE-9424: Accept Long arguments for Redis commands (#6698)
     add 4618604  GEODE-9426: Update docs for HTTP session management (#6703)
     add 400dee1  GEODE-9070: Improve ClientServerSessionCacheDUnitTest and add additional logging (#6567)
     add 0726d5a  GEODE-9378: Implement ZRANGEBYSCORE (#6700)
     add 6890221  GEODE-9441: Reduce Nested func test thread count (#6708)
     add d77cb31  GEODE-9439: Convert CertificateBuilder to sun/jdk APIs (#6707)
     add 198f664  GEODE-9368: Changes to support better resiliency for HA scenarios (#6686)
     add 4338015  GEODE-9443: Increase pid_max in CI images (#6710)
     add d615470  GEODE-9304: Make RedisSortedSet measurement of bytes in use accurate (#6699)
     add 4e70bfc  GEODE-9289: Configuration class modified into VersionedDataSerializable
     add 693e18c  GEODE-9354: Extract and test ArgumentRedactorRegex (#6641)
     add 7d08ab5  GEODE-9429: Allow Radish HSCAN to handle all valid values for COUNT (#6701)
     add 7e246f5  GEODE-9447: fix release scripts (#6712)
     add 95d0bee  Remove sabbey37 from codeowners (#6717)
     add 0fd6201  GEODE-9462: Capture call stacks from all sources (#6723)
     add 9b13911  add 1.12.4 to old versions on develop
     add 277222d  GEODE-9300: write-buffer-size value not used when creating disk store (#6596)
     add cb2f987  GEODE-8728: Isolate tests without Docker (#6720)
     add cb96b92  GEODE-6588: Cleanup multi-user auth.
     add 536ad41  GEODE-8870: Removes GFE_71
     add 0fd2c32  GEODE-6588: Cleanup InternalDistributedMember
     add 7e06d03  GEODE-6588: Cleanup FilterRoutingInfo
     add 963d03a  GEODE-6588: Cleanup MemberIdentifierImpl
     add 7c04b86  GEODE-9388: Implement Radish ZRANGEBYLEX Command (#6716)
     add 138d5b8  add 1.13.4 to old versions and set as Benchmarks baseline on develop (#6728)
     add f7cc081  GEODE-9185: Add ZPOPMAX Radish command (#6726)
     add d58482b  GEODE-4181: Add JUnit 5 Support (#6740)
     add 32e5a5f  GEODE-4181: Use new includeTags property name (#6742)
     add d444b02  GEODE-9492: Ignore default port test in stress tests (#6748)
     add b0a4783  GEODE-9491: Fix REST API test use of ephemeral ports (#6751)
     add 5a6fe75  GEODE-9483: Make StartLocatorCommandIntegrationTest not start unneeded locator (#6731)
     add 7f98970  GEODE-9463: Add SerializableRegionRedundancyStatusImpl to accept list (#6753)
     add 645dd08  Changing the version with ordinal 121 to be 1.13.2 (#6729)
     add 81523b7  GEODE-9488: Make CqQuery test assign port (#6741)
     add 08a5d41  GEODE-9494: Security Properties for HTTP Module (#6754)
     add bca2aeb  GEODE-9489: Adjust assertion in GeodeRedisServerStartupDUnitTest to use class instead of message
     add 8aeec39  GEODE-9338: Remove strong guarantees for Radish PUBLISH command (#6704)
     add 88860d0  GEODE-9409: wait for PdxRegistry before executing create region (#6743)
     add 8d455b4  GEODE-9379: Implement ZREVRANGEBYSCORE (#6715)
     add 9bdfd13  Revert GEODE-4181: Add JUnit 5 Support (#6762)
     add 1210cbc  GEODE-9493: rework sizing of RedisString, RedisHash, RedisSet, and RedisSortedSet (#6727)
     add f85bc83  GEODE-8870: Remove GFE_80
     add 08c660e  GEODE-6588: Cleanup ClientHealthStats
     add b92a0f6  GEODE-6588: Cleanup GatewayReceiverCommand
     add 4f8a6ca  GEODE-6588: Cleanup RegisterInterest61
     add 5d69c63  GEODE-6588: Cleanup RegisterInterestList66
     add def8a1f  GEODE-6588: Cleanup ServerSideHandshakeImpl
     add 8e097c3  GEODE-6588: Cleanup VersionedObjectList
     add fe190e6  GEODE-6588: Cleanup GatewaySenderAdvisor
     add d136519  GEODE-6588: Cleanup DLockService
     add 7e0888b  GEODE-6588: Cleanup AbstractUpdateOperation
     add e109e82  GEODE-6588: Cleanup EventID
     add f410b7e  GEODE-6588: Cleanup FilterRoutingInfo
     add 5b544ff  GEODE-6588: Cleanup InitialImageOperation
     add c919e3f  GEODE-6588: Cleanup Connection
     add f63d19e  GEODE-6588: Cleanup CliFunctionResult
     add a5ad625  GEODE-6588: Cleanup RegisterInterest61Test
     add 0827a38  GEODE-6588: Cleanup RegisterInterestList66Test
     add 0d9e4bd  GEODE-8870: Removes old unused classes.
     add a10a56f  GEODE-9074: Added update of messageQueueSize at putting message to qu… (#6445)
     add 639c5f9  Added dschneider to redis apis as codeowner (#6769)
     add a1df4b3  GEODE-9490: Correctly ignore RedisProxy exceptions in NativeRedisClusterTestRule (#6745)
     add ed38145  GEODE-9169: remove netty context switch (#6725)
     add befc7cc  GEODE-9186: Add Radish ZPOPMIN command (#6738)
     add 12e0b14  GEODE-9496: Enhance the usage of newly introduced system property (#6756)
     add 6e7110f  GEODE-8870: Removes GFE_8009
     add 2a321cf  GEODE-9500: clear deltaInfo even if delta not distributed
     add 7835dc6  GEODE-9184: Add Radish ZLEXCOUNT command (#6735)
     add 76695e4  GEODE-8980: bump deps (#6734)
     add 5e9b368  GEODE-4181: Reduce ChildVM command line length (#6763)
     add fc6ef7c  GEODE-9525: Add Radish benchmarks to CI (#6775)
     add 1969f39  GEODE-9514: optimize how Coder reads and writes "int" and "long" values (#6765)
     add 9fcbb74  GEODE-9525: Add Radish benchmarks to CI - with fix (#6780)
     add 2752849  GEODE-9523: Fix invalid path in ContainerInstall (#6774)
     add 0d1954b  GEODE-9526: Fix path computation in DiskStore test (#6777)
     add 9ff39d12 GEODE-9529: fix release scripts (benchmark baseline, docker) (#6779)
     add dc18a2a  GEODE-9525: Add Radish benchmarks to CI - fix 2 (#6784)
     add 018fb58  GEODE-9071: Add wait before check cq listener invocations. (#6785)
     add 280bd84  GEODE-9515: Skip setting MBeanServer when JMXConnectorServer will set it (#6770)
     add a87cc25  Create ThreadLocal instance, use to manage DeltaInfos (#6776)
     add 6f77c99  GEODE-9442: Add logging when Native Redis container is stopped (#6791)
     add 20ee160  GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class (#6757)
     add 7f4afe6  GEODE-9539: Remove Radish SupportedCommandsJUnitTest (#6795)
     add fdda7db  GEODE-9506: Do not use random ephemeral port to start Redis servers (#6790)
     add 58592ed  GEODE-9389: Implement Radish ZREVRANGEBYLEX Command (#6766)
     add c9d465b  GEODE-9369: Command to copy region entries from a WAN site to another (#6601)
     add ed816c5  GEODE-9528: Updated test to await until asserted (#6798)
     add b944ace  GEODE-9451: On demand authentication expiration and re-authentication (#6787)
     add 10f5f30  GEODE-9436: Implement Radish ZREMRANGEBYSCORE command (#6800)
     add b377e3f  GEODE-9408: Avoid duplicate events sent by Serial Gateway Sender when group-transaction-events is true (#6663)
     add 48f3e62  Revert "GEODE-9369: Command to copy region entries from a WAN site to another (#6601)" (#6811)
     add 10abff6  GEODE-9532: Register LongWrapperSerializer before Region.put() (#6799)
     add 39e7413  GEODE-9555: optimize incr/decr results  (#6778)
     add faf76ad  GEODE-9482: change Coder.bytesToLong to fail if bytes start with "-0" or "+" (#6807)
     add ccaa72a  GEODE-8980: bump deps (#6813)
     add 3b2c531  GEODE-9486: Fix validate-serializable-objects (#6746)
     add 4af2bad  GEODE-9458: function execution with expiring authentication (#6789)
     add a36c327  Adding the PGP keys for Nabarun Nag with apache ID (#6818)
     add 38b22dc  GEODE-9252: Wait longer for Redis cluster to be formed (#6817)
     add 4cbb02a  GEODE-9560: Implement Radish ECHO command (#6815)
     add 214fc2c  GEODE-9541: Explicitly unsubscribe after each test in SubCommandsIntegrationTest (#6821)
     add 00aa276  GEODE-9537: Ensure that servers do not start on ephemeral ports (#6796)
     add 14cfdf0  GEODE-7864: Add missing curly braces to if statements (#6812)
     add 89dba01  GEODE-9564: Rename package from ParameterRequirements to parameters (#6819)
     add 25f70a7  Revert "GEODE-9486: Fix validate-serializable-objects (#6746)" (#6816)
     add 93c1864  GEODE-9497: create new hash map class with fewer fields (#6768)
     add ae8d674  GEODE-9518: Implement Radish ZUNIONSTORE command (#6794)
     add fd377ed  GEODE-9434: add ZREMRANGEBYLEX command (#6773)
     add 15a4e62  Update CODEOWNERS file (#6838)
     add 6326e7a  GEODE-9573: Uses mutable list for connections.
     add ed00393  GEODE-9574: Sets cause to null on certain exceptions.
     add 81ae780  GEODE-9447: fix release scripts (#6824)
     add 070fdd2  GEODE:9556: make Radish GETSET a supported command (#6832)
     add 8b4d4f0  GEODE-9435: Implement ZREMRANGEBYRANK (#6803)
     add 347eb68  add 1.14.0 to old versions and set as Benchmarks baseline on develop (#6840)
     add acbd0ff  GEODE-9486: Fix validate-serializable-objects (with Windows fixes) (#6823)
     add dadbbdc  GEODE-9561: User Guide - jmx-manager-ssl-enabled supersedes jmx-manager-ssl (#6837)
     add 02ab2ca  GEODE-9586: modify 1.15.0's client server protocol version (#6846)
     add 712cba8  GEODE-9561: typo repair (#6849)
     add d1d605b  GEODE-9554: Change up the rebalance calls to use new canDelete call (#6845)
     add 9242a1f  GEODE-9577: Make PSETEX and SETEX supported commands (#6841)
     add 151d8c1  GEODE-6588: Cleanup Connection
     add 7b924b5  GEODE-5994: Cleanup from some additional review comments (#6852)
     add 723429f  GEODE-8626: Omitting field-mapping tag of cache.xml when using Simple JDBC Connector (#5637)
     add 5cbb203  GEODE-9347: optimize pubSub (#6814)
     add e64044b  GEODE-9589: Support SETRANGE command (#6855)
     add 9964d0d  Align logo, edit PR template (#6272)
     add d0c734f  GEODE-9585: adding support for the KEYSLOT command
     add 5f612e9  GEODE-9546: Integrate Security Manager into Radish AUTH flow (#6844)
     add b97370f  Revert "GEODE-9546: Integrate Security Manager into Radish AUTH flow (#6844)" (#6864)
     add b4add8b  GEODE-9521: add more multi-server test scenario (#6860)
     add 81153cf  GEODE-9542: Enable SSL client authentication for Radish (#6826)
     add b1ee810  GEODE-9446: Remove unecessary byte arrays from RedisSortedSet (#6783)
     add bca4755  Revert "Revert "GEODE-9546: Integrate Security Manager into Radish AUTH flow (#6844)" (#6864)" (#6868)
     add 0a579bd  GEODE-9583: Flush the disk stores before unregistering all serializers (#6854)
     add d58df40  GEODE-9519: Implement Radish ZSCAN command (#6831)
     add d0113fc  GEODE-9552: Change how Radish server shutdown/disconnect is handled (#6871)
     add b7b32de  GEODE-9605: Allow use of character literals in Radish module (#6872)
     add ed902f6  GEODE-9495: Limit Thread Sleep In PubSubNativeRedisAcceptanceTest (#6866)
     add 39bda58  GEODE-9458: Enhance function execution testing auth expiry (#6865)
     add ec5c7be  GEODE-9575: improve how publish executes a function (#6873)
     add 62f196b  GEODE-9605: Remove unnecessary casts to byte (#6876)
     add 00b4156  GEODE-9596: Avoid creating multiple cq maps in ClientUpdateMessage (#6869)
     add 78a481d  Revert "GEODE-9495: Limit Thread Sleep In PubSubNativeRedisAcceptanceTest (#6866)" (#6879)
     add c68a770  GEODE-9582: make radish pattern match compatible with redis
     add 6dbd219  GEODE-9365: Removing unnecessary synchronization (#6858)
     add b07f320  GEODE-9457: re-authentication in event dispatcher (#6835)
     add 19f55ad  GEODE-9204: thread hung waiting for response (#6426)
     add cf1b35c  GEODE-9606: Fix flaky PubSubIntegrationTest.testPatternWithoutAGlob (#6884)
     add 7bd1d73  GEODE-9486: Improve AnalyzeSerializables integration tests (#6878)
     add bfaaa4f  GEODE-9621: Add spotless rule for build.gradle files (#6889)
     add b8048e1  GEODE-9619: [documentation] Align contents section in README (#6888)
     add 6862935  GEODE-7309: uplift lucene to 7.1.0 (#6351)
     add 31bfdb9  fixed the incorrect spelling (#6886)
     add 47ba499  GEODE-9547: Radish commands are authorized by the SecurityManager (#6883)
     add 09c01c8  GEODE-9566: Radish is not experimental (#6897)
     add 1d6eef3  GEODE-4181: Migrate uses of JUnitParamsRunner (#6890)
     add db60e0e  GEODE-8192: Make Radish MSET command atomic (#6862)
     add 08ecbe7  Revert "GEODE-7309: uplift lucene to 7.1.0 (#6351)" (#6903)
     add 7d21eda  GEODE-9459: testing clients with WAN connected cluster (#6901)
     add cc891d6  GEODE-9628: Fix setting client credential documentation (#6894)
     add cf33465  GEODE-9479: Document receivers & regions start order (#6902)
     add 1875835  GEODE-9570: make sure re-authentication works with registered interests (#6885)
     add 2744ab8  GEODE-9495: limit thread sleep in pub sub native redis acceptance test (#6899)
     add 468e0a3  GEODE-9581: Fix possible sending of duplicate events (#6896)
     add fc75182  GEODE-4181: Add JUnit 5 Support (#6911)
     add 28321af  GEODE-9516: add ZINTERSTORE command (#6861)
     add 5b78326  GEODE-9623: Add Radish COMMAND command (#6907)
     add 02a5cb7  GEODE-9649: using spotless rule to enforce dependency version constraints
     add 9377d81  GEODE-9607: prevent pubsub from running server out of memory (#6880)
     add 4e94e97  GEODE-9629: Remove from the GatewaySender API one setter method. (#6915)
     add a8e5202  GEODE-9624: Fix 'status redundancy' result for empty regions (#6895)
     add 5ee16ac  GEODE-9568: UG build script keep doc after generating it (#6906)
     add 45383f0  Revert "GEODE-9607: prevent pubsub from running server out of memory (#6880)" (#6921)
     add ab651eb  GEODE-9625: Only serialize transaction metadata when grouping enabled. (#6892)
     add 3c70fee  GEODE-8840: Support RENAMENX command (#6877)
     add e2d66c4  GEODE-9658: refactor test AuthInit to not use static field for credentials. (#6922)
     add 068c613  GEODE-8200: After checking locator presence store the status in OperationStateStore (#6914)
     add 9c597af  GEODE-9650: LOLWUT command (#6908)
     add 470e092  GEODE-9522: When a server is force disconnected, it should set shutdo… (#6827)
     add 5dde7d7  GEODE-8876: Statistics not collecting correct value for gets when tra… (#6199)
     add b73065f  GEODE-9672: Disable native redis multibulk test (#6934)
     add 3448e82  GEODE-9623: Unsupported commands should not be returned by COMMAND when not enabled (#6933)
     add 4e85e29  GEODE-9587: Support MSETNX command (#6925)
     add 091ee88  GEODE-9628: Documentation fix for setting credentials in client (#6928)
     add 4b3c49e  GEODE-9640: Initiate threadId in EventID. (#6905)
     add ccccc5e  GEODE-9663: throw and handle AuthenticationExpiredException at login time (#6927)
     add d5995b5  GEODE-9662: increase acceptance test timeout (#6940)
     add 3f3dfdb  GEODE-9623: Radish COMMAND command should return simple strings (#6937)
     add 0ff721c  GEODE-9665 Fix multiple redirections in RENAME and RENAMENX (#6929)
     add 69af380  GEODE-9621: Change spotlessGradle behavior for delcaring dependency v… (#6942)
     add d17b535  GEODE-4181: Remove debug printouts from GeodeParamsRunner (#6944)
     add fb93bea  GEODE-9630: remove public setters from GatewaySender interface (#6939)
     add af1e066  GEODE-9567: Geode for Redis full rename (#6936)
     add 311ba98  Restore patch file (#6956)
     add 93cde0c  GEODE-9567: Geode for Redis rename, additional doc corrections (#6957)
     add 9458d57  GEODE-9536: Ignore client server cache op test on Windows (#6952)
     add 3514680  GEODE-9413: Enable more native Redis TCL tests for sorted sets (#6955)
     add 07c8ecb  GEODE-9536: Make PingOp test more patient (#6951)
     add 47f87a5  GEODE-9536: Disable jar deploy tests on Windows (#6949)
     add 95b01c5  GEODE-9536: Ignore JQ filter tests on Windows (#6953)
     add 72455fc  GEODE-9641: Remove unnecessary allocation of HeapDataOutputStream (#6943)
     add a99134a  GEODE-9663: refactor authenticateIfRequired (#6948)
     add f41a1c5  GEODE-9534: get rid of some test warnings (#6945)
     add 9ddb20d  GEODE-9707: capture hprof files even on OOM (#6965)
     add 518e213  GEODE-9607: prevent pubsub from running server out of memory
     add 316d020  GEODE-9703: roll redis benchmark baseline past the module rename (#6966)
     add 956db9c  GEODE-9629: previous fix missed removing this other public getter that broke compatibility (#6972)
     add 4ae106f  GEODE-9667: Stop ignoring tests that work (#6932)
     add e8942b7  GEODE-9629: remove factory method added to public API (#6978)
     add 09d840d  GEODE-9645: mulituserauth don't do dataserializer registrations from client (#6935)
     add 198cc40  GEODE-9717: enable self-service jdk8 pr checks via jdk8 pr label (#6979)
     add b6f8cc8  GEODE-9717: fix to ensure all required PR check jobs are present (#6983)
     add e9320c5  GEODE-9674: fix durable client message loss issue in tests. (#6947)
     add 7dd6143  GEODE-9536: Disable client version test on Windows (#6971)
     add c2b19e3  GEODE-9702: Add SPI check to Java API compare build task (#6980)
     add 02e4baa  GEODE-9701: Support lower VM counts in ClusterStartupRule
     add 07eb304  GEODE-9705: When create PR failed with DistributedSystemDisconnectedE… (#6964)
     add 03ea94b  GEODE-9534, GEODE-9540: add more tests for peer communication and bulk operations (#6985)
     add 269bda1  GEODE-9713: Support thread count in ExecutorService rules
     add b9ed570  Fix geode-junit sanctioned serializables
     add d46baf9  Handle BrokenBarrierException when canceled.
     add 9a0a7ff  Fix geode-dunit sanctioned serializables
     add 8c1fb0b  GEODE-9713: Simplify DistributedExecutorServiceRuleLimitedThreadCountTest
     add 22c21fb  GEODE-9038: Ignore AlertingIOException in ShutdownAllDUnitTest
     add 220bc2d  GEODE-9668: Enable ignored HitsMissesIntegrationTest (#6987)
     add b39958f  GEODE-9666: Avoid caching InetSocketAddress (#6938)
     add 905d08a  GEODE-9714: Add Shiro packages to sanctioned serializables
     add 9414f99  Remove unused method
     add c7cd775  Use clearSerializationFilter after each test.
     add 883d0c2  Fix javadocs on SANCTIONED_SERIALIZABLES_DEPENDENCIES_PATTERN.
     add 0f36be8  Fix assumeTrue description in AcceptList tests.
     add 615f180  GEODE-9635: wait for bucket initialization, after clean queue (#6916)
     add 00f92b6  GEODE-9677: After provider sends ImageReply, requester could finish e… (#6992)
     add 4497428  GEODE-9731: Fix flaky PubSubIntegrationTest (#6991)
     add 567460f  GEODE-9627: Add service provider interface to register DataSerializableFixedIDs (#6891)
     add c106e01  GEODE-9369: Command to copy region entries from a WAN site to another (#6833)
     add 3f66f45  GEODE-9581: Set a higher number of retries to get transction events in tests to avoid flakyness in test case (#6990)
     add fa82bc8  GEODE-9660: ConcurrentLoopingThreads should not run action in case of thread exceptions (#6993)
     add aa93f93  Fixing the archiving of benchmark results (#7000)
     add 0764ca0  GEODE-9714: Revert multiple commits from rebase-merge (#6995)
     add b3a302d  GEODE-9713: Revert multiple commits from rebase-merge (#6996)
     add 924e39f  GEODE-9481: Removed deprecated objects from OldClientSupportDUnitTest (#6946)
     add 01505a6  GEODE-9686: Remove deprecated elements from GemfireDataCommandsDistributedTestBase (#6950)
     add b8a4ba3  GEODE-9687: Removed deprecated elements from RegionMembershipMBeanDistributedTestBase (#6954)
     add 4a6b917  GEODE-9725: Remove membership port range feature from AvailablePort (#6986)
     add 036127a  empty PatternSubscription lists are no longer added to the cache (#7004)
     add 54f302a  GEODE-9734: fix race in ClientPublisher (#6999)
     add 7c85032  GEODE-9699: Redis Z*STORE commands should handle empty result sets (#6997)
     add 3a59870  Revert "GEODE-9369: Command to copy region entries from a WAN site to another (#6833)" (#7005)
     add a21df0b  GEODE-9720: remove *FunctionExecutor classes (#6977)
     add 3860c2f  GEODE-9604: Use AvailablePortHelper in MSetDUnitTest (#7011)
     add 6a60434  GEODE-9751: load yaml vars safely (unsafe load was deprecated and is now removed) (#7016)
     add 636bea3  GEODE-9713: Support thread count in ExecutorService rules (#7002)
     add 4398bec  GEODE-9676: Limit array and string sizes for unauthenticated Radish connections (#6994)
     add cdfae8f  GEODE-9749: ignore the test case that shows GEODE-9704. (#7015)
     add 726d537  GEODE-9733: Migrate geode-unsafe from junit4 to junit5 APIs (#6998)
     add a2a80ed  GEODE-9714: Add Shiro packages to sanctioned serializables (#7001)
     add 5176db0  GEODE-9745: use geode-for-redis in stats (#7013)
     add d3104cc  GEODE-9654: add system properties for timeouts (#6961)
     add 6c467ef  GEODE-9674: For durable client, when client reconnects, server should retrieve the message from the queue, not continue to try to deliver the last un-delivered message.
     add 9aa120e  Declare dependencies we use, drop unused dependencies (#6973)
     add 9079de9  Revert "Declare dependencies we use, drop unused dependencies (#6973)" (#7020)
     add 380151b  GEODE-9743: updated ClientSideHandshakeImpl and added UT (#7008)
     add a6ef213  GEODE-9722: removed geode-for-redis shutdown command (#7021)
     add 17a67bc  Revert "GEODE-8876: Statistics not collecting correct value for gets when tra… (#6199)" (#7027)
     add 929bb92  GEODE-9765: Remove alb3rtobr from CODEWATCHERS (#7030)
     add 5e02cfd  GEODE-9742:fix resource leak due to Files.list and Files.walk (#7007)
     add e44a044  GEODE-9750: add pubsub stats (#7028)
     add 31a8560  GEODE-9723: test transactions with auth expiration (#7012)
     add 2770669  GEODE-9729: test should handle occasional AllConnectionsInUseException (#7037)
     add f5ccf3b  GEODE-9562: add system property for redis region name (#6960)
     add 1b0806b  GEODE-9771: Use generic japicmp test-target in CI (#7041)
     add 4675991  GEODE-9721: renamed the constant names to begin with GEODE_FOR_REDIS_ (#7038)
     add 4b7fe0a  GEODE-9670: fix ignored test to have the correct expectations (#7042)
     add 80bd441  move RedisPropertiesTest to match the location of the source class (#7043)
     add 647e4b4  Update codeowners (#7045)
     add 4248006  [GEODE-9775] CI Changes to support CI migration
     add e1fac45  GEODE-9775: fixup missing Concourse variable for PR pipeline (#7047)
     add d759a52  GEODE-9767: Bump netty from 4.1.67.Final to 4.1.69.Final (#7031)
     add 115704a  GEODE-9763: DUnit Test of Concurrent P2P Messaging with TLS Enabled (#6930)
     add 0b93946  GEODE-9740: enhance redis security permissions (#7029)
     add e24d185  GEODE-9773: roll redis benchmark baseline past incompatible change (#7049)
     add 7340352  [GEODE-9775] Add heavy-lifter environment variables. (#7052)
     add e0c33cd  GEODE-9757: Ensure that tx cache ops always add CachedDeserializable entries (#7022)
     add c7947a5  GEODE-9682: SetOptions and ZAddOptions are no longer serializable (#7050)
     add b2a4050  GEODE-9685: removed unused constructors (#7055)
     add 5f9cbc2  GEODE-9780: Remove tests for nonexistent internal Redis commands (#7056)
     add c6bee7a  GEODE-9683: Add unit test coverage for RedisMemberInfo (#7054)
     add dae7b82  GEODE-9684: Add unit test coverage for RedisMemberInfoRetrievalFunction (#7053)
     add b4deab0  Revert "GEODE-9767: Bump netty from 4.1.67.Final to 4.1.69.Final (#7031)" (#7061)
     add ec9fd00  GEODE-9656: Document Async disk writer exit behavior (#7062)
     add 22577d7  GEODE-9646: Update native redis tests to consistently use version 6.2.6 (#7019)
     add 3b88dfb  GEODE-9784: GFSH connect and start server with username option (#7059)
     add adc2e71  add 1.12.5 to old versions on develop
     add e651ca0  [GEODE-9775] Add heavy-lifter variables to mass-test. (#7065)
     add caa561f  GEODE-9756: add geode-for-redis-replica-count gemfire property (#7058)
     add a18ad46  Revert "GEODE-9756: add geode-for-redis-replica-count gemfire property (#7058)" (#7069)
     add af79b3a  GEODE-9792: avoid sending in multiple authentication request on the same connection by different threads. (#7067)
     add 789c89a  GEODE-9756: add  "geode-for-redis-redundant-copies" gemfire property (#7070)
     add 8da59ba  GEODE-9671: correct test's expectations (#7073)
     add a9bc1a3  GEODE-9791: Update Mockito dependency to 4.0.0 (#7066)
     add 835167a  GEODE-9794: Radish PassiveExpirationManager can throw NPE (#7072)
     add 60c62d8  GEODE-9786: Make IndexibleTreeSet inner class of quick check test (#7078)
     add 4c43c53  GEODE-9774: Clear networkHop variable at function execution exit (#7051)
     add 7f4bf62  GEODE-9778: Bump netty from 4.1.67.Final to 4.1.70.Final (#7075)
     add 96ea7b9  GEODE-9797: User guide typo repairs (#7085)
     add eea1001  GEODE-9781: clean up radish sys props (#7080)
     add 276a819  GEODE-9693:Removed deprecated elements from ListIndexCommandDistributedTestBase (#6958)
     add e341477  Add required pipeline path dependencies (#7096)
     add a8a23ba  GEODE-9758: Configure locator serialization filtering by default on Java 8 (#6962)
     add beb898c  GEODE-9775: fix remaining pipelines to support k8s (#7099)
     add 9f41e48  GEODE-9792: synchronize multi-user authentication on different threads (#7088)
     add 0cb1736  GEODE-9805: Do not log arguments of Radish AUTH command (#7094)
     add 1885f06  GEODE-9675: remove useless but flaky test (#7095)
     add 917b83d  GEODE-9747: add expected DistributedSystemDisconnectedException to the test (#7093)
     add 01eeaa6  GEODE-9746: do not logout old subjects immediately when we get a new subject for the same uniqueId (#7063)
     add 14a818b  Revert "GEODE-9758: Configure locator serialization filtering by default on Java 8 (#6962)" (#7104)
     add 3eaeed8  GEODE-9369: Command to copy region entries from a WAN site to another (#7006)
     add 67359dc  GEODE-9632: Allow INDEX_THRESHOLD_SIZE System property to override CompiledValue.RESULT_LIMIT (#7010)
     add b427853  GEODE-9802: Do not use ephemeral port in test (#7092)
     add 4d304bc  GEODE-9486: Add codeowners for serialization filtering (#7106)
     add f27c36e  GEODE-9793: Implementation of Version Interfaces (#7074)
     add 9675cf8  GEODE-6588: Use System.lineSeparator()
     add 0ac9c8a  GEODE-9090: Do not log non-printable characters when debug logging from ManagementLoggingFilter (#7110)
     add bcb2e3e  GEODE-9566: removed a couple more geode-for-redis Experimental instances (#7102)
     add e6d10c8  GEODE-9769: add pubsub stats to INFO command (#7100)
     add e832de0  GEODE-9449: Remove 'b' prefix from constants (#7118)
     add 1fac184  GEODE-9803: turning on security debug log in the test and add more debug logging (#7117)
     add 477a3dc  GEODE-9821: Remove use of local docker-compose from Radish native tests (#7125)
     add 293dd97  GEODE-9816: Added CLIENT SETNAME and GETNAME commands. (#7123)
     add 5f28444  GEODE-9793: Fix duplicate 'Running on' in gfsh version --full (#7120)
     add 5d1e919  GEODE-9817: Enable customized source set paths for ClassAnalysisRule (#7121)
     add 685ad9e  GEODE-9806: added skip recovery of recovered bucket (#7107)
     add f61e32f  GEODE-9820: stopCQ should handle general exception same way as ExecuteCQ61 (#7122)
     add 5ec6a66  GEODE-1537: Re-order ephemeral port acquisition to fix flaky DurableRegistrationDUnitTest (#7111)
     add fb142e1  GEODE-9825: processInputBuffer resize retains data (#7131)
     add f56d60a  GEODE-9838: Log key info for deserialization issue while index update (#7136)
     add b0d05cf  GEODE-9812: Add Radish tests that kills multiple servers (#7115)
     add 6ed37eb  GEODE-9850: tombstone might not create yet caused getOldestTombstoneTime() return 0 (#7141)
     add 2e64b16  GEODE-9727: Updated COMMAND error message (#7134)
     add aca053b  GEOGE-9823: CLUSTER & CLIENT error messages list supported subcommands. (#7128)
     add 87e3017  GEODE-9782: Restructure geode-for-redis module (#7142)
     add 09951b7  GEODE-9709: Clean up GcCommandDUnitTestBase (#6968)
     add 8387def  GEODE-9824: Initialize AvailablePortHelper safely (#7129)
     add e3a0af3  GEODE-9638: Make test compiler not use files (#7133)
     add 5d89d4f  GEODE-9862: pin Gradle use of jgit (#7152)
     add 09a8faf  GEODE-9768: wait for destroying of region to finish, before creating … (#7035)
     add e69590e  GEODE-9669: Improve reporting of Radish mem_fragmentation_ratio (#7127)
     add 2b523e1  GEODE-9855: Radish authentication during HA test (#7146)
     add 607c30c  GEODE-9811: Turn UnavailableSecurityManagerException into CacheClosedException (#7148)
     add a24fceb  GEODE-9396: Translate Old Member IP to Name for Endpoint ID (#7119)
     add 673d447  GEODE-9863: Point redis benchmarks at geode-for-redis-benchmark-baseline branch (#7154)
     add 4f573ec  GEODE-9866: Call System.gc before Radish tests query memory info (#7156)
     add b13243e  GEODE-9827: SDIFF command supported (#7157)
     add f53497c  GEODE-9811: Turn UnavailableSecurityManagerException into CacheClosedException (part 2) (#7155)
     add 7179a7c  GEODE-9803: Fix the flaky "Failed To find authenticated user" problem (#7149)
     add 99bbf99  GEODE-9867: do not process the message if the connection is terminated (#7158)
     add 20242c6  GEODE-9865: Decrement the count if the connection is unsuccessful (#7159)
     add 588e26a  GEODE-9866: Improvements to AbstractRedisMemoryStatsIntegrationTest (#7168)
     add ee1471f  GEODE-9772: use delta for all redis modify data ops (#7105)
     add 7e01634  GEODE-9826: SCARD command supported (#7160)
     add a51e473  GEODE-9873: Add AuthenticationExpiredException message to Radish error response (#7169)
     add d093b73  GEODE-9831: support SISMEMBER support command (#7164)
     add bc18f5e  GEODE-9875: client operation should not send in invalid userId. (#7173)
     add 1e66771  GEODE-9808: Throw appropriate exception in AutoConnectionSourceImpl (#7143)
     add 20c4177  GEODE-9622: Make failover test not use ephemeral port (#7178)
     add d02d95a  GEODE-9870: Avoid Radish MOVED error during flushAll in AuthWhileServersRestartDUnitTest (#7171)
     add 68b9080  GEODE-9872: Make test framework code assign ports (#7176)
     add db64b49  GEODE-9758: Move SanctionedSerializables to filter package (#7165)
     add c65f048  GEODE-9871: Improve Radish test for network KB/s verification (#7170)
     add 324ed89  GEODE-9854: Orphaned .drf file causing memory leak (#7145)
     add 3b133c3  GEODE-9882: User Guide, Micrometer section, fix product_name typo (#7181)
     add 310c647  GEODE-9877: Use ServerSocket to create interfering port (#7180)
     add 0e55693  adjust timeouts and max_in_flight for best pipeline characteristics (#7183)
     add d89fdf6  GEODE-9822: Quorum Calculation Requires Majority (#7126)
     add 79475fa  GEODE-9851:  Use InterestType and DataPolicy over ordinal int. (#7103)
     add 53c353b  GEODE-9888: Bump log4j from 2.14.1 to 2.15.0 (#7185)
     add b6fca29  GEODE-9758: Move ClassUtils to geode-common (#7166)
     add 7a03e80  GEODE-9730: release script improvements (#6989)
     add 7bec747  GEODE-9898: Bump log4j from 2.15.0 to 2.16.0 (#7200)
     add a0467e1  add 1.14.1, 1.13.5 and 1.12.6 to old versions and set 1.14.1 as Benchmarks baseline on develop. (#7190)
     add 9359388  GEODE-9148: prevent expiration reschedules (#6514)
     add da16195  GEODE-9899: Fix synchronization for RedisSet (#7201)
     add 3b2595a  GEODE-9850: resolve the flaky test in getting the oldest tombstone (#7198)
     add 0aced7f  GEODE-9810: More robust waiting for native Redis cluster to start (#7192)
     add 0d2d1c2  GEODE-9770: Close the cache after ConflictingPersistentDataException (#7199)
     add 48ccfe7  Enable LGTM as PR-gating checks (#7197)
     add ec29bb7  GEODE-9716: Add extra info to error message for assert (#7188)
     add 45714b3  GEODE-9905: Bump log4j from 2.16.0 to 2.17.0 (#7215)
     add ebf8479  GEODE-9879: Extract SystemProperty to geode-common (#7177)
     add b3cc8d4  GEODE-9905: Bump log4j from 2.17.0 to 2.17.1 (#7225)
     add 6656121  Bumping copyright year to 2022 (#7226)
     add 674226c  increase disk quota to hold more old versions (#7229)
     add d974f15  GEODE-8644: CME will send additional UPDATE_VERSION event via serial … (#7204)
     add 0e787a6  GEODE-9887: Fix for deadlock during server shutdown (#7194)
     add 87b1007  Revert "GEODE-9854: Orphaned .drf file causing memory leak (#7145)" (#7209)
     add 5c76706  GEODE-9912: Add unique identifier to DUnit log lines (#7232)
     add 237d3ac  GEODE-9911: Allow ExecutorServiceRule to name threads (#7231)
     add 68f074d  Enable tests again (#7233)
     add 5e9c775  GEODE-9828: support SDIFFSTORE command (#7172)
     add 97601eb  GEODE-9819: fix durable client socket leak
     add f23c23d  GEODE-9691: Fix flaky ZRemDUnitTest (#7239)
     add 5549292  add 1.12.7, 1.13.6, and 1.14.2 to old versions, pare down old patch versions, and set 1.14.2 as Benchmark baseline on develop (#7203)
     add f70700e  feature/GEODE-9902: Modify ZUNIONSTORE and ZINTERSTORE storing methods (#7219)
     add eb6a0dc  GEODE-9900: ensure AuthenticationExpiredException handling (#7207)
     add 16bae15  GEODE-9930: Mark ClusterManagementOperation @Experimental (#7243)
     add a4dc904  GEODE-9927: Introduce geode-server-all. (#7242)
     add 87c32e4  GEODE-9932: Change naming convention for Redish hash tags in tests (#7244)
     add 0f9f237  GEODE-9924: Avoid merging repeat test logs (#7246)
     add 3404126  GEODE-8980: bump dependencies (#7250)
     add 4995d18  GEODE-7934: Use thread safe list type.
     add 31b0386  GEODE-6588: Cleanup static analyzer warnings.
     add 8bbc5ef  GEODE-9832: SMOVE Command Support (#7227)
     add e7ca26f  GEODE-9869: Remove geode-for-redis properties from gfsh options (#7205)
     add 79c606f  GEODE-9934: Move Redis MemoryOverheadIntegration test classes (#7249)
     add 152b09f  GEODE-9940: ci improvements (#7254)
     add efc526a  GEODE-9735: Do not copy entries that have been updated after the comm… (#7003)
     add c0fbe30  GEODE-9881: Oplog not compacted after recovery (#7193)
     add 233533b  GEODE-9940: ci improvements (#7255)
     add b2417ca  GEODE-9942: Include JUnit 5 tests in stress tests (#7256)
     add 83ce65f  GEODE-9815: Prefer to remove a redundant copy in the same zone (#7124)
     add ac04dc4  Fix for jcenter shutdown. (#7260)
     add 4a688b0  GEODE-9829: Add SINTER command to Redis supported commands. (#7236)
     add 2b03244  GEODE-9944: Handle a race when HARegionQueue is not initialized yet. (#7259)
     add 93fdccc  GEODE-9937: Add convenience methods to FileWatchingX509Extended*Manager (#7251)
     add 83de8f2  add 1.12.8 to old versions on develop (#7268)
     add cb42855  GEODE-9913: Added basicBridgePut condition to ensure VersionTag set (#7235)
     add 742cf33  GEODE-9936: Modify multi-key Redis commands for wrong type key (#7257)
     add ab04f8a  GEODE-9965: don't assume the release directory contains only numbered Geode releases: ignore anything that doesn't start with a number, such as KEYS and kafka-connector-n.n.n) (#7269)
     add a5644c3  GEODE-9897: Improve ClientUserAuthsTest (#7263)
     add 109fdd8  GEODE-9908: when make durable client queue primary, send marker messa… (#7267)
     add f78fd73  GEODE-9836: SUNION Command Support
     add a240351  GEODE-9644: Remove use of ephemeral ports for tests (#7264)
     add 7978abf  GEODE-9758: Add internal serial filter API (#7217)
     add 6b20445  GEODE-9962: Update redis INFO command for cluster mode responses (#7273)
     add 9f32d721 GEODE-9971: Fix test case after switching from docker-compose to testcontainers (#7277)
     add fef9a4f  GEODE-9961: GatewayReceiver rethrows CancelException (#7275)
     add 8f7193c  GEODE-9933: documentation for authorization expiry (#7248)
     add 41eb499  GEODE-6588: Mass cleanup of static analyzer warnings. (#7221)
     add 7e86321  GEODE-9976: Edit CODEOWNERS mappings for kirklund (#7281)
     add e2abb65  GEODE-9807: gfsh gateway sender stop in parallel (like start) (#7108)
     add dccfc18  Update codeowners mappings for kamilla1201 (#7287)
     add b349cb8  GEODE-9977: Remove defunct RedisCommandSupportLevel.INTERNAL type (#7283)
     add da6008a  GEODE-9978: Remove test-container. (#7286)
     add 3a36962  GEODE-9837: SUNIONSTORE Command Support (#7284)
     add a2ed241  add 1.13.7 to old versions on develop (#7292)
     add a53c6da  GEODE-9834: SRANDMEMBER Command Support (#7228)
     add 763f590  GEODE-9973: Correct docs regarding P2P socket timeout behaviour (#7294)
     add b8dd86b  GEODE-9885: Handle duplicated appends in Redis StringsDUnitTest (#7290)
     add 66eb3f9  update redis svg to use new module name (#7288)
     add 7b0a88d  GEODE-9922: Move Redis cross-slot checking to RegionProvider (#7295)
     add 7794553  GEODE-9958: Add gfsh-specific tests for Radish startup (#7297)
     add 95210d1  GEODE-9923: Add log message troubleshooting info from support team community (#7296)
     add 085b616  GEODE-6751: Improved the tests for locator-gfsh compatibility (#7289)
     add 6579b01  GEODE-8616: Refactoring the test to remove deprecated APIs (#7301)
     add 4b5b30e  GEODE-9969: Fix unescaping the region name with underscore (#7282)
     add 67d7725  Revert "GEODE-9973: Correct docs regarding P2P socket timeout behaviour (#7294)" (#7306)
     add ea91bf0  GEODE-9859: Do not copy entry if it is a destroyed entry (#7147)
     add 53dae13  add 1.14.3 to old versions and set as Benchmarks baseline on develop (#7307)
     add 0ec7f48  roll develop to 1.16.0 now that support/1.15 has been created (#7309)
     add d690f7b  GEODE-9973: Correct docs regarding P2P socket timeout behaviour (#7310)
     add 1eeccab  GEODE-9883 Update Geode for Redis docs file (#7274)
     add b33021f  remove stray markdown file (#7314)
     add b7da7c2  Revert "GEODE-9969: Fix unescaping the region name with underscore (#7282)" (#7311)
     add bbe12c3  GEODE-9972: eliminate overnight step from release process (#7280)
     add bbe9a3a  GEODE-9853: get all members hosting bucket (#7144)
     add 32e32af  GEODE-9830: SINTERSTORE Command Support (#7302)
     add e0c4b9c  GEODE-9988: Log full exception when JNDI binding fails during cache creation (#7304)
     add 0687992  GEODE-9604 Also fix MSetNXDunitTest (#7325)
     add 2db94b7  Adding a script which performs validation of a release candidate
     add 00ccce2  GEODE-9995: Use ephemeral ports to avoid port in use issues (#7329)
     add da60432  GEODE-9835: Add SSCAN to Redis supported commands (#7278)
     add c0eb58e  GEODE-9993: Make SMOVE transactional (#7321)
     add dcba954  GEODE-10011: Do not perform second scan if first scanned entire map (#7333)
     add 064fe00  GEODE-9999: Update the Geode for Redis documentation (#7326)
     add 6413c33  GEODE-9994 Make Redis RENAME atomic (#7328)
     add afa17f6  GEODE-9833: SPOP Command Support (#7319)
     add cc31c15  Initial commit (#7335)
     add 507565e  GEODE-9710: Cleanup PRColocationDUnitTestHelper (#6969)
     add 1da9039  GEODE-10015: Set java.rmi.server.hostname when SSL enabled. (#7337)
     add e7094ee  GEODE-9985: add region redundancy to avoid data loss. (#7308)
     add 551d7d7  GEODE-10009: Invoked internalClose with keepAlive true (#7332)
     add ce57e9f  GEODE-9980: Improve error handling of serial filters (#7299)
     add fbe4e66  GEODE-10022: fix the logging to log the entire stack trace. (#7349)
     add 8825d95  GEODE-10018: Remove redundant TX flag from SetOptions (#7352)
     add 21215d8  GEODE-9845: Refactor OutOfMemoryDUnitTest (#7338)
     add 9fa1c1b  GEODE-10021: Clean up RemoteTransactionDUnitTest (#7339)
     add a98197b  GEODE-9990: turn DiskAccessException into CacheClosedException (#7334)
     add fc3f991  GEODE-10032: Add Category to RedisCommandType (#7354)
     add 592dd65  GEODE-10042: do not make ClientUserAuths null when we are not unregister client yet. (#7357)
     add 0f0edbe  GEODE-10002: Remove in documentation obligation for parallel … (#7345)
     add 9eeeb2d  GEODE-9981: Use API to get crypto oid (#7298)
     add 5d69a61  GEODE-10046: bump dependencies (#7360)
     add f20888e  GEODE-10019: Obey rules on release commits (#7341)
     add cd0b52e  GEODE-10047: Fix expiration interval log (#7359)
     add 5f79b21  GEODE-10057: Correct geode-for-redis docs (#7370)
     add 9ef20d9  GEODE-10034: Organize Geode For Redis Stats By Category (#7363)
     add 5d72863  GEODE-9694: Removed deprecated elements from QueryCommandDistributedTestBase (#6959)
     add 920268b  GEODE-10052: Fix flakiness in OutOfMemoryDUnitTest (#7369)
     add a049b6e  GEODE-9892: Create Infrastructure for Redis Lists (#7261)
     add 97d1b2a  GEODE-9708: Removed analyzer warnings from FunctionCommandsDistributedTestBase (#6967)
     add 77dd1ad  GEODE-6588: Cleanup static analyzer warnings. (#7373)
     add 4d1a263  GEODE-10000: Avoid gfsh stop gateway sender error when stopped a second time (#7327)
     add 9cd402f  GEODE-10008: Avoid possible EntryDestroyedException error (#7343)
     add c51aea6  GEODE-10054: remove EnsurePrimaryStaysPutDUnitTest (#7371)
     add 9305169  GEODE-9998: Upgrade Jedis client from 3.6.3 to 4.1.1 (#7340)
     add e191407  GEODE-10072: Restore japicmp report (#7383)
     add 1fc35af  GEODE-9947: Add Radish LINDEX command (#7380)
     add 45cbe7f  GEODE-10063: Correctly set primary queue connection.  (#7382)
     add b729702  GEODE-10083: Fix RedisProxy to correctly process MOVED response (#7394)
     add dc1f1ab  Initial commit
     add 438a4d4  GEODE-9949: Implement Radish LPUSHX command (#7397)
     add 040062d  GEODE-10086: Removed StringBuilder variables (#7399)
     add 41e7a17  GEODE-10084: CliFunction should handle all throwable (#7395)
     add d9ef0f1  GEODE-10049: Check full Redis error message (#7362)
     add 5ed8bd9  GEODE-10092: add more logging for future debug when region size gets below 0. (#7402)
     add ea20f25  GEODE-10010: Improve accuracy of per-second Redis stats (#7358)
     add e040759  GEODE-10093 - Fixed attr issue in Delta Session (#7405)
     add 3551b8d  GEODE-10075 Fix jacoco code coverage reports
     add 7289a1c  Revert "GEODE-10010: Improve accuracy of per-second Redis stats (#7358)" (#7415)
     add 262dc08  GEODE-10094: Fix NPE when populating index in partitioned region. (#7410)
     add 7f5c883  Remove the pin to jgit now that grgit has fixed its POM (#7265)
     add c8e7a63  GEODE-6588: Cleanup static analyzer warnings. (#7377)
     add 3b8f440  GEODE-9991: Configure SSLParameters directly. (#7315)
     add ac9d1cf  GEODE-10066: Don't wrap IOExceptions in IllegalStateExceptions. (#7390)
     add b21c2c6  GEODE-9984: Avoid flakyness of testCommandDoesNotCopyEntriesUpdatedAf… (#7330)
     add 3a08e47  change CI to use merge not rebase (#7285)
     add 2cd5d82  GEODE-9950: Add Radish LRANGE command (#7389)
     add 72665b1  GEODE-9910: Stop embedded locator after failed start (#7393)
     new 81eb1be  GEODE-7683: introduce BR.cmnClearRegion
     new 5726d03  GEODE-7674: Clear on PR with lucene index should throw exception (#6317)
     new 7d522e6  GEODE-9132: Delete ClearPRMessage
     new 0fed677  GEODE-9132: Fixup PartitionResponse constructors
     new 436bc4e  GEODE-9132: Cleanup PartitionedRegionClearMessage
     new 2ed5569  GEODE-9132: Remove unused DSFID constants
     new ef0b7ec  GEODE-9132: Undelete unnecessary uses of final
     new 1196265  GEODE-9132: Cleanup PartitionedRegionPartialClearException
     new 5858295  GEODE-9132: Remove ClearPRMessage from sanctionedDataSerializables.txt
     new 125da07  Fixup AnalyzeCoreSerializablesJUnitTest for PartitionedRegionPartialClearException
     new ec48272  GEODE-9132: PartitionedRegionClearWithConcurrentOperationsDUnitTest cleanup 1
     new e3ef061  GEODE-9132: PartitionedRegionClearWithConcurrentOperationsDUnitTest cleanup 2
     new ce2a9ee  GEODE-9132: PartitionedRegionClearWithConcurrentOperationsDUnitTest cleanup 3
     new 7e2ee09  GEODE-9132: Always acquire write lock for PR clear
     new a139614  GEODE-9132: Use factory method to avoid escaped reference
     new 7427273  GEODE-9132: Fix locking in PRClearCreateIndexDUnitTest
     new eb6f7c6  GEODE-9195: Remove PR clear local locking (#6410)
     new 85ecd69  GEODE-9194: Missing file is causing trouble (#6574)
     new bed0734  GEODE-9194: Feature/region stats update (#6430)
     new a66dde8  rebase to develop

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (583e06b)
            \
             N -- N -- N   refs/heads/feature/GEODE-7665 (a66dde8)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 20 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .asf.yaml                                          |    8 +-
 .github/PULL_REQUEST_TEMPLATE.md                   |   10 +-
 BUILDING.md                                        |    2 +-
 CODEOWNERS                                         |  128 +-
 CODEWATCHERS                                       |   22 +-
 KEYS                                               |  131 +-
 LICENSE                                            |    2 +
 NOTICE                                             |    6 +-
 README.md                                          |   28 +-
 boms/build.gradle                                  |   16 -
 .../src/test/resources/expected-pom.xml            |  212 +-
 boms/geode-client-bom/build.gradle                 |    1 -
 build.gradle                                       |   13 +-
 buildSrc/build.gradle                              |   15 +-
 .../org/apache/geode/gradle/PasswordDialog.groovy  |    4 +-
 .../geode/gradle/TestPropertiesWriter.groovy       |   18 +-
 .../japicmp/AllowMajorBreakingChanges.groovy       |    2 +-
 .../gradle/japicmp/GeodeApiRegressionRule.groovy   |    2 +-
 .../gradle/japicmp/GeodeSpiRegressionRule.groovy   |   45 +
 .../gradle/japicmp/ParentIsExperimental.groovy     |    6 +-
 .../gradle/plugins/DependencyConstraints.groovy    |  106 +-
 .../dockerized/DockerTestWorkerConfig.groovy       |   92 -
 .../testing/dockerized/DockerizedTestPlugin.groovy |  137 -
 .../testing/isolation/IsolatedTestPlugin.groovy    |   87 +
 .../geode/gradle/testing/repeat/RepeatTest.groovy  |    5 +-
 .../dockerized/DockerConnectionAcceptor.java       |  114 -
 .../testing/dockerized/DockerMessagingServer.java  |   69 -
 .../gradle/testing/dockerized/DockerProcess.java   |  287 --
 .../testing/dockerized/DockerProcessLauncher.java  |  227 --
 .../WildcardBindingInetAddressFactory.java         |   32 -
 .../testing/isolation/CompletableProcess.java      |   95 +
 .../geode/gradle/testing/isolation/PortRange.java  |   60 +
 .../gradle/testing/isolation/PortRangeContext.java |   83 +
 .../isolation/PortRangeProcessLauncher.java        |   81 +
 .../isolation/WorkingDirectoryIsolator.java        |   31 +-
 .../ExecutionTrackingTestClassProcessor.java       |   55 +
 .../ExecutionTrackingTestResultProcessor.java      |  121 +
 .../gradle/testing/repeat/RepeatTestExecuter.java  |  162 +
 .../testing/repeat/RepeatableTestExecuter.java     |  159 -
 .../geode-dockerized-test.properties               |    1 -
 .../gradle-plugins/geode-isolated-test.properties  |    1 +
 .../src/main/resources/japicmp_exceptions.json     |   10 +-
 .../geode/gradle/test/isolation/PortRangeTest.java |   85 +
 .../isolation/WorkingDirectoryIsolatorTest.java    |   47 +
 .../org/apache/geode/javac/SimpleFileManager.java  |    2 +-
 .../org/apache/geode/javac/SimpleSourceFile.java   |    2 +-
 .../geode/javac/TestAnnotationProcessor.java       |    2 +-
 ci/bin/concourse_job_performance.py                |    4 +-
 ci/images/google-geode-builder/packer.json         |    5 +-
 ci/images/google-geode-builder/scripts/setup.sh    |    2 +-
 ci/images/google-windows-geode-builder/packer.json |    4 +-
 ci/images/test-container/Dockerfile                |   64 -
 ci/pipelines/examples/deploy_pipeline.sh           |   10 -
 ci/pipelines/examples/jinja.template.yml           |    3 +
 ci/pipelines/geode-build/deploy_pipeline.sh        |   10 -
 ci/pipelines/geode-build/jinja.template.yml        |   11 +-
 ci/pipelines/images/jinja.template.yml             |   47 +-
 ci/pipelines/mass-test-run/deploy_pipeline.sh      |   10 -
 ci/pipelines/mass-test-run/jinja.template.yml      |   20 +-
 ci/pipelines/meta/deploy_meta.sh                   |    8 +-
 ci/pipelines/meta/jinja.template.yml               |    6 +-
 ci/pipelines/pull-request/jinja.template.yml       |   29 +-
 ci/pipelines/render.py                             |    4 +-
 ci/pipelines/shared/jinja.variables.yml            |   61 +-
 ci/scripts/archive_results.sh                      |    2 +-
 ci/scripts/build_image.sh                          |   17 +-
 ci/scripts/capture-call-stacks.sh                  |   37 +-
 ci/scripts/cleanup_benchmarks.sh                   |   22 +-
 ci/scripts/create_instance.sh                      |   23 +-
 ci/scripts/execute_build.sh                        |    7 +-
 ci/scripts/execute_redis_tests.sh                  |   43 +-
 ci/scripts/execute_tests.sh                        |    2 +-
 ci/scripts/repeat-new-tests.sh                     |   16 +-
 ci/scripts/rsync_code_down.sh                      |    2 +-
 ci/scripts/shared_utilities.sh                     |   71 +-
 dev-tools/dependencies/bump.sh                     |   11 +-
 dev-tools/docker/docs/Dockerfile                   |    4 +-
 dev-tools/docker/docs/preview-user-guide.sh        |   42 +-
 dev-tools/release-testing/README.md                |   12 +
 dev-tools/release-testing/smoketest_rc.sh          |  235 ++
 dev-tools/release/README.md                        |    5 +-
 dev-tools/release/commit_rc.sh                     |   31 +-
 dev-tools/release/create_support_branches.sh       |   58 +-
 dev-tools/release/deploy_rc_pipeline.sh            |  140 +-
 dev-tools/release/license_review.sh                |   10 +-
 dev-tools/release/prepare_rc.sh                    |   44 +-
 dev-tools/release/print_announce_email.sh          |  102 +
 dev-tools/release/promote_rc.sh                    |  281 +-
 dev-tools/release/set_copyright.sh                 |   17 +-
 dev-tools/release/set_versions.sh                  |   55 +-
 docker/Dockerfile                                  |   17 +-
 extensions/geode-modules-assembly/build.gradle     |    9 +-
 .../release/session/bin/modify_war                 |    3 +-
 .../internal/common/AbstractSessionCache.java      |    4 +-
 .../internal/common/ClientServerSessionCache.java  |   31 +-
 .../internal/common/PeerToPeerSessionCache.java    |   18 +-
 .../internal/filter/GemfireHttpSession.java        |    6 +-
 .../internal/filter/GemfireSessionManager.java     |    4 +-
 .../attributes/AbstractDeltaSessionAttributes.java |    4 +-
 .../attributes/AbstractSessionAttributes.java      |    2 +-
 .../internal/filter/attributes/DeltaEvent.java     |    6 +-
 .../session/internal/filter/util/TypeAwareMap.java |    2 +-
 .../session/internal/jmx/SessionStatistics.java    |    6 +-
 .../session/internal/filter/CommonTests.java       |   14 +-
 .../SessionReplicationIntegrationJUnitTest.java    |    7 +-
 .../session/filter/SessionCachingFilter.java       |   12 +-
 .../geode/modules/session/installer/Installer.java |    2 +-
 .../session/installer/args/ArgumentProcessor.java  |   10 +-
 .../geode/modules/session/CommandServlet.java      |    4 +-
 .../geode/modules/session/EmbeddedTomcat.java      |   10 +-
 .../apache/geode/modules/session/QueryCommand.java |    2 +-
 .../AbstractCommitSessionValveIntegrationTest.java |    4 +-
 .../AbstractDeltaSessionIntegrationTest.java       |   98 +
 .../AbstractSessionValveIntegrationTest.java       |    4 +-
 .../catalina/Tomcat7DeltaSessionManager.java       |   20 +-
 .../catalina/Tomcat7DeltaSessionManagerTest.java   |   30 +-
 .../geode/modules/session/EmbeddedTomcat8.java     |    6 +-
 .../catalina/Tomcat8DeltaSessionManager.java       |    8 +-
 .../catalina/Tomcat8DeltaSessionManagerTest.java   |   30 +-
 .../catalina/Tomcat9DeltaSessionManager.java       |    8 +-
 .../catalina/Tomcat9DeltaSessionManagerTest.java   |   30 +-
 extensions/geode-modules/build.gradle              |    1 +
 .../util/ClientServerSessionCacheDUnitTest.java    |   80 +-
 .../JvmRouteBinderValveIntegrationTest.java        |    4 +-
 .../LocalSessionCacheLoaderIntegrationTest.java    |    4 +-
 .../LocalSessionCacheWriterIntegrationTest.java    |    4 +-
 ...sionExpirationCacheListenerIntegrationTest.java |    4 +-
 .../AbstractDeltaSessionIntegrationTest.java       |    2 +-
 ...aSessionAttributeEventBatchIntegrationTest.java |    4 +-
 ...essionDestroyAttributeEventIntegrationTest.java |    4 +-
 .../DeltaSessionStatisticsIntegrationTest.java     |    4 +-
 ...SessionUpdateAttributeEventIntegrationTest.java |    4 +-
 .../modules/util/ModuleFunctionsSecurityTest.java  |    2 +-
 ...tionedRegionEntriesFunctionIntegrationTest.java |    2 +-
 ...icatedRegionEntriesFunctionIntegrationTest.java |    2 +-
 .../gatewaydelta/AbstractGatewayDeltaEvent.java    |   14 +-
 .../gatewaydelta/GatewayDeltaCreateEvent.java      |   12 +-
 .../gatewaydelta/GatewayDeltaDestroyEvent.java     |    6 +-
 .../GatewayDeltaEventApplicationCacheListener.java |   12 +-
 .../GatewayDeltaForwarderCacheListener.java        |   38 +-
 .../modules/session/bootstrap/AbstractCache.java   |   40 +-
 .../session/bootstrap/ClientServerCache.java       |    8 +-
 .../modules/session/bootstrap/PeerToPeerCache.java |   14 +-
 .../session/catalina/AbstractSessionCache.java     |   10 +-
 .../session/catalina/ClientServerSessionCache.java |   34 +-
 .../modules/session/catalina/DeltaSession.java     |   15 +-
 .../session/catalina/DeltaSessionFacade.java       |    6 +-
 .../session/catalina/DeltaSessionManager.java      |    2 +-
 .../session/catalina/PeerToPeerSessionCache.java   |   24 +-
 .../catalina/Tomcat6DeltaSessionManager.java       |   22 +-
 .../catalina/callback/LocalSessionCacheLoader.java |    2 +-
 .../catalina/callback/LocalSessionCacheWriter.java |    6 +-
 .../internal/DeltaSessionAttributeEventBatch.java  |   14 +-
 .../DeltaSessionDestroyAttributeEvent.java         |    8 +-
 .../catalina/internal/DeltaSessionStatistics.java  |   16 +-
 .../internal/DeltaSessionUpdateAttributeEvent.java |   12 +-
 .../geode/modules/util/BootstrappingFunction.java  |    5 +-
 .../apache/geode/modules/util/ContextMapper.java   |    2 +-
 .../geode/modules/util/CreateRegionFunction.java   |   48 +-
 .../geode/modules/util/RegionConfiguration.java    |   66 +-
 .../util/RegionConfigurationCacheListener.java     |   32 +-
 .../modules/util/ResourceManagerValidator.java     |   20 +-
 .../geode/modules/util/SessionCustomExpiry.java    |    2 +-
 .../session/bootstrap/AbstractCacheTest.java       |   62 +
 .../session/bootstrap/ClientServerCacheTest.java   |   25 +
 .../session/bootstrap/PeerToPeerCacheTest.java     |   25 +
 .../util/ClassLoaderObjectInputStreamTest.java     |   20 +-
 extensions/session-testing-war/build.gradle        |    2 +-
 .../session/AccessAttributeValueListener.java      |    6 +-
 .../geode/modules/session/CommandServlet.java      |    6 +-
 .../apache/geode/modules/session/QueryCommand.java |    2 +-
 geode-apis-compatible-with-redis/README.md         |  228 --
 geode-apis-compatible-with-redis/build.gradle      |  121 -
 .../apache/geode/redis/NativeRedisClusterTest.java |   80 -
 .../GeodeRedisServerStartUpAcceptanceTest.java     |   99 -
 .../GlobPatternNativeRedisAcceptanceTest.java      |   32 -
 .../executor/UnknownNativeRedisAcceptanceTest.java |   32 -
 .../cluster/ClusterNativeRedisAcceptanceTest.java  |   31 -
 .../connection/AuthNativeRedisAcceptanceTest.java  |   68 -
 .../connection/EchoNativeRedisAcceptanceTest.java  |   33 -
 .../connection/PingNativeRedisAcceptanceTest.java  |   33 -
 .../SelectNativeRedisAcceptanceTest.java           |   33 -
 .../hash/HScanNativeRedisAcceptanceTest.java       |   35 -
 .../hash/HashesNativeRedisAcceptanceTest.java      |   36 -
 .../hash/HincrByFloatNativeRedisAccetanceTest.java |   36 -
 .../MemoryOverheadNativeRedisAcceptanceTest.java   |   60 -
 .../executor/key/DelNativeRedisAcceptanceTest.java |   37 -
 .../key/ExistsNativeRedisAcceptanceTest.java       |   37 -
 .../key/ExpireAtNativeRedisAcceptanceTest.java     |   37 -
 .../key/ExpireNativeRedisAcceptanceTest.java       |   37 -
 .../key/KeysNativeRedisAcceptanceTest.java         |   36 -
 .../key/PExpireAtNativeRedisAcceptanceTest.java    |   37 -
 .../key/PTTLNativeRedisAcceptanceTest.java         |   37 -
 .../key/PersistNativeRedisAcceptanceTest.java      |   37 -
 .../key/PexpireNativeRedisAcceptanceTest.java      |   37 -
 .../key/RenameNativeRedisAcceptanceTest.java       |   36 -
 .../key/ScanNativeRedisAcceptanceTest.java         |   37 -
 .../executor/key/TTLNativeRedisAcceptanceTest.java |   35 -
 .../key/TypeNativeRedisAcceptanceTest.java         |   35 -
 .../key/UnlinkNativeRedisAcceptanceTest.java       |   37 -
 .../LettucePubSubNativeRedisAcceptanceTest.java    |   32 -
 .../pubsub/PubSubNativeRedisAcceptanceTest.java    |   31 -
 .../SubscriptionsNativeRedisAcceptanceTest.java    |   31 -
 .../server/DBSizeNativeRedisAcceptanceTest.java    |   32 -
 .../server/FlushAllNativeRedisAcceptanceTest.java  |   32 -
 .../server/FlushDBNativeRedisAcceptanceTest.java   |   32 -
 .../HitsMissesNativeRedisAcceptanceTest.java       |   31 -
 .../server/InfoNativeRedisAcceptanceTest.java      |   31 -
 .../server/InfoStatsNativeRedisAcceptanceTest.java |   41 -
 .../MemoryStatsNativeRedisAcceptanceTest.java      |   37 -
 .../server/ShutDownNativeRedisAcceptanceTest.java  |   32 -
 .../server/SlowlogNativeRedisAcceptanceTest.java   |   31 -
 .../server/TimeNativeRedisAcceptanceTest.java      |   32 -
 .../set/SDiffNativeRedisAcceptanceTest.java        |   37 -
 .../set/SInterNativeRedisAcceptanceTest.java       |   37 -
 .../set/SIsMemberNativeRedisAcceptanceTest.java    |   36 -
 .../set/SMoveNativeRedisAcceptanceTest.java        |   37 -
 .../set/SPopNativeRedisAcceptanceTest.java         |   37 -
 .../set/SRemNativeRedisAcceptanceTest.java         |   37 -
 .../set/SScanNativeRedisAcceptanceTest.java        |   37 -
 .../set/SUnionNativeRedisAcceptanceTest.java       |   37 -
 .../set/SetsNativeRedisAcceptanceTest.java         |   37 -
 .../sortedset/ZAddNativeRedisAcceptanceTest.java   |   36 -
 .../sortedset/ZCardNativeRedisAcceptanceTest.java  |   36 -
 .../ZIncrByNativeRedisIntegrationTest.java         |   35 -
 .../sortedset/ZRemNativeRedisAcceptanceTest.java   |   34 -
 .../sortedset/ZScoreNativeRedisAcceptanceTest.java |   35 -
 .../AppendMemoryNativeRedisAcceptanceTest.java     |   30 -
 .../string/AppendNativeRedisAcceptanceTest.java    |   35 -
 .../string/BitCountNativeRedisAcceptanceTest.java  |   35 -
 .../string/BitOpNativeRedisAcceptanceTest.java     |   35 -
 .../string/BitPosNativeRedisAcceptanceTest.java    |   31 -
 .../string/DecrByNativeRedisAcceptanceTest.java    |   35 -
 .../string/DecrNativeRedisAcceptanceTest.java      |   36 -
 .../string/GetBitNativeRedisAcceptanceTest.java    |   35 -
 .../string/GetNativeRedisAcceptanceTest.java       |   35 -
 .../string/GetRangeNativeRedisAcceptanceTest.java  |   36 -
 .../string/GetSetNativeRedisAcceptanceTest.java    |   36 -
 .../IncrByFloatNativeRedisAcceptanceTest.java      |   35 -
 .../string/IncrByNativeRedisAcceptanceTest.java    |   35 -
 .../string/IncrNativeRedisAcceptanceTest.java      |   36 -
 .../string/MGetNativeRedisAcceptanceTest.java      |   35 -
 .../string/MSetNXNativeRedisAcceptanceTest.java    |   36 -
 .../string/MSetNativeRedisAcceptanceTest.java      |   36 -
 .../string/PSetEXNativeRedisAcceptanceTest.java    |   36 -
 .../string/SetBitNativeRedisAcceptanceTest.java    |   36 -
 .../string/SetExNativeRedisAcceptanceTest.java     |   36 -
 .../string/SetNXNativeRedisAcceptanceTest.java     |   36 -
 .../string/SetNativeRedisAcceptanceTest.java       |   35 -
 .../string/SetRangeNativeRedisAcceptanceTest.java  |   36 -
 .../string/StringNativeRedisAcceptanceTest.java    |   36 -
 .../session/NativeRedisSessionAcceptanceTest.java  |   64 -
 ...NativeRedisSessionExpirationAcceptanceTest.java |   58 -
 .../resources/0001-configure-redis-tests.patch     |  808 -----
 .../java/org/apache/geode/NativeRedisTestRule.java |   84 -
 .../java/org/apache/geode/redis/ClusterNode.java   |   67 -
 .../java/org/apache/geode/redis/ClusterNodes.java  |  126 -
 .../geode/redis/ConcurrentLoopingThreads.java      |  140 -
 .../apache/geode/redis/GeodeRedisServerRule.java   |   78 -
 .../geode/redis/NativeRedisClusterTestRule.java    |  173 --
 .../apache/geode/redis/RedisIntegrationTest.java   |   43 -
 .../proxy/ClusterNodesResponseProcessor.java       |   65 -
 .../redis/internal/proxy/MovedResponseHandler.java |   58 -
 .../geode/redis/internal/proxy/RedisProxy.java     |   88 -
 .../internal/proxy/RedisProxyInboundHandler.java   |  180 --
 .../internal/proxy/RedisProxyOutboundHandler.java  |   77 -
 .../geode/redis/mocks/MockBinarySubscriber.java    |   45 -
 .../apache/geode/redis/mocks/MockSubscriber.java   |  231 --
 .../test/dunit/rules/RedisClusterStartupRule.java  |  132 -
 .../commonTest/resources/redis-cluster-compose.yml |   65 -
 .../geode/redis/CheckPrimaryBucketFunction.java    |  133 -
 .../redis/EnsurePrimaryStaysPutDUnitTest.java      |  202 --
 .../redis/GeodeRedisServerStartupDUnitTest.java    |  142 -
 .../apache/geode/redis/OutOfMemoryDUnitTest.java   |  235 --
 .../org/apache/geode/redis/RedisDistDUnitTest.java |  290 --
 .../cluster/RedisPartitionResolverDUnitTest.java   |  113 -
 .../geode/redis/internal/data/DeltaDUnitTest.java  |  224 --
 .../data/PartitionedRegionStatsUpdateTest.java     |  413 ---
 .../executor/CrashAndNoRepeatDUnitTest.java        |  327 --
 .../redis/internal/executor/FlushAllDUnitTest.java |  108 -
 .../redis/internal/executor/InfoDUnitTest.java     |  134 -
 .../cluster/ClusterSlotsAndNodesDUnitTest.java     |  309 --
 .../cluster/JedisAndLettuceClusterDUnitTest.java   |   89 -
 .../internal/executor/hash/HExistsDUnitTest.java   |  137 -
 .../internal/executor/hash/HGetDUnitTest.java      |   92 -
 .../internal/executor/hash/HKeysDUnitTest.java     |  160 -
 .../internal/executor/hash/HMgetDUnitTest.java     |   99 -
 .../internal/executor/hash/HMsetDUnitTest.java     |  235 --
 .../internal/executor/hash/HScanDunitTest.java     |  221 --
 .../internal/executor/hash/HSetNXDunitTest.java    |  119 -
 .../executor/hash/HashesAndCrashesDUnitTest.java   |  331 --
 .../internal/executor/hash/HdelDUnitTest.java      |  182 --
 .../internal/executor/hash/HlenDUnitTest.java      |  198 --
 .../internal/executor/hash/HsetDUnitTest.java      |  236 --
 .../internal/executor/hash/HstrlenDUnitTest.java   |   97 -
 .../internal/executor/hash/HvalsDUnitTest.java     |   96 -
 .../internal/executor/key/ExpireDUnitTest.java     |  183 --
 .../internal/executor/key/PersistDUnitTest.java    |  129 -
 .../internal/executor/key/RenameDUnitTest.java     |  202 --
 .../internal/executor/pubsub/PubSubDUnitTest.java  |  525 ----
 .../redis/internal/executor/set/SaddDUnitTest.java |  154 -
 .../redis/internal/executor/set/SremDUnitTest.java |  177 --
 .../internal/executor/sortedset/ZAddDUnitTest.java |  162 -
 .../executor/sortedset/ZCardDUnitTest.java         |   88 -
 .../internal/executor/sortedset/ZRemDUnitTest.java |  249 --
 .../internal/executor/string/StringsDUnitTest.java |  269 --
 .../geode/redis/session/RedisSessionDUnitTest.java |  159 -
 .../geode/redis/session/SessionDUnitTest.java      |  259 --
 .../redis/session/SessionExpirationDUnitTest.java  |  179 --
 .../redis/session/SessionsAndCrashesDUnitTest.java |  230 --
 .../config/DUnitSocketAddressResolver.java         |   57 -
 .../config/WebMvcConfig.java                       |   61 -
 .../AnalyzeRedisSerializablesIntegrationTest.java  |   31 -
 .../AbstractCommandPipeliningIntegrationTest.java  |  123 -
 .../redis/RedisCommandArgumentsTestHelper.java     |  104 -
 .../org/apache/geode/redis/RedisTestHelper.java    |   41 -
 .../java/org/apache/geode/redis/SSLTest.java       |   80 -
 .../AbstractGlobPatternIntegrationTest.java        |  255 --
 .../executor/AbstractUnknownIntegrationTest.java   |   89 -
 .../executor/GlobPatternIntegrationTest.java       |   32 -
 .../internal/executor/UnknownIntegrationTest.java  |   38 -
 .../cluster/AbstractClusterIntegrationTest.java    |   56 -
 .../executor/cluster/ClusterIntegrationTest.java   |   32 -
 .../common/UnsupportedCommandsIntegrationTest.java |  131 -
 .../connection/AbstractEchoIntegrationTest.java    |   50 -
 .../connection/AbstractPingIntegrationTest.java    |   74 -
 .../connection/AbstractSelectIntegrationTest.java  |   56 -
 .../executor/connection/AuthIntegrationTest.java   |  163 -
 .../executor/connection/EchoIntegrationTest.java   |   33 -
 .../executor/connection/PingIntegrationTest.java   |   33 -
 .../executor/connection/QuitIntegrationTest.java   |   83 -
 .../executor/connection/SelectIntegrationTest.java |   44 -
 .../hash/AbstractHScanIntegrationTest.java         |  585 ----
 .../hash/AbstractHashesIntegrationTest.java        |  922 ------
 .../hash/AbstractHincrByFloatIntegrationTest.java  |  182 --
 .../AbstractMemoryOverheadIntegrationTest.java     |  253 --
 .../executor/hash/HScanIntegrationTest.java        |   62 -
 .../executor/hash/HashesIntegrationTest.java       |   31 -
 .../executor/hash/HincrByFloatIntegrationTest.java |   32 -
 .../hash/MemoryOverheadIntegrationTest.java        |  104 -
 .../executor/key/AbstractDelIntegrationTest.java   |  118 -
 .../key/AbstractExistsIntegrationTest.java         |  192 --
 .../key/AbstractExpireAtIntegrationTest.java       |  129 -
 .../key/AbstractExpireIntegrationTest.java         |  357 ---
 .../executor/key/AbstractKeysIntegrationTest.java  |  126 -
 .../key/AbstractPExpireAtIntegrationTest.java      |   72 -
 .../executor/key/AbstractPTTLIntegrationTest.java  |   67 -
 .../key/AbstractPersistIntegrationTest.java        |  147 -
 .../key/AbstractPexpireIntegrationTest.java        |  108 -
 .../key/AbstractRenameIntegrationTest.java         |  382 ---
 .../executor/key/AbstractScanIntegrationTest.java  |  304 --
 .../executor/key/AbstractTTLIntegrationTest.java   |   85 -
 .../executor/key/AbstractTypeIntegrationTest.java  |   78 -
 .../key/AbstractUnlinkIntegrationTest.java         |  118 -
 .../internal/executor/key/DelIntegrationTest.java  |   32 -
 .../executor/key/ExistsIntegrationTest.java        |   32 -
 .../executor/key/ExpireAtIntegrationTest.java      |   32 -
 .../executor/key/ExpireIntegrationTest.java        |   32 -
 .../internal/executor/key/KeysIntegrationTest.java |   33 -
 .../executor/key/PExpireAtIntegrationTest.java     |   32 -
 .../internal/executor/key/PTTLIntegrationTest.java |   32 -
 .../executor/key/PersistIntegrationTest.java       |   31 -
 .../executor/key/PexpireIntegrationTest.java       |   32 -
 .../executor/key/RenameIntegrationTest.java        |   32 -
 .../internal/executor/key/ScanIntegrationTest.java |   56 -
 .../internal/executor/key/TTLIntegrationTest.java  |   32 -
 .../internal/executor/key/TypeIntegrationTest.java |   33 -
 .../executor/key/UnlinkIntegrationTest.java        |   32 -
 .../AbstractLettucePubSubIntegrationTest.java      |  377 ---
 .../pubsub/AbstractPubSubIntegrationTest.java      |  883 ------
 .../AbstractSubscriptionsIntegrationTest.java      |  201 --
 .../pubsub/LettucePubSubIntegrationTest.java       |   32 -
 .../executor/pubsub/PubSubIntegrationTest.java     |   31 -
 .../pubsub/SubscriptionsIntegrationTest.java       |   53 -
 .../server/AbstractDBSizeIntegrationTest.java      |   52 -
 .../server/AbstractFlushAllIntegrationTest.java    |   67 -
 .../server/AbstractFlushDBIntegrationTest.java     |   59 -
 .../server/AbstractHitsMissesIntegrationTest.java  |  617 ----
 .../server/AbstractInfoIntegrationTest.java        |  293 --
 .../AbstractRedisInfoStatsIntegrationTest.java     |  333 --
 .../AbstractRedisMemoryStatsIntegrationTest.java   |   93 -
 .../server/AbstractShutDownIntegrationTest.java    |   60 -
 .../server/AbstractSlowlogIntegrationTest.java     |  151 -
 .../server/AbstractTimeIntegrationTest.java        |   74 -
 .../executor/server/DBSizeIntegrationTest.java     |   32 -
 .../executor/server/FlushAllIntegrationTest.java   |   39 -
 .../executor/server/FlushDBIntegrationTest.java    |   33 -
 .../executor/server/HitsMissesIntegrationTest.java |   32 -
 .../executor/server/InfoIntegrationTest.java       |   34 -
 .../executor/server/InfoStatsIntegrationTest.java  |   41 -
 .../server/MemoryStatsIntegrationTest.java         |   30 -
 .../executor/server/ShutdownIntegrationTest.java   |   46 -
 .../executor/server/SlowlogIntegrationTest.java    |   34 -
 .../executor/server/TimeIntegrationTest.java       |   32 -
 .../executor/set/AbstractSDiffIntegrationTest.java |  210 --
 .../set/AbstractSInterIntegrationTest.java         |  208 --
 .../set/AbstractSIsMemberIntegrationTest.java      |   90 -
 .../executor/set/AbstractSMoveIntegrationTest.java |  170 --
 .../executor/set/AbstractSPopIntegrationTest.java  |  264 --
 .../executor/set/AbstractSRemIntegrationTest.java  |  180 --
 .../executor/set/AbstractSScanIntegrationTest.java |  341 ---
 .../set/AbstractSUnionIntegrationTest.java         |  201 --
 .../executor/set/AbstractSetsIntegrationTest.java  |  274 --
 .../executor/set/SDiffIntegrationTest.java         |   31 -
 .../executor/set/SInterIntegrationTest.java        |   31 -
 .../executor/set/SIsMemberIntegrationTest.java     |   31 -
 .../executor/set/SMoveIntegrationTest.java         |   31 -
 .../internal/executor/set/SPopIntegrationTest.java |   31 -
 .../internal/executor/set/SRemIntegrationTest.java |   31 -
 .../executor/set/SScanIntegrationTest.java         |   56 -
 .../executor/set/SUnionIntegrationTest.java        |   31 -
 .../internal/executor/set/SetsIntegrationTest.java |   31 -
 .../sortedset/AbstractZAddIntegrationTest.java     |  280 --
 .../sortedset/AbstractZCardIntegrationTest.java    |   87 -
 .../sortedset/AbstractZIncrByIntegrationTest.java  |  298 --
 .../sortedset/AbstractZRemIntegrationTest.java     |  152 -
 .../sortedset/AbstractZScoreIntegrationTest.java   |   67 -
 .../executor/sortedset/ZAddIntegrationTest.java    |   31 -
 .../executor/sortedset/ZCardIntegrationTest.java   |   31 -
 .../executor/sortedset/ZIncrByIntegrationTest.java |   30 -
 .../executor/sortedset/ZRemIntegrationTest.java    |   29 -
 .../executor/sortedset/ZScoreIntegrationTest.java  |   31 -
 .../string/AbstractAppendIntegrationTest.java      |  136 -
 .../AbstractAppendMemoryIntegrationTest.java       |   65 -
 .../string/AbstractBitCountIntegrationTest.java    |  111 -
 .../string/AbstractBitOpIntegrationTest.java       |  222 --
 .../string/AbstractBitPosIntegrationTest.java      |  182 --
 .../string/AbstractDecrByIntegrationTest.java      |  165 -
 .../string/AbstractDecrIntegrationTest.java        |   89 -
 .../string/AbstractGetBitIntegrationTest.java      |   88 -
 .../string/AbstractGetIntegrationTest.java         |   93 -
 .../string/AbstractGetRangeIntegrationTest.java    |  267 --
 .../string/AbstractGetSetIntegrationTest.java      |  163 -
 .../string/AbstractIncrByFloatIntegrationTest.java |  183 --
 .../string/AbstractIncrByIntegrationTest.java      |  137 -
 .../string/AbstractIncrIntegrationTest.java        |  121 -
 .../AbstractLettuceAppendIntegrationTest.java      |   61 -
 .../string/AbstractMGetIntegrationTest.java        |   97 -
 .../string/AbstractMSetIntegrationTest.java        |  176 --
 .../string/AbstractMSetNXIntegrationTest.java      |   91 -
 .../string/AbstractPSetEXIntegrationTest.java      |   58 -
 .../string/AbstractSetBitIntegrationTest.java      |  104 -
 .../string/AbstractSetEXIntegrationTest.java       |   72 -
 .../string/AbstractSetIntegrationTest.java         |  544 ----
 .../string/AbstractSetNXIntegrationTest.java       |  105 -
 .../string/AbstractSetRangeIntegrationTest.java    |  109 -
 .../string/AbstractStringIntegrationTest.java      |  159 -
 .../executor/string/AppendIntegrationTest.java     |   31 -
 .../string/AppendMemoryIntegrationTest.java        |   29 -
 .../executor/string/BitCountIntegrationTest.java   |   31 -
 .../executor/string/BitOpIntegrationTest.java      |   31 -
 .../executor/string/BitPosIntegrationTest.java     |   32 -
 .../executor/string/DecrByIntegrationTest.java     |   31 -
 .../executor/string/DecrIntegrationTest.java       |   31 -
 .../executor/string/GetBitIntegrationTest.java     |   31 -
 .../executor/string/GetIntegrationTest.java        |   31 -
 .../executor/string/GetRangeIntegrationTest.java   |   31 -
 .../executor/string/GetSetIntegrationTest.java     |   31 -
 .../string/IncrByFloatIntegrationTest.java         |   31 -
 .../executor/string/IncrByIntegrationTest.java     |   31 -
 .../executor/string/IncrIntegrationTest.java       |   31 -
 .../string/LettuceAppendIntegrationTest.java       |   31 -
 .../executor/string/MGetIntegrationTest.java       |   31 -
 .../executor/string/MSetIntegrationTest.java       |   31 -
 .../executor/string/MSetNXIntegrationTest.java     |   31 -
 .../executor/string/PSetEXIntegrationTest.java     |   31 -
 .../executor/string/SetBitIntegrationTest.java     |   31 -
 .../executor/string/SetEXIntegrationTest.java      |   31 -
 .../executor/string/SetIntegrationTest.java        |   31 -
 .../executor/string/SetNXIntegrationTest.java      |   31 -
 .../executor/string/SetRangeIntegrationTest.java   |   31 -
 .../executor/string/StringIntegrationTest.java     |   31 -
 .../pubsub/SubscriptionsIntegrationTest.java       |  150 -
 .../geode/redis/mocks/DummySubscription.java       |   66 -
 .../apache/geode/codeAnalysis/excludedClasses.txt  |    2 -
 .../org/apache/geode/codeAnalysis/openBugs.txt     |   21 -
 .../codeAnalysis/sanctionedDataSerializables.txt   |   48 -
 ...ObjectOpenCustomHashmapWithCursorBenchmark.java |   70 -
 .../geode/redis/internal/GeodeRedisServer.java     |  166 -
 .../geode/redis/internal/GeodeRedisService.java    |  149 -
 .../ClusterParameterRequirements.java              |   36 -
 .../EvenParameterRequirements.java                 |   51 -
 .../ExactParameterRequirements.java                |   34 -
 .../MaximumParameterRequirements.java              |   49 -
 .../MinimumParameterRequirements.java              |   35 -
 .../MultipleParameterRequirements.java             |   36 -
 .../OddParameterRequirements.java                  |   50 -
 .../ParameterRequirements.java                     |   27 -
 .../RedisParametersMismatchException.java          |   24 -
 .../SlowlogParameterRequirements.java              |   62 -
 .../SpopParameterRequirements.java                 |   34 -
 .../UnspecifiedParameterRequirements.java          |   27 -
 .../redis/internal/PassiveExpirationManager.java   |   88 -
 .../redis/internal/RedisCommandSupportLevel.java   |   24 -
 .../geode/redis/internal/RedisCommandType.java     |  355 ---
 .../geode/redis/internal/RedisConstants.java       |   62 -
 .../internal/RedisDistributedSystemService.java    |   43 -
 .../geode/redis/internal/RegionProvider.java       |  107 -
 .../apache/geode/redis/internal/SlotAdvisor.java   |  180 --
 .../redis/internal/cluster/RedisMemberInfo.java    |   84 -
 .../cluster/RedisMemberInfoRetrievalFunction.java  |   76 -
 .../Object2ObjectOpenCustomHashMapWithCursor.java  |  189 --
 .../redis/internal/data/AbstractRedisData.java     |  243 --
 .../redis/internal/data/ByteArrayWrapper.java      |  170 --
 .../geode/redis/internal/data/CommandHelper.java   |  206 --
 .../geode/redis/internal/data/NullRedisData.java   |  130 -
 .../internal/data/NullRedisDataStructures.java     |   23 -
 .../geode/redis/internal/data/NullRedisHash.java   |   62 -
 .../geode/redis/internal/data/NullRedisSet.java    |  170 --
 .../redis/internal/data/NullRedisSortedSet.java    |   96 -
 .../geode/redis/internal/data/NullRedisString.java |  296 --
 .../geode/redis/internal/data/RedisData.java       |   65 -
 .../data/RedisDataCommandsFunctionExecutor.java    |   49 -
 .../geode/redis/internal/data/RedisDataType.java   |   37 -
 .../data/RedisDataTypeMismatchException.java       |   34 -
 .../geode/redis/internal/data/RedisHash.java       |  425 ---
 .../data/RedisHashCommandsFunctionExecutor.java    |  115 -
 .../apache/geode/redis/internal/data/RedisKey.java |   96 -
 .../data/RedisKeyCommandsFunctionExecutor.java     |   99 -
 .../apache/geode/redis/internal/data/RedisSet.java |  357 ---
 .../data/RedisSetCommandsFunctionExecutor.java     |  108 -
 .../geode/redis/internal/data/RedisSortedSet.java  |  339 ---
 .../RedisSortedSetCommandsFunctionExecutor.java    |   63 -
 .../geode/redis/internal/data/RedisString.java     |  486 ---
 .../data/RedisStringCommandsFunctionExecutor.java  |  145 -
 .../geode/redis/internal/delta/AddsDeltaInfo.java  |   51 -
 .../redis/internal/delta/AppendDeltaInfo.java      |   46 -
 .../geode/redis/internal/delta/DeltaInfo.java      |   24 -
 .../geode/redis/internal/delta/DeltaType.java      |   24 -
 .../geode/redis/internal/delta/RemsDeltaInfo.java  |   51 -
 .../redis/internal/delta/TimestampDeltaInfo.java   |   35 -
 .../redis/internal/executor/AbstractExecutor.java  |   47 -
 .../redis/internal/executor/BaseSetOptions.java    |   82 -
 .../redis/internal/executor/CommandFunction.java   |  303 --
 .../geode/redis/internal/executor/Executor.java    |   35 -
 .../geode/redis/internal/executor/GlobPattern.java |  163 -
 .../executor/RedisCommandsFunctionInvoker.java     |   73 -
 .../redis/internal/executor/RedisResponse.java     |  155 -
 .../internal/executor/SingleResultCollector.java   |   57 -
 .../executor/SingleResultRedisFunction.java        |   63 -
 .../redis/internal/executor/StripedExecutor.java   |   41 -
 .../executor/SynchronizedStripedExecutor.java      |   72 -
 .../redis/internal/executor/UnknownExecutor.java   |   52 -
 .../redis/internal/executor/cluster/CRC16.java     |   76 -
 .../internal/executor/cluster/ClusterExecutor.java |  168 --
 .../executor/cluster/RedisPartitionResolver.java   |   35 -
 .../internal/executor/connection/AuthExecutor.java |   49 -
 .../internal/executor/connection/EchoExecutor.java |   35 -
 .../internal/executor/connection/PingExecutor.java |   59 -
 .../internal/executor/connection/QuitExecutor.java |   35 -
 .../executor/connection/SelectExecutor.java        |   38 -
 .../redis/internal/executor/hash/HDelExecutor.java |   58 -
 .../internal/executor/hash/HExistsExecutor.java    |   54 -
 .../internal/executor/hash/HGetAllExecutor.java    |   55 -
 .../redis/internal/executor/hash/HGetExecutor.java |   55 -
 .../internal/executor/hash/HIncrByExecutor.java    |   73 -
 .../executor/hash/HIncrByFloatExecutor.java        |   75 -
 .../internal/executor/hash/HKeysExecutor.java      |   57 -
 .../redis/internal/executor/hash/HLenExecutor.java |   48 -
 .../internal/executor/hash/HMGetExecutor.java      |   59 -
 .../internal/executor/hash/HMSetExecutor.java      |   62 -
 .../internal/executor/hash/HScanExecutor.java      |  118 -
 .../redis/internal/executor/hash/HSetExecutor.java |   60 -
 .../internal/executor/hash/HSetNXExecutor.java     |   41 -
 .../internal/executor/hash/HStrLenExecutor.java    |   39 -
 .../internal/executor/hash/HValsExecutor.java      |   66 -
 .../redis/internal/executor/hash/HashExecutor.java |   26 -
 .../internal/executor/hash/RedisHashCommands.java  |   54 -
 .../hash/RedisHashCommandsFunctionInvoker.java     |  122 -
 .../executor/key/AbstractScanExecutor.java         |   39 -
 .../redis/internal/executor/key/DelExecutor.java   |   41 -
 .../internal/executor/key/ExistsExecutor.java      |   42 -
 .../internal/executor/key/ExpireAtExecutor.java    |   61 -
 .../internal/executor/key/ExpireExecutor.java      |   67 -
 .../redis/internal/executor/key/KeysExecutor.java  |   70 -
 .../internal/executor/key/PExpireAtExecutor.java   |   26 -
 .../internal/executor/key/PExpireExecutor.java     |   26 -
 .../redis/internal/executor/key/PTTLExecutor.java  |   27 -
 .../internal/executor/key/PersistExecutor.java     |   38 -
 .../internal/executor/key/RedisKeyCommands.java    |   39 -
 .../key/RedisKeyCommandsFunctionInvoker.java       |  100 -
 .../internal/executor/key/RenameExecutor.java      |   49 -
 .../internal/executor/key/RenameFunction.java      |  253 --
 .../redis/internal/executor/key/ScanExecutor.java  |  142 -
 .../redis/internal/executor/key/TTLExecutor.java   |   47 -
 .../redis/internal/executor/key/TypeExecutor.java  |   37 -
 .../executor/pubsub/PsubscribeExecutor.java        |   80 -
 .../internal/executor/pubsub/PublishExecutor.java  |   39 -
 .../executor/pubsub/PunsubscribeExecutor.java      |   86 -
 .../executor/pubsub/SubscribeExecutor.java         |   78 -
 .../executor/pubsub/UnsubscribeExecutor.java       |   82 -
 .../internal/executor/server/DBSizeExecutor.java   |   33 -
 .../internal/executor/server/FlushAllExecutor.java |   44 -
 .../internal/executor/server/InfoExecutor.java     |  192 --
 .../internal/executor/server/ShutDownExecutor.java |   31 -
 .../internal/executor/server/SlowlogExecutor.java  |   41 -
 .../internal/executor/server/TimeExecutor.java     |   41 -
 .../internal/executor/set/RedisSetCommands.java    |   54 -
 .../set/RedisSetCommandsFunctionInvoker.java       |  116 -
 .../redis/internal/executor/set/SAddExecutor.java  |   38 -
 .../redis/internal/executor/set/SCardExecutor.java |   31 -
 .../redis/internal/executor/set/SDiffExecutor.java |   31 -
 .../internal/executor/set/SDiffStoreExecutor.java  |   23 -
 .../internal/executor/set/SInterExecutor.java      |   31 -
 .../internal/executor/set/SInterStoreExecutor.java |   25 -
 .../internal/executor/set/SIsMemberExecutor.java   |   36 -
 .../internal/executor/set/SMembersExecutor.java    |   34 -
 .../redis/internal/executor/set/SMoveExecutor.java |   58 -
 .../redis/internal/executor/set/SPopExecutor.java  |   53 -
 .../internal/executor/set/SRandMemberExecutor.java |   63 -
 .../redis/internal/executor/set/SRemExecutor.java  |   41 -
 .../redis/internal/executor/set/SScanExecutor.java |  121 -
 .../internal/executor/set/SUnionExecutor.java      |   31 -
 .../internal/executor/set/SUnionStoreExecutor.java |   23 -
 .../redis/internal/executor/set/SetExecutor.java   |   22 -
 .../redis/internal/executor/set/SetOpExecutor.java |   95 -
 .../executor/sortedset/RedisSortedSetCommands.java |   34 -
 .../RedisSortedSetCommandsFunctionInvoker.java     |   69 -
 .../internal/executor/sortedset/ZAddExecutor.java  |  122 -
 .../internal/executor/sortedset/ZAddOptions.java   |   63 -
 .../internal/executor/sortedset/ZCardExecutor.java |   32 -
 .../executor/sortedset/ZIncrByExecutor.java        |   38 -
 .../internal/executor/sortedset/ZRemExecutor.java  |   40 -
 .../executor/sortedset/ZScoreExecutor.java         |   39 -
 .../internal/executor/string/AppendExecutor.java   |   39 -
 .../internal/executor/string/BitCountExecutor.java |   56 -
 .../internal/executor/string/BitOpExecutor.java    |   60 -
 .../internal/executor/string/BitPosExecutor.java   |   74 -
 .../internal/executor/string/DecrByExecutor.java   |   50 -
 .../internal/executor/string/DecrExecutor.java     |   33 -
 .../internal/executor/string/GetBitExecutor.java   |   48 -
 .../internal/executor/string/GetExecutor.java      |   34 -
 .../internal/executor/string/GetRangeExecutor.java |   61 -
 .../internal/executor/string/GetSetExecutor.java   |   41 -
 .../internal/executor/string/IncrByExecutor.java   |   51 -
 .../executor/string/IncrByFloatExecutor.java       |   69 -
 .../internal/executor/string/IncrExecutor.java     |   34 -
 .../internal/executor/string/MGetExecutor.java     |   43 -
 .../internal/executor/string/MSetExecutor.java     |   45 -
 .../internal/executor/string/MSetNXExecutor.java   |   59 -
 .../internal/executor/string/PSetEXExecutor.java   |   24 -
 .../executor/string/RedisStringCommands.java       |   60 -
 .../string/RedisStringCommandsFunctionInvoker.java |  150 -
 .../internal/executor/string/SetBitExecutor.java   |   64 -
 .../internal/executor/string/SetEXExecutor.java    |   74 -
 .../internal/executor/string/SetExecutor.java      |  218 --
 .../internal/executor/string/SetNXExecutor.java    |   42 -
 .../redis/internal/executor/string/SetOptions.java |   70 -
 .../internal/executor/string/SetRangeExecutor.java |   59 -
 .../internal/executor/string/StringExecutor.java   |   26 -
 .../internal/executor/string/StrlenExecutor.java   |   32 -
 .../redis/internal/netty/ByteToCommandDecoder.java |  216 --
 .../apache/geode/redis/internal/netty/Client.java  |   62 -
 .../apache/geode/redis/internal/netty/Coder.java   |  390 ---
 .../apache/geode/redis/internal/netty/Command.java |  221 --
 .../internal/netty/ExecutionHandlerContext.java    |  490 ---
 .../redis/internal/netty/NettyRedisServer.java     |  281 --
 .../netty/RedisCommandParserException.java         |   41 -
 .../internal/pubsub/AbstractSubscription.java      |  120 -
 .../redis/internal/pubsub/ChannelSubscription.java |   68 -
 .../redis/internal/pubsub/PatternSubscription.java |   67 -
 .../apache/geode/redis/internal/pubsub/PubSub.java |   99 -
 .../geode/redis/internal/pubsub/PubSubImpl.java    |  171 --
 .../internal/pubsub/PublishResultCollector.java    |   63 -
 .../geode/redis/internal/pubsub/Subscription.java  |   73 -
 .../geode/redis/internal/pubsub/Subscriptions.java |  131 -
 .../redis/internal/statistics/GeodeRedisStats.java |  252 --
 .../redis/internal/statistics/RedisStats.java      |  203 --
 ...e.distributed.internal.DistributedSystemService |    1 -
 .../org.apache.geode.internal.cache.CacheService   |    1 -
 ...de-apis-compatible-with-redis-serializables.txt |   16 -
 .../src/performanceTest/environment-setup.sh       |  124 -
 .../redis/internal/RegionProviderJUnitTest.java    |   36 -
 .../redis/internal/SupportedCommandsJUnitTest.java |  215 --
 ...tOpenCustomHashMapWithCursorQuickCheckTest.java |   89 -
 ...ject2ObjectOpenCustomHashMapWithCursorTest.java |  204 --
 .../geode/redis/internal/data/RedisHashTest.java   |  560 ----
 .../redis/internal/data/RedisKeyJUnitTest.java     |  100 -
 .../geode/redis/internal/data/RedisSetTest.java    |  399 ---
 .../redis/internal/data/RedisSortedSetTest.java    |  308 --
 .../geode/redis/internal/data/RedisStringTest.java |  414 ---
 .../internal/executor/cluster/CRC16JUnitTest.java  |   52 -
 .../redis/internal/netty/CommandJUnitTest.java     |   71 -
 .../redis/internal/pubsub/PubSubImplJUnitTest.java |   98 -
 .../internal/pubsub/SubscriptionsJUnitTest.java    |  198 --
 .../src/test/resources/expected-pom.xml            |  176 --
 geode-assembly/build.gradle                        |  278 +-
 geode-assembly/geode-assembly-test/build.gradle    |    1 -
 .../web/controllers/AddFreeItemToOrders.java       |    8 +-
 .../rest/internal/web/controllers/Customer.java    |   34 +-
 .../web/controllers/GetDeliveredOrders.java        |    2 +-
 .../rest/internal/web/controllers/GetRegions.java  |    4 +-
 .../geode/rest/internal/web/controllers/Item.java  |   42 +-
 .../geode/rest/internal/web/controllers/Order.java |   22 +-
 .../rest/internal/web/controllers/Person.java      |   38 +-
 .../org/apache/geode/session/tests/Client.java     |   10 +-
 .../geode/session/tests/ContainerInstall.java      |    4 +-
 .../geode/session/tests/ContainerManager.java      |    2 +-
 .../geode/session/tests/ServerContainer.java       |    4 +-
 .../geode/session/tests/TomcatContainer.java       |    4 +-
 .../apache/geode/session/tests/TomcatInstall.java  |    6 +-
 .../geode/test/junit/rules/GeodeDevRestClient.java |   15 +-
 .../test/junit/rules/GeodeHttpClientRule.java      |    6 +-
 .../geode/test/junit/rules/HttpResponseAssert.java |    9 +-
 ...iversWithSamePortAndHostnameForSendersTest.java |   34 +-
 ...gerConfiguresJmxSerialFilterAcceptanceTest.java |  115 -
 ...gerConfiguresJmxSerialFilterAcceptanceTest.java |  111 -
 ...scribeConfigAreFullyRedactedAcceptanceTest.java |  111 +-
 ...tandaloneClientManagementAPIAcceptanceTest.java |    2 +-
 .../geode/modules/DeployJarAcceptanceTest.java     |   11 +-
 .../org/apache/geode/rules/DockerComposeRule.java  |   22 +
 ...artLocatorGlobalSerialFilterAcceptanceTest.java |  138 +
 .../StartLocatorJmxSerialFilterAcceptanceTest.java |  111 +
 ...tartServerGlobalSerialFilterAcceptanceTest.java |  150 +
 .../StartServerJmxSerialFilterAcceptanceTest.java  |  108 +
 .../gradle-test-projects/management/build.gradle   |   16 +-
 .../cache/wan/scripts/geode-starter-create.gfsh    |    1 -
 .../management/JQFilterVerificationDUnitTest.java  |    8 +-
 .../cli/commands/StartServerCommandDUnitTest.java  |   19 +-
 .../cli/commands/StopLocatorCommandDUnitTest.java  |    2 +-
 .../ClientClusterManagementServiceDunitTest.java   |    2 +-
 .../rest/ClusterManagementServiceOnServerTest.java |    2 +-
 .../rest/DeploymentManagementDUnitTest.java        |    2 +-
 .../DeploymentSemanticVersionJarDUnitTest.java     |   17 +-
 ...eveloperRestSecurityConfigurationDUnitTest.java |    4 +-
 .../rest/GeodeManagementServiceFlagDUnitTest.java  |    3 +-
 .../rest/ListRegionManagementDunitTest.java        |    3 +-
 ...nagementRestSecurityConfigurationDUnitTest.java |    4 +-
 .../rest/RestoreRedundancyManagementDUnitTest.java |   92 +-
 .../internal/web/controllers/RestAPITestBase.java  |    2 +-
 .../web/controllers/RestAPIsWithSSLDUnitTest.java  |    2 +-
 .../session/tests/GenericAppServerInstall.java     |    4 +-
 .../org/apache/geode/session/tests/LogChecker.java |    6 +-
 .../geode/AssemblyContentsIntegrationTest.java     |    2 +-
 .../geode/GfshDependencyJarIntegrationTest.java    |   92 +
 .../StartLocatorCommandIntegrationTest.java        |   16 +-
 .../internal/web/RestInterfaceIntegrationTest.java |    3 +-
 .../rest/internal/web/RestRegionAPIDUnitTest.java  |  424 ---
 .../internal/web/RestRegionAPIIntegrationTest.java |  514 ++++
 .../PdxBasedCrudControllerIntegrationTest.java     |   46 +-
 .../geode/tools/pulse/PulseConnectivityTest.java   |    2 +-
 .../tools/pulse/PulseSecurityWithSSLTest.java      |    2 +-
 .../integrationTest/resources/assembly_content.txt |   95 +-
 .../resources/dependency_classpath.txt             |   91 +-
 .../integrationTest/resources/expected_jars.txt    |   12 +-
 .../resources/gfsh_dependency_classpath.txt        |   98 +
 geode-assembly/src/main/dist/LICENSE               |   10 +-
 geode-assembly/src/main/dist/NOTICE                |    2 +-
 .../tools/pulse/ui/PulseAcceptanceAuthTest.java    |    2 +-
 .../tools/pulse/ui/PulseAcceptanceNoAuthTest.java  |    2 +-
 .../tools/pulse/ui/PulseAcceptanceTestBase.java    |    2 +-
 .../DeploymentManagementUpgradeTest.java           |    4 +-
 .../management/OperationManagementUpgradeTest.java |   18 +-
 .../RollingUpgradeWithGfshDUnitTest.java           |   25 +-
 .../management/RollingUpgradeWithSslDUnitTest.java |  276 ++
 .../cli/commands/ConnectCommandUpgradeTest.java    |   57 +-
 .../web/controllers/RestAPICompatibilityTest.java  |   19 +-
 .../Tomcat8ClientServerRollingUpgradeTest.java     |    2 +-
 .../org/apache/geode/management/gemfire.properties |   17 +
 geode-book/README.md                               |   20 +-
 geode-book/config.yml                              |   10 +-
 .../source/subnavs/geode-subnav.erb                |   40 +-
 geode-book/redirects.rb                            |    4 +-
 geode-common/build.gradle                          |   14 +
 .../apache/geode/internal/lang/SystemProperty.java |  118 +
 .../geode/internal/lang/utils/ClassUtils.java      |  143 +
 .../internal/lang/utils/function/Checked.java      |   55 +
 .../geode/internal/version/ComponentVersion.java   |   72 +
 .../internal/version/DistributionVersion.java      |   76 +
 .../geode/util/internal/GeodeJsonMapper.java       |   13 +-
 .../geode/util/internal/TeeOutputStream.java       |   19 +-
 .../apache/geode/util/internal/TeePrintStream.java |    9 +-
 .../geode/annotations/ExperimentalJUnitTest.java   |   12 +-
 .../geode/internal/lang/SystemPropertyTest.java    |  107 +
 .../geode/internal/lang/utils/ClassUtilsTest.java  |  163 +
 .../internal/lang/utils/function/CheckedTest.java  |   39 +
 geode-concurrency-test/build.gradle                |    1 +
 .../geode/test/concurrency/loop/LoopRunner.java    |    3 +-
 geode-connectors/build.gradle                      |    2 +-
 .../jdbc/CacheXmlJdbcMappingIntegrationTest.java   |  268 ++
 .../org/apache/geode/connectors/jdbc/Employee.java |   12 +-
 .../geode/connectors/jdbc/JdbcDistributedTest.java |   47 +-
 .../connectors/jdbc/JdbcLoaderIntegrationTest.java |    2 +-
 .../connectors/jdbc/NonSerializedEmployee.java     |   44 +
 .../org/apache/geode/connectors/jdbc/TestDate.java |    8 +-
 ...cMappingIntegrationTest.FieldMappings.cache.xml |   47 +
 ...eldMappingsColumnNamesWithUnderscores.cache.xml |   47 +
 ...appingIntegrationTest.NoFieldMappings.cache.xml |   44 +
 ...NoFieldMappingsWithNonSerializedClass.cache.xml |   44 +
 ...bcMappingIntegrationTest.WrongPdxName.cache.xml |   44 +
 .../cli/CreateDataSourceCommandDUnitTest.java      |    2 +-
 .../cli/CreateMappingCommandDUnitTest.java         |   12 +-
 ...reateMappingCommandForProxyRegionDUnitTest.java |    4 +-
 .../cli/DeregisterDriverCommandDUnitTest.java      |    4 +-
 .../cli/DestroyMappingCommandDunitTest.java        |    8 +-
 .../cli/JdbcClusterConfigDistributedTest.java      |    9 +-
 .../internal/cli/ListDriversCommandDUnitTest.java  |    6 +-
 .../internal/cli/ListMappingCommandDUnitTest.java  |    2 +-
 .../cli/RegisterDriverCommandDUnitTest.java        |    4 +-
 ...lyzeConnectorsSerializablesIntegrationTest.java |   37 +
 .../AnalyzeConnectorsSerializablesJUnitTest.java   |   34 -
 ...ctionedSerializablesServiceIntegrationTest.java |   40 +
 .../cli/JDBCConnectorFunctionsSecurityTest.java    |    2 +-
 .../jdbc/JdbcPooledDataSourceFactory.java          |    2 +-
 .../jdbc/internal/AbstractJdbcCallback.java        |    2 +-
 .../ConnectorsDistributedSystemService.java        |   43 -
 .../ConnectorsSanctionedSerializablesService.java  |   27 +
 .../jdbc/internal/JdbcConnectorService.java        |    6 +
 .../jdbc/internal/JdbcConnectorServiceImpl.java    |   62 +
 .../geode/connectors/jdbc/internal/SqlHandler.java |   22 +-
 .../jdbc/internal/SqlStatementFactory.java         |    2 +-
 .../connectors/jdbc/internal/SqlToPdxInstance.java |    4 +-
 .../connectors/jdbc/internal/TableMetaData.java    |   16 +-
 .../CreateMappingPreconditionCheckFunction.java    |   60 +-
 .../jdbc/internal/cli/DescribeMappingCommand.java  |    6 +-
 .../jdbc/internal/cli/DescribeMappingResult.java   |    4 +-
 .../internal/cli/DestroyDataSourceCommand.java     |    2 +-
 .../jdbc/internal/cli/MappingCommandUtils.java     |    8 +-
 .../jdbc/internal/configuration/FieldMapping.java  |   10 +-
 .../jdbc/internal/configuration/RegionMapping.java |    6 +-
 .../connectors/jdbc/internal/xml/ElementType.java  |    2 +-
 .../internal/xml/RegionMappingConfiguration.java   |  127 +
 ...e.distributed.internal.DistributedSystemService |   16 -
 ...alization.filter.SanctionedSerializablesService |   15 +
 .../jdbc/JdbcConnectorExceptionTest.java           |    6 +-
 .../jdbc/JdbcPooledDataSourceFactoryTest.java      |    2 +-
 .../jdbc/internal/JdbcConnectorServiceTest.java    |   98 +
 .../connectors/jdbc/internal/SqlHandlerTest.java   |   12 +-
 .../jdbc/internal/SqlStatementFactoryTest.java     |    2 +-
 .../jdbc/internal/SqlToPdxInstanceCreatorTest.java |    6 +-
 .../jdbc/internal/SqlToPdxInstanceTest.java        |   16 +-
 .../jdbc/internal/TableMetaDataManagerTest.java    |    2 +-
 .../internal/cli/CreateDataSourceCommandTest.java  |    2 +-
 .../cli/CreateMappingCommandInterceptorTest.java   |   10 +-
 .../internal/cli/CreateMappingCommandTest.java     |   16 +-
 ...CreateMappingPreconditionCheckFunctionTest.java |    8 +-
 .../internal/cli/DeregisterDriverCommandTest.java  |    4 +-
 .../cli/DescribeDataSourceCommandTest.java         |    4 +-
 .../internal/cli/DescribeMappingCommandTest.java   |    2 +-
 .../internal/cli/DestroyDataSourceCommandTest.java |    2 +-
 .../internal/cli/ListDataSourceCommandTest.java    |    4 +-
 .../jdbc/internal/cli/ListDriversCommandTest.java  |    2 +-
 .../jdbc/internal/cli/ListMappingCommandTest.java  |    4 +-
 .../jdbc/internal/cli/MappingCommandUtilsTest.java |    2 +-
 .../internal/cli/RegisterDriverCommandTest.java    |    2 +-
 .../xml/RegionMappingConfigurationTest.java        |  325 ++
 geode-core/build.gradle                            |  597 ++--
 .../java/org/apache/geode/TestDataSerializer.java  |   20 +-
 .../api/AlertingServiceDistributedTest.java        |    4 +-
 ...rtingServiceWithoutListenerDistributedTest.java |    4 +-
 .../geode/cache/ClientServerTimeSyncDUnitTest.java |    4 +-
 .../cache/ConnectionPoolAndLoaderDUnitTest.java    |    8 +-
 .../geode/cache/ConnectionPoolDUnitTest.java       |  112 +-
 .../CreateAndLocalDestroyInTXRegressionTest.java   |    4 +-
 .../cache/RegionExpirationDistributedTest.java     |    4 +-
 ...ValidateSerializableObjectsDistributedTest.java |  320 ++
 .../ClientServerRegisterInterestsDUnitTest.java    |    4 +-
 ...AllCacheListenerClientServerRegressionTest.java |    8 +-
 .../internal/AutoConnectionSourceDUnitTest.java    |    2 +-
 .../CacheServerSSLConnectionDUnitTest.java         |   50 +-
 ...tServerHostNameVerificationDistributedTest.java |    9 +-
 .../internal/CustomSSLProviderDistributedTest.java |   24 +-
 .../SSLDualServerNoClientAuthDUnitTest.java        |    8 +-
 .../client/internal/SSLNoClientAuthDUnitTest.java  |   16 +-
 .../internal/provider/CustomKeyManagerFactory.java |   16 +-
 .../provider/CustomTrustManagerFactory.java        |   16 +-
 .../management/MemoryThresholdsDUnitTest.java      |  233 +-
 .../MemoryThresholdsOffHeapDUnitTest.java          |  208 +-
 .../cache/management/ResourceManagerDUnitTest.java |  275 +-
 .../partition/PartitionRegionHelperDUnitTest.java  |   34 +-
 .../cache/query/dunit/CompiledInDUnitTest.java     |    6 +-
 .../query/dunit/CorruptedIndexIntegrationTest.java |    4 +-
 .../cache/query/dunit/CqTimeTestListener.java      |   96 +-
 .../IndexUsageInJoinQueryDistributedTest.java      |    8 +-
 ...nequalityQueryWithRebalanceDistributedTest.java |   12 +-
 ...MultiServerPartitionedRegionQueryDUnitTest.java |   10 +-
 .../query/dunit/NonDistinctOrderByDUnitImpl.java   |   40 +-
 .../query/dunit/OrderByPartitionedDUnitTest.java   |   48 +-
 .../geode/cache/query/dunit/PDXQueryTestBase.java  |  116 +-
 .../cache/query/dunit/PdxLocalQueryDUnitTest.java  |   86 +-
 .../PdxLocalQueryVersionedClassDUnitTest.java      |    4 +-
 .../query/dunit/PdxMultiThreadQueryDUnitTest.java  |  368 +++
 .../geode/cache/query/dunit/PdxQueryDUnitTest.java |  499 +--
 .../cache/query/dunit/PdxStringQueryDUnitTest.java |  307 +-
 ...PersistentRegionCompactRangeIndexDUnitTest.java |   32 +-
 .../cache/query/dunit/PortfolioPdxVersion.java     |   34 +-
 .../cache/query/dunit/PositionPdxVersion.java      |   78 +-
 .../query/dunit/QueryAPITestPartitionResolver.java |    4 +-
 .../cache/query/dunit/QueryAuthorization.java      |    6 +-
 .../dunit/QueryDataInconsistencyDUnitTest.java     |   13 +-
 .../cache/query/dunit/QueryIndexDUnitTest.java     |  350 +--
 .../query/dunit/QueryIndexUsingXMLDUnitTest.java   |   21 +-
 .../dunit/QueryUsingFunctionContextDUnitTest.java  |   90 +-
 .../cache/query/dunit/QueryUsingPoolDUnitTest.java |  104 +-
 .../cache/query/dunit/RemoteQueryDUnitTest.java    |   82 +-
 .../ResourceManagerWithQueryMonitorDUnitTest.java  |    6 +-
 .../query/dunit/SelectStarQueryDUnitTest.java      |   24 +-
 ...igurationServiceConstraintsDistributedTest.java |    8 +-
 .../AggregateFunctionsQueryDUnitTest.java          |    8 +-
 ...ncurrentIndexInitOnOverflowRegionDUnitTest.java |    6 +-
 ...exUpdateWithInplaceObjectModFalseDUnitTest.java |   42 +-
 .../ConcurrentIndexUpdateWithoutWLDUnitTest.java   |   56 +-
 .../internal/index/CopyOnReadIndexDUnitTest.java   |    4 +-
 .../index/IndexTrackingQueryObserverDUnitTest.java |    4 +-
 .../InitializeIndexEntryDestroyQueryDUnitTest.java |    8 +-
 .../index/MultiIndexCreationDUnitTest.java         |   13 +-
 .../index/PutAllWithIndexPerfDUnitTest.java        |    2 +-
 .../partitioned/PRBasicIndexCreationDUnitTest.java |    2 +-
 .../partitioned/PRColocatedEquiJoinDUnitTest.java  |   10 +-
 .../query/partitioned/PRQueryDUnitHelper.java      |   72 +-
 .../cache/query/partitioned/PRQueryDUnitTest.java  |    5 +-
 .../PRQueryRemoteNodeExceptionDUnitTest.java       |   10 +-
 .../cache/snapshot/ParallelSnapshotDUnitTest.java  |    2 +-
 .../geode/cache/snapshot/SnapshotDUnitTest.java    |   11 +-
 .../snapshot/SnapshotPerformanceDUnitTest.java     |    2 +-
 .../apache/geode/cache30/CacheCloseDUnitTest.java  |    6 +-
 .../geode/cache30/CacheListenerTestCase.java       |   48 +-
 .../apache/geode/cache30/CacheLoaderTestCase.java  |   24 +-
 .../apache/geode/cache30/CacheMapTxnDUnitTest.java |   42 +-
 .../CacheRegionsReliablityStatsCheckDUnitTest.java |    2 +-
 .../geode/cache30/CacheStatisticsDUnitTest.java    |   45 +-
 .../CacheStatisticsPartitionedRegionDUnitTest.java |   32 +-
 .../apache/geode/cache30/CacheWriterTestCase.java  |   32 +-
 .../geode/cache30/CacheXMLPartitionResolver.java   |   18 +-
 .../apache/geode/cache30/CacheXml66DUnitTest.java  |  115 +-
 .../apache/geode/cache30/CacheXml80DUnitTest.java  |    2 +-
 .../geode/cache30/CacheXmlGeode10DUnitTest.java    |    4 +-
 .../apache/geode/cache30/CallbackArgDUnitTest.java |   29 +-
 .../geode/cache30/ClearMultiVmCallBkDUnitTest.java |   16 +-
 .../geode/cache30/ClearMultiVmDUnitTest.java       |   46 +-
 .../geode/cache30/ClientMembershipDUnitTest.java   |   68 +-
 .../cache30/ClientRegisterInterestDUnitTest.java   |   37 +-
 .../geode/cache30/ClientServerCCEDUnitTest.java    |   26 +-
 .../ClientServerCacheOperationDUnitTest.java       |  117 +-
 .../cache30/ConcurrentLeaveDuringGIIDUnitTest.java |   14 +-
 .../DiskDistributedNoAckRegionTestCase.java        |    6 +-
 .../geode/cache30/DiskRegionDistributedTest.java   |   12 +-
 .../apache/geode/cache30/DiskRegionTestImpl.java   |   32 +-
 .../geode/cache30/DistAckMapMethodsDUnitTest.java  |   94 +-
 .../cache30/DistributedAckRegionCCEDUnitTest.java  |   12 +-
 .../cache30/DistributedAckRegionDUnitTest.java     |    2 +-
 .../DistributedMulticastRegionDUnitTest.java       |   22 +-
 .../DistributedNoAckRegionCCEDUnitTest.java        |    4 +-
 .../cache30/DistributedNoAckRegionDUnitTest.java   |    2 +-
 .../geode/cache30/GlobalLockingDUnitTest.java      |   34 +-
 .../geode/cache30/GlobalRegionCCEDUnitTest.java    |    2 +-
 .../geode/cache30/GlobalRegionDUnitTest.java       |    8 +-
 .../cache30/LRUEvictionControllerDUnitTest.java    |   47 +-
 .../apache/geode/cache30/LocalRegionDUnitTest.java |   16 +-
 .../cache30/MemLRUEvictionControllerDUnitTest.java |   38 +-
 .../OffHeapLRUEvictionControllerDUnitTest.java     |    3 +-
 .../cache30/PRBucketSynchronizationDUnitTest.java  |    5 +-
 .../geode/cache30/PartitionedRegionDUnitTest.java  |    4 +-
 ...rtitionedRegionMembershipListenerDUnitTest.java |   18 +-
 .../org/apache/geode/cache30/ProxyDUnitTest.java   |  158 +-
 .../cache30/PutAllCallBkRemoteVMDUnitTest.java     |   59 +-
 .../cache30/PutAllCallBkSingleVMDUnitTest.java     |   18 +-
 .../geode/cache30/PutAllMultiVmDUnitTest.java      |   84 +-
 .../apache/geode/cache30/QueueMsgDUnitTest.java    |    4 +-
 .../geode/cache30/RRSynchronizationDUnitTest.java  |    7 +-
 .../apache/geode/cache30/ReconnectDUnitTest.java   |   21 +-
 .../cache30/ReconnectWithCacheXMLDUnitTest.java    |    5 +-
 .../cache30/ReconnectedCacheServerDUnitTest.java   |   14 +-
 .../geode/cache30/RegionAttributesTestCase.java    |    6 +-
 .../cache30/RegionMembershipListenerDUnitTest.java |  135 +-
 .../RegionReliabilityListenerDUnitTest.java        |    2 +-
 .../geode/cache30/RegionReliabilityTestCase.java   |  129 +-
 .../apache/geode/cache30/ReliabilityTestCase.java  |    9 +-
 ...tePRValuesAreNotDeserializedRegressionTest.java |    4 +-
 .../geode/cache30/RemoveAllMultiVmDUnitTest.java   |   76 +-
 .../geode/cache30/RequiredRolesDUnitTest.java      |  106 +-
 .../geode/cache30/SearchAndLoadDUnitTest.java      |   18 +-
 .../org/apache/geode/cache30/SlowRecDUnitTest.java |  122 +-
 .../geode/cache30/TXDistributedDUnitTest.java      |  147 +-
 .../org/apache/geode/cache30/TXOrderDUnitTest.java |   26 +-
 .../geode/cache30/TXRestrictionsDUnitTest.java     |    2 +-
 .../apache/geode/cache30/TestPdxSerializer.java    |    2 +-
 .../geode/cache30/TestTransactionListener.java     |   12 +-
 .../ValuesAreLazilyDeserializedRegressionTest.java |    4 +-
 .../distributed/DistributedLockBlackboardImpl.java |    2 +-
 .../DistributedLockServiceDUnitTest.java           |  209 +-
 .../distributed/DistributedMemberDUnitTest.java    |   24 +-
 .../distributed/DistributedSystemConnectPerf.java  |    4 +-
 .../distributed/DistributedSystemDUnitTest.java    |  104 +-
 .../distributed/FailDeserializationFunction.java   |   40 +
 .../geode/distributed/HostedLocatorsDUnitTest.java |   19 +-
 .../apache/geode/distributed/LocatorDUnitTest.java |  171 +-
 .../geode/distributed/LocatorLauncherTest.java     |   43 -
 .../apache/geode/distributed/RoleDUnitTest.java    |   19 +-
 .../distributed/ServerLauncherDUnitTestHelper.java |    2 +-
 .../internal/BadCacheLoaderDUnitTest.java          |   93 +
 .../ClusterDistributionManagerDUnitTest.java       |   50 +-
 ...lusterDistributionManagerForAdminDUnitTest.java |   20 +-
 .../geode/distributed/internal/DateMessage.java    |   14 +-
 .../internal/P2PMessagingConcurrencyDUnitTest.java |  370 +++
 .../internal/deadlock/DeadlockDetectorTest.java    |    2 +-
 .../deadlock/GemFireDeadlockDetectorDUnitTest.java |    4 +-
 .../locks/DLockServiceCharacterizationTests.java   |    2 +-
 .../streaming/StreamingOperationManyDUnitTest.java |   34 +-
 .../streaming/StreamingOperationOneDUnitTest.java  |   38 +-
 .../geode/disttx/CacheMapDistTXDUnitTest.java      |    8 +-
 .../apache/geode/disttx/DistTXDebugDUnitTest.java  |   68 +-
 .../disttx/DistributedTransactionDUnitTest.java    |   52 +-
 ...ackwardCompatibilitySerializationDUnitTest.java |   27 +-
 .../internal/ClassNotFoundExceptionDUnitTest.java  |   18 +-
 .../geode/internal/PdxDeleteFieldDUnitTest.java    |   24 +-
 .../apache/geode/internal/PdxRenameDUnitTest.java  |   23 +-
 .../internal/cache/ARMLockTestHookAdapter.java     |   16 +-
 ...onCreateBeforeInitializationRegressionTest.java |    8 +-
 ...okenSerializationConsistencyRegressionTest.java |    8 +-
 .../cache/BucketCreationCrashRegressionTest.java   |   22 +-
 .../internal/cache/CacheAdvisorDUnitTest.java      |   12 +-
 ...eanupFailedInitWithDiskFilesRegressionTest.java |   10 +-
 .../geode/internal/cache/ClearDAckDUnitTest.java   |   24 +-
 ...ingGiiOplogWithMissingCreateRegressionTest.java |    8 +-
 .../geode/internal/cache/ClearGlobalDUnitTest.java |    8 +-
 .../ClearRegionMessageAssertionRegressionTest.java |    8 +-
 .../internal/cache/ClearRvvLockingDUnitTest.java   |   79 +-
 .../internal/cache/ClearTXLockingDUnitTest.java    |    8 +-
 .../ClientCachingProxyRegionDistributedTest.java   |    4 +-
 ...entDeserializationCopyOnReadRegressionTest.java |   17 +-
 .../cache/ClientServerGetAllDUnitTest.java         |   30 +-
 ...entServerInvalidAndDestroyedEntryDUnitTest.java |   10 +-
 ...rverNotColocatedTransactionDistributedTest.java |    4 +-
 ...rverReadConflictTransactionDistributedTest.java |   54 +-
 ...erRepeatableReadTransactionDistributedTest.java |    4 +-
 .../cache/ClientServerTransactionCCEDUnitTest.java |    2 +-
 .../cache/ClientServerTransactionDUnitTest.java    |  733 ++---
 .../cache/CompactOfflineDiskStoreDUnitTest.java    |    5 +-
 .../internal/cache/ConcurrentMapOpsDUnitTest.java  |   25 +-
 .../internal/cache/DeltaFaultInDUnitTest.java      |   20 +-
 .../internal/cache/DeltaPropagationDUnitTest.java  |  110 +-
 .../cache/DeltaPropagationStatsDUnitTest.java      |   96 +-
 .../geode/internal/cache/DeltaSizingDUnitTest.java |   76 +-
 .../DestroyRegionDuringGIIDistributedTest.java     |    4 +-
 ...iskRecoveryWithVersioningGiiRegressionTest.java |    8 +-
 .../internal/cache/DiskRegByteArrayDUnitTest.java  |    6 +-
 .../internal/cache/DistributedCacheTestCase.java   |   10 +-
 .../EntriesDoNotExpireDuringGiiRegressionTest.java |    2 +-
 .../internal/cache/FixedPRSinglehopDUnitTest.java  |   89 +-
 .../geode/internal/cache/GIIDeltaDUnitTest.java    |   45 +-
 .../internal/cache/GIIFlowControlDUnitTest.java    |    7 +-
 .../GiiDiskAccessExceptionRegressionTest.java      |    4 +-
 .../cache/HAOverflowMemObjectSizerDUnitTest.java   |   38 +-
 ...zedDiskRegionWithIoExceptionRegressionTest.java |    4 +-
 .../cache/InterruptClientServerDUnitTest.java      |    2 +-
 .../geode/internal/cache/InterruptsDUnitTest.java  |    2 +-
 ...LatestLastAccessTimeMessageDistributedTest.java |   93 +
 .../geode/internal/cache/MapClearGIIDUnitTest.java |   36 +-
 .../cache/NetSearchMessagingDUnitTest.java         |    2 +-
 .../cache/P2PDeltaPropagationDUnitTest.java        |  120 +-
 .../PRAccessorWithOverflowRegressionTest.java      |    4 +-
 .../cache/PRCustomPartitioningDistributedTest.java |   32 +-
 .../PREntryIdleExpirationDistributedTest.java      |    2 +-
 .../cache/PREntrySetIteratorRegressionTest.java    |    2 +-
 .../internal/cache/PRQueryDistributedTest.java     |   68 +-
 .../PRQueryWithIndexAndPdxDistributedTest.java     |    4 +-
 .../cache/PRQueryWithIndexDistributedTest.java     |    4 +-
 ...RQueryWithPdxDuringRebalanceRegressionTest.java |   10 +-
 .../PRWithIndexAfterRebalanceRegressionTest.java   |    8 +-
 .../cache/ParallelDiskStoreRecoveryDUnitTest.java  |    5 +-
 .../internal/cache/PartitionListenerDUnitTest.java |   34 +-
 .../cache/PartitionedRegionAPIDUnitTest.java       |   22 +-
 ...dRegionBucketCreationDistributionDUnitTest.java |   10 +-
 .../PartitionedRegionCacheXMLExampleDUnitTest.java |    7 +-
 .../PartitionedRegionCloseDistributedTest.java     |   16 +-
 .../cache/PartitionedRegionCreationDUnitTest.java  |    8 +-
 .../PartitionedRegionDelayedRecoveryDUnitTest.java |   12 +-
 .../cache/PartitionedRegionDestroyDUnitTest.java   |   20 +-
 .../PartitionedRegionEntryCountDUnitTest.java      |    2 +-
 .../cache/PartitionedRegionEvictionDUnitTest.java  |  115 +-
 .../cache/PartitionedRegionHADUnitTest.java        |    6 +-
 ...itionedRegionHAFailureAndRecoveryDUnitTest.java |   18 +-
 .../PartitionedRegionInvalidateDUnitTest.java      |    4 +-
 .../PartitionedRegionLocalMaxMemoryDUnitTest.java  |    2 +-
 ...tionedRegionLocalMaxMemoryOffHeapDUnitTest.java |    2 +-
 .../cache/PartitionedRegionMultipleDUnitTest.java  |    8 +-
 .../PartitionedRegionOffHeapEvictionDUnitTest.java |    6 +-
 .../cache/PartitionedRegionSingleHopDUnitTest.java |   51 +-
 ...nedRegionSingleHopWithServerGroupDUnitTest.java |   11 +-
 .../cache/PartitionedRegionTestUtilsDUnitTest.java |    6 +-
 .../cache/PersistentRegionRecoveryDUnitTest.java   |   14 +-
 .../geode/internal/cache/PutAllDAckDUnitTest.java  |   14 +-
 .../internal/cache/PutAllGlobalDUnitTest.java      |   16 +-
 .../cache/RegionListenerDistributedTest.java       |    6 +-
 ...RegisterInterestWithEvictionRegressionTest.java |    6 +-
 .../internal/cache/RemoteTransactionDUnitTest.java | 2080 ++++++-------
 .../internal/cache/RemoveAllDAckDUnitTest.java     |   12 +-
 .../geode/internal/cache/RemoveDAckDUnitTest.java  |   16 +-
 .../internal/cache/RemoveGlobalDUnitTest.java      |   26 +-
 .../internal/cache/SingleHopStatsDUnitTest.java    |   22 +-
 .../geode/internal/cache/SizingFlagDUnitTest.java  |   33 +-
 .../internal/cache/SystemFailureDUnitTest.java     |   44 +-
 .../org/apache/geode/internal/cache/TestDelta.java |    4 +-
 .../cache/TestDeltaSerializableSizeableObject.java |   64 +
 .../geode/internal/cache/TestNonSizerObject.java   |    6 +-
 .../TransactionCommitOnFarSideDistributedTest.java |   18 +
 .../cache/TransactionsWithDeltaDUnitTest.java      |   32 +-
 .../cache/TransactionsWithGIIDistributedTest.java  |    6 +-
 .../cache/ValidateOfflineDiskStoreDUnitTest.java   |    5 +-
 .../cache/backup/BackupDistributedTest.java        |   28 +-
 .../backup/IncrementalBackupDistributedTest.java   |    4 +-
 .../PrepareAndFinishBackupDistributedTest.java     |    6 +-
 .../RebalanceOperationComplexDistributedTest.java  |  339 +++
 ...alanceOperationComplexPart2DistributedTest.java |  223 ++
 .../control/RebalanceOperationDistributedTest.java |   13 +-
 .../RestoreRedundancyOperationDUnitTest.java       |  115 +-
 .../cache/event/EventTrackerDUnitTest.java         |   10 +-
 .../eviction/EvictionObjectSizerDUnitTest.java     |   42 +-
 .../cache/eviction/EvictionStatsDUnitTest.java     |   37 +-
 .../ClientFunctionTimeoutRegressionTest.java       |    4 +-
 .../cache/execute/ColocationFailoverDUnitTest.java |  121 +-
 .../cache/execute/CustomResultCollector.java       |    4 +-
 ...istributedRegionFunctionExecutionDUnitTest.java |   18 +-
 ...ExceptionsIncludeLocalMemberRegressionTest.java |    6 +-
 ...ctionExecutionWithExceptionDistributedTest.java |    8 +-
 .../FunctionExecutionWithPrincipalDUnitTest.java   |    6 +-
 ...ionExecutionWithTransactionDistributedTest.java |    9 +-
 .../execute/FunctionOnRegionRetryDUnitTest.java    |    5 +-
 .../execute/FunctionOnServerRetryDUnitTest.java    |    4 +-
 .../execute/FunctionOnServersRetryDUnitTest.java   |    4 +-
 .../cache/execute/FunctionRetryTestBase.java       |   32 +-
 .../cache/execute/FunctionServiceBase.java         |   12 +-
 .../FunctionServiceMultipleOnMemberDUnitTest.java  |    2 +-
 .../cache/execute/LocalDataSetDUnitTest.java       |   68 +-
 .../execute/LocalDataSetIndexingDUnitTest.java     |   20 +-
 .../execute/LocalFunctionExecutionDUnitTest.java   |   26 +-
 .../execute/MemberFunctionExecutionDUnitTest.java  |  107 +-
 .../MultiRegionFunctionExecutionDUnitTest.java     |   40 +-
 .../cache/execute/MyTransactionFunction.java       |    2 +-
 .../NestedFunctionExecutionDistributedTest.java    |   10 +-
 .../OnGroupsFunctionExecutionDUnitTest.java        |   96 +-
 ...lientServerFunctionExecutionNoAckDUnitTest.java |   18 +-
 ...ientServerRegionFunctionExecutionDUnitTest.java |    2 +-
 ...erRegionFunctionExecutionFailoverDUnitTest.java |    4 +-
 ...egionFunctionExecutionNoSingleHopDUnitTest.java |    2 +-
 ...ctionExecutionSelectorNoSingleHopDUnitTest.java |    2 +-
 ...rRegionFunctionExecutionSingleHopDUnitTest.java |   51 +-
 .../cache/execute/PRColocationDUnitTest.java       |  592 ++--
 .../execute/PRFunctionExecutionDUnitTest.java      |   12 +-
 ...FunctionExecutionWithResultSenderDUnitTest.java |    6 +-
 .../cache/execute/PRSetOperationJTADUnitTest.java  |   44 +-
 .../cache/execute/PRSetOperationTXDUnitTest.java   |   20 +-
 .../cache/execute/PRTransactionDUnitTest.java      |  157 +-
 .../RepeatableReadTransactionDistributedTest.java  |   28 +-
 .../ExtensionClusterConfigurationDUnitTest.java    |    3 -
 .../mock/AlterMockRegionExtensionFunction.java     |    2 +-
 .../mock/CreateMockRegionExtensionFunction.java    |    2 +-
 .../mock/DestroyMockRegionExtensionFunction.java   |    2 +-
 .../cache/functions/LocalDataSetFunction.java      |    2 +-
 .../cache/ha/EventIdOptimizationDUnitTest.java     |   65 +-
 .../geode/internal/cache/ha/FailoverDUnitTest.java |   33 +-
 .../internal/cache/ha/HABugInPutDUnitTest.java     |   22 +-
 .../geode/internal/cache/ha/HAClearDUnitTest.java  |   38 +-
 .../internal/cache/ha/HAConflationDUnitTest.java   |   20 +-
 .../internal/cache/ha/HADuplicateDUnitTest.java    |   26 +-
 .../cache/ha/HAEventIdPropagationDUnitTest.java    |   91 +-
 .../geode/internal/cache/ha/HAExpiryDUnitTest.java |   58 +-
 .../geode/internal/cache/ha/HAGIIBugDUnitTest.java |   26 +-
 .../geode/internal/cache/ha/HAGIIDUnitTest.java    |   54 +-
 .../cache/ha/HARQueueNewImplDUnitTest.java         |    5 +-
 .../geode/internal/cache/ha/HARegionDUnitTest.java |   75 +-
 .../internal/cache/ha/HARegionQueueDUnitTest.java  |  144 +-
 .../ha/HARegionQueueExpiryRegressionTest.java      |   13 +-
 .../cache/ha/HARegionQueueSizeRegressionTest.java  |    8 +-
 .../HARegionQueueThreadIdExpiryRegressionTest.java |   12 +-
 .../internal/cache/ha/HASlowReceiverDUnitTest.java |   36 +-
 .../cache/ha/OperationsPropagationDUnitTest.java   |   30 +-
 .../ha/PreferSerializedHARegionQueueTest.java      |   24 +-
 .../geode/internal/cache/ha/PutAllDUnitTest.java   |   62 +-
 .../geode/internal/cache/ha/StatsBugDUnitTest.java |   24 +-
 .../cache/locks/TXLockServiceDUnitTest.java        |   53 +-
 ...BucketCreationCrashCompletesRegressionTest.java |    4 +-
 .../BucketRebalanceStatRegressionTest.java         |    8 +-
 .../cache/partitioned/ElidedPutAllDUnitTest.java   |    4 +-
 .../partitioned/PartitionResolverDUnitTest.java    |    9 +-
 ...artitionedRegionAttributesMutatorDUnitTest.java |    4 +-
 .../PartitionedRegionLoaderWriterDUnitTest.java    |    8 +-
 .../partitioned/PersistPRKRFIntegrationTest.java   |   12 +-
 ...tColocatedPartitionedRegionDistributedTest.java |   46 +-
 ...PersistentPartitionedRegionDistributedTest.java |    9 +-
 .../PersistentPartitionedRegionRegressionTest.java |    6 +-
 ...eueRemovalMessageProcessingDistributedTest.java |   10 +-
 .../cache/partitioned/ShutdownAllDUnitTest.java    |   18 +-
 .../StreamingPartitionOperationManyDUnitTest.java  |   38 +-
 .../StreamingPartitionOperationOneDUnitTest.java   |   40 +-
 .../fixed/FixedPartitioningDUnitTest.java          |   22 +-
 ...oningWithColocationAndPersistenceDUnitTest.java |   52 +-
 .../fixed/QuarterPartitionResolver.java            |   30 +-
 .../fixed/SingleHopQuarterPartitionResolver.java   |   30 +-
 ...ntPartitionedRegionWithRedundancyDUnitTest.java |   14 +-
 .../PersistentRVVRecoveryDUnitTest.java            |    6 +-
 .../PersistentRecoveryOrderDUnitTest.java          |   43 +-
 .../cache/snapshot/GFSnapshotDUnitTest.java        |    4 +-
 .../DeltaPropagationFailureRegressionTest.java     |    4 +-
 .../cache/tier/sockets/AcceptorImplDUnitTest.java  |    4 +-
 ...dCompatibilityHigherVersionClientDUnitTest.java |   26 +-
 .../sockets/CacheServerTransactionsDUnitTest.java  |  145 +-
 .../tier/sockets/ClearPropagationDUnitTest.java    |   42 +-
 .../tier/sockets/ClientConflationDUnitTest.java    |   51 +-
 ...entDestroyRegionNotificationRegressionTest.java |    4 +-
 ...troyRegionUnregisterInterestRegressionTest.java |    4 +-
 .../sockets/ClientInterestNotifyDUnitTest.java     |   28 +-
 .../ClientProxyWithDeltaDistributedTest.java       |    6 +-
 .../sockets/ClientRegionGetRegressionTest.java     |    4 +-
 ...ientServerConnectDisconnectDistributedTest.java |   10 +-
 .../ClientServerForceInvalidateDUnitTest.java      |   35 +-
 .../tier/sockets/ClientServerMiscDUnitTest.java    |    4 +-
 ...ientServerRemoteHostAddressDistributedTest.java |    6 +-
 .../ClientWithInterestFailoverDistributedTest.java |   18 +-
 .../cache/tier/sockets/ConflationDUnitTest.java    |   57 +-
 .../DataSerializerPropagationDUnitTest.java        |  150 +-
 .../cache/tier/sockets/DeltaEOFException.java      |   26 +-
 .../sockets/DestroyEntryPropagationDUnitTest.java  |   90 +-
 .../sockets/DurableClientBug39997DUnitTest.java    |    3 +-
 ...ientConnectDisconnectSocketDistributedTest.java |   16 +-
 .../sockets/DurableClientQueueSizeDUnitTest.java   |   45 +-
 .../sockets/DurableClientReconnectDUnitTest.java   |   48 +-
 .../tier/sockets/DurableClientStatsDUnitTest.java  |   80 +-
 .../tier/sockets/DurableRegistrationDUnitTest.java |  298 +-
 .../sockets/DurableResponseMatrixDUnitTest.java    |   16 +-
 .../tier/sockets/EventIDVerificationDUnitTest.java |   50 +-
 .../sockets/EventIDVerificationInP2PDUnitTest.java |   40 +-
 .../internal/cache/tier/sockets/FaultyDelta.java   |   52 +-
 .../GetConnectedServerCountRegressionTest.java     |    8 +-
 .../cache/tier/sockets/HABug36738DUnitTest.java    |   16 +-
 .../tier/sockets/HAInterestPart1DUnitTest.java     |  116 +-
 .../tier/sockets/HAInterestPart2DUnitTest.java     |  135 +-
 .../cache/tier/sockets/HAInterestTestCase.java     |   61 +-
 .../HARegionQueueStatsCloseRegressionTest.java     |   10 +-
 .../sockets/HAStartupAndFailoverDUnitTest.java     |  144 +-
 .../sockets/InstantiatorPropagationDUnitTest.java  |  296 +-
 .../cache/tier/sockets/InterestListDUnitTest.java  |  152 +-
 .../sockets/InterestListEndpointDUnitTest.java     |   80 +-
 .../sockets/InterestListFailoverDUnitTest.java     |   41 +-
 .../sockets/InterestListRecoveryDUnitTest.java     |   34 +-
 .../sockets/InterestRegrListenerDUnitTest.java     |  110 +-
 .../sockets/InterestResultPolicyDUnitTest.java     |   42 +-
 .../MessageTrackingTimeoutRegressionTest.java      |    6 +-
 .../tier/sockets/NewRegionAttributesDUnitTest.java |   40 +-
 .../cache/tier/sockets/PingOpDistributedTest.java  |   15 +-
 .../sockets/RedundancyLevelPart1DUnitTest.java     |    4 +-
 .../tier/sockets/RedundancyLevelTestBase.java      |    5 +-
 .../cache/tier/sockets/RegionCloseDUnitTest.java   |   18 +-
 ...isterInterestBeforeRegionCreationDUnitTest.java |   28 +-
 .../sockets/RegisterInterestDistributedTest.java   |    2 +-
 .../sockets/RegisterInterestKeysDUnitTest.java     |   30 +-
 ...nterestOnServerWithoutRegionRegressionTest.java |    4 +-
 ...isterInterestServerMetaDataDistributedTest.java |   32 +-
 .../tier/sockets/ReliableMessagingDUnitTest.java   |   30 +-
 ...RootRegionsExcludesHARegionsRegressionTest.java |    6 +-
 .../tier/sockets/SlowDispatcherDUnitTest.java      |  168 ++
 .../tier/sockets/UnregisterInterestDUnitTest.java  |   24 +-
 .../tier/sockets/UpdatePropagationDUnitTest.java   |   34 +-
 .../VerifyEventIDGenerationInP2PDUnitTest.java     |   12 +-
 ...ifyUpdatesFromNonInterestEndPointDUnitTest.java |   40 +-
 .../cache/tx/SetOperationJTADistributedTest.java   |   34 +-
 .../cache/versions/TombstoneDUnitTest.java         |   10 +-
 ...yncEventQueueEntrySynchronizationDUnitTest.java |    6 +-
 ...ventListenerWithCacheLoaderDistributedTest.java |   10 +-
 ...syncEventListenerWithFilterDistributedTest.java |   20 +-
 .../asyncqueue/AsyncEventQueuePausedDUnitTest.java |   25 +-
 .../asyncqueue/AsyncEventQueueStatsDUnitTest.java  |   16 +-
 ...oncurrentAsyncEventListenerDistributedTest.java |   38 +-
 .../ParallelAsyncEventListenerDistributedTest.java |  174 +-
 ...AsyncEventListenerStopStartDistributedTest.java |   32 +-
 ...ListenersDifferentPrimariesDistributedTest.java |   16 +-
 .../SerialEventListenerDistributedTest.java        |   12 +-
 .../ConcurrentAsyncEventQueueDUnitTest.java        |   30 +-
 .../wan/misc/CommonAsyncEventQueueDUnitTest.java   |   10 +-
 .../CompressionCacheListenerDUnitTest.java         |    4 +-
 .../CompressionRegionOperationsDUnitTest.java      |   14 +-
 .../compression/CompressionStatsDUnitTest.java     |    2 +-
 .../internal/jta/ClientServerJTADUnitTest.java     |    8 +-
 .../ClientServerJTAFailoverDistributedTest.java    |   12 +-
 .../geode/internal/jta/dunit/CommitThread.java     |    2 +-
 .../internal/jta/dunit/IdleTimeOutDUnitTest.java   |   12 +-
 .../internal/jta/dunit/LoginTimeOutDUnitTest.java  |   14 +-
 .../internal/jta/dunit/MaxPoolSizeDUnitTest.java   |   10 +-
 .../geode/internal/jta/dunit/RollbackThread.java   |    2 +-
 .../jta/dunit/TransactionTimeOutDUnitTest.java     |   24 +-
 .../jta/dunit/TxnManagerMultiThreadDUnitTest.java  |   20 +-
 .../internal/jta/dunit/TxnTimeOutDUnitTest.java    |   32 +-
 .../offheap/OutOfOffHeapMemoryDUnitTest.java       |    4 +-
 .../statistics/StatisticsDistributedTest.java      |   98 +-
 .../LoggingWithReconnectDistributedTest.java       |   48 +-
 .../geode/management/CacheManagementDUnitTest.java |  280 +-
 .../management/ClientHealthStatsDUnitTest.java     |    3 +-
 .../apache/geode/management/CompositeStats.java    |   24 +-
 .../geode/management/CompositeTestMBean.java       |    4 +-
 .../management/CompositeTypeTestDUnitTest.java     |   12 +-
 .../geode/management/DLockManagementDUnitTest.java |   68 +-
 .../geode/management/DiskManagementDUnitTest.java  |   68 +-
 .../DistributedSystemMXBeanDistributedTest.java    |    2 +-
 ...butedSystemMXBeanWithAlertsDistributedTest.java |    4 +-
 ...stemMXBeanWithNotificationsDistributedTest.java |    2 +-
 .../geode/management/ManagementTestRule.java       |   13 +-
 .../management/MemberMXBeanDistributedTest.java    |   16 +-
 .../management/OffHeapManagementDUnitTest.java     |   21 +-
 .../management/PartitionedRegionStatsTest.java     |    2 +-
 .../management/RegionCreateDestroyDUnitTest.java   |   10 +-
 .../management/RegionManagementDUnitTest.java      |    2 +-
 ...niversalMembershipListenerAdapterDUnitTest.java |   22 +-
 .../stats/DistributedSystemStatsDUnitTest.java     |   10 +-
 .../ClusterConfigDeployJarDUnitTest.java           |   48 +-
 .../ClusterConfigLocatorRestartDUnitTest.java      |    2 +-
 ...rConfigServerRestartWithJarDeployDUnitTest.java |    2 +-
 ...urationPersistenceServiceUsingDirDUnitTest.java |    7 +-
 .../configuration/DeployJarWithSSLDUnitTest.java   |    4 +-
 .../ImportClusterConfigDistributedTest.java        |    8 +-
 .../ImportOldClusterConfigDUnitTest.java           |    2 +-
 .../internal/pulse/TestClientIdsDUnitTest.java     |   26 +-
 .../internal/pulse/TestFunctionsDUnitTest.java     |    2 +-
 .../internal/pulse/TestHeapDUnitTest.java          |    8 +-
 .../internal/pulse/TestLocatorsDUnitTest.java      |    6 +-
 .../security/MultiUserAuthenticationDUnitTest.java |   76 +-
 .../internal/util/ManagementUtilsDUnitTest.java    |    6 +-
 .../pdx/ClientsWithVersioningRetryDUnitTest.java   |    4 +-
 .../geode/pdx/DistributedSystemIdDUnitTest.java    |    4 +-
 .../geode/pdx/JSONPdxClientServerDUnitTest.java    |    3 +-
 .../geode/pdx/PdxAttributesDistributedTest.java    |   12 +-
 .../apache/geode/pdx/PdxClientServerDUnitTest.java |    2 +-
 .../apache/geode/pdx/PdxSerializableDUnitTest.java |   20 +-
 .../apache/geode/pdx/PdxTypeExportDUnitTest.java   |    3 +-
 .../geode/security/AuthExpirationDUnitTest.java    |  326 ++
 .../security/AuthExpirationFunctionDUnitTest.java  |  313 ++
 .../AuthExpirationMultiServerDUnitTest.java        |  384 +++
 .../AuthExpirationTransactionDUnitTest.java        |  347 +++
 .../security/ClientContainsKeyAuthDUnitTest.java   |    2 +-
 .../ClientDestroyInvalidateAuthDUnitTest.java      |    2 +-
 .../security/ClientDestroyRegionAuthDUnitTest.java |    6 +-
 .../geode/security/ClientGetAllAuthDUnitTest.java  |    2 +-
 .../security/ClientGetEntryAuthDUnitTest.java      |    2 +-
 .../geode/security/ClientGetPutAuthDUnitTest.java  |    8 +-
 .../security/ClientMultiUserAuthzDUnitTest.java    |   13 +-
 .../security/ClientRegionClearAuthDUnitTest.java   |    4 +-
 .../ClientRegisterInterestAuthDUnitTest.java       |    2 +-
 .../security/ClientRemoveAllAuthDUnitTest.java     |    2 +-
 .../ClientUnregisterInterestAuthDUnitTest.java     |    2 +-
 .../ClusterConfigWithEmbededLocatorDUnitTest.java  |    6 +-
 .../ClusterConfigWithoutSecurityDUnitTest.java     |   15 +-
 .../ClusterConfigurationSecurityDUnitTest.java     |    2 +-
 .../DeltaClientPostAuthorizationDUnitTest.java     |   24 +-
 .../security/DurableClientFailoverDUnitTest.java   |  121 +
 .../IntegratedSecurityPeerAuthDUnitTest.java       |    9 +-
 .../NoShowValue1PostProcessorDUnitTest.java        |    2 +-
 .../geode/security/P2PAuthenticationDUnitTest.java |    8 +-
 .../geode/security/PDXPostProcessorDUnitTest.java  |   53 +-
 ...AuthenticatorWithCachelessLocatorDUnitTest.java |    6 +-
 .../PeerSecurityWithEmbeddedLocatorDUnitTest.java  |    2 +-
 .../geode/security/PostProcessorDUnitTest.java     |    2 +-
 .../security/SecurityClusterConfigDUnitTest.java   |   14 +-
 .../SecurityWithoutClusterConfigDUnitTest.java     |    5 +-
 .../security/StartServerAuthorizationTest.java     |    2 +-
 .../query/PdxQuerySecurityDistributedTest.java     |    2 +-
 ...erySecurityForbiddenQueriesDistributedTest.java |    2 +-
 .../cache/RebalanceOperationComplex-client.xml     |   35 +
 .../cache/RebalanceOperationComplex-server.xml     |   48 +
 .../java/org/apache/geode/CopyJUnitTest.java       |  136 +-
 .../apache/geode/DiskInstantiatorsJUnitTest.java   |   54 +-
 .../apache/geode/JtaNoninvolvementJUnitTest.java   |   33 +-
 .../org/apache/geode/SetOperationTXJUnitTest.java  |   27 +-
 .../apache/geode/TXExpirationIntegrationTest.java  |    8 +-
 .../java/org/apache/geode/TXJUnitTest.java         | 3174 ++++++++++----------
 .../java/org/apache/geode/TXWriterJUnitTest.java   |  135 +-
 .../org/apache/geode/TXWriterOOMEJUnitTest.java    |   19 +-
 .../internal/BindDistributedSystemJUnitTest.java   |   12 +-
 .../internal/CacheHealthEvaluatorJUnitTest.java    |   10 +-
 .../internal/MemberHealthEvaluatorJUnitTest.java   |    4 +-
 .../DeprecatedAgentLauncherIntegrationTest.java    |    6 +-
 .../apache/geode/cache/CacheListenerJUnitTest.java |  150 +-
 .../cache/ConnectionPoolFactoryJUnitTest.java      |   22 +-
 .../org/apache/geode/cache/ProxyJUnitTest.java     |  131 +-
 .../cache/RegionExpirationIntegrationTest.java     |    2 +-
 .../apache/geode/cache/RegionFactoryJUnitTest.java |  186 +-
 .../RemoveAllCacheListenerPeerRegressionTest.java  |    8 +-
 .../geode/cache/ValueConstraintRegressionTest.java |    4 +-
 ...ncEventQueueEvictionAndExpirationJUnitTest.java |   11 +-
 .../cache/client/ClientRegionFactoryJUnitTest.java |   70 +-
 .../AutoConnectionSourceImplIntegrationTest.java   |  700 +++++
 .../AutoConnectionSourceImplJUnitTest.java         |  710 -----
 .../internal/ConnectionPoolImplJUnitTest.java      |   18 +-
 .../client/internal/QueueManagerJUnitTest.java     |   28 +-
 .../ConnectionAccountingConcurrentTest.java        |   12 +-
 .../pooling/ConnectionManagerImplTest.java         |   16 +-
 .../cache/execute/CoreFunctionSecurityTest.java    |    2 +-
 .../execute/FunctionDynamicByArgsSecurityTest.java |    2 +-
 .../FunctionToFileTrackerIntegrationTest.java      |   62 +-
 .../mapInterface/ExceptionHandlingJUnitTest.java   |    4 +-
 .../cache/mapInterface/MapFunctionalJUnitTest.java |    8 +-
 .../mapInterface/PutAllGlobalLockJUnitTest.java    |   18 +-
 .../operations/PutOperationContextJUnitTest.java   |   14 +-
 .../cache/query/JoinQueriesIntegrationTest.java    |    6 +-
 .../cache/query/LocalQueryServiceJUnitTest.java    |   24 +-
 .../geode/cache/query/PdxStringQueryJUnitTest.java |   51 +-
 .../apache/geode/cache/query/QueryJUnitTest.java   |   23 +-
 .../geode/cache/query/QueryServiceJUnitTest.java   |    6 +-
 .../cache/query/QueryServiceRegressionTest.java    |   18 +-
 .../geode/cache/query/QueryTestUtilsJUnitTest.java |    2 +-
 .../QueryWithBucketParameterIntegrationTest.java   |    2 +-
 .../apache/geode/cache/query/RegionJUnitTest.java  |   39 +-
 .../geode/cache/query/TypedIteratorJUnitTest.java  |   12 +-
 .../functional/ComparisonOperatorsJUnitTest.java   |   42 +-
 .../DistinctAndNonDistinctQueryJUnitTest.java      |   30 +-
 ...tinctResultsWithDupValuesInRegionJUnitTest.java |    8 +-
 .../cache/query/functional/FunctionJUnitTest.java  |   48 +-
 .../query/functional/INOperatorJUnitTest.java      |   50 +-
 .../query/functional/IUM6Bug32345ReJUnitTest.java  |   16 +-
 .../geode/cache/query/functional/IUMJUnitTest.java |   15 +-
 .../functional/IUMRCompositeIteratorJUnitTest.java |   20 +-
 .../IUMRMultiIndexesMultiRegionJUnitTest.java      |   83 +-
 .../functional/IUMRShuffleIteratorsJUnitTest.java  |   30 +-
 .../functional/IUMRSingleRegionJUnitTest.java      |   58 +-
 ...IndependentOperandsInWhereClause2JUnitTest.java |    6 +-
 .../functional/IndexCreationDeadLockJUnitTest.java |   38 +-
 .../query/functional/IndexCreationJUnitTest.java   |   54 +-
 .../query/functional/IndexOnEntrySetJUnitTest.java |   39 +-
 .../query/functional/IndexOperatorJUnitTest.java   |   50 +-
 .../functional/IndexPrimaryKeyUsageJUnitTest.java  |   20 +-
 .../IndexUsageInNestedQueryJUnitTest.java          |    4 +-
 ...IndexUsageInNestedQueryWithParamsJUnitTest.java |    6 +-
 .../IndexUsageWithAliasAsProjAtrbtJUnitTest.java   |   10 +-
 .../IndexUseMultFrmSnglCondJUnitTest.java          |   14 +-
 .../IndexWithSngleFrmAndMultCondQryJUnitTest.java  |  204 +-
 .../functional/IteratorTypeDefEmpJUnitTest.java    |    6 +-
 .../query/functional/IteratorTypeDefJUnitTest.java |   24 +-
 .../IteratorTypeDefaultTypesJUnitTest.java         |  122 +-
 .../functional/IumMultConditionJUnitTest.java      |   16 +-
 .../query/functional/LikePredicateJUnitTest.java   |  127 +-
 .../query/functional/LimitClauseJUnitTest.java     |   68 +-
 .../functional/LogicalOperatorsJUnitTest.java      |   52 +-
 .../cache/query/functional/MiscJUnitTest.java      |  120 +-
 .../functional/MultiIndexCreationJUnitTest.java    |   18 +-
 .../functional/MultiRegionIndexUsageJUnitTest.java |   74 +-
 .../query/functional/MultipleRegionsJUnitTest.java |    4 +-
 .../functional/NegativeNumberQueriesJUnitTest.java |    2 +-
 .../query/functional/NestedQueryJUnitTest.java     |   20 +-
 .../NonDistinctOrderByPartitionedJUnitTest.java    |    8 +-
 .../NonDistinctOrderByReplicatedJUnitTest.java     |   52 +-
 .../query/functional/NumericQueryJUnitTest.java    |   24 +-
 .../functional/OrderByReplicatedJUnitTest.java     |   70 +-
 .../functional/ParameterBindingJUnitTest.java      |   20 +-
 .../query/functional/PdxOrderByJUnitTest.java      |    8 +-
 .../functional/QRegionInterfaceJUnitTest.java      |   18 +-
 .../QueryREUpdateInProgressJUnitTest.java          |    6 +-
 .../query/functional/QueryUndefinedJUnitTest.java  |    6 +-
 .../functional/ReservedKeywordsJUnitTest.java      |   10 +-
 .../ResultsDataSerializabilityJUnitTest.java       |    5 +-
 .../query/functional/SelectToDateJUnitTest.java    |   26 +-
 .../functional/StructMemberAccessJUnitTest.java    |   36 +-
 .../TestNewFunctionSSorRSIntegrationTest.java      |    4 +-
 .../CompiledGroupBySelectIntegrationTest.java      |    4 +-
 .../CompiledJunctionInternalsJUnitTest.java        | 1114 ++++---
 .../query/internal/CopyOnReadQueryJUnitTest.java   |   30 +-
 .../DefaultQuerySecurityIntegrationTest.java       |   14 +-
 .../internal/GroupJunctionIntegrationTest.java     |    4 +-
 .../query/internal/IndexManagerJUnitTest.java      |    6 +-
 .../query/internal/OrderByComparatorJUnitTest.java |   16 +-
 .../internal/ProjectionAttributeJUnitTest.java     |   17 +-
 .../QueryFromClauseCanonicalizationJUnitTest.java  |    8 +-
 .../query/internal/QueryObserverCallbacksTest.java |    2 +-
 .../internal/QueryServiceXmlIntegrationTest.java   |    6 +-
 .../cache/query/internal/QueryTraceJUnitTest.java  |   21 +-
 .../cache/query/internal/QueryUtilsJUnitTest.java  |   21 +-
 .../AggregateFunctionQueryBaseIntegrationTest.java |    4 +-
 .../internal/aggregate/AvgIntegrationTest.java     |    4 +-
 .../internal/aggregate/CountIntegrationTest.java   |    4 +-
 .../internal/aggregate/MaxIntegrationTest.java     |    4 +-
 .../internal/aggregate/MinIntegrationTest.java     |    4 +-
 .../internal/aggregate/SumIntegrationTest.java     |    4 +-
 .../index/AsynchIndexMaintenanceJUnitTest.java     |   49 +-
 .../internal/index/CompactRangeIndexJUnitTest.java |   50 +-
 .../CompactRangeIndexQueryIntegrationTest.java     |    2 +-
 .../index/DeclarativeIndexCreationJUnitTest.java   |    6 +-
 .../internal/index/EquiJoinIntegrationTest.java    |   10 +-
 .../index/HashIndexQueryIntegrationTest.java       |   51 +-
 .../index/IndexCreationInternalsJUnitTest.java     |   26 +-
 .../internal/index/IndexMaintainceJUnitTest.java   |  471 ---
 .../internal/index/IndexMaintenanceJUnitTest.java  |  339 ++-
 .../index/IndexManagerIntegrationTest.java         |   10 +-
 .../index/IndexTrackingQueryObserverJUnitTest.java |   10 +-
 .../query/internal/index/IndexUseJUnitTest.java    |  145 +-
 .../IndexedMergeEquiJoinScenariosJUnitTest.java    |   16 +-
 .../internal/index/MapIndexStoreJUnitTest.java     |   14 +-
 .../NewDeclarativeIndexCreationJUnitTest.java      |   42 +-
 .../internal/index/PartitionedIndexJUnitTest.java  |    4 +-
 .../index/PdxCopyOnReadQueryJUnitTest.java         |    2 +-
 .../QueryOnCompressedRegionWithIndexTest.java      |   48 +-
 .../internal/index/RangeIndexAPIJUnitTest.java     |  125 +-
 .../query/partitioned/PRColocatedEquiJoinTest.java |    2 +-
 .../query/partitioned/PRInvalidQueryJUnitTest.java |    2 +-
 .../partitioned/PRQueryCacheClosedJUnitTest.java   |    4 +-
 .../partitioned/PRQueryNumThreadsJUnitTest.java    |    4 +-
 .../partitioned/PRQueryRegionClosedJUnitTest.java  |    8 +-
 .../PRQueryRegionDestroyedJUnitTest.java           |  109 +-
 .../query/transaction/QueryAndJtaJUnitTest.java    |   14 +-
 .../cache/snapshot/CacheSnapshotJUnitTest.java     |    4 +-
 .../cache/snapshot/RegionSnapshotJUnitTest.java    |   12 +-
 .../AnalyzeCoreSerializablesIntegrationTest.java   |   37 +
 .../AnalyzeCoreSerializablesJUnitTest.java         |   28 -
 .../RestrictUseOfInetAddressJUnitTest.java         |    2 +-
 .../LauncherMemberMXBeanIntegrationTest.java       |    2 +-
 .../geode/distributed/LocatorIntegrationTest.java  |  180 +-
 ...catorLauncherJmxManagerLocalRegressionTest.java |   22 +-
 .../LocatorLauncherLocalIntegrationTest.java       |    2 +-
 .../LocatorLauncherRemoteIntegrationTest.java      |    2 +-
 .../LocatorLauncherRemoteIntegrationTestCase.java  |   12 +-
 .../ServerLauncherLocalIntegrationTest.java        |    2 +-
 .../ServerLauncherRemoteIntegrationTest.java       |    2 +-
 .../ServerLauncherRemoteIntegrationTestCase.java   |   12 +-
 .../DefaultPropertiesGeneratorIntegrationTest.java |   40 +-
 .../DistributionAdvisorIntegrationTest.java        |   11 +-
 ...nalDistributedSystemBuilderIntegrationTest.java |   44 +-
 .../InternalDistributedSystemIntegrationTest.java  |  755 ++++-
 .../InternalDistributedSystemJUnitTest.java        |  919 ------
 .../LocatorLoadSnapshotIntegrationTest.java        |    5 +-
 .../deadlock/DeadlockDetectorIntegrationTest.java  |    2 +-
 .../locks/DLockReentrantLockJUnitTest.java         |    2 +-
 .../internal/membership/MembershipJUnitTest.java   |   14 +-
 .../api/CoreOnlyUsesMembershipAPIArchUnitTest.java |    8 +-
 .../tcpserver/TCPClientSSLIntegrationTest.java     |   69 +-
 .../tcpserver/TCPServerSSLInegrationTest.java      |  163 +
 .../internal/tcpserver/TCPServerSSLJUnitTest.java  |  167 -
 .../org/apache/geode/disttx/DistTXJUnitTest.java   |   14 +-
 .../apache/geode/disttx/DistTXWriterJUnitTest.java |    8 +-
 .../geode/disttx/DistTXWriterOOMEJUnitTest.java    |    8 +-
 .../org/apache/geode/disttx/PRDistTXJUnitTest.java |   14 +-
 .../AvailablePortHelperIntegrationTest.java        |   53 +-
 ...ctionedSerializablesServiceIntegrationTest.java |   39 +
 .../apache/geode/internal/InlineKeyJUnitTest.java  |    4 +-
 .../geode/internal/PdxDeleteFieldJUnitTest.java    |   17 +-
 .../apache/geode/internal/PdxRenameJUnitTest.java  |   10 +-
 .../apache/geode/internal/SSLConfigJUnitTest.java  |    2 +-
 ...edThreadPoolExecutorWithKeepAliveJUnitTest.java |  157 +-
 .../CacheDistributionAdvisorConcurrentTest.java    |    4 +-
 .../cache/CacheLifecycleListenerJUnitTest.java     |   12 +-
 ...tMessagesRegionCreationAndDestroyJUnitTest.java |    4 +-
 .../ClusterConfigurationLoaderIntegrationTest.java |    2 +-
 .../cache/CompactOfflineDiskStoreJUnitTest.java    |    2 +-
 .../internal/cache/ComplexDiskRegionJUnitTest.java |    2 +-
 ...urrentFlushingAndRegionOperationsJUnitTest.java |    2 +-
 .../cache/ConcurrentMapLocalJUnitTest.java         |   18 +-
 .../cache/ConcurrentRegionOperationsJUnitTest.java |  145 +-
 ...currentRollingAndRegionOperationsJUnitTest.java |   54 +-
 .../geode/internal/cache/ConflationJUnitTest.java  |   40 +-
 .../geode/internal/cache/DiskIFJUnitTest.java      |    8 +-
 .../internal/cache/DiskInitFileJUnitTest.java      |   72 +
 .../cache/DiskLruRegRecoveryJUnitTest.java         |   10 +-
 .../geode/internal/cache/DiskOldAPIsJUnitTest.java |   12 +-
 .../DiskRandomOperationsAndRecoveryJUnitTest.java  |   75 +-
 .../internal/cache/DiskRegCacheXmlJUnitTest.java   |   37 +-
 .../cache/DiskRegCachexmlGeneratorJUnitTest.java   |    4 +-
 .../DiskRegOplogSwtchingAndRollerJUnitTest.java    |   76 +-
 .../internal/cache/DiskRegRecoveryJUnitTest.java   |  232 +-
 .../cache/DiskRegionAsyncRecoveryJUnitTest.java    |    8 +-
 ...iskRegionChangingRegionAttributesJUnitTest.java |    4 +-
 .../internal/cache/DiskRegionClearJUnitTest.java   |   17 +-
 ...ctorClearOplogAfterRecoveryIntegrationTest.java |  182 ++
 .../DiskRegionIllegalArguementsJUnitTest.java      |   26 +-
 .../cache/DiskStoreFactoryIntegrationTest.java     |    8 +-
 .../cache/DiskStoreImplIntegrationTest.java        |   17 +
 .../geode/internal/cache/FaultingInJUnitTest.java  |   24 +-
 .../LIFOEvictionAlgoEnabledRegionJUnitTest.java    |   68 +-
 ...FOEvictionAlgoMemoryEnabledRegionJUnitTest.java |   52 +-
 .../internal/cache/MapInterface2JUnitTest.java     |   38 +-
 .../internal/cache/MapInterfaceJUnitTest.java      |   52 +-
 .../MultipleOplogsRollingFeatureJUnitTest.java     |   16 +-
 .../internal/cache/OfflineSnapshotJUnitTest.java   |   11 +-
 .../geode/internal/cache/OplogFlushTest.java       |    2 +-
 .../geode/internal/cache/OplogJUnitTest.java       |   36 +-
 .../geode/internal/cache/OplogRVVJUnitTest.java    |    2 +
 .../internal/cache/OverflowOplogFlushTest.java     |    2 +-
 .../internal/cache/PRDataStoreMemoryJUnitTest.java |   34 +-
 .../apache/geode/internal/cache/PRTXJUnitTest.java |   16 +-
 .../cache/PartitionedRegionCreationJUnitTest.java  |   36 +-
 .../cache/PartitionedRegionDataStoreJUnitTest.java |   22 +-
 ...itionedRegionQueryEvaluatorIntegrationTest.java |   21 +-
 ...rtitionedRegionSerializableObjectJUnitTest.java |   22 +-
 ...itionedRegionSingleNodeOperationsJUnitTest.java |  189 +-
 .../cache/PartitionedRegionStatsJUnitTest.java     |   14 +-
 .../PersistentPartitionedRegionJUnitTest.java      |    6 +-
 .../internal/cache/PoolManagerIntegrationTest.java |  195 ++
 .../cache/ReplaceWithOverflowJUnitTest.java        |    2 +-
 .../internal/cache/SimpleDiskRegionJUnitTest.java  |   34 +-
 .../cache/TXDetectReadConflictJUnitTest.java       |   18 +-
 .../internal/cache/TXManagerImplJUnitTest.java     |  162 +-
 .../internal/cache/TXReservationMgrJUnitTest.java  |   47 +-
 .../internal/cache/TombstoneCreationJUnitTest.java |    4 +-
 .../internal/cache/UpdateVersionJUnitTest.java     |   10 +-
 .../cache/backup/BackupIntegrationTest.java        |    2 +-
 .../cache/backup/FileSystemBackupWriterTest.java   |    4 +-
 .../backup/IncrementalBackupIntegrationTest.java   |    4 +-
 .../cache/control/MemoryMonitorJUnitTest.java      |   38 +-
 .../control/MemoryMonitorOffHeapJUnitTest.java     |   26 +-
 .../DiskRegOverflowAsyncGetInMemPerfJUnitTest.java |    8 +-
 .../DiskRegOverflowAsyncJUnitPerformanceTest.java  |   10 +-
 ...erflowSyncGetInMemPerfJUnitPerformanceTest.java |    8 +-
 .../DiskRegOverflowSyncJUnitPerformanceTest.java   |   12 +-
 ...skRegionOverflowAsyncRollingOpLogJUnitTest.java |    8 +-
 ...iskRegionOverflowSyncRollingOpLogJUnitTest.java |    4 +-
 .../DiskRegionPersistOnlySyncJUnitTest.java        |    6 +-
 .../DiskRegionRollOpLogJUnitPerformanceTest.java   |    8 +-
 .../MultiThreadedOplogPerJUnitPerformanceTest.java |   10 +-
 .../DistributedEventTrackerIntegrationTest.java    |    4 +-
 .../cache/eviction/EvictionIntegrationTest.java    |    3 +-
 .../ha/BlockingHARQAddOperationJUnitTest.java      |   12 +-
 .../cache/ha/BlockingHARegionJUnitTest.java        |  177 +-
 .../cache/ha/BlockingHARegionQueueJUnitTest.java   |    6 +-
 .../cache/ha/HARQAddOperationJUnitTest.java        |   97 +-
 .../geode/internal/cache/ha/HARegionJUnitTest.java |    2 +-
 .../cache/ha/HARegionQueueIntegrationTest.java     |   10 +-
 .../internal/cache/ha/HARegionQueueJUnitTest.java  |   16 +-
 .../cache/ha/HARegionQueueStartStopJUnitTest.java  |    6 +-
 .../DestroyEntryDuringCloseIntegrationTest.java    |    4 +-
 .../DefaultDiskDirsIntegrationTest.java            |    4 +-
 .../cache/tier/sockets/CacheClientProxyTest.java   |   83 +-
 .../CacheServerMaxConnectionsJUnitTest.java        |   26 +-
 .../ClientHealthMonitorIntegrationTest.java        |   30 +-
 .../tier/sockets/ConnectionProxyJUnitTest.java     |   36 +-
 .../sockets/CqNameToOpHashMapIntegrationTest.java  |    2 +-
 .../sockets/FilterProfileIntegrationJUnitTest.java |   17 +-
 .../sockets/ServerConnectionIntegrationTest.java   |    2 +-
 .../RegionVersionVectorIntegrationTest.java        |    2 +-
 ...GatewaySenderEventProcessorIntegrationTest.java |    8 +-
 .../AsyncEventQueueValidationsJUnitTest.java       |   11 +-
 ...elGatewaySenderFlushedCoordinatorJUnitTest.java |   24 +-
 .../cache/xmlcache/CacheXmlParserJUnitTest.java    |    4 +-
 .../classloader/ClassPathLoaderDeployTest.java     |    4 +-
 .../ClassPathLoaderIntegrationTest.java            |   86 +-
 .../classloader/ClassPathLoaderJUnitTest.java      |    4 +-
 .../datasource/ConnectionPoolingJUnitTest.java     |   15 +-
 ...emFireTransactionDataSourceIntegrationTest.java |    4 +-
 ...hChildrenRollingFileHandlerIntegrationTest.java |   44 +-
 .../internal/jta/BlockingTimeOutJUnitTest.java     |    4 +-
 .../geode/internal/jta/DataSourceJTAJUnitTest.java |    1 -
 .../internal/jta/SetOperationJTAJUnitTest.java     |   33 +-
 .../internal/jta/TransactionTimeOutJUnitTest.java  |   12 +-
 ...TransactionTimeoutExceptionIntegrationTest.java |    6 +-
 .../internal/jta/functional/CacheJUnitTest.java    |  232 +-
 .../net/ClientSocketFactoryIntegrationTest.java    |    6 +-
 .../SSLConfigurationFactoryIntegrationTest.java    |   69 +
 .../internal/net/SSLSocketIntegrationTest.java     |   64 +-
 .../internal/net/SocketCloserIntegrationTest.java  |   26 +-
 .../internal/net/SocketCreatorFailHandshake.java   |    4 +-
 .../internal/net/SocketCreatorIntegrationTest.java |  165 +
 .../geode/internal/offheap/InlineKeyJUnitTest.java |    4 +-
 .../MemoryAllocatorFillPatternIntegrationTest.java |   42 +-
 .../internal/offheap/OffHeapIndexJUnitTest.java    |   12 +-
 .../geode/internal/offheap/OffHeapRegionBase.java  |   77 +-
 .../offheap/OffHeapValidationJUnitTest.java        |   49 +-
 .../FileProcessControllerIntegrationTest.java      |    2 +-
 ...SecurityServiceFactoryShiroIntegrationTest.java |    4 +-
 ...cherGlobalSerialFilterBlankIntegrationTest.java |   55 +
 ...herGlobalSerialFilterExistsIntegrationTest.java |   55 +
 ...rLauncherGlobalSerialFilterIntegrationTest.java |   52 +
 ...alSerialFilterPropertyBlankIntegrationTest.java |   54 +
 ...alSerialFilterPropertyEmptyIntegrationTest.java |   54 +
 ...atorLauncherJmxSerialFilterIntegrationTest.java |   84 +
 ...mxSerialFilterPropertyBlankIntegrationTest.java |   88 +
 ...mxSerialFilterPropertyEmptyIntegrationTest.java |   88 +
 ...xSerialFilterPropertyExistsIntegrationTest.java |   90 +
 .../filter/LocatorLauncherWithJmxManager.java      |   82 +
 .../filter/SerialFilterAssertions.java             |   58 +
 ...cherGlobalSerialFilterBlankIntegrationTest.java |   55 +
 ...herGlobalSerialFilterExistsIntegrationTest.java |   55 +
 ...rLauncherGlobalSerialFilterIntegrationTest.java |   51 +
 ...alSerialFilterPropertyBlankIntegrationTest.java |   53 +
 ...alSerialFilterPropertyEmptyIntegrationTest.java |   53 +
 ...rverLauncherJmxSerialFilterIntegrationTest.java |   87 +
 ...mxSerialFilterPropertyBlankIntegrationTest.java |   88 +
 ...mxSerialFilterPropertyEmptyIntegrationTest.java |   88 +
 ...xSerialFilterPropertyExistsIntegrationTest.java |   90 +
 .../filter/ServerLauncherWithJmxManager.java       |   77 +
 ...DistributedSystemStatisticsIntegrationTest.java |  125 +-
 ...ributedSystemStatisticsTypeIntegrationTest.java |   12 +-
 .../statistics/FileSizeLimitIntegrationTest.java   |   67 +-
 .../GemFireStatSamplerIntegrationTest.java         |    1 -
 .../internal/statistics/LinuxSystemStatsTest.java  |    8 +-
 .../SimpleStatSamplerIntegrationTest.java          |   50 +-
 .../StatArchiveHandlerIntegrationTest.java         |  104 +-
 ...rchiveWithConsecutiveResourceInstGenerator.java |   49 +-
 ...veWithConsecutiveResourceInstGeneratorTest.java |    8 +-
 ...WithConsecutiveResourceInstIntegrationTest.java |   19 +-
 .../StatArchiveWriterReaderIntegrationTest.java    |  220 +-
 .../statistics/StatSamplerIntegrationTest.java     |   26 +-
 .../StatTypesAreRolledOverRegressionTest.java      |   52 +-
 .../internal/stats50/AtomicStatsJUnitTest.java     |    2 +-
 .../internal/util/ProductVersionUtilTest.java      |   87 +
 .../ConcurrentHashMapIteratorJUnitTest.java        |    8 +-
 .../concurrent/CopyOnWriteHashMapJUnitTest.java    |    8 +-
 .../concurrent/cm/ConcurrentHashMapJUnitTest.java  |   50 +-
 .../concurrent/cm/CountedMapLoopsJUnitTest.java    |    2 +-
 .../util/concurrent/cm/IntMapCheckJUnitTest.java   |   31 +-
 .../util/concurrent/cm/MapCheckJUnitTest.java      |   29 +-
 .../util/concurrent/cm/MapLoopsJUnitTest.java      |    2 +-
 .../util/concurrent/cm/RLJBarJUnitTest.java        |    8 +-
 .../redaction/ArgumentRedactorIntegrationTest.java |   52 +
 .../bean/stats/AsyncEventQueueStatsJUnitTest.java  |    2 +-
 .../management/bean/stats/DiskStatsJUnitTest.java  |    2 +-
 .../stats/DistributedSystemStatsJUnitTest.java     |   16 +-
 .../bean/stats/GatewayMBeanBridgeJUnitTest.java    |    2 +-
 ...erConfiguresJmxSerialFilterIntegrationTest.java |  204 --
 .../internal/ManagementAgentIntegrationTest.java   |  150 +
 ...erConfiguresJmxSerialFilterIntegrationTest.java |  201 --
 .../internal/beans/ManagementAdapterTest.java      |    4 +-
 .../internal/configuration/ZipUtilsJUnitTest.java  |   14 +-
 .../utils/XmlUtilsAddNewNodeJUnitTest.java         |   22 +-
 .../internal/deployment/FunctionScannerTest.java   |    2 +-
 .../internal/security/CliCommandsSecurityTest.java |    2 +-
 .../security/DeployCommandsSecurityTest.java       |    2 +-
 .../security/GatewayReceiverMBeanSecurityTest.java |    2 +-
 .../security/GatewaySenderMBeanSecurityTest.java   |    2 +-
 .../internal/security/JmxCredentialTypeTest.java   |    2 +-
 .../LockServiceMBeanAuthorizationJUnitTest.java    |    2 +-
 ...urityServiceWithCustomRealmIntegrationTest.java |    8 +-
 ...SecurityServiceWithShiroIniIntegrationTest.java |   72 +-
 .../SecurityWithExpirationIntegrationTest.java     |   79 +
 .../ReadOpFileAccessControllerJUnitTest.java       |   17 +-
 ...SSLSocketParameterExtensionIntegrationTest.java |   44 +-
 .../geode/pdx/AutoSerializableJUnitTest.java       |  110 +-
 .../org/apache/geode/pdx/ByteSourceJUnitTest.java  |   64 +-
 .../geode/pdx/JSONFormatterBasicJUnitTest.java     |    4 +-
 .../apache/geode/pdx/JSONFormatterJUnitTest.java   |    4 +-
 .../geode/pdx/PdxInstanceFactoryJUnitTest.java     |  143 +-
 .../apache/geode/pdx/PdxSerializableJUnitTest.java |  345 ++-
 .../org/apache/geode/pdx/PdxStringJUnitTest.java   |   10 +-
 .../geode/pdx/internal/MultipleCacheJUnitTest.java |    2 +-
 .../CacheFactoryWithSecurityObjectTest.java        |   52 +-
 .../geode/security/ExampleSecurityManagerTest.java |   34 +-
 .../test/process/ProcessWrapperJUnitTest.java      |   16 +-
 ....apache.geode.internal.version.ComponentVersion |   16 +
 ...ache.geode.internal.version.DistributionVersion |   16 +
 .../apache/geode/codeAnalysis/excludedClasses.txt  |    3 +
 .../codeAnalysis/sanctionedDataSerializables.txt   |  131 +-
 .../geode/internal/logging/dir1/systemlog.txt      |    2 +-
 .../geode/internal/logging/dir2/systemlog.txt      |    2 +-
 .../{test => integrationTest}/resources/shiro.ini  |    0
 .../geode/internal/ra/GFConnectionFactoryImpl.java |    4 +-
 .../apache/geode/internal/ra/GFConnectionImpl.java |    8 +-
 .../geode/internal/ra/spi/JCALocalTransaction.java |   70 +-
 .../internal/ra/spi/JCAManagedConnection.java      |   84 +-
 .../ra/spi/JCAManagedConnectionFactory.java        |   22 +-
 .../ra/spi/JCAManagedConnectionMetaData.java       |    6 +-
 .../EvictionWithPartiallyMarkedListsBenchmark.java |    2 +-
 .../rebalance/RebalanceModelBuilder.java           |   14 +-
 .../ConcurrentHashMapObjectBenchmark.java          |  375 +++
 .../util/concurrent/MpmcFifoQueueBenchmark.java    |  275 ++
 .../util/concurrent/MpmcLifoQueueBenchmark.java    |  300 ++
 .../internal/util/concurrent/MpmcMapBenchmark.java |  196 ++
 .../util/concurrent/MpmcMapLongBenchmark.java      |  179 ++
 .../util/concurrent/SpmcFifoQueueBenchmark.java    |  338 +++
 .../src/main/java/org/apache/geode/CopyHelper.java |   12 +-
 .../main/java/org/apache/geode/DataSerializer.java |    6 +-
 .../org/apache/geode/GemFireCheckedException.java  |    8 +-
 .../java/org/apache/geode/GemFireException.java    |    4 +-
 .../main/java/org/apache/geode/Instantiator.java   |   16 +-
 .../java/org/apache/geode/admin/AdminConfig.java   |    8 +-
 .../java/org/apache/geode/admin/AlertLevel.java    |   23 +-
 .../java/org/apache/geode/admin/GemFireHealth.java |   12 +-
 .../apache/geode/admin/GemFireMemberStatus.java    |  213 +-
 .../geode/admin/RegionSubRegionSnapshot.java       |   41 +-
 .../org/apache/geode/admin/SystemMemberType.java   |   17 +-
 .../admin/internal/AbstractHealthEvaluator.java    |   16 +-
 .../admin/internal/AdminDistributedSystemImpl.java |  467 ++-
 .../geode/admin/internal/BackupStatusImpl.java     |    2 +-
 .../admin/internal/CacheHealthConfigImpl.java      |    8 +-
 .../geode/admin/internal/CacheHealthEvaluator.java |   60 +-
 .../admin/internal/CacheServerConfigImpl.java      |   35 +-
 .../geode/admin/internal/CacheServerImpl.java      |   50 +-
 .../admin/internal/ConfigurationParameterImpl.java |   56 +-
 .../internal/DistributedSystemConfigImpl.java      |  279 +-
 .../DistributedSystemHealthConfigImpl.java         |    2 +-
 .../internal/DistributedSystemHealthEvaluator.java |   24 +-
 .../internal/DistributedSystemHealthMonitor.java   |   59 +-
 .../internal/DistributionLocatorConfigImpl.java    |   36 +-
 .../admin/internal/DistributionLocatorImpl.java    |   91 +-
 .../internal/EnabledManagedEntityController.java   |   13 +-
 .../admin/internal/GemFireHealthConfigImpl.java    |   10 +-
 .../admin/internal/GemFireHealthEvaluator.java     |   53 +-
 .../geode/admin/internal/GemFireHealthImpl.java    |  180 +-
 .../apache/geode/admin/internal/LogCollator.java   |   15 +-
 .../admin/internal/ManagedEntityConfigImpl.java    |   76 +-
 .../admin/internal/ManagedEntityConfigXml.java     |    8 +-
 .../internal/ManagedEntityConfigXmlGenerator.java  |   32 +-
 .../internal/ManagedEntityConfigXmlParser.java     |   26 +-
 .../admin/internal/ManagedSystemMemberImpl.java    |   68 +-
 .../admin/internal/MemberHealthConfigImpl.java     |   12 +-
 .../admin/internal/MemberHealthEvaluator.java      |   24 +-
 .../apache/geode/admin/internal/StatisticImpl.java |   10 +-
 .../admin/internal/StatisticResourceImpl.java      |   44 +-
 .../internal/SystemMemberBridgeServerImpl.java     |   72 +-
 .../admin/internal/SystemMemberCacheEventImpl.java |    6 +-
 .../internal/SystemMemberCacheEventProcessor.java  |   34 +-
 .../admin/internal/SystemMemberCacheImpl.java      |   89 +-
 .../geode/admin/internal/SystemMemberImpl.java     |   84 +-
 .../internal/SystemMemberRegionEventImpl.java      |    4 +-
 .../admin/internal/SystemMemberRegionImpl.java     |  136 +-
 .../admin/internal/SystemMembershipEventImpl.java  |    8 +-
 .../internal/AdminDistributedSystemJmxImpl.java    |  187 +-
 .../geode/admin/jmx/internal/AgentConfigImpl.java  |  285 +-
 .../apache/geode/admin/jmx/internal/AgentImpl.java |  294 +-
 .../geode/admin/jmx/internal/AgentLauncher.java    |   63 +-
 .../admin/jmx/internal/CacheServerJmxImpl.java     |   85 +-
 .../admin/jmx/internal/ConfigAttributeInfo.java    |   22 +-
 .../internal/ConfigurationParameterJmxImpl.java    |   14 +-
 .../DistributedSystemHealthConfigJmxImpl.java      |   22 +-
 .../jmx/internal/DistributionLocatorJmxImpl.java   |   38 +-
 .../admin/jmx/internal/DynamicManagedBean.java     |   50 +-
 .../jmx/internal/GemFireHealthConfigJmxImpl.java   |   36 +-
 .../admin/jmx/internal/GemFireHealthJmxImpl.java   |   18 +-
 .../admin/jmx/internal/GenerateMBeanHTML.java      |   38 +-
 .../geode/admin/jmx/internal/MBeanUtils.java       |   77 +-
 .../geode/admin/jmx/internal/MX4JModelMBean.java   |   53 +-
 .../jmx/internal/MX4JServerSocketFactory.java      |    8 +-
 .../geode/admin/jmx/internal/MailManager.java      |   62 +-
 .../admin/jmx/internal/ManagedResourceType.java    |   30 +-
 .../jmx/internal/MemberInfoWithStatsMBean.java     |  141 +-
 .../admin/jmx/internal/RMIRegistryService.java     |    4 +-
 .../jmx/internal/RefreshNotificationType.java      |   18 +-
 .../admin/jmx/internal/StatAlertNotification.java  |   40 +-
 .../admin/jmx/internal/StatisticAttributeInfo.java |   22 +-
 .../jmx/internal/StatisticResourceJmxImpl.java     |   62 +-
 .../internal/SystemMemberBridgeServerJmxImpl.java  |   22 +-
 .../jmx/internal/SystemMemberCacheJmxImpl.java     |   52 +-
 .../geode/admin/jmx/internal/SystemMemberJmx.java  |    8 +-
 .../admin/jmx/internal/SystemMemberJmxImpl.java    |   57 +-
 .../jmx/internal/SystemMemberRegionJmxImpl.java    |   26 +-
 .../org/apache/geode/cache/AttributesFactory.java  |  473 ++-
 .../java/org/apache/geode/cache/CacheCallback.java |    2 +-
 .../org/apache/geode/cache/CacheException.java     |    4 +-
 .../apache/geode/cache/CacheExistsException.java   |    2 +-
 .../apache/geode/cache/CacheRuntimeException.java  |    4 +-
 .../geode/cache/CacheTransactionManager.java       |    4 +-
 .../geode/cache/CommitDistributionException.java   |    2 +-
 .../java/org/apache/geode/cache/DataPolicy.java    |   78 +-
 .../java/org/apache/geode/cache/Declarable.java    |    4 +-
 .../apache/geode/cache/DiskAccessException.java    |    4 +-
 .../org/apache/geode/cache/DiskStoreFactory.java   |    2 +-
 .../geode/cache/DiskWriteAttributesFactory.java    |   42 +-
 .../apache/geode/cache/DynamicRegionFactory.java   |  122 +-
 .../apache/geode/cache/EntryExistsException.java   |    2 +-
 .../org/apache/geode/cache/EvictionAlgorithm.java  |    2 +-
 .../org/apache/geode/cache/EvictionAttributes.java |   26 +-
 .../org/apache/geode/cache/ExpirationAction.java   |    4 +-
 .../apache/geode/cache/ExpirationAttributes.java   |   40 +-
 .../org/apache/geode/cache/InterestPolicy.java     |    2 +-
 .../apache/geode/cache/InterestResultPolicy.java   |    4 +-
 .../java/org/apache/geode/cache/LossAction.java    |    8 +-
 .../org/apache/geode/cache/LowMemoryException.java |    6 +-
 .../apache/geode/cache/MembershipAttributes.java   |   68 +-
 .../java/org/apache/geode/cache/MirrorType.java    |    4 +-
 .../java/org/apache/geode/cache/Operation.java     |   58 +-
 .../geode/cache/PartitionAttributesFactory.java    |   34 +-
 .../main/java/org/apache/geode/cache/Region.java   |    2 +-
 .../apache/geode/cache/RegionAccessException.java  |   15 +-
 .../geode/cache/RegionDistributionException.java   |   15 +-
 .../apache/geode/cache/RegionExistsException.java  |    8 +-
 .../java/org/apache/geode/cache/RegionFactory.java |   96 +-
 .../apache/geode/cache/RegionRoleException.java    |    4 +-
 .../org/apache/geode/cache/ResumptionAction.java   |    8 +-
 .../main/java/org/apache/geode/cache/Scope.java    |   12 +-
 .../apache/geode/cache/SubscriptionAttributes.java |   24 +-
 .../asyncqueue/internal/AsyncEventQueueImpl.java   |   14 +-
 .../internal/ParallelAsyncEventQueueImpl.java      |   49 +-
 .../internal/SerialAsyncEventQueueImpl.java        |   60 +-
 .../geode/cache/client/internal/AbstractOp.java    |   70 +-
 .../geode/cache/client/internal/AddPDXEnumOp.java  |    6 +-
 .../geode/cache/client/internal/AddPDXTypeOp.java  |    4 +-
 .../cache/client/internal/AuthenticateUserOp.java  |  169 +-
 .../client/internal/AutoConnectionSourceImpl.java  |  100 +-
 .../client/internal/CacheServerLoadMessage.java    |   10 +-
 .../geode/cache/client/internal/ClearOp.java       |    4 +-
 .../client/internal/ClientMetadataService.java     |  143 +-
 .../client/internal/ClientPartitionAdvisor.java    |   79 +-
 .../client/internal/ClientRegionFactoryImpl.java   |   60 +-
 .../client/internal/ClientSideHandshakeImpl.java   |    9 +-
 .../cache/client/internal/CloseConnectionOp.java   |    4 +-
 .../geode/cache/client/internal/CommitOp.java      |   10 +-
 .../client/internal/ConnectionFactoryImpl.java     |   50 +-
 .../cache/client/internal/ConnectionStats.java     |  652 ++--
 .../geode/cache/client/internal/ContainsKeyOp.java |   12 +-
 .../geode/cache/client/internal/DestroyOp.java     |   22 +-
 .../cache/client/internal/DestroyRegionOp.java     |    4 +-
 .../geode/cache/client/internal/Endpoint.java      |   12 +-
 .../cache/client/internal/EndpointManagerImpl.java |   35 +-
 .../client/internal/ExecuteFunctionNoAckOp.java    |   18 +-
 .../cache/client/internal/ExecuteFunctionOp.java   |   23 +-
 .../internal/ExecuteRegionFunctionNoAckOp.java     |   11 +-
 .../client/internal/ExecuteRegionFunctionOp.java   |    5 +-
 .../internal/ExecuteRegionFunctionSingleHopOp.java |   11 +-
 .../internal/ExplicitConnectionSourceImpl.java     |    4 +-
 .../geode/cache/client/internal/GetAllOp.java      |   49 +-
 .../client/internal/GetClientPRMetaDataOp.java     |    5 +-
 .../internal/GetClientPartitionAttributesOp.java   |    6 +-
 .../geode/cache/client/internal/GetEntryOp.java    |    8 +-
 .../cache/client/internal/GetEventValueOp.java     |    4 +-
 .../client/internal/GetFunctionAttributeOp.java    |    4 +-
 .../apache/geode/cache/client/internal/GetOp.java  |   24 +-
 .../cache/client/internal/GetPDXEnumByIdOp.java    |    4 +-
 .../geode/cache/client/internal/GetPDXEnumsOp.java |    6 +-
 .../cache/client/internal/GetPDXIdForEnumOp.java   |    8 +-
 .../cache/client/internal/GetPDXIdForTypeOp.java   |    8 +-
 .../cache/client/internal/GetPDXTypeByIdOp.java    |    4 +-
 .../geode/cache/client/internal/GetPDXTypesOp.java |    6 +-
 .../geode/cache/client/internal/InvalidateOp.java  |   14 +-
 .../geode/cache/client/internal/KeySetOp.java      |    6 +-
 .../cache/client/internal/LiveServerPinger.java    |    2 +-
 .../geode/cache/client/internal/MakePrimaryOp.java |    4 +-
 .../cache/client/internal/OpExecutorImpl.java      |  394 +--
 .../apache/geode/cache/client/internal/PingOp.java |    4 +-
 .../geode/cache/client/internal/PoolImpl.java      |   16 +-
 .../geode/cache/client/internal/PrimaryAckOp.java  |    9 +-
 .../geode/cache/client/internal/ProxyCache.java    |   56 +-
 .../cache/client/internal/ProxyCacheCloseOp.java   |    4 +-
 .../geode/cache/client/internal/ProxyRegion.java   |  110 +-
 .../geode/cache/client/internal/PutAllOp.java      |   97 +-
 .../apache/geode/cache/client/internal/PutOp.java  |   24 +-
 .../geode/cache/client/internal/QueryOp.java       |   37 +-
 .../cache/client/internal/QueueConnectionImpl.java |   26 +-
 .../cache/client/internal/QueueManagerImpl.java    |  100 +-
 .../cache/client/internal/QueueStateImpl.java      |   79 +-
 .../cache/client/internal/ReadyForEventsOp.java    |    4 +-
 .../client/internal/RegisterDataSerializersOp.java |   17 +-
 .../client/internal/RegisterInstantiatorsOp.java   |    7 +-
 .../client/internal/RegisterInterestListOp.java    |   44 +-
 .../cache/client/internal/RegisterInterestOp.java  |   61 +-
 .../client/internal/RegisterInterestTracker.java   |   89 +-
 .../geode/cache/client/internal/RemoveAllOp.java   |   91 +-
 .../geode/cache/client/internal/RollbackOp.java    |    8 +-
 .../cache/client/internal/ServerDenyList.java      |    2 +-
 .../geode/cache/client/internal/ServerProxy.java   |    6 +-
 .../client/internal/ServerRegionDataAccess.java    |    8 +-
 .../cache/client/internal/ServerRegionProxy.java   |  113 +-
 .../internal/SingleHopOperationCallable.java       |   13 +-
 .../apache/geode/cache/client/internal/SizeOp.java |    4 +-
 .../geode/cache/client/internal/TXFailoverOp.java  |    6 +-
 .../cache/client/internal/TXSynchronizationOp.java |   18 +-
 .../client/internal/UnregisterInterestListOp.java  |    9 +-
 .../client/internal/UnregisterInterestOp.java      |   12 +-
 .../cache/client/internal/UserAttributes.java      |   24 +-
 .../internal/locator/ClientConnectionRequest.java  |    4 +-
 .../internal/locator/ClientConnectionResponse.java |    8 +-
 .../internal/locator/ClientReplacementRequest.java |    8 +-
 .../internal/locator/GetAllServersResponse.java    |   10 +-
 .../internal/locator/LocatorListResponse.java      |   18 +-
 .../internal/locator/LocatorStatusResponse.java    |   79 +-
 .../internal/locator/QueueConnectionRequest.java   |   10 +-
 .../internal/locator/QueueConnectionResponse.java  |    8 +-
 .../pooling/AvailableConnectionManager.java        |    4 +-
 .../internal/pooling/ConnectionAccounting.java     |    4 +-
 .../internal/pooling/ConnectionManagerImpl.java    |   15 +-
 .../client/internal/pooling/PooledConnection.java  |   72 +-
 .../cache/client/proxy/SniProxySocketFactory.java  |    4 +-
 .../geode/cache/configuration/CacheConfig.java     |  212 +-
 .../configuration/CacheTransactionManagerType.java |    6 +-
 .../geode/cache/configuration/ClassNameType.java   |    2 +-
 .../geode/cache/configuration/DeclarableType.java  |    4 +-
 .../geode/cache/configuration/DiskDirType.java     |    4 +-
 .../geode/cache/configuration/DiskDirsType.java    |    2 +-
 .../geode/cache/configuration/DiskStoreType.java   |   20 +-
 .../configuration/DynamicRegionFactoryType.java    |    8 +-
 .../cache/configuration/FunctionServiceType.java   |    4 +-
 .../cache/configuration/GatewayReceiverConfig.java |   18 +-
 .../cache/configuration/JndiBindingsType.java      |   56 +-
 .../geode/cache/configuration/ObjectType.java      |    2 +-
 .../geode/cache/configuration/ParameterType.java   |    6 +-
 .../apache/geode/cache/configuration/PdxType.java  |   10 +-
 .../configuration/RegionAttributesDataPolicy.java  |    4 +-
 .../cache/configuration/RegionAttributesType.java  |  164 +-
 .../geode/cache/configuration/RegionConfig.java    |   40 +-
 .../cache/configuration/ResourceManagerType.java   |    8 +-
 .../SerializationRegistrationType.java             |   14 +-
 .../geode/cache/configuration/ServerType.java      |   38 +-
 .../geode/cache/execute/FunctionException.java     |    6 +-
 .../execute/FunctionInvocationTargetException.java |    2 +-
 .../internal/execute/FunctionToFileTracker.java    |   20 +-
 .../operations/ExecuteCQOperationContext.java      |    4 +-
 .../ExecuteFunctionOperationContext.java           |   30 +-
 .../cache/operations/InterestOperationContext.java |    6 +-
 .../geode/cache/operations/InterestType.java       |   14 +-
 .../cache/operations/KeyOperationContext.java      |   16 +-
 .../cache/operations/KeySetOperationContext.java   |    6 +-
 .../cache/operations/KeyValueOperationContext.java |    8 +-
 .../cache/operations/PutAllOperationContext.java   |    8 +-
 .../cache/operations/PutOperationContext.java      |    8 +-
 .../cache/operations/QueryOperationContext.java    |   17 +-
 .../operations/RegionCreateOperationContext.java   |    4 +-
 .../cache/operations/RegionOperationContext.java   |    8 +-
 .../RegisterInterestOperationContext.java          |    4 +-
 .../operations/RemoveAllOperationContext.java      |   10 +-
 .../internal/GetOperationContextImpl.java          |    8 +-
 .../cache/operations/internal/UpdateOnlyMap.java   |   29 +-
 .../cache/partition/PartitionRegionHelper.java     |    6 +-
 .../persistence/PartitionOfflineException.java     |    4 +-
 .../geode/cache/query/CqAttributesFactory.java     |    8 +-
 .../org/apache/geode/cache/query/IndexType.java    |    2 +-
 .../cache/query/MultiIndexCreationException.java   |    6 +-
 .../query/internal/AbstractCompiledValue.java      |   29 +-
 .../internal/AbstractGroupOrRangeJunction.java     |   99 +-
 .../cache/query/internal/AllGroupJunction.java     |   22 +-
 .../cache/query/internal/AttributeDescriptor.java  |    2 +-
 .../org/apache/geode/cache/query/internal/Bag.java |  249 +-
 .../query/internal/CompiledAggregateFunction.java  |   33 +-
 .../cache/query/internal/CompiledArithmetic.java   |    7 +-
 .../cache/query/internal/CompiledBindArgument.java |   13 +-
 .../cache/query/internal/CompiledComparison.java   |   76 +-
 .../cache/query/internal/CompiledConstruction.java |   20 +-
 .../cache/query/internal/CompiledFunction.java     |   31 +-
 .../query/internal/CompiledGroupBySelect.java      |  144 +-
 .../geode/cache/query/internal/CompiledID.java     |    8 +-
 .../geode/cache/query/internal/CompiledIn.java     |  149 +-
 .../query/internal/CompiledIndexOperation.java     |   37 +-
 .../cache/query/internal/CompiledIteratorDef.java  |   34 +-
 .../cache/query/internal/CompiledJunction.java     |  149 +-
 .../geode/cache/query/internal/CompiledLike.java   |   38 +-
 .../cache/query/internal/CompiledLiteral.java      |    4 +-
 .../cache/query/internal/CompiledNegation.java     |   13 +-
 .../cache/query/internal/CompiledOperation.java    |   70 +-
 .../geode/cache/query/internal/CompiledPath.java   |   18 +-
 .../geode/cache/query/internal/CompiledRegion.java |   14 +-
 .../geode/cache/query/internal/CompiledSelect.java |  336 +--
 .../query/internal/CompiledSortCriterion.java      |   42 +-
 .../cache/query/internal/CompiledUnaryMinus.java   |   21 +-
 .../cache/query/internal/CompiledUndefined.java    |   29 +-
 .../geode/cache/query/internal/CompiledValue.java  |    6 +-
 .../query/internal/CompositeGroupJunction.java     |  135 +-
 .../apache/geode/cache/query/internal/CqEntry.java |   16 +-
 .../cache/query/internal/CqQueryVsdStats.java      |   56 +-
 .../geode/cache/query/internal/CqStateImpl.java    |   12 +-
 .../internal/CumulativeNonDistinctResults.java     |   91 +-
 .../geode/cache/query/internal/DefaultQuery.java   |  124 +-
 .../cache/query/internal/DefaultQueryService.java  |   68 +-
 .../geode/cache/query/internal/DerivedInfo.java    |   39 +-
 .../cache/query/internal/ExecutionContext.java     |   10 +-
 .../apache/geode/cache/query/internal/Filter.java  |    3 +-
 .../geode/cache/query/internal/Functions.java      |   20 +-
 .../geode/cache/query/internal/GroupJunction.java  |    6 +-
 .../query/internal/IndexConditioningHelper.java    |   50 +-
 .../internal/IndexCutDownExpansionHelper.java      |    3 +-
 .../geode/cache/query/internal/IndexInfo.java      |   12 +-
 .../query/internal/IndexTrackingQueryObserver.java |   46 +-
 .../geode/cache/query/internal/Indexable.java      |    3 +-
 .../cache/query/internal/LinkedResultSet.java      |   19 +-
 .../cache/query/internal/LinkedStructSet.java      |   26 +-
 .../geode/cache/query/internal/MethodDispatch.java |   34 +-
 .../cache/query/internal/NWayMergeResults.java     |  171 +-
 .../cache/query/internal/ObjectIntHashMap.java     |   39 +-
 .../cache/query/internal/OrderByComparator.java    |    6 +-
 .../query/internal/OrderByComparatorMapped.java    |   18 +-
 .../cache/query/internal/PRQueryTraceInfo.java     |    5 +-
 .../geode/cache/query/internal/PathUtils.java      |   18 +-
 .../cache/query/internal/ProxyQueryService.java    |   48 +-
 .../geode/cache/query/internal/QCompiler.java      |  314 +-
 .../apache/geode/cache/query/internal/QRegion.java |  159 +-
 .../apache/geode/cache/query/internal/QScope.java  |    2 +-
 .../internal/QueryConfigurationServiceImpl.java    |   14 +-
 .../query/internal/QueryExecutionContext.java      |   18 +-
 .../cache/query/internal/QueryObserverAdapter.java |    6 +-
 .../geode/cache/query/internal/QueryUtils.java     |   34 +-
 .../geode/cache/query/internal/RangeJunction.java  |  121 +-
 .../geode/cache/query/internal/ResultsBag.java     |   72 +-
 .../ResultsCollectionCopyOnReadWrapper.java        |    7 +-
 .../ResultsCollectionPdxDeserializerWrapper.java   |   13 +-
 .../query/internal/ResultsCollectionWrapper.java   |  188 +-
 .../geode/cache/query/internal/ResultsSet.java     |   15 +-
 .../cache/query/internal/RuntimeIterator.java      |    4 +-
 .../cache/query/internal/SortedResultSet.java      |   19 +-
 .../cache/query/internal/SortedResultsBag.java     |   76 +-
 .../cache/query/internal/SortedStructBag.java      |   42 +-
 .../cache/query/internal/SortedStructSet.java      |   52 +-
 .../geode/cache/query/internal/StructBag.java      |   65 +-
 .../geode/cache/query/internal/StructImpl.java     |   53 +-
 .../geode/cache/query/internal/StructSet.java      |   97 +-
 .../internal/aggregate/AbstractAggregator.java     |    6 +-
 .../query/internal/aggregate/AvgDistinct.java      |    2 +-
 .../internal/aggregate/AvgDistinctPRQueryNode.java |    2 +-
 .../query/internal/aggregate/AvgPRQueryNode.java   |    2 +-
 .../cache/query/internal/aggregate/Count.java      |    2 +-
 .../query/internal/aggregate/CountDistinct.java    |    2 +-
 .../aggregate/CountDistinctPRQueryNode.java        |    4 +-
 .../query/internal/aggregate/CountPRQueryNode.java |    2 +-
 .../internal/aggregate/DistinctAggregator.java     |    6 +-
 .../query/internal/aggregate/SumDistinct.java      |    2 +-
 .../internal/aggregate/SumDistinctPRQueryNode.java |    4 +-
 .../cache/query/internal/cq/CqAttributesImpl.java  |   32 +-
 .../geode/cache/query/internal/cq/CqService.java   |   14 +-
 .../cache/query/internal/cq/MissingCqService.java  |   38 +-
 .../cache/query/internal/index/AbstractIndex.java  |  417 ++-
 .../query/internal/index/AbstractMapIndex.java     |  105 +-
 .../query/internal/index/CompactMapRangeIndex.java |   96 +-
 .../query/internal/index/CompactRangeIndex.java    |  287 +-
 .../cache/query/internal/index/DummyQRegion.java   |   24 +-
 .../index/FunctionalIndexCreationHelper.java       |  201 +-
 .../cache/query/internal/index/HashIndex.java      |  297 +-
 .../cache/query/internal/index/HashIndexSet.java   |   50 +-
 .../query/internal/index/IndexCreationData.java    |   48 +-
 .../query/internal/index/IndexCreationHelper.java  |   12 +-
 .../cache/query/internal/index/IndexData.java      |    6 +-
 .../cache/query/internal/index/IndexElemArray.java |   14 +-
 .../cache/query/internal/index/IndexManager.java   |  247 +-
 .../cache/query/internal/index/IndexProtocol.java  |    3 +-
 .../cache/query/internal/index/IndexStats.java     |   32 +-
 .../cache/query/internal/index/IndexUtils.java     |    3 +-
 .../cache/query/internal/index/MapIndexStore.java  |    6 +-
 .../cache/query/internal/index/MapRangeIndex.java  |   89 +-
 .../query/internal/index/MemoryIndexStore.java     |  115 +-
 .../query/internal/index/PartitionedIndex.java     |  134 +-
 .../query/internal/index/PrimaryKeyIndex.java      |   42 +-
 .../index/PrimaryKeyIndexCreationHelper.java       |   28 +-
 .../cache/query/internal/index/RangeIndex.java     |  407 ++-
 .../query/internal/parse/ASTAggregateFunc.java     |    6 +-
 .../query/internal/parse/ASTConversionExpr.java    |    2 +-
 .../geode/cache/query/internal/parse/ASTDummy.java |    2 +-
 .../cache/query/internal/parse/ASTGroupBy.java     |    2 +-
 .../geode/cache/query/internal/parse/ASTHint.java  |    2 +-
 .../query/internal/parse/ASTHintIdentifier.java    |    2 +-
 .../cache/query/internal/parse/ASTImport.java      |    2 +-
 .../geode/cache/query/internal/parse/ASTLimit.java |    2 +-
 .../cache/query/internal/parse/ASTLiteral.java     |    4 +-
 .../query/internal/parse/ASTMethodInvocation.java  |    2 +-
 .../cache/query/internal/parse/ASTOrderBy.java     |    2 +-
 .../cache/query/internal/parse/ASTSelect.java      |    2 +-
 .../query/internal/parse/ASTSortCriterion.java     |    2 +-
 .../geode/cache/query/internal/parse/ASTType.java  |   10 +-
 .../geode/cache/query/internal/parse/ASTUnary.java |    2 +-
 .../cache/query/internal/parse/UtilParser.java     |    8 +-
 .../query/internal/types/CollectionTypeImpl.java   |   12 +-
 .../cache/query/internal/types/MapTypeImpl.java    |   14 +-
 .../query/internal/types/NumericComparator.java    |    4 +-
 .../cache/query/internal/types/ObjectTypeImpl.java |   16 +-
 .../cache/query/internal/types/StructTypeImpl.java |   20 +-
 .../cache/query/internal/types/TypeUtils.java      |   25 +-
 .../cache/query/internal/utils/LimitIterator.java  |   10 +-
 .../geode/cache/query/internal/utils/PDXUtils.java |    6 +-
 .../cache/query/internal/xml/ElementType.java      |    2 +-
 .../xml/QueryMethodAuthorizerCreation.java         |    2 +-
 .../configuration/QueryConfigService.java          |   10 +-
 .../security/JavaBeanAccessorMethodAuthorizer.java |    2 +-
 .../query/security/RegExMethodAuthorizer.java      |    6 +-
 .../query/security/RestrictedMethodAuthorizer.java |   10 +-
 .../security/UnrestrictedMethodAuthorizer.java     |    2 +-
 .../org/apache/geode/cache/server/ServerLoad.java  |    9 +-
 .../server/internal/ConnectionCountProbe.java      |    2 +-
 .../geode/cache/server/internal/LoadMonitor.java   |   22 +-
 .../apache/geode/cache/wan/EventSequenceID.java    |   33 +-
 .../org/apache/geode/cache/wan/GatewaySender.java  |   89 +-
 .../apache/geode/compression/SnappyCompressor.java |    4 +-
 .../geode/datasource/PooledDataSourceFactory.java  |    2 +-
 .../apache/geode/distributed/AbstractLauncher.java |   19 +-
 .../geode/distributed/ConfigurationProperties.java |  126 +-
 .../geode/distributed/DistributedLockService.java  |    3 +-
 .../geode/distributed/DistributedMember.java       |    1 +
 .../geode/distributed/DurableClientAttributes.java |   43 +-
 .../java/org/apache/geode/distributed/Locator.java |   12 +-
 .../apache/geode/distributed/LocatorLauncher.java  |  167 +-
 .../apache/geode/distributed/ServerLauncher.java   |   23 +-
 .../internal/AbstractDistributionConfig.java       |   50 +-
 .../internal/ClusterDistributionManager.java       |   53 +-
 .../distributed/internal/ClusterElderManager.java  |   18 +-
 .../internal/CollectingReplyProcessor.java         |    5 +-
 .../geode/distributed/internal/ConflationKey.java  |   14 +-
 .../apache/geode/distributed/internal/DMStats.java |    3 +-
 .../apache/geode/distributed/internal/DSClock.java |   56 +-
 .../internal/DefaultPropertiesGenerator.java       |    2 +-
 .../internal/DistributedSystemService.java         |   26 -
 .../distributed/internal/DistributionConfig.java   |  132 +-
 .../internal/DistributionConfigImpl.java           |  118 +-
 .../internal/DistributionConfigSnapshot.java       |    6 +-
 .../distributed/internal/DistributionImpl.java     |   45 +-
 .../distributed/internal/DistributionManager.java  |    6 +-
 .../distributed/internal/DistributionMessage.java  |  103 +-
 .../distributed/internal/DistributionStats.java    |  237 +-
 .../distributed/internal/FlowControlParams.java    |    6 +-
 .../distributed/internal/HealthMonitorImpl.java    |   52 +-
 .../internal/HighPriorityAckedMessage.java         |   50 +-
 .../InternalConfigurationPersistenceService.java   |   44 +-
 .../internal/InternalDistributedSystem.java        |   92 +-
 .../distributed/internal/InternalLocator.java      |    4 +-
 .../distributed/internal/LocatorLoadSnapshot.java  |    2 +-
 .../geode/distributed/internal/LocatorStats.java   |   84 +-
 .../internal/LonerDistributionManager.java         |   62 +-
 .../internal/OverflowQueueWithDMStats.java         |   18 +-
 .../distributed/internal/ProcessorKeeper21.java    |   26 +-
 .../internal/ReliableReplyProcessor21.java         |   36 +-
 .../geode/distributed/internal/ReplyException.java |    6 +-
 .../geode/distributed/internal/ReplyMessage.java   |   96 +-
 .../distributed/internal/ReplyProcessor21.java     |  168 +-
 .../geode/distributed/internal/ReplySender.java    |   11 +-
 .../geode/distributed/internal/SecurityConfig.java |    4 +-
 .../distributed/internal/SerialAckedMessage.java   |   21 +-
 .../geode/distributed/internal/ServerLocation.java |   15 +-
 .../internal/ServerLocationAndMemberId.java        |    8 +-
 .../geode/distributed/internal/ServerLocator.java  |   72 +-
 .../distributed/internal/ShutdownMessage.java      |    8 +-
 .../distributed/internal/SizeableRunnable.java     |    4 +-
 .../geode/distributed/internal/StartupMessage.java |  128 +-
 .../distributed/internal/StartupMessageData.java   |   46 +-
 .../internal/StartupMessageReplyProcessor.java     |   18 +-
 .../distributed/internal/StartupOperation.java     |   17 +-
 .../internal/StartupResponseMessage.java           |   88 +-
 .../StartupResponseWithVersionMessage.java         |   24 +-
 .../ThrottlingMemLinkedQueueWithDMStats.java       |   12 +-
 .../internal/WaitForViewInstallation.java          |   14 +-
 .../distributed/internal/WanLocatorDiscoverer.java |    2 +-
 .../internal/deadlock/DLockDependencyMonitor.java  |   16 +-
 .../internal/deadlock/DeadlockDetector.java        |    8 +-
 .../distributed/internal/deadlock/Dependency.java  |   10 +-
 .../internal/deadlock/DependencyGraph.java         |   16 +-
 .../deadlock/DependencyMonitorManager.java         |    6 +-
 .../internal/deadlock/GemFireDeadlockDetector.java |    2 +-
 .../internal/deadlock/LocalLockInfo.java           |   14 +-
 .../distributed/internal/deadlock/LocalThread.java |   20 +-
 .../deadlock/MessageDependencyMonitor.java         |   17 +-
 .../distributed/internal/direct/DirectChannel.java |   60 +-
 .../distributed/internal/locks/DLockGrantor.java   |  711 +++--
 .../locks/DLockLessorDepartureHandler.java         |    2 +-
 .../internal/locks/DLockQueryProcessor.java        |  111 +-
 .../locks/DLockRecoverGrantorProcessor.java        |   93 +-
 .../internal/locks/DLockReleaseProcessor.java      |   84 +-
 .../internal/locks/DLockRemoteToken.java           |   34 +-
 .../internal/locks/DLockRequestProcessor.java      |  457 ++-
 .../distributed/internal/locks/DLockService.java   |  655 ++--
 .../distributed/internal/locks/DLockStats.java     |   62 +-
 .../distributed/internal/locks/DLockToken.java     |  108 +-
 .../internal/locks/DeposeGrantorProcessor.java     |   42 +-
 .../internal/locks/DistributedMemberLock.java      |   62 +-
 .../internal/locks/ElderInitProcessor.java         |   69 +-
 .../distributed/internal/locks/ElderState.java     |   44 +-
 .../distributed/internal/locks/GrantorInfo.java    |   16 +-
 .../internal/locks/GrantorRequestProcessor.java    |  106 +-
 .../distributed/internal/locks/LockGrantorId.java  |   61 +-
 .../locks/NonGrantorDestroyedProcessor.java        |   38 +-
 .../distributed/internal/locks/RemoteThread.java   |   28 +-
 .../membership/InternalDistributedMember.java      |   30 +-
 .../internal/membership/InternalRole.java          |   14 +-
 .../internal/membership/adapter/ServiceConfig.java |    6 +-
 .../membership/adapter/auth/GMSAuthenticator.java  |    6 +-
 .../internal/streaming/StreamingOperation.java     |  116 +-
 ...eAnnotationBasedMethodInvocationAuthorizer.java |    3 +-
 .../examples/security/ExampleSecurityManager.java  |   14 +-
 .../main/java/org/apache/geode/i18n/StringId.java  |   12 +-
 .../org/apache/geode/internal/AbstractConfig.java  |   15 +-
 .../java/org/apache/geode/internal/Assert.java     |   12 +-
 .../geode/internal/ByteBufferOutputStream.java     |   18 +-
 .../org/apache/geode/internal/ConfigSource.java    |   34 +-
 .../apache/geode/internal/CopyOnWriteHashSet.java  |   16 +-
 .../CoreSanctionedSerializablesService.java        |   27 +
 .../org/apache/geode/internal/DSFIDFactory.java    |  886 +++---
 .../DistributedSerializableObjectConfig.java       |   51 +
 .../apache/geode/internal/DistributionLocator.java |    2 +-
 .../geode/internal/EmptyInputStreamFilter.java     |   24 -
 .../java/org/apache/geode/internal/ExitCode.java   |    2 +-
 .../org/apache/geode/internal/GemFireVersion.java  |    7 +
 .../org/apache/geode/internal/GeodeVersion.java    |   40 +
 .../geode/internal/HeapDataOutputStream.java       |   82 +-
 .../org/apache/geode/internal/HistogramStats.java  |   34 +-
 .../apache/geode/internal/InputStreamFilter.java   |   24 -
 .../geode/internal/InternalDataSerializer.java     |  239 +-
 .../geode/internal/InternalInstantiator.java       |   10 +-
 .../org/apache/geode/internal/JvmSizeUtils.java    |   61 +-
 .../org/apache/geode/internal/ManagerInfo.java     |   53 +-
 .../java/org/apache/geode/internal/NanoTimer.java  |   33 +-
 .../geode/internal/NullDataOutputStream.java       |   32 +-
 .../apache/geode/internal/ObjIdConcurrentMap.java  |   61 +-
 .../java/org/apache/geode/internal/ObjIdMap.java   |   46 +-
 .../internal/ObjectInputStreamFilterWrapper.java   |  252 --
 .../apache/geode/internal/OneTaskOnlyExecutor.java |   10 +-
 .../apache/geode/internal/ProcessOutputReader.java |   20 +-
 .../org/apache/geode/internal/SystemAdmin.java     |  248 +-
 .../apache/geode/internal/SystemDescription.java   |   54 +
 .../org/apache/geode/internal/SystemTimer.java     |   10 +-
 .../apache/geode/internal/UniqueIdGenerator.java   |   35 +-
 .../apache/geode/internal/VersionDescription.java  |   32 +-
 .../geode/internal/VersionedObjectInput.java       |   48 +-
 .../geode/internal/VersionedObjectOutput.java      |   36 +-
 .../geode/internal/admin/CacheCollector.java       |   14 +-
 .../internal/admin/ClientMembershipMessage.java    |   20 +-
 .../geode/internal/admin/ClientStatsManager.java   |    6 +-
 .../internal/admin/CompoundEntrySnapshot.java      |   34 +-
 .../internal/admin/CompoundRegionSnapshot.java     |   76 +-
 .../geode/internal/admin/GfManagerAgentConfig.java |   24 +-
 .../apache/geode/internal/admin/ListenerIdMap.java |   40 +-
 .../org/apache/geode/internal/admin/StatAlert.java |    2 +-
 .../geode/internal/admin/StatAlertsManager.java    |   21 +-
 .../admin/remote/AddHealthListenerRequest.java     |    8 +-
 .../admin/remote/AddHealthListenerResponse.java    |   10 +-
 .../admin/remote/AddStatListenerRequest.java       |   14 +-
 .../admin/remote/AddStatListenerResponse.java      |    8 +-
 .../admin/remote/AdminFailureResponse.java         |    8 +-
 .../geode/internal/admin/remote/AdminRegion.java   |    6 +-
 .../internal/admin/remote/AdminReplyProcessor.java |   20 +-
 .../geode/internal/admin/remote/AdminRequest.java  |   32 +-
 .../geode/internal/admin/remote/AdminResponse.java |    6 +-
 .../geode/internal/admin/remote/AdminWaiters.java  |   23 +-
 .../admin/remote/AlertsNotificationMessage.java    |    8 +-
 .../admin/remote/AppCacheSnapshotMessage.java      |    6 +-
 .../internal/admin/remote/BridgeServerRequest.java |   30 +-
 .../admin/remote/BridgeServerResponse.java         |   12 +-
 .../internal/admin/remote/CacheConfigRequest.java  |   18 +-
 .../internal/admin/remote/CacheConfigResponse.java |   14 +-
 .../internal/admin/remote/CacheInfoRequest.java    |    4 +-
 .../internal/admin/remote/CacheInfoResponse.java   |    8 +-
 .../admin/remote/CancelStatListenerRequest.java    |    8 +-
 .../admin/remote/CancelStatListenerResponse.java   |    2 +-
 .../internal/admin/remote/CancellationMessage.java |    4 +-
 .../admin/remote/CancellationRegistry.java         |    4 +-
 .../internal/admin/remote/CliLegacyMessage.java    |    8 +-
 .../internal/admin/remote/ClientHealthStats.java   |   84 +-
 .../internal/admin/remote/CompactRequest.java      |    8 +-
 .../internal/admin/remote/CompactResponse.java     |    4 +-
 .../internal/admin/remote/DestroyEntryMessage.java |   12 +-
 .../admin/remote/DestroyRegionMessage.java         |    8 +-
 .../admin/remote/DistributionLocatorId.java        |  120 +-
 .../geode/internal/admin/remote/DummyEntry.java    |   12 +-
 .../admin/remote/DurableClientInfoRequest.java     |   12 +-
 .../admin/remote/DurableClientInfoResponse.java    |    8 +-
 .../internal/admin/remote/EntryValueNodeImpl.java  |   53 +-
 .../admin/remote/FetchDistLockInfoRequest.java     |    4 +-
 .../admin/remote/FetchDistLockInfoResponse.java    |   17 +-
 .../admin/remote/FetchHealthDiagnosisRequest.java  |   18 +-
 .../admin/remote/FetchHealthDiagnosisResponse.java |   10 +-
 .../internal/admin/remote/FetchHostRequest.java    |    4 +-
 .../internal/admin/remote/FetchHostResponse.java   |   38 +-
 .../remote/FetchResourceAttributesRequest.java     |    4 +-
 .../remote/FetchResourceAttributesResponse.java    |    2 +-
 .../internal/admin/remote/FetchStatsRequest.java   |    8 +-
 .../internal/admin/remote/FetchStatsResponse.java  |   12 +-
 .../internal/admin/remote/FetchSysCfgRequest.java  |    4 +-
 .../internal/admin/remote/FetchSysCfgResponse.java |    8 +-
 .../admin/remote/FlushAppCacheSnapshotMessage.java |    2 +-
 .../admin/remote/HealthListenerMessage.java        |   14 +-
 .../admin/remote/InspectionClasspathManager.java   |    4 +-
 .../internal/admin/remote/LicenseInfoRequest.java  |    4 +-
 .../internal/admin/remote/LicenseInfoResponse.java |    6 +-
 .../admin/remote/MissingPersistentIDsResponse.java |    6 +-
 .../admin/remote/ObjectDetailsRequest.java         |   12 +-
 .../admin/remote/ObjectDetailsResponse.java        |   25 +-
 .../internal/admin/remote/ObjectNamesRequest.java  |    4 +-
 .../internal/admin/remote/ObjectNamesResponse.java |    8 +-
 .../remote/PrepareRevokePersistentIDRequest.java   |   23 +-
 .../admin/remote/RefreshMemberSnapshotRequest.java |    6 +-
 .../remote/RefreshMemberSnapshotResponse.java      |   10 +-
 .../internal/admin/remote/RegionAdminMessage.java  |   10 +-
 .../internal/admin/remote/RegionAdminRequest.java  |   10 +-
 .../admin/remote/RegionAttributesRequest.java      |    2 +-
 .../admin/remote/RegionAttributesResponse.java     |    8 +-
 .../geode/internal/admin/remote/RegionRequest.java |   26 +-
 .../internal/admin/remote/RegionResponse.java      |   22 +-
 .../internal/admin/remote/RegionSizeRequest.java   |    6 +-
 .../internal/admin/remote/RegionSizeResponse.java  |   14 +-
 .../admin/remote/RegionStatisticsRequest.java      |    2 +-
 .../admin/remote/RegionStatisticsResponse.java     |    8 +-
 .../admin/remote/RegionSubRegionSizeRequest.java   |    6 +-
 .../admin/remote/RegionSubRegionsSizeResponse.java |   24 +-
 .../geode/internal/admin/remote/RemoteAlert.java   |   14 +-
 .../internal/admin/remote/RemoteApplicationVM.java |    2 +-
 .../internal/admin/remote/RemoteBridgeServer.java  |  120 +-
 .../internal/admin/remote/RemoteCacheInfo.java     |  112 +-
 .../admin/remote/RemoteCacheStatistics.java        |   10 +-
 .../internal/admin/remote/RemoteDLockInfo.java     |   30 +-
 .../internal/admin/remote/RemoteEntrySnapshot.java |   34 +-
 .../internal/admin/remote/RemoteGemFireVM.java     |  133 +-
 .../admin/remote/RemoteGfManagerAgent.java         |    6 +-
 .../internal/admin/remote/RemoteObjectName.java    |   12 +-
 .../admin/remote/RemoteRegionAttributes.java       |  334 +-
 .../admin/remote/RemoteRegionSnapshot.java         |   50 +-
 .../geode/internal/admin/remote/RemoteStat.java    |   56 +-
 .../internal/admin/remote/RemoteStatResource.java  |   42 +-
 .../admin/remote/RemoteTransportConfig.java        |  105 +-
 .../admin/remote/RemoveHealthListenerRequest.java  |    8 +-
 .../admin/remote/RemoveHealthListenerResponse.java |    2 +-
 .../admin/remote/ResetHealthStatusRequest.java     |    8 +-
 .../admin/remote/ResetHealthStatusResponse.java    |    2 +-
 .../admin/remote/RevokePersistentIDRequest.java    |   13 +-
 .../admin/remote/RevokePersistentIDResponse.java   |    2 +-
 .../internal/admin/remote/RootRegionRequest.java   |    2 +-
 .../internal/admin/remote/RootRegionResponse.java  |   20 +-
 .../remote/ShutdownAllGatewayHubsRequest.java      |    6 +-
 .../internal/admin/remote/ShutdownAllRequest.java  |   12 +-
 .../internal/admin/remote/ShutdownAllResponse.java |    8 +-
 .../admin/remote/SnapshotResultMessage.java        |   12 +-
 .../remote/StatAlertsManagerAssignMessage.java     |    6 +-
 .../internal/admin/remote/StatListenerMessage.java |   26 +-
 .../internal/admin/remote/StoreSysCfgRequest.java  |    8 +-
 .../internal/admin/remote/StoreSysCfgResponse.java |    8 +-
 .../internal/admin/remote/SubRegionRequest.java    |    2 +-
 .../internal/admin/remote/SubRegionResponse.java   |   16 +-
 .../internal/admin/remote/TailLogRequest.java      |    4 +-
 .../internal/admin/remote/TailLogResponse.java     |    2 +-
 .../admin/remote/UpdateAlertDefinitionMessage.java |    8 +-
 .../internal/admin/remote/VersionInfoRequest.java  |    4 +-
 .../internal/admin/remote/VersionInfoResponse.java |    8 +-
 .../admin/remote/VersionMismatchAlert.java         |   16 +-
 .../admin/statalerts/BaseDecoratorImpl.java        |   16 +-
 .../admin/statalerts/DummyStatisticInfoImpl.java   |   29 +-
 .../admin/statalerts/FunctionDecoratorImpl.java    |    8 +-
 .../internal/admin/statalerts/FunctionHelper.java  |    8 +-
 .../statalerts/GaugeThresholdDecoratorImpl.java    |   13 +-
 .../admin/statalerts/MultiAttrDefinitionImpl.java  |   42 +-
 .../statalerts/NumberThresholdDecoratorImpl.java   |   14 +-
 .../admin/statalerts/SingleAttrDefinitionImpl.java |   33 +-
 .../admin/statalerts/StatisticInfoImpl.java        |   23 +-
 .../internal/cache/AbstractBucketRegionQueue.java  |   55 +-
 .../geode/internal/cache/AbstractCacheServer.java  |   71 +-
 .../geode/internal/cache/AbstractDiskRegion.java   |  456 +--
 .../geode/internal/cache/AbstractRegion.java       |    2 +-
 .../geode/internal/cache/AbstractRegionMap.java    |   58 +-
 .../internal/cache/AbstractUpdateOperation.java    |   66 +-
 .../apache/geode/internal/cache/AcceptHelper.java  |    2 +-
 .../cache/AddCacheServerProfileMessage.java        |   12 +-
 .../geode/internal/cache/AfterCompletion.java      |    2 +-
 .../apache/geode/internal/cache/BucketAdvisor.java |    9 +-
 .../apache/geode/internal/cache/BucketDump.java    |   20 +-
 .../internal/cache/BucketRedundancyTracker.java    |    2 +-
 .../apache/geode/internal/cache/BucketRegion.java  |   68 +-
 .../geode/internal/cache/BucketRegionQueue.java    |  184 +-
 .../geode/internal/cache/BucketServerLocation.java |   16 +-
 .../internal/cache/BucketServerLocation66.java     |   44 +-
 .../internal/cache/BytesAndBitsForCompactor.java   |   18 +-
 .../geode/internal/cache/CacheClientStatus.java    |   28 +-
 .../apache/geode/internal/cache/CacheConfig.java   |   62 +-
 .../internal/cache/CacheDistributionAdvisor.java   |   34 +-
 .../apache/geode/internal/cache/CacheObserver.java |   34 +-
 .../geode/internal/cache/CacheObserverAdapter.java |   93 +-
 .../geode/internal/cache/CacheServerAdvisor.java   |   20 +-
 .../geode/internal/cache/CacheServerImpl.java      |   87 +-
 .../geode/internal/cache/CacheStatisticsImpl.java  |   18 +-
 .../cache/CachedDeserializableFactory.java         |    6 +-
 .../internal/cache/ClientRegionEventImpl.java      |    6 +-
 .../cache/ClientSubscriptionConfigImpl.java        |   34 +-
 .../geode/internal/cache/CloseCacheMessage.java    |    8 +-
 .../internal/cache/ClusterConfigurationLoader.java |    4 +-
 .../geode/internal/cache/ColocationHelper.java     |   60 +-
 .../geode/internal/cache/CommitReplyException.java |   12 +-
 .../internal/cache/CountingDataInputStream.java    |   72 +-
 .../internal/cache/CreateRegionProcessor.java      |  208 +-
 .../internal/cache/CustomEntryExpiryTask.java      |    8 +-
 .../geode/internal/cache/DestroyOperation.java     |   56 +-
 .../cache/DestroyPartitionedRegionMessage.java     |   62 +-
 .../internal/cache/DestroyRegionOperation.java     |  133 +-
 .../geode/internal/cache/DirectoryHolder.java      |   40 +-
 .../geode/internal/cache/DiskDirectoryStats.java   |   10 +-
 .../org/apache/geode/internal/cache/DiskId.java    |   92 +-
 .../apache/geode/internal/cache/DiskInitFile.java  |  813 +++--
 .../apache/geode/internal/cache/DiskRegion.java    |  155 +-
 .../geode/internal/cache/DiskRegionStats.java      |   60 +-
 .../geode/internal/cache/DiskStoreAttributes.java  |   60 +-
 .../geode/internal/cache/DiskStoreFactoryImpl.java |   72 +-
 .../apache/geode/internal/cache/DiskStoreImpl.java |  690 ++---
 .../geode/internal/cache/DiskStoreMonitor.java     |    4 +-
 .../geode/internal/cache/DiskStoreStats.java       |  118 +-
 .../internal/cache/DiskWriteAttributesImpl.java    |   78 +-
 .../geode/internal/cache/DistPeerTXStateStub.java  |   62 +-
 .../internal/cache/DistTXAdjunctCommitMessage.java |    4 +-
 .../geode/internal/cache/DistTXCommitMessage.java  |   76 +-
 .../internal/cache/DistTXPrecommitMessage.java     |   85 +-
 .../internal/cache/DistTXRollbackMessage.java      |   70 +-
 .../apache/geode/internal/cache/DistTXState.java   |  226 +-
 .../internal/cache/DistTXStateOnCoordinator.java   |   38 +-
 .../cache/DistTXStateProxyImplOnCoordinator.java   |   98 +-
 .../cache/DistTXStateProxyImplOnDatanode.java      |   36 +-
 .../internal/cache/DistributedCacheOperation.java  |  387 ++-
 .../internal/cache/DistributedClearOperation.java  |  100 +-
 .../internal/cache/DistributedPingMessage.java     |    2 +-
 .../internal/cache/DistributedPutAllOperation.java |  301 +-
 .../geode/internal/cache/DistributedRegion.java    |   29 +-
 .../DistributedRegionFunctionStreamingMessage.java |  117 +-
 .../cache/DistributedRemoveAllOperation.java       |  279 +-
 .../cache/DistributedTombstoneOperation.java       |   56 +-
 .../internal/cache/DynamicRegionAttributes.java    |    8 +-
 .../apache/geode/internal/cache/EntriesSet.java    |   84 +-
 .../geode/internal/cache/EntryEventImpl.java       |  524 ++--
 .../internal/cache/EntryEventSerialization.java    |    2 +-
 .../geode/internal/cache/EntryExpiryTask.java      |   17 +-
 .../geode/internal/cache/EntryOperationImpl.java   |   14 +-
 .../apache/geode/internal/cache/EntrySnapshot.java |   54 +-
 .../geode/internal/cache/EnumListenerEvent.java    |   24 +-
 .../org/apache/geode/internal/cache/EventID.java   |  207 +-
 .../geode/internal/cache/EventStateHelper.java     |   15 +-
 .../internal/cache/EvictionAttributesImpl.java     |   42 +-
 .../cache/EvictionAttributesMutatorImpl.java       |    4 +-
 .../geode/internal/cache/ExpirationScheduler.java  |    8 +-
 ...xpireDisconnectedClientTransactionsMessage.java |    8 +-
 .../geode/internal/cache/ExpiryRegionEntry.java    |   10 +-
 .../apache/geode/internal/cache/ExpiryTask.java    |   62 +-
 .../geode/internal/cache/ExportDiskRegion.java     |    6 +-
 .../apache/geode/internal/cache/FilterProfile.java |  503 ++--
 .../geode/internal/cache/FilterRoutingInfo.java    |  286 +-
 .../internal/cache/FindDurableQueueProcessor.java  |   38 +-
 .../geode/internal/cache/FindRemoteTXMessage.java  |   44 +-
 .../internal/cache/FindVersionTagOperation.java    |   38 +-
 .../cache/FixedPartitionAttributesImpl.java        |   43 +-
 .../internal/cache/ForceReattemptException.java    |   10 +-
 .../cache/ForceableLinkedBlockingQueue.java        |    6 +-
 .../cache/FunctionStreamingReplyMessage.java       |   36 +-
 .../internal/cache/FutureCachedDeserializable.java |    2 +-
 .../geode/internal/cache/GemFireCacheImpl.java     |   10 +-
 .../apache/geode/internal/cache/GridAdvisor.java   |  120 +-
 .../org/apache/geode/internal/cache/HARegion.java  |  103 +-
 .../geode/internal/cache/IdentityArrayList.java    |   65 +-
 .../cache/InMemoryPersistentMemberView.java        |   10 +-
 .../internal/cache/IncomingGatewayStatus.java      |   26 +-
 .../internal/cache/InitialImageFlowControl.java    |    4 +-
 .../internal/cache/InitialImageOperation.java      | 1248 ++++----
 .../apache/geode/internal/cache/InterestEvent.java |    2 +-
 .../cache/InterestRegistrationEventImpl.java       |   65 +-
 .../internal/cache/InternalRegionArguments.java    |   86 +-
 .../geode/internal/cache/InvalidateOperation.java  |   40 +-
 .../cache/InvalidatePartitionedRegionMessage.java  |   10 +-
 .../internal/cache/InvalidateRegionOperation.java  |   17 +-
 .../internal/cache/JtaAfterCompletionMessage.java  |   10 +-
 .../org/apache/geode/internal/cache/KeyInfo.java   |   20 +-
 .../cache/LatestLastAccessTimeMessage.java         |   68 +-
 .../cache/LatestLastAccessTimeOperation.java       |    6 +-
 .../cache/LatestLastAccessTimeReplyProcessor.java  |    6 +-
 .../geode/internal/cache/LoaderHelperImpl.java     |   12 +-
 .../apache/geode/internal/cache/LocalDataSet.java  |  141 +-
 .../apache/geode/internal/cache/LocalRegion.java   |  119 +-
 .../cache/MemberFunctionStreamingMessage.java      |  132 +-
 .../cache/NetSearchExpirationCalculator.java       |    4 +-
 .../java/org/apache/geode/internal/cache/Node.java |   54 +-
 .../geode/internal/cache/NonLocalRegionEntry.java  |  102 +-
 .../cache/NonLocalRegionEntryWithStats.java        |   24 +-
 .../apache/geode/internal/cache/NonTXEntry.java    |    6 +-
 .../org/apache/geode/internal/cache/Oplog.java     | 1980 ++++++------
 .../geode/internal/cache/OrderedTombstoneMap.java  |    4 +-
 .../apache/geode/internal/cache/OverflowOplog.java |  332 +-
 .../geode/internal/cache/OverflowOplogSet.java     |   84 +-
 .../internal/cache/PRContainsValueFunction.java    |    5 +-
 .../internal/cache/PRHARedundancyProvider.java     |   10 +
 .../geode/internal/cache/PRQueryProcessor.java     |   69 +-
 .../internal/cache/PRSystemPropertyGetter.java     |    2 +-
 .../internal/cache/PartitionAttributesImpl.java    |  291 +-
 .../internal/cache/PartitionRegionConfig.java      |  163 +-
 .../cache/PartitionRegionConfigValidator.java      |   91 +-
 .../geode/internal/cache/PartitionedRegion.java    | 1485 +++++----
 .../internal/cache/PartitionedRegionDataStore.java |  606 ++--
 .../internal/cache/PartitionedRegionHelper.java    |   27 +-
 .../cache/PartitionedRegionQueryEvaluator.java     |  190 +-
 .../cache/PartitionedRegionRedundancyTracker.java  |    4 +-
 .../internal/cache/PartitionedRegionStats.java     |  256 +-
 .../internal/cache/PartitionedRegionStatus.java    |   10 +-
 .../geode/internal/cache/PeerTXStateStub.java      |   49 +-
 .../geode/internal/cache/PersistentOplogSet.java   |    5 +-
 .../internal/cache/PlaceHolderDiskRegion.java      |   12 +-
 .../geode/internal/cache/PoolManagerImpl.java      |   16 +-
 .../org/apache/geode/internal/cache/PoolStats.java |   88 +-
 .../cache/PreferBytesCachedDeserializable.java     |   22 +-
 .../geode/internal/cache/ProxyBucketRegion.java    |  171 +-
 .../geode/internal/cache/ProxyRegionMap.java       |   64 +-
 .../cache/PutAllPartialResultException.java        |   54 +-
 .../geode/internal/cache/QueuedOperation.java      |   38 +-
 .../geode/internal/cache/RegionEventImpl.java      |   70 +-
 .../geode/internal/cache/RegionExpiryTask.java     |    2 +-
 .../geode/internal/cache/RegionIdleExpiryTask.java |    4 +-
 .../geode/internal/cache/RegionListener.java       |    8 +-
 .../apache/geode/internal/cache/RegionStatus.java  |   10 +-
 .../geode/internal/cache/RegionTTLExpiryTask.java  |    4 +-
 .../internal/cache/RemoteOperationException.java   |    4 +-
 .../cache/RemoveCacheServerProfileMessage.java     |   12 +-
 .../apache/geode/internal/cache/RoleEventImpl.java |   12 +-
 .../cache/SearchLoadAndWriteProcessor.java         |  882 +++---
 .../geode/internal/cache/SenderIdMonitor.java      |    4 +-
 .../geode/internal/cache/ServerPingMessage.java    |   12 +-
 .../geode/internal/cache/StateFlushOperation.java  |   64 +-
 .../cache/StoreAllCachedDeserializable.java        |   34 +-
 .../geode/internal/cache/TXBucketRegionState.java  |    4 +-
 .../geode/internal/cache/TXCommitMessage.java      | 1012 +++----
 .../org/apache/geode/internal/cache/TXEntry.java   |   54 +-
 .../apache/geode/internal/cache/TXEntryState.java  |  254 +-
 .../geode/internal/cache/TXEntryUserAttrState.java |   16 +-
 .../org/apache/geode/internal/cache/TXEvent.java   |   19 +-
 .../geode/internal/cache/TXFarSideCMTracker.java   |   74 +-
 .../java/org/apache/geode/internal/cache/TXId.java |   24 +-
 .../cache/TXLastEventInTransactionUtils.java       |   21 +-
 .../apache/geode/internal/cache/TXLockRequest.java |   62 +-
 .../apache/geode/internal/cache/TXManagerImpl.java |  299 +-
 .../org/apache/geode/internal/cache/TXMessage.java |   40 +-
 .../internal/cache/TXRegionLockRequestImpl.java    |   66 +-
 .../apache/geode/internal/cache/TXRegionState.java |  226 +-
 .../internal/cache/TXRemoteCommitMessage.java      |   18 +-
 .../geode/internal/cache/TXReservationMgr.java     |   24 +-
 .../apache/geode/internal/cache/TXRmtEvent.java    |   34 +-
 .../org/apache/geode/internal/cache/TXState.java   |  385 ++-
 .../geode/internal/cache/TXStateInterface.java     |    2 +-
 .../geode/internal/cache/TXStateProxyImpl.java     |  174 +-
 .../apache/geode/internal/cache/TXStateStub.java   |   22 +-
 .../internal/cache/TimestampedEntryEventImpl.java  |   16 +-
 .../geode/internal/cache/TombstoneService.java     |  133 +-
 .../internal/cache/TxCallbackEventFactoryImpl.java |    8 +-
 .../geode/internal/cache/UnsharedImageState.java   |    2 +-
 .../internal/cache/UpdateAttributesProcessor.java  |  120 +-
 .../cache/UpdateEntryVersionOperation.java         |   40 +-
 .../geode/internal/cache/UpdateOperation.java      |  192 +-
 .../cache/UserSpecifiedDiskStoreAttributes.java    |   20 +-
 .../cache/UserSpecifiedRegionAttributes.java       |  120 +-
 .../internal/cache/VMCachedDeserializable.java     |   40 +-
 .../geode/internal/cache/VMLRURegionMap.java       |   40 +-
 .../geode/internal/cache/ValidatingDiskRegion.java |   28 +-
 .../geode/internal/cache/ValueByteWrapper.java     |    8 +-
 .../internal/cache/WrappedCallbackArgument.java    |   12 +-
 .../cache/WrappedRegionMembershipListener.java     |   62 +-
 .../cache/backup/BackupDataStoreResult.java        |    6 +-
 .../geode/internal/cache/backup/BackupService.java |    2 +-
 .../CompressedCachedDeserializable.java            |   20 +-
 .../geode/internal/cache/control/FilterByPath.java |    4 +-
 .../internal/cache/control/HeapMemoryMonitor.java  |  200 +-
 .../geode/internal/cache/control/MemoryEvent.java  |   24 +-
 .../internal/cache/control/MemoryThresholds.java   |   75 +-
 .../cache/control/OffHeapMemoryMonitor.java        |  166 +-
 .../control/PartitionRebalanceDetailsImpl.java     |   63 +-
 .../cache/control/RebalanceOperationImpl.java      |   73 +-
 .../cache/control/RebalanceResultsImpl.java        |   26 +-
 .../internal/cache/control/ResourceAdvisor.java    |   80 +-
 .../cache/control/ResourceManagerStats.java        |  182 +-
 .../SerializableRegionRedundancyStatusImpl.java    |   16 +-
 .../cache/entries/AbstractDiskRegionEntry.java     |    2 +-
 .../entries/AbstractOplogDiskRegionEntry.java      |    4 +-
 .../cache/entries/AbstractRegionEntry.java         |   28 +-
 .../geode/internal/cache/entries/DiskEntry.java    |  168 +-
 .../VMStatsDiskLRURegionEntryHeapIntKey.java       |   34 +-
 .../VMStatsDiskLRURegionEntryHeapLongKey.java      |   34 +-
 .../VMStatsDiskLRURegionEntryHeapObjectKey.java    |   32 +-
 .../VMStatsDiskLRURegionEntryHeapStringKey1.java   |   40 +-
 .../VMStatsDiskLRURegionEntryHeapStringKey2.java   |   46 +-
 .../VMStatsDiskLRURegionEntryHeapUUIDKey.java      |   40 +-
 .../VMStatsDiskLRURegionEntryOffHeapIntKey.java    |   32 +-
 .../VMStatsDiskLRURegionEntryOffHeapLongKey.java   |   32 +-
 .../VMStatsDiskLRURegionEntryOffHeapObjectKey.java |   30 +-
 ...VMStatsDiskLRURegionEntryOffHeapStringKey1.java |   38 +-
 ...VMStatsDiskLRURegionEntryOffHeapStringKey2.java |   44 +-
 .../VMStatsDiskLRURegionEntryOffHeapUUIDKey.java   |   38 +-
 .../entries/VMStatsDiskRegionEntryHeapIntKey.java  |   26 +-
 .../entries/VMStatsDiskRegionEntryHeapLongKey.java |   26 +-
 .../VMStatsDiskRegionEntryHeapObjectKey.java       |   24 +-
 .../VMStatsDiskRegionEntryHeapStringKey1.java      |   32 +-
 .../VMStatsDiskRegionEntryHeapStringKey2.java      |   38 +-
 .../entries/VMStatsDiskRegionEntryHeapUUIDKey.java |   32 +-
 .../VMStatsDiskRegionEntryOffHeapIntKey.java       |   24 +-
 .../VMStatsDiskRegionEntryOffHeapLongKey.java      |   24 +-
 .../VMStatsDiskRegionEntryOffHeapObjectKey.java    |   22 +-
 .../VMStatsDiskRegionEntryOffHeapStringKey1.java   |   30 +-
 .../VMStatsDiskRegionEntryOffHeapStringKey2.java   |   36 +-
 .../VMStatsDiskRegionEntryOffHeapUUIDKey.java      |   30 +-
 .../entries/VMStatsLRURegionEntryHeapIntKey.java   |   26 +-
 .../entries/VMStatsLRURegionEntryHeapLongKey.java  |   26 +-
 .../VMStatsLRURegionEntryHeapObjectKey.java        |   24 +-
 .../VMStatsLRURegionEntryHeapStringKey1.java       |   32 +-
 .../VMStatsLRURegionEntryHeapStringKey2.java       |   38 +-
 .../entries/VMStatsLRURegionEntryHeapUUIDKey.java  |   32 +-
 .../VMStatsLRURegionEntryOffHeapIntKey.java        |   24 +-
 .../VMStatsLRURegionEntryOffHeapLongKey.java       |   24 +-
 .../VMStatsLRURegionEntryOffHeapObjectKey.java     |   22 +-
 .../VMStatsLRURegionEntryOffHeapStringKey1.java    |   30 +-
 .../VMStatsLRURegionEntryOffHeapStringKey2.java    |   36 +-
 .../VMStatsLRURegionEntryOffHeapUUIDKey.java       |   30 +-
 .../entries/VMStatsRegionEntryHeapIntKey.java      |   20 +-
 .../entries/VMStatsRegionEntryHeapLongKey.java     |   20 +-
 .../entries/VMStatsRegionEntryHeapObjectKey.java   |   18 +-
 .../entries/VMStatsRegionEntryHeapStringKey1.java  |   26 +-
 .../entries/VMStatsRegionEntryHeapStringKey2.java  |   32 +-
 .../entries/VMStatsRegionEntryHeapUUIDKey.java     |   26 +-
 .../entries/VMStatsRegionEntryOffHeapIntKey.java   |   18 +-
 .../entries/VMStatsRegionEntryOffHeapLongKey.java  |   18 +-
 .../VMStatsRegionEntryOffHeapObjectKey.java        |   16 +-
 .../VMStatsRegionEntryOffHeapStringKey1.java       |   24 +-
 .../VMStatsRegionEntryOffHeapStringKey2.java       |   30 +-
 .../entries/VMStatsRegionEntryOffHeapUUIDKey.java  |   24 +-
 .../VMThinDiskLRURegionEntryHeapIntKey.java        |   24 +-
 .../VMThinDiskLRURegionEntryHeapLongKey.java       |   24 +-
 .../VMThinDiskLRURegionEntryHeapObjectKey.java     |   22 +-
 .../VMThinDiskLRURegionEntryHeapStringKey1.java    |   30 +-
 .../VMThinDiskLRURegionEntryHeapStringKey2.java    |   36 +-
 .../VMThinDiskLRURegionEntryHeapUUIDKey.java       |   30 +-
 .../VMThinDiskLRURegionEntryOffHeapIntKey.java     |   22 +-
 .../VMThinDiskLRURegionEntryOffHeapLongKey.java    |   22 +-
 .../VMThinDiskLRURegionEntryOffHeapObjectKey.java  |   20 +-
 .../VMThinDiskLRURegionEntryOffHeapStringKey1.java |   28 +-
 .../VMThinDiskLRURegionEntryOffHeapStringKey2.java |   34 +-
 .../VMThinDiskLRURegionEntryOffHeapUUIDKey.java    |   28 +-
 .../entries/VMThinDiskRegionEntryHeapIntKey.java   |   16 +-
 .../entries/VMThinDiskRegionEntryHeapLongKey.java  |   16 +-
 .../VMThinDiskRegionEntryHeapObjectKey.java        |   14 +-
 .../VMThinDiskRegionEntryHeapStringKey1.java       |   22 +-
 .../VMThinDiskRegionEntryHeapStringKey2.java       |   28 +-
 .../entries/VMThinDiskRegionEntryHeapUUIDKey.java  |   22 +-
 .../VMThinDiskRegionEntryOffHeapIntKey.java        |   14 +-
 .../VMThinDiskRegionEntryOffHeapLongKey.java       |   14 +-
 .../VMThinDiskRegionEntryOffHeapObjectKey.java     |   12 +-
 .../VMThinDiskRegionEntryOffHeapStringKey1.java    |   20 +-
 .../VMThinDiskRegionEntryOffHeapStringKey2.java    |   26 +-
 .../VMThinDiskRegionEntryOffHeapUUIDKey.java       |   20 +-
 .../entries/VMThinLRURegionEntryHeapIntKey.java    |   16 +-
 .../entries/VMThinLRURegionEntryHeapLongKey.java   |   16 +-
 .../entries/VMThinLRURegionEntryHeapObjectKey.java |   14 +-
 .../VMThinLRURegionEntryHeapStringKey1.java        |   22 +-
 .../VMThinLRURegionEntryHeapStringKey2.java        |   28 +-
 .../entries/VMThinLRURegionEntryHeapUUIDKey.java   |   22 +-
 .../entries/VMThinLRURegionEntryOffHeapIntKey.java |   14 +-
 .../VMThinLRURegionEntryOffHeapLongKey.java        |   14 +-
 .../VMThinLRURegionEntryOffHeapObjectKey.java      |   12 +-
 .../VMThinLRURegionEntryOffHeapStringKey1.java     |   20 +-
 .../VMThinLRURegionEntryOffHeapStringKey2.java     |   26 +-
 .../VMThinLRURegionEntryOffHeapUUIDKey.java        |   20 +-
 .../cache/entries/VMThinRegionEntryHeapIntKey.java |   10 +-
 .../entries/VMThinRegionEntryHeapLongKey.java      |   10 +-
 .../entries/VMThinRegionEntryHeapObjectKey.java    |    8 +-
 .../entries/VMThinRegionEntryHeapStringKey1.java   |   16 +-
 .../entries/VMThinRegionEntryHeapStringKey2.java   |   22 +-
 .../entries/VMThinRegionEntryHeapUUIDKey.java      |   16 +-
 .../entries/VMThinRegionEntryOffHeapIntKey.java    |    8 +-
 .../entries/VMThinRegionEntryOffHeapLongKey.java   |    8 +-
 .../entries/VMThinRegionEntryOffHeapObjectKey.java |    6 +-
 .../VMThinRegionEntryOffHeapStringKey1.java        |   14 +-
 .../VMThinRegionEntryOffHeapStringKey2.java        |   20 +-
 .../entries/VMThinRegionEntryOffHeapUUIDKey.java   |   14 +-
 ...VersionedStatsDiskLRURegionEntryHeapIntKey.java |   60 +-
 ...ersionedStatsDiskLRURegionEntryHeapLongKey.java |   60 +-
 ...sionedStatsDiskLRURegionEntryHeapObjectKey.java |   58 +-
 ...ionedStatsDiskLRURegionEntryHeapStringKey1.java |   66 +-
 ...ionedStatsDiskLRURegionEntryHeapStringKey2.java |   72 +-
 ...ersionedStatsDiskLRURegionEntryHeapUUIDKey.java |   66 +-
 ...sionedStatsDiskLRURegionEntryOffHeapIntKey.java |   58 +-
 ...ionedStatsDiskLRURegionEntryOffHeapLongKey.java |   58 +-
 ...nedStatsDiskLRURegionEntryOffHeapObjectKey.java |   56 +-
 ...edStatsDiskLRURegionEntryOffHeapStringKey1.java |   64 +-
 ...edStatsDiskLRURegionEntryOffHeapStringKey2.java |   70 +-
 ...ionedStatsDiskLRURegionEntryOffHeapUUIDKey.java |   64 +-
 .../VersionedStatsDiskRegionEntryHeapIntKey.java   |   52 +-
 .../VersionedStatsDiskRegionEntryHeapLongKey.java  |   52 +-
 ...VersionedStatsDiskRegionEntryHeapObjectKey.java |   50 +-
 ...ersionedStatsDiskRegionEntryHeapStringKey1.java |   58 +-
 ...ersionedStatsDiskRegionEntryHeapStringKey2.java |   64 +-
 .../VersionedStatsDiskRegionEntryHeapUUIDKey.java  |   58 +-
 ...VersionedStatsDiskRegionEntryOffHeapIntKey.java |   50 +-
 ...ersionedStatsDiskRegionEntryOffHeapLongKey.java |   50 +-
 ...sionedStatsDiskRegionEntryOffHeapObjectKey.java |   48 +-
 ...ionedStatsDiskRegionEntryOffHeapStringKey1.java |   56 +-
 ...ionedStatsDiskRegionEntryOffHeapStringKey2.java |   62 +-
 ...ersionedStatsDiskRegionEntryOffHeapUUIDKey.java |   56 +-
 .../VersionedStatsLRURegionEntryHeapIntKey.java    |   52 +-
 .../VersionedStatsLRURegionEntryHeapLongKey.java   |   52 +-
 .../VersionedStatsLRURegionEntryHeapObjectKey.java |   50 +-
 ...VersionedStatsLRURegionEntryHeapStringKey1.java |   58 +-
 ...VersionedStatsLRURegionEntryHeapStringKey2.java |   64 +-
 .../VersionedStatsLRURegionEntryHeapUUIDKey.java   |   58 +-
 .../VersionedStatsLRURegionEntryOffHeapIntKey.java |   50 +-
 ...VersionedStatsLRURegionEntryOffHeapLongKey.java |   50 +-
 ...rsionedStatsLRURegionEntryOffHeapObjectKey.java |   48 +-
 ...sionedStatsLRURegionEntryOffHeapStringKey1.java |   56 +-
 ...sionedStatsLRURegionEntryOffHeapStringKey2.java |   62 +-
 ...VersionedStatsLRURegionEntryOffHeapUUIDKey.java |   56 +-
 .../VersionedStatsRegionEntryHeapIntKey.java       |   46 +-
 .../VersionedStatsRegionEntryHeapLongKey.java      |   46 +-
 .../VersionedStatsRegionEntryHeapObjectKey.java    |   44 +-
 .../VersionedStatsRegionEntryHeapStringKey1.java   |   52 +-
 .../VersionedStatsRegionEntryHeapStringKey2.java   |   58 +-
 .../VersionedStatsRegionEntryHeapUUIDKey.java      |   52 +-
 .../VersionedStatsRegionEntryOffHeapIntKey.java    |   44 +-
 .../VersionedStatsRegionEntryOffHeapLongKey.java   |   44 +-
 .../VersionedStatsRegionEntryOffHeapObjectKey.java |   42 +-
 ...VersionedStatsRegionEntryOffHeapStringKey1.java |   50 +-
 ...VersionedStatsRegionEntryOffHeapStringKey2.java |   56 +-
 .../VersionedStatsRegionEntryOffHeapUUIDKey.java   |   50 +-
 .../VersionedThinDiskLRURegionEntryHeapIntKey.java |   50 +-
 ...VersionedThinDiskLRURegionEntryHeapLongKey.java |   50 +-
 ...rsionedThinDiskLRURegionEntryHeapObjectKey.java |   48 +-
 ...sionedThinDiskLRURegionEntryHeapStringKey1.java |   56 +-
 ...sionedThinDiskLRURegionEntryHeapStringKey2.java |   62 +-
 ...VersionedThinDiskLRURegionEntryHeapUUIDKey.java |   56 +-
 ...rsionedThinDiskLRURegionEntryOffHeapIntKey.java |   48 +-
 ...sionedThinDiskLRURegionEntryOffHeapLongKey.java |   48 +-
 ...onedThinDiskLRURegionEntryOffHeapObjectKey.java |   46 +-
 ...nedThinDiskLRURegionEntryOffHeapStringKey1.java |   54 +-
 ...nedThinDiskLRURegionEntryOffHeapStringKey2.java |   60 +-
 ...sionedThinDiskLRURegionEntryOffHeapUUIDKey.java |   54 +-
 .../VersionedThinDiskRegionEntryHeapIntKey.java    |   42 +-
 .../VersionedThinDiskRegionEntryHeapLongKey.java   |   42 +-
 .../VersionedThinDiskRegionEntryHeapObjectKey.java |   40 +-
 ...VersionedThinDiskRegionEntryHeapStringKey1.java |   48 +-
 ...VersionedThinDiskRegionEntryHeapStringKey2.java |   54 +-
 .../VersionedThinDiskRegionEntryHeapUUIDKey.java   |   48 +-
 .../VersionedThinDiskRegionEntryOffHeapIntKey.java |   40 +-
 ...VersionedThinDiskRegionEntryOffHeapLongKey.java |   40 +-
 ...rsionedThinDiskRegionEntryOffHeapObjectKey.java |   38 +-
 ...sionedThinDiskRegionEntryOffHeapStringKey1.java |   46 +-
 ...sionedThinDiskRegionEntryOffHeapStringKey2.java |   52 +-
 ...VersionedThinDiskRegionEntryOffHeapUUIDKey.java |   46 +-
 .../VersionedThinLRURegionEntryHeapIntKey.java     |   42 +-
 .../VersionedThinLRURegionEntryHeapLongKey.java    |   42 +-
 .../VersionedThinLRURegionEntryHeapObjectKey.java  |   40 +-
 .../VersionedThinLRURegionEntryHeapStringKey1.java |   48 +-
 .../VersionedThinLRURegionEntryHeapStringKey2.java |   54 +-
 .../VersionedThinLRURegionEntryHeapUUIDKey.java    |   48 +-
 .../VersionedThinLRURegionEntryOffHeapIntKey.java  |   40 +-
 .../VersionedThinLRURegionEntryOffHeapLongKey.java |   40 +-
 ...ersionedThinLRURegionEntryOffHeapObjectKey.java |   38 +-
 ...rsionedThinLRURegionEntryOffHeapStringKey1.java |   46 +-
 ...rsionedThinLRURegionEntryOffHeapStringKey2.java |   52 +-
 .../VersionedThinLRURegionEntryOffHeapUUIDKey.java |   46 +-
 .../VersionedThinRegionEntryHeapIntKey.java        |   36 +-
 .../VersionedThinRegionEntryHeapLongKey.java       |   36 +-
 .../VersionedThinRegionEntryHeapObjectKey.java     |   34 +-
 .../VersionedThinRegionEntryHeapStringKey1.java    |   42 +-
 .../VersionedThinRegionEntryHeapStringKey2.java    |   48 +-
 .../VersionedThinRegionEntryHeapUUIDKey.java       |   42 +-
 .../VersionedThinRegionEntryOffHeapIntKey.java     |   34 +-
 .../VersionedThinRegionEntryOffHeapLongKey.java    |   34 +-
 .../VersionedThinRegionEntryOffHeapObjectKey.java  |   32 +-
 .../VersionedThinRegionEntryOffHeapStringKey1.java |   40 +-
 .../VersionedThinRegionEntryOffHeapStringKey2.java |   46 +-
 .../VersionedThinRegionEntryOffHeapUUIDKey.java    |   40 +-
 .../internal/cache/event/BulkOperationHolder.java  |    6 +-
 .../cache/event/DistributedEventTracker.java       |   20 +-
 .../cache/event/EventSequenceNumberHolder.java     |   10 +-
 .../cache/eviction/AbstractEvictionController.java |    8 +-
 .../cache/eviction/AbstractEvictionList.java       |    2 +-
 .../internal/cache/eviction/CountLRUEviction.java  |    2 +-
 .../cache/eviction/CountLRUStatistics.java         |   20 +-
 .../cache/eviction/EvictionCountersImpl.java       |   44 +-
 .../cache/eviction/EvictionListBuilder.java        |   13 +-
 .../geode/internal/cache/eviction/HeapEvictor.java |   24 +-
 .../internal/cache/eviction/HeapLRUController.java |    3 +-
 .../internal/cache/eviction/HeapLRUStatistics.java |   18 +-
 .../cache/eviction/LRUListWithAsyncSorting.java    |    9 +-
 .../cache/eviction/LRUListWithSyncSorting.java     |    7 +-
 .../cache/eviction/MemoryLRUController.java        |   12 +-
 .../cache/eviction/MemoryLRUStatistics.java        |   20 +-
 .../internal/cache/eviction/RegionEvictorTask.java |   20 +-
 .../internal/cache/eviction/SizeLRUController.java |    6 +-
 .../internal/cache/execute/AbstractExecution.java  |    2 +-
 .../cache/execute/CachedResultCollector.java       |    4 +-
 .../cache/execute/DefaultResultCollector.java      |   10 +-
 .../execute/DistributedRegionFunctionExecutor.java |   92 +-
 .../DistributedRegionFunctionResultSender.java     |   96 +-
 .../DistributedRegionFunctionResultWaiter.java     |    8 +-
 .../cache/execute/FunctionContextImpl.java         |   30 +-
 .../cache/execute/FunctionExecutionNodePruner.java |   26 +-
 .../cache/execute/FunctionRemoteContext.java       |   60 +-
 .../execute/FunctionStreamingResultCollector.java  |  182 +-
 .../InternalFunctionInvocationTargetException.java |   10 +-
 .../cache/execute/LocalResultCollectorImpl.java    |   92 +-
 .../cache/execute/MemberFunctionResultSender.java  |   92 +-
 .../cache/execute/MemberFunctionResultWaiter.java  |    2 +-
 .../cache/execute/MemberMappedArgument.java        |   10 +-
 .../cache/execute/MultiRegionFunctionExecutor.java |   86 +-
 .../execute/MultiRegionFunctionResultWaiter.java   |    6 +-
 .../execute/PartitionedRegionFunctionExecutor.java |  195 +-
 .../PartitionedRegionFunctionResultSender.java     |  102 +-
 .../PartitionedRegionFunctionResultWaiter.java     |   20 +-
 .../cache/execute/RegionFunctionContextImpl.java   |   46 +-
 .../cache/execute/ResultCollectorHolder.java       |    2 +-
 .../cache/execute/ServerFunctionExecutor.java      |   14 +-
 .../execute/ServerRegionFunctionExecutor.java      |    4 +-
 .../ServerToClientFunctionResultSender.java        |  102 +-
 .../ServerToClientFunctionResultSender65.java      |   88 +-
 .../cache/execute/StreamingFunctionOperation.java  |   18 +-
 .../execute/metrics/FunctionServiceStats.java      |   58 +-
 .../cache/extension/SimpleExtensionPoint.java      |    2 +-
 .../geode/internal/cache/ha/HAContainerMap.java    |    8 +-
 .../geode/internal/cache/ha/HAContainerRegion.java |   14 +-
 .../geode/internal/cache/ha/HARegionQueue.java     | 1065 ++++---
 .../internal/cache/ha/HARegionQueueAttributes.java |    6 +-
 .../internal/cache/ha/HARegionQueueStats.java      |   52 +-
 .../internal/cache/ha/QueueRemovalMessage.java     |    4 +-
 .../cache/ha/QueueSynchronizationProcessor.java    |    2 +-
 .../geode/internal/cache/ha/ThreadIdentifier.java  |   29 +-
 .../cache/locks/TXLessorDepartureHandler.java      |    4 +-
 .../geode/internal/cache/locks/TXLockBatch.java    |   37 +-
 .../geode/internal/cache/locks/TXLockIdImpl.java   |   34 +-
 .../internal/cache/locks/TXLockServiceImpl.java    |   81 +-
 .../locks/TXLockUpdateParticipantsMessage.java     |   36 +-
 .../cache/locks/TXOriginatorRecoveryProcessor.java |   32 +-
 .../locks/TXRecoverGrantorMessageProcessor.java    |   11 +-
 .../internal/cache/map/AbstractRegionMapPut.java   |    2 +-
 .../internal/cache/map/RegionMapCommitPut.java     |   17 +-
 .../geode/internal/cache/map/RegionMapPut.java     |   38 +-
 .../AllBucketProfilesUpdateMessage.java            |   24 +-
 .../partitioned/BecomePrimaryBucketMessage.java    |   34 +-
 .../cache/partitioned/BucketCountLoadProbe.java    |    2 +-
 .../partitioned/BucketProfileUpdateMessage.java    |   36 +-
 .../cache/partitioned/BucketSizeMessage.java       |   32 +-
 .../cache/partitioned/ColocatedRegionDetails.java  |   19 +-
 .../cache/partitioned/ContainsKeyValueMessage.java |   46 +-
 .../cache/partitioned/CreateBucketMessage.java     |   28 +-
 .../partitioned/DeposePrimaryBucketMessage.java    |   16 +-
 .../internal/cache/partitioned/DestroyMessage.java |  181 +-
 .../internal/cache/partitioned/DumpB2NRegion.java  |   66 +-
 .../cache/partitioned/DumpBucketsMessage.java      |   16 +-
 .../partitioned/EndBucketCreationMessage.java      |    8 +-
 .../cache/partitioned/FetchBulkEntriesMessage.java |  112 +-
 .../cache/partitioned/FetchEntriesMessage.java     |   77 +-
 .../cache/partitioned/FetchEntryMessage.java       |   30 +-
 .../cache/partitioned/FetchKeysMessage.java        |  124 +-
 .../partitioned/FetchPartitionDetailsMessage.java  |  100 +-
 .../internal/cache/partitioned/FlushMessage.java   |   28 +-
 .../internal/cache/partitioned/GetMessage.java     |  102 +-
 .../cache/partitioned/IdentityRequestMessage.java  |   48 +-
 .../cache/partitioned/IdentityUpdateMessage.java   |   18 +-
 .../cache/partitioned/IndexCreationMsg.java        |   74 +-
 .../cache/partitioned/InterestEventMessage.java    |   20 +-
 .../cache/partitioned/InvalidateMessage.java       |   58 +-
 .../internal/cache/partitioned/LockObject.java     |    4 +-
 .../partitioned/ManageBackupBucketMessage.java     |   68 +-
 .../cache/partitioned/ManageBucketMessage.java     |   48 +-
 .../cache/partitioned/MoveBucketMessage.java       |   34 +-
 .../partitioned/OfflineMemberDetailsImpl.java      |    6 +-
 .../PRFunctionStreamingResultCollector.java        |  155 +-
 .../geode/internal/cache/partitioned/PRLoad.java   |   32 +-
 .../partitioned/PRLocallyDestroyedException.java   |    2 +-
 .../cache/partitioned/PRSanityCheckMessage.java    |   10 +-
 .../cache/partitioned/PRTombstoneMessage.java      |   22 +-
 .../partitioned/PRUpdateEntryVersionMessage.java   |   50 +-
 .../cache/partitioned/PartitionMemberInfoImpl.java |   52 +-
 .../cache/partitioned/PartitionMessage.java        |  118 +-
 .../PartitionMessageWithDirectReply.java           |   20 +-
 .../cache/partitioned/PartitionRegionInfoImpl.java |   46 +-
 .../PartitionedRegionFunctionStreamingMessage.java |   22 +-
 .../partitioned/PartitionedRegionRebalanceOp.java  |   27 +-
 .../partitioned/PersistentBucketRecoverer.java     |   13 +-
 .../cache/partitioned/PrimaryRequestMessage.java   |   20 +-
 .../cache/partitioned/PutAllPRMessage.java         |  148 +-
 .../internal/cache/partitioned/PutMessage.java     |  408 ++-
 .../internal/cache/partitioned/QueryMessage.java   |   88 +-
 .../internal/cache/partitioned/RegionAdvisor.java  |    2 +-
 .../cache/partitioned/RemoveAllPRMessage.java      |  148 +-
 .../cache/partitioned/RemoveBucketMessage.java     |   32 +-
 .../cache/partitioned/RemoveIndexesMessage.java    |   52 +-
 .../internal/cache/partitioned/SizeMessage.java    |   46 +-
 .../cache/partitioned/SizedBasedLoadProbe.java     |    4 +-
 .../partitioned/StreamingPartitionOperation.java   |   97 +-
 .../partitioned/rebalance/BucketOperatorImpl.java  |    2 +-
 .../rebalance/BucketOperatorWrapper.java           |   14 +-
 .../partitioned/rebalance/CompositeDirector.java   |   48 +-
 .../rebalance/ExplicitMoveDirector.java            |    4 +-
 .../cache/partitioned/rebalance/FPRDirector.java   |   16 +-
 .../partitioned/rebalance/MovePrimariesFPR.java    |    3 +-
 .../rebalance/ParallelBucketOperator.java          |   51 +-
 .../rebalance/PercentageMoveDirector.java          |    2 +-
 .../rebalance/SatisfyRedundancyFPR.java            |    2 +-
 .../cache/partitioned/rebalance/model/Bucket.java  |   40 +-
 .../partitioned/rebalance/model/BucketRollup.java  |    8 +-
 .../cache/partitioned/rebalance/model/Member.java  |   89 +-
 .../partitioned/rebalance/model/MemberRollup.java  |    6 +-
 .../cache/partitioned/rebalance/model/Move.java    |    6 +-
 .../model/PartitionedRegionLoadModel.java          |  309 +-
 .../partitioned/rebalance/model/RefusalReason.java |   15 +-
 .../internal/cache/persistence/BytesAndBits.java   |    8 +-
 .../cache/persistence/CanonicalIdHolder.java       |   15 +-
 .../CreatePersistentRegionProcessor.java           |    2 +-
 .../cache/persistence/DefaultDiskDirs.java         |    2 +-
 .../cache/persistence/DiskInitFileInterpreter.java |    5 +-
 .../cache/persistence/DiskInitFileParser.java      |   31 +-
 .../internal/cache/persistence/DiskRegionView.java |    2 +-
 .../cache/persistence/DiskStoreFilter.java         |    7 +-
 .../internal/cache/persistence/DiskStoreID.java    |   13 +-
 .../cache/persistence/MembershipFlushRequest.java  |    2 +-
 .../cache/persistence/MembershipViewRequest.java   |   14 +-
 .../cache/persistence/PRPersistentConfig.java      |    5 +-
 .../cache/persistence/PersistentMemberID.java      |   41 +-
 .../cache/persistence/PersistentMemberManager.java |   18 +-
 .../cache/persistence/PersistentMemberPattern.java |    5 +-
 .../cache/persistence/PersistentMemberState.java   |    2 +-
 .../persistence/PersistentMembershipView.java      |    6 +-
 .../persistence/PersistentStateQueryMessage.java   |    4 +-
 .../persistence/PersistentStateQueryResults.java   |   10 +-
 .../PrepareNewPersistentMemberMessage.java         |    2 +-
 .../persistence/RemovePersistentMemberMessage.java |    4 +-
 .../UninterruptibleRandomAccessFile.java           |  117 +-
 .../query/mock/CachedDeserializableComparator.java |    2 +-
 .../cache/persistence/query/mock/IndexMapImpl.java |   10 +-
 .../cache/persistence/query/mock/ItrAdapter.java   |    2 +-
 .../cache/persistence/query/mock/Pair.java         |   10 +-
 .../persistence/query/mock/PairComparator.java     |    4 +-
 .../persistence/query/mock/ResultListImpl.java     |    2 +-
 .../query/mock/SortedResultBagImpl.java            |    6 +-
 .../query/mock/SortedResultMapImpl.java            |    6 +-
 .../query/mock/SortedResultSetImpl.java            |    2 +-
 .../org/apache/geode/internal/cache/properties.md  |    2 +-
 .../internal/cache/snapshot/ClientExporter.java    |    8 +-
 .../internal/cache/snapshot/ExportedRegistry.java  |    8 +-
 .../internal/cache/snapshot/FlowController.java    |    2 +-
 .../geode/internal/cache/snapshot/GFSnapshot.java  |    2 +-
 .../cache/snapshot/RegionSnapshotServiceImpl.java  |   10 +-
 .../cache/snapshot/SnapshotOptionsImpl.java        |   10 +-
 .../internal/cache/snapshot/SnapshotPacket.java    |    2 +-
 .../internal/cache/snapshot/WindowedExporter.java  |   10 +-
 .../geode/internal/cache/tier/BatchException.java  |    6 +-
 .../internal/cache/tier/CachedRegionHelper.java    |   12 +-
 .../apache/geode/internal/cache/tier/Command.java  |    7 +-
 .../internal/cache/tier/CommunicationMode.java     |    8 +-
 .../geode/internal/cache/tier/Encryptor.java       |    3 +
 .../geode/internal/cache/tier/InterestType.java    |   28 +-
 .../cache/tier/InternalClientMembership.java       |   69 +-
 .../geode/internal/cache/tier/MessageType.java     |    7 +-
 .../internal/cache/tier/ServerSideHandshake.java   |    1 +
 .../internal/cache/tier/sockets/AcceptorImpl.java  |    6 +-
 .../geode/internal/cache/tier/sockets/AuthIds.java |    4 +-
 .../internal/cache/tier/sockets/BaseCommand.java   |  345 ++-
 .../cache/tier/sockets/BaseCommandQuery.java       |    8 +-
 .../cache/tier/sockets/CacheClientNotifier.java    |  193 +-
 .../tier/sockets/CacheClientNotifierStats.java     |   48 +-
 .../cache/tier/sockets/CacheClientProxy.java       |  698 ++---
 .../cache/tier/sockets/CacheClientProxyStats.java  |  122 +-
 .../cache/tier/sockets/CacheClientUpdater.java     |  249 +-
 .../cache/tier/sockets/CacheServerHelper.java      |    6 +-
 .../cache/tier/sockets/CacheServerStats.java       |  418 +--
 .../tier/sockets/ClientDenylistProcessor.java      |   30 +-
 .../cache/tier/sockets/ClientHealthMonitor.java    |   18 +-
 .../cache/tier/sockets/ClientInterestList.java     |   90 +-
 .../tier/sockets/ClientInterestMessageImpl.java    |   14 +-
 .../tier/sockets/ClientProxyMembershipID.java      |  278 +-
 .../tier/sockets/ClientReAuthenticateMessage.java  |  106 +
 .../tier/sockets/ClientRegistrationMetadata.java   |    2 +-
 .../cache/tier/sockets/ClientTombstoneMessage.java |   50 +-
 .../tier/sockets/ClientUpdateMessageImpl.java      |   23 +-
 .../cache/tier/sockets/ClientUserAuths.java        |  239 +-
 .../cache/tier/sockets/CommandInitializer.java     |    7 +-
 .../internal/cache/tier/sockets/EncryptorImpl.java |   40 +-
 .../cache/tier/sockets/HAEventWrapper.java         |   88 +-
 .../internal/cache/tier/sockets/Handshake.java     |   89 +-
 .../geode/internal/cache/tier/sockets/Message.java |  404 +--
 .../cache/tier/sockets/MessageDispatcher.java      |  290 +-
 .../cache/tier/sockets/ObjectPartList.java         |  117 +-
 .../cache/tier/sockets/ObjectPartList651.java      |  153 -
 .../tier/sockets/OldClientSupportService.java      |    1 -
 .../geode/internal/cache/tier/sockets/Part.java    |  168 +-
 .../tier/sockets/RandomSubjectIdGenerator.java     |   80 +
 .../sockets/RemoveClientFromDenylistMessage.java   |    8 +-
 .../tier/sockets/SerializedObjectPartList.java     |  127 -
 .../cache/tier/sockets/ServerConnection.java       |  339 ++-
 .../tier/sockets/ServerConnectionCollection.java   |    2 +-
 .../sockets/ServerInterestRegistrationMessage.java |   24 +-
 .../cache/tier/sockets/ServerQueueStatus.java      |   28 +-
 .../cache/tier/sockets/ServerResponseMatrix.java   |    4 +-
 .../tier/sockets/ServerSideHandshakeFactory.java   |    2 +-
 .../tier/sockets/ServerSideHandshakeImpl.java      |    8 +-
 .../cache/tier/sockets/SubjectIdGenerator.java     |   45 +
 .../cache/tier/sockets/UserAuthAttributes.java     |   18 +-
 .../cache/tier/sockets/VersionedObjectList.java    |  250 +-
 .../cache/tier/sockets/command/AddPdxEnum.java     |    6 +-
 .../cache/tier/sockets/command/AddPdxType.java     |    6 +-
 .../cache/tier/sockets/command/ClearRegion.java    |   12 +-
 .../cache/tier/sockets/command/ClientReady.java    |    7 +-
 .../tier/sockets/command/CloseConnection.java      |    9 +-
 .../cache/tier/sockets/command/CommitCommand.java  |    7 +-
 .../cache/tier/sockets/command/ContainsKey66.java  |    7 +-
 .../cache/tier/sockets/command/CreateRegion.java   |    7 +-
 .../cache/tier/sockets/command/Default.java        |    9 +-
 .../cache/tier/sockets/command/Destroy70.java      |   12 +-
 .../cache/tier/sockets/command/DestroyRegion.java  |   12 +-
 .../tier/sockets/command/ExecuteFunction70.java    |   11 +-
 .../sockets/command/ExecuteRegionFunction66.java   |   16 +-
 .../command/ExecuteRegionFunctionSingleHop.java    |   19 +-
 .../sockets/command/GatewayReceiverCommand.java    |  131 +-
 .../internal/cache/tier/sockets/command/Get70.java |   10 +-
 .../cache/tier/sockets/command/GetAll70.java       |   76 +-
 .../tier/sockets/command/GetAllWithCallback.java   |   21 +-
 .../command/GetClientPRMetadataCommand66.java      |   11 +-
 .../GetClientPartitionAttributesCommand66.java     |   12 +-
 .../tier/sockets/command/GetFunctionAttribute.java |    7 +-
 .../cache/tier/sockets/command/GetPDXEnumById.java |    7 +-
 .../tier/sockets/command/GetPDXIdForEnum.java      |    7 +-
 .../tier/sockets/command/GetPDXIdForType.java      |    7 +-
 .../cache/tier/sockets/command/GetPDXTypeById.java |    7 +-
 .../cache/tier/sockets/command/GetPdxEnums70.java  |    7 +-
 .../cache/tier/sockets/command/GetPdxTypes70.java  |    7 +-
 .../cache/tier/sockets/command/Invalid.java        |    9 +-
 .../cache/tier/sockets/command/Invalidate70.java   |   12 +-
 .../cache/tier/sockets/command/KeySet.java         |   12 +-
 .../cache/tier/sockets/command/MakePrimary.java    |    7 +-
 .../cache/tier/sockets/command/PeriodicAck.java    |    7 +-
 .../internal/cache/tier/sockets/command/Ping.java  |   10 +-
 .../internal/cache/tier/sockets/command/Put70.java |   13 +-
 .../cache/tier/sockets/command/PutAll80.java       |   15 +-
 .../tier/sockets/command/PutUserCredentials.java   |   76 +-
 .../internal/cache/tier/sockets/command/Query.java |    8 +-
 .../cache/tier/sockets/command/Query651.java       |    8 +-
 .../sockets/command/RegisterDataSerializers.java   |   11 +-
 .../sockets/command/RegisterInstantiators.java     |   11 +-
 .../tier/sockets/command/RegisterInterest61.java   |  111 +-
 .../sockets/command/RegisterInterestList66.java    |   41 +-
 .../cache/tier/sockets/command/RemoveAll.java      |   15 +-
 .../cache/tier/sockets/command/RemoveUserAuth.java |    9 +-
 .../tier/sockets/command/RequestEventValue.java    |   11 +-
 .../tier/sockets/command/RollbackCommand.java      |    7 +-
 .../internal/cache/tier/sockets/command/Size.java  |   15 +-
 .../tier/sockets/command/TXFailoverCommand.java    |    7 +-
 .../sockets/command/TXSynchronizationCommand.java  |    7 +-
 .../tier/sockets/command/UnregisterInterest.java   |   34 +-
 .../sockets/command/UnregisterInterestList.java    |    7 +-
 .../sockets/command/UpdateClientNotification.java  |    7 +-
 .../cache/tx/AbstractPeerTXRegionStub.java         |    4 +-
 .../internal/cache/tx/ClientTXRegionStub.java      |    8 +-
 .../geode/internal/cache/tx/ClientTXStateStub.java |   70 +-
 .../geode/internal/cache/tx/DistTxEntryEvent.java  |   99 +-
 .../geode/internal/cache/tx/DistTxKeyInfo.java     |    2 +-
 .../internal/cache/tx/DistributedTXRegionStub.java |    4 +-
 .../internal/cache/tx/PartitionedTXRegionStub.java |   40 +-
 .../internal/cache/tx/RemoteClearMessage.java      |   10 +-
 .../cache/tx/RemoteContainsKeyValueMessage.java    |   42 +-
 .../internal/cache/tx/RemoteDestroyMessage.java    |  175 +-
 .../internal/cache/tx/RemoteFetchEntryMessage.java |   39 +-
 .../internal/cache/tx/RemoteFetchKeysMessage.java  |   40 +-
 .../cache/tx/RemoteFetchVersionMessage.java        |   14 +-
 .../geode/internal/cache/tx/RemoteGetMessage.java  |   60 +-
 .../internal/cache/tx/RemoteInvalidateMessage.java |   48 +-
 .../internal/cache/tx/RemoteOperationMessage.java  |   86 +-
 .../tx/RemoteOperationMessageWithDirectReply.java  |    2 +-
 .../internal/cache/tx/RemotePutAllMessage.java     |  142 +-
 .../geode/internal/cache/tx/RemotePutMessage.java  |  287 +-
 .../internal/cache/tx/RemoteRemoveAllMessage.java  |  140 +-
 .../geode/internal/cache/tx/RemoteSizeMessage.java |   21 +-
 .../internal/cache/tx/TransactionalOperation.java  |   33 +-
 .../cache/versions/BitSetExceptionIterator.java    |    4 +-
 .../cache/versions/CompactVersionHolder.java       |   34 +-
 .../internal/cache/versions/DiskVersionTag.java    |    2 +-
 .../internal/cache/versions/RVVException.java      |   10 +-
 .../internal/cache/versions/RVVExceptionB.java     |  112 +-
 .../internal/cache/versions/RVVExceptionT.java     |   96 +-
 .../cache/versions/RegionVersionHolder.java        |  210 +-
 .../cache/versions/RegionVersionVector.java        |  365 ++-
 .../geode/internal/cache/versions/VersionTag.java  |  132 +-
 .../internal/cache/wan/AbstractGatewaySender.java  |  581 ++--
 .../wan/AbstractGatewaySenderEventProcessor.java   |  497 ++-
 .../geode/internal/cache/wan/BatchException70.java |   16 +-
 .../internal/cache/wan/GatewayReceiverStats.java   |  124 +-
 .../internal/cache/wan/GatewaySenderAdvisor.java   |  265 +-
 .../cache/wan/GatewaySenderAttributes.java         |   74 +-
 .../wan/GatewaySenderEventCallbackArgument.java    |   32 +-
 .../wan/GatewaySenderEventCallbackDispatcher.java  |   35 +-
 .../cache/wan/GatewaySenderEventDispatcher.java    |    9 +
 .../internal/cache/wan/GatewaySenderEventImpl.java |  552 ++--
 ...aySenderQueueEntrySynchronizationOperation.java |   65 +-
 .../internal/cache/wan/GatewaySenderStats.java     |  152 +-
 .../cache/wan/InternalGatewayQueueEvent.java       |   38 -
 .../cache/wan/InternalGatewaySenderFactory.java    |    8 +
 .../cache/wan/TransportFilterServerSocket.java     |    6 +-
 .../internal/cache/wan/TransportFilterSocket.java  |   10 +-
 .../cache/wan/TransportFilterSocketFactory.java    |    2 +-
 ...currentParallelGatewaySenderEventProcessor.java |   89 +-
 .../ConcurrentParallelGatewaySenderQueue.java      |   44 +-
 .../ParallelGatewaySenderEventProcessor.java       |   76 +-
 .../wan/parallel/ParallelGatewaySenderQueue.java   |  449 +--
 .../wan/parallel/ParallelQueueRemovalMessage.java  |   26 +-
 ...tilParallelGatewaySenderFlushedCoordinator.java |   32 +-
 .../cache/wan/serial/BatchDestroyOperation.java    |   44 +-
 ...oncurrentSerialGatewaySenderEventProcessor.java |  106 +-
 .../serial/SerialGatewaySenderEventProcessor.java  |  292 +-
 .../cache/wan/serial/SerialGatewaySenderQueue.java |  431 ++-
 .../wan/serial/SerialSecondaryGatewayListener.java |   27 +-
 .../internal/cache/xmlcache/AbstractXmlParser.java |    2 +-
 .../cache/xmlcache/AsyncEventQueueCreation.java    |   92 +-
 .../internal/cache/xmlcache/BindingCreation.java   |    6 +-
 .../internal/cache/xmlcache/CacheCreation.java     |    3 +-
 .../cache/xmlcache/CacheServerCreation.java        |   54 +-
 .../xmlcache/CacheTransactionManagerCreation.java  |   24 +-
 .../internal/cache/xmlcache/CacheXmlGenerator.java |    2 +-
 .../internal/cache/xmlcache/CacheXmlParser.java    |  272 +-
 .../cache/xmlcache/CacheXmlPropertyResolver.java   |    4 +-
 .../xmlcache/CacheXmlPropertyResolverHelper.java   |   20 +-
 .../internal/cache/xmlcache/CacheXmlVersion.java   |    2 +-
 .../cache/xmlcache/ClientCacheCreation.java        |   16 +-
 .../cache/xmlcache/ClientHaQueueCreation.java      |   24 +-
 .../xmlcache/DiskStoreAttributesCreation.java      |  103 +-
 .../cache/xmlcache/FunctionServiceCreation.java    |    8 +-
 .../cache/xmlcache/GatewayReceiverCreation.java    |   46 +-
 .../internal/cache/xmlcache/IndexCreationData.java |   14 +-
 .../cache/xmlcache/RegionAttributesCreation.java   |  419 ++-
 .../internal/cache/xmlcache/RegionCreation.java    |  120 +-
 .../cache/xmlcache/ResourceManagerCreation.java    |   48 +-
 .../cache/xmlcache/SerializerCreation.java         |    8 +-
 .../internal/cache/xmlcache/XmlGeneratorUtils.java |    5 +-
 .../internal/classloader/ClassPathLoader.java      |    4 +-
 .../internal/classloader/ClasspathService.java     |    2 +-
 .../DeployJarChildFirstClassLoader.java            |    7 +-
 .../concurrent/CompactConcurrentHashSet2.java      |   98 +-
 .../org/apache/geode/internal/concurrent/LI.java   |    5 +-
 .../apache/geode/internal/config/JAXBService.java  |    6 +-
 .../internal/datasource/AbstractDataSource.java    |    2 +-
 .../internal/datasource/AbstractPoolCache.java     |   84 +-
 .../datasource/ClientConnectionFactoryWrapper.java |   14 +-
 .../geode/internal/datasource/ConfigProperty.java  |    6 +-
 .../datasource/ConfiguredDataSourceProperties.java |    6 +-
 .../datasource/ConnectionPoolCacheImpl.java        |    2 +-
 .../datasource/ConnectionProviderException.java    |    2 +-
 .../internal/datasource/DataSourceFactory.java     |   36 +-
 .../datasource/FacetsJCAConnectionManagerImpl.java |    8 +-
 .../datasource/GemFireBasicDataSource.java         |    2 +-
 .../datasource/GemFireTransactionDataSource.java   |   11 +-
 .../internal/datasource/ManagedPoolCacheImpl.java  |    6 +-
 .../internal/deployment/JarDeploymentService.java  |   16 +-
 .../i18n/AbstractStringIdResourceBundle.java       |   13 +-
 .../geode/internal/io/CompositeOutputStream.java   |   45 +-
 .../geode/internal/io/CompositePrintStream.java    |   12 +-
 .../io/MainWithChildrenRollingFileHandler.java     |   31 +-
 .../apache/geode/internal/jndi/ContextImpl.java    |   22 +-
 .../internal/jndi/InitialContextFactoryImpl.java   |    6 +-
 .../apache/geode/internal/jndi/JNDIInvoker.java    |   19 +-
 .../geode/internal/jta/GlobalTransaction.java      |   73 +-
 .../apache/geode/internal/jta/TransactionImpl.java |    9 +-
 .../geode/internal/jta/TransactionManagerImpl.java |   36 +-
 .../org/apache/geode/internal/jta/XidImpl.java     |    8 +-
 .../org/apache/geode/internal/lang/ClassUtils.java |  143 -
 .../apache/geode/internal/lang/StringUtils.java    |   12 +-
 .../geode/internal/lang/SystemPropertyHelper.java  |   89 +-
 .../apache/geode/internal/lang/SystemUtils.java    |   10 +-
 .../org/apache/geode/internal/logging/Banner.java  |   11 +-
 .../internal/logging/CoreLoggingExecutors.java     |    2 +-
 .../geode/internal/logging/InternalLogWriter.java  |    2 +-
 .../geode/internal/logging/LogFileParser.java      |   16 +-
 .../geode/internal/logging/LogWriterImpl.java      |    8 +-
 .../geode/internal/logging/MergeLogFiles.java      |    2 +-
 .../geode/internal/logging/SecurityLogWriter.java  |    4 +-
 .../internal/logging/SecurityManagerLogWriter.java |    4 +-
 .../internal/modules/util/RegionConfiguration.java |   62 +-
 .../internal/monitoring/ThreadsMonitoring.java     |   16 +-
 .../internal/monitoring/ThreadsMonitoringImpl.java |   16 +-
 .../monitoring/ThreadsMonitoringProcess.java       |    4 +-
 .../monitoring/executor/AbstractExecutor.java      |   18 +-
 .../org/apache/geode/internal/net/BufferPool.java  |    6 +-
 .../geode/internal/net/ByteBufferVendor.java       |    9 +
 .../apache/geode/internal/net/NioSslEngine.java    |    7 +-
 .../geode/internal/net/SCClusterSocketCreator.java |   23 +-
 .../org/apache/geode/internal/net/SSLConfig.java   |  149 +-
 .../internal/net/SSLConfigurationFactory.java      |   26 +-
 .../org/apache/geode/internal/net/SSLUtil.java     |   54 +-
 .../apache/geode/internal/net/SocketCloser.java    |   18 +-
 .../apache/geode/internal/net/SocketCreator.java   |   78 +-
 .../geode/internal/net/SocketCreatorFactory.java   |    2 +-
 .../net/filewatch/ExtendedAliasKeyManager.java     |   20 +-
 .../FileWatchingX509ExtendedKeyManager.java        |   24 +-
 .../FileWatchingX509ExtendedTrustManager.java      |   24 +-
 .../internal/net/filewatch/PollingFileWatcher.java |    4 +-
 .../internal/offheap/AbstractStoredObject.java     |    4 +-
 .../internal/offheap/AddressableMemoryManager.java |    6 +-
 .../apache/geode/internal/offheap/Fragment.java    |   10 +-
 .../geode/internal/offheap/FreeListManager.java    |  193 +-
 .../geode/internal/offheap/LifecycleListener.java  |   12 +-
 .../internal/offheap/MemoryAllocatorImpl.java      |  119 +-
 .../geode/internal/offheap/MemoryBlockNode.java    |   40 +-
 .../internal/offheap/MemoryInspectorImpl.java      |   16 +-
 .../geode/internal/offheap/OffHeapStorage.java     |   62 +-
 .../internal/offheap/OffHeapStoredObject.java      |   60 +-
 .../offheap/OffHeapStoredObjectAddressStack.java   |   28 +-
 .../internal/offheap/OffHeapStoredObjectSlice.java |   10 +-
 .../offheap/OffHeapStoredObjectWithHeapForm.java   |    2 +-
 .../geode/internal/offheap/RefCountChangeInfo.java |   40 +-
 .../apache/geode/internal/offheap/SlabImpl.java    |   18 +-
 .../geode/internal/offheap/TinyStoredObject.java   |   12 +-
 .../offheap/annotations/OffHeapIdentifier.java     |    2 +-
 .../internal/process/ControlFileWatchdog.java      |   15 +-
 .../internal/process/FileProcessController.java    |    2 +-
 .../internal/process/LocalProcessLauncher.java     |    2 +-
 .../org/apache/geode/internal/process/PidFile.java |    4 +-
 .../internal/process/ProcessControllerFactory.java |    2 +-
 .../internal/process/ProcessStreamReader.java      |   10 +-
 .../apache/geode/internal/process/ProcessType.java |   16 +-
 .../geode/internal/process/ProcessUtils.java       |    2 +-
 .../signal/AbstractSignalNotificationHandler.java  |    2 +-
 .../geode/internal/process/signal/SignalEvent.java |    8 +-
 .../geode/internal/security/AuthorizeRequest.java  |  321 +-
 .../internal/security/AuthorizeRequestPP.java      |   94 +-
 .../security/IntegratedSecurityService.java        |   48 +-
 .../internal/security/LegacySecurityService.java   |   12 +-
 .../security/shiro/JMXShiroAuthenticator.java      |    2 +-
 .../security/shiro/SecurityManagerProvider.java    |    6 +-
 .../internal/security/shiro/ShiroPrincipal.java    |    2 +-
 .../geode/internal/sequencelog/EntryLogger.java    |    6 +-
 .../geode/internal/sequencelog/GraphType.java      |    2 +-
 .../internal/sequencelog/SequenceLoggerImpl.java   |    6 +-
 .../geode/internal/sequencelog/Transition.java     |    2 +-
 .../sequencelog/io/GemfireLogConverter.java        |    4 +-
 .../geode/internal/sequencelog/io/GraphReader.java |    2 +-
 .../internal/sequencelog/io/InputStreamReader.java |    6 +-
 .../sequencelog/io/OutputStreamAppender.java       |   19 +-
 .../geode/internal/sequencelog/model/Edge.java     |    9 +-
 .../geode/internal/sequencelog/model/Graph.java    |   14 +-
 .../geode/internal/sequencelog/model/GraphID.java  |   10 +-
 .../geode/internal/sequencelog/model/GraphSet.java |   22 +-
 .../geode/internal/sequencelog/model/Vertex.java   |   17 +-
 .../internal/shared/NativeErrorException.java      |    2 +-
 .../geode/internal/shared/StringPrintWriter.java   |   61 +-
 .../internal/size/CachingSingleObjectSizer.java    |   10 +-
 .../geode/internal/size/ObjectGraphSizer.java      |   22 +-
 .../geode/internal/size/ObjectTraverser.java       |   17 +-
 .../geode/internal/size/ReflectionObjectSizer.java |   29 +-
 .../internal/size/ReflectionSingleObjectSizer.java |   23 +-
 .../internal/size/SizeClassOnceObjectSizer.java    |    6 +-
 .../geode/internal/size/WellKnownClassSizer.java   |    8 +-
 .../statistics/AbstractStatisticsFactory.java      |   45 +-
 .../geode/internal/statistics/ArchiveSplitter.java |  124 +-
 .../geode/internal/statistics/CallbackSampler.java |    4 +-
 .../geode/internal/statistics/CounterMonitor.java  |    6 +-
 .../internal/statistics/DummyStatisticsImpl.java   |   12 +-
 .../geode/internal/statistics/GaugeMonitor.java    |    4 +-
 .../internal/statistics/GemFireStatSampler.java    |    2 +-
 .../geode/internal/statistics/HostStatSampler.java |   82 +-
 .../statistics/IgnoreResourceException.java        |    4 +-
 .../statistics/LocalStatisticsFactory.java         |   20 +-
 .../internal/statistics/LocalStatisticsImpl.java   |   46 +-
 .../statistics/MapBasedStatisticsNotification.java |   20 +-
 .../internal/statistics/ResourceInstance.java      |   40 +-
 .../geode/internal/statistics/ResourceType.java    |   22 +-
 .../geode/internal/statistics/SampleCollector.java |  178 +-
 .../internal/statistics/SimpleStatSampler.java     |   20 +-
 .../internal/statistics/SimpleStatisticId.java     |    4 +-
 .../internal/statistics/StatArchiveDescriptor.java |   46 +-
 .../internal/statistics/StatArchiveHandler.java    |  139 +-
 .../internal/statistics/StatArchiveReader.java     |  556 ++--
 .../internal/statistics/StatArchiveWriter.java     |  354 ++-
 .../internal/statistics/StatMonitorHandler.java    |   90 +-
 .../internal/statistics/StatSamplerStats.java      |   50 +-
 .../statistics/StatisticDescriptorImpl.java        |   60 +-
 .../statistics/StatisticNotFoundException.java     |    4 +-
 .../statistics/StatisticsClockFactory.java         |    6 +-
 .../internal/statistics/StatisticsMonitor.java     |   34 +-
 .../statistics/StatisticsTypeFactoryImpl.java      |    6 +-
 .../internal/statistics/StatisticsTypeImpl.java    |   28 +-
 .../internal/statistics/StatisticsTypeXml.java     |    8 +-
 .../internal/statistics/StripedStatisticsImpl.java |    8 +-
 .../apache/geode/internal/statistics/VMStats.java  |   12 +-
 .../geode/internal/statistics/ValueMonitor.java    |    9 +-
 .../statistics/platform/LinuxProcFsStatistics.java |    1 -
 .../internal/statistics/platform/ProcessStats.java |    4 +-
 .../apache/geode/internal/stats50/VMStats50.java   |  104 +-
 .../apache/geode/internal/tcp/BaseMsgStreamer.java |   10 +-
 .../geode/internal/tcp/ByteBufferInputStream.java  |  280 +-
 .../geode/internal/tcp/ConnectExceptions.java      |   22 +-
 .../org/apache/geode/internal/tcp/Connection.java  |  394 ++-
 .../apache/geode/internal/tcp/ConnectionTable.java |  216 +-
 .../geode/internal/tcp/DirectReplySender.java      |   56 +-
 .../apache/geode/internal/tcp/MsgDestreamer.java   |  117 +-
 .../apache/geode/internal/tcp/MsgOutputStream.java |   50 +-
 .../org/apache/geode/internal/tcp/MsgReader.java   |   14 +-
 .../org/apache/geode/internal/tcp/MsgStreamer.java |  430 ++-
 .../apache/geode/internal/tcp/MsgStreamerList.java |   77 +-
 .../tcp/VersionedByteBufferInputStream.java        |    4 +-
 .../geode/internal/tcp/VersionedMsgStreamer.java   |   21 +-
 .../geode/internal/util/AbortableTaskService.java  |    6 +-
 .../geode/internal/util/ArgumentRedactor.java      |  216 +-
 .../apache/geode/internal/util/Breadcrumbs.java    |    8 +-
 .../geode/internal/util/CollectionUtils.java       |   19 +-
 .../apache/geode/internal/util/DriverJarUtils.java |   18 +-
 .../org/apache/geode/internal/util/HostName.java   |    2 +-
 .../geode/internal/util/JavaCommandBuilder.java    |   14 +-
 .../apache/geode/internal/util/PluckStacks.java    |   31 +-
 .../geode/internal/util/ProductVersionUtil.java    |   72 +
 .../org/apache/geode/internal/util/StopWatch.java  |   24 +-
 .../apache/geode/internal/util/TransformUtils.java |   53 +-
 .../geode/internal/util/VersionedArrayList.java    |   60 +-
 .../util/concurrent/CopyOnWriteHashMap.java        |   12 +-
 .../util/concurrent/CopyOnWriteWeakHashMap.java    |   12 +-
 .../concurrent/CustomEntryConcurrentHashMap.java   |  348 ++-
 .../util/concurrent/ReentrantSemaphore.java        |   10 +-
 .../util/concurrent/SemaphoreReadWriteLock.java    |    4 +-
 .../util/concurrent/StoppableCondition.java        |    2 +-
 .../util/concurrent/StoppableReentrantLock.java    |    4 +-
 .../StoppableReentrantReadWriteLock.java           |    4 +-
 .../redaction/CombinedSensitiveDictionary.java     |   41 +
 .../geode/internal/util/redaction/ParserRegex.java |   93 +
 .../internal/util/redaction/RedactionDefaults.java |   58 +
 .../internal/util/redaction/RedactionStrategy.java |   51 +
 .../util/redaction/RegexRedactionStrategy.java     |   50 +
 .../util/redaction/SensitiveDataDictionary.java    |   32 +
 .../util/redaction/SensitivePrefixDictionary.java  |   37 +
 .../redaction/SensitiveSubstringDictionary.java    |   37 +
 .../internal/util/redaction/StringRedaction.java   |  123 +
 .../geode/logging/internal/Configuration.java      |    6 +-
 .../logging/internal/LoggingProviderLoader.java    |    5 +-
 .../geode/management/ClientHealthStatus.java       |    6 +-
 .../apache/geode/management/DiskBackupResult.java  |    6 +-
 .../geode/management/EvictionAttributesData.java   |   16 +-
 .../management/FixedPartitionAttributesData.java   |    6 +-
 .../apache/geode/management/GemFireProperties.java |    6 +-
 .../geode/management/JMXNotificationType.java      |    4 +-
 .../org/apache/geode/management/JVMMetrics.java    |   14 +-
 .../geode/management/MembershipAttributesData.java |    6 +-
 .../org/apache/geode/management/OSMetrics.java     |   26 +-
 .../geode/management/PartitionAttributesData.java  |   20 +-
 .../geode/management/PersistentMemberDetails.java  |    6 +-
 .../geode/management/RegionAttributesData.java     |   66 +-
 .../apache/geode/management/ServerLoadData.java    |    8 +-
 .../geode/management/internal/AgentUtil.java       |    2 +-
 .../geode/management/internal/AlertDetails.java    |   28 +-
 .../management/internal/BackupStatusImpl.java      |    4 +-
 .../management/internal/BaseManagementService.java |   13 +-
 .../management/internal/CompositeConverter.java    |    2 +-
 .../management/internal/DiskBackupStatusImpl.java  |    6 +-
 .../management/internal/FederationComponent.java   |   38 +-
 .../geode/management/internal/FilterParam.java     |    8 +-
 .../internal/GeodeRemoteStreamExporter.java        |   10 +-
 .../management/internal/JmxManagerAdvisee.java     |   24 +-
 .../management/internal/JmxManagerAdvisor.java     |  101 +-
 .../management/internal/JmxManagerLocator.java     |   24 +-
 .../internal/JmxManagerLocatorResponse.java        |   24 +-
 .../internal/JmxRmiOpenTypesSerialFilter.java      |  148 -
 .../management/internal/JmxRmiSerialFilter.java    |   21 -
 .../geode/management/internal/MBeanJMXAdapter.java |   17 +-
 .../internal/MBeanProxyInfoRepository.java         |   14 +-
 .../geode/management/internal/ManagementAgent.java |  167 +-
 .../internal/ManagementAgentFactory.java           |    3 +-
 .../internal/ManagementCacheListener.java          |    4 +-
 .../management/internal/ManagementFunction.java    |   15 +-
 .../internal/ManagementMembershipListener.java     |    2 +-
 .../internal/ManagementResourceRepo.java           |    8 +-
 .../internal/MonitoringRegionCacheListener.java    |    4 +-
 .../internal/NotificationCacheListener.java        |    4 +-
 .../geode/management/internal/NotificationHub.java |   16 +-
 .../management/internal/NotificationHubClient.java |    2 +-
 .../geode/management/internal/NotificationKey.java |   19 +-
 .../geode/management/internal/OpenMethod.java      |    2 +-
 .../management/internal/OpenTypeConverter.java     |   19 +-
 .../geode/management/internal/ProxyInfo.java       |    4 +-
 .../geode/management/internal/RestAgent.java       |    8 +-
 .../management/internal/StringBasedFilter.java     |   10 +-
 .../internal/SystemManagementService.java          |    9 +-
 .../internal/api/GeodeConnectionConfig.java        |    3 +-
 .../internal/beans/AsyncEventQueueMBean.java       |    2 +-
 .../internal/beans/AsyncEventQueueMBeanBridge.java |   10 +-
 .../management/internal/beans/BeanUtilFuncs.java   |    9 +-
 .../internal/beans/CacheServerBridge.java          |   57 +-
 .../internal/beans/CacheServerMBean.java           |    2 +-
 .../management/internal/beans/DataQueryEngine.java |    6 +-
 .../internal/beans/DiskRegionBridge.java           |   14 +-
 .../management/internal/beans/DiskStoreMBean.java  |    2 +-
 .../internal/beans/DiskStoreMBeanBridge.java       |   30 +-
 .../beans/DistributedLockServiceBridge.java        |   12 +-
 .../beans/DistributedLockServiceMBean.java         |    2 +-
 .../internal/beans/DistributedRegionBridge.java    |   52 +-
 .../internal/beans/DistributedSystemBridge.java    |   68 +-
 .../internal/beans/DistributedSystemMBean.java     |    2 +-
 .../management/internal/beans/FileUploader.java    |    6 +-
 .../internal/beans/GatewayReceiverMBean.java       |    2 +-
 .../internal/beans/GatewaySenderMBean.java         |    2 +-
 .../internal/beans/GatewaySenderMBeanBridge.java   |   28 +-
 .../management/internal/beans/LocatorMBean.java    |    2 +-
 .../internal/beans/LocatorMBeanBridge.java         |   12 +-
 .../internal/beans/LockServiceMBean.java           |    2 +-
 .../internal/beans/LockServiceMBeanBridge.java     |    6 +-
 .../management/internal/beans/MBeanAggregator.java |   28 +-
 .../management/internal/beans/ManagerMBean.java    |    2 +-
 .../internal/beans/ManagerMBeanBridge.java         |    4 +-
 .../management/internal/beans/MemberMBean.java     |    2 +-
 .../internal/beans/MemberMBeanBridge.java          |    6 +-
 .../internal/beans/MetricsCalculator.java          |    2 +-
 .../internal/beans/PartitionedRegionBridge.java    |   22 +-
 .../internal/beans/QueryDataFunction.java          |    8 +-
 .../management/internal/beans/RegionMBean.java     |    2 +-
 .../internal/beans/RegionMBeanBridge.java          |   52 +-
 .../beans/RegionMBeanCompositeDataFactory.java     |    7 +-
 .../management/internal/beans/ServerBridge.java    |    6 +-
 .../internal/beans/stats/GCStatsMonitor.java       |    4 +-
 .../stats/GatewayReceiverClusterStatsMonitor.java  |    8 +-
 .../stats/GatewaySenderClusterStatsMonitor.java    |    8 +-
 .../beans/stats/IntegerStatsDeltaAggregator.java   |    8 +-
 .../beans/stats/LongStatsDeltaAggregator.java      |    8 +-
 .../internal/beans/stats/MBeanStatsMonitor.java    |    6 +-
 .../beans/stats/MemberClusterStatsMonitor.java     |   14 +-
 .../beans/stats/MemberLevelDiskMonitor.java        |    2 +-
 .../beans/stats/RegionClusterStatsMonitor.java     |   22 +-
 .../beans/stats/ServerClusterStatsMonitor.java     |    8 +-
 .../internal/beans/stats/StatsAggregator.java      |   32 +-
 .../internal/beans/stats/StatsAverageLatency.java  |    8 +-
 .../internal/beans/stats/StatsLatency.java         |    8 +-
 .../management/internal/beans/stats/StatsRate.java |    8 +-
 .../configuration/domain/CacheElement.java         |    2 +-
 .../configuration/domain/Configuration.java        |   54 +-
 .../domain/ConfigurationChangeResult.java          |   27 +-
 .../internal/configuration/domain/XmlEntity.java   |    2 -
 .../messages/ConfigurationResponse.java            |   21 +-
 .../SharedConfigurationStatusResponse.java         |    8 +-
 .../configuration/mutators/DeploymentManager.java  |    9 +-
 .../realizers/DeploymentRealizer.java              |    2 +-
 .../realizers/GatewayReceiverRealizer.java         |   10 +-
 .../configuration/realizers/IndexRealizer.java     |    2 +-
 .../realizers/RegionConfigRealizer.java            |   37 +-
 .../internal/configuration/utils/XmlUtils.java     |   10 +-
 .../internal/configuration/utils/ZipUtils.java     |    6 +-
 .../validators/DeploymentValidator.java            |    3 +-
 .../configuration/validators/MemberValidator.java  |    6 +-
 .../validators/RegionConfigValidator.java          |    2 +-
 .../functions/CacheRealizationFunction.java        |    4 +-
 .../internal/functions/CliFunctionResult.java      |  125 +-
 .../functions/GetMemberInformationFunction.java    |    4 +-
 .../geode/management/internal/i18n/CliStrings.java |   33 +-
 .../internal/json/AbstractJSONFormatter.java       |    8 +-
 .../internal/json/QueryResultFormatter.java        |    8 +-
 .../internal/messages/CompactRequest.java          |   12 +-
 .../internal/messages/CompactResponse.java         |    4 +-
 .../operation/OperationHistoryManager.java         |   16 +-
 .../internal/operation/OperationManager.java       |    2 +-
 .../internal/operation/OperationState.java         |   31 +-
 .../internal/security/AccessControlMBean.java      |    2 +-
 .../internal/security/MBeanServerWrapper.java      |    8 +-
 .../unsafe/ReadOpFileAccessController.java         |    2 +-
 .../management/internal/util/ManagementUtils.java  |   35 +-
 .../geode/management/internal/util/RegionPath.java |    4 +-
 .../internal/web/domain/QueryParameterSource.java  |    8 +-
 .../UniversalMembershipListenerAdapter.java        |   38 +-
 .../metrics/internal/CompoundMeterBinder.java      |    2 +-
 .../InternalDistributedSystemMetricsService.java   |    6 +-
 .../internal/SSLParameterExtensionContextImpl.java |    2 +-
 .../main/java/org/apache/geode/pdx/FieldType.java  |   12 +-
 .../java/org/apache/geode/pdx/JSONFormatter.java   |    4 +-
 .../geode/pdx/ReflectionBasedAutoSerializer.java   |   24 +-
 .../pdx/internal/AutoSerializableManager.java      |  211 +-
 .../geode/pdx/internal/CheckTypeRegistryState.java |    4 +-
 .../geode/pdx/internal/ClientTypeRegistration.java |    4 +-
 .../java/org/apache/geode/pdx/internal/EnumId.java |   15 +-
 .../org/apache/geode/pdx/internal/EnumInfo.java    |   82 +-
 .../geode/pdx/internal/LonerTypeRegistration.java  |    8 +-
 .../org/apache/geode/pdx/internal/PdxField.java    |   87 +-
 .../apache/geode/pdx/internal/PdxInstanceEnum.java |   46 +-
 .../geode/pdx/internal/PdxInstanceFactoryImpl.java |   74 +-
 .../apache/geode/pdx/internal/PdxInstanceImpl.java |   28 +-
 .../apache/geode/pdx/internal/PdxOutputStream.java |   66 +-
 .../apache/geode/pdx/internal/PdxReaderImpl.java   |   94 +-
 .../org/apache/geode/pdx/internal/PdxString.java   |   30 +-
 .../org/apache/geode/pdx/internal/PdxType.java     |  139 +-
 .../apache/geode/pdx/internal/PdxUnreadData.java   |   20 +-
 .../apache/geode/pdx/internal/PdxWriterImpl.java   |  276 +-
 .../geode/pdx/internal/PeerTypeRegistration.java   |    5 +-
 .../geode/pdx/internal/TrackingPdxReaderImpl.java  |  254 +-
 .../apache/geode/pdx/internal/TypeRegistry.java    |  169 +-
 .../apache/geode/pdx/internal/UnreadPdxType.java   |    6 +-
 .../internal/WeakConcurrentIdentityHashMap.java    |   12 +-
 .../pdx/internal/WritablePdxInstanceImpl.java      |   16 +-
 .../apache/geode/pdx/internal/json/JsonHelper.java |   49 +-
 .../geode/pdx/internal/json/PdxInstanceHelper.java |    2 +-
 .../pdx/internal/json/PdxInstanceSortedHelper.java |   15 +-
 .../apache/geode/pdx/internal/json/PdxToJSON.java  |   55 +-
 .../org/apache/geode/security/AuthInitialize.java  |    2 +-
 .../security/AuthenticationExpiredException.java   |   32 +
 .../geode/security/GemFireSecurityException.java   |   10 +-
 .../geode/security/NotAuthorizedException.java     |    8 +-
 .../apache/geode/security/ResourcePermission.java  |    8 +-
 .../org/apache/geode/security/SecurityManager.java |   12 +-
 .../apache/geode/services/result/impl/Failure.java |    2 +-
 ...alization.filter.SanctionedSerializablesService |   15 +
 ....apache.geode.internal.version.ComponentVersion |   16 +
 .../sanctioned-geode-core-serializables.txt        |    8 +-
 .../tools/gfsh/app/windowsbindings.properties      |   40 +-
 .../BaseLineAndCompareQueryPerfJUnitTest.java      |   40 +-
 .../DiskRegionPerfJUnitPerformanceTest.java        |    8 +-
 .../src/test/java/com/company/app/DBLoader.java    |    6 +-
 .../src/test/java/com/company/data/MySizer.java    |    2 +-
 .../org/apache/geode/SystemFailureJUnitTest.java   |    4 +-
 .../test/java/org/apache/geode/UnitTestDoclet.java |   29 +-
 .../apache/geode/admin/AlertLevelJUnitTest.java    |    8 +-
 .../admin/internal/DistributedSystemTestCase.java  |    8 +-
 .../geode/cache/AttributesFactoryJUnitTest.java    |   26 +-
 .../internal/ParallelAsyncEventQueueImplTest.java  |    4 +-
 .../cache/client/internal/AbstractOpTest.java      |   70 +-
 .../client/internal/AbstractOpWithTimeoutTest.java |    2 +-
 .../client/internal/AuthenticateUserOpTest.java    |  156 +
 .../internal/AutoConnectionSourceImplTest.java     |   99 +
 .../internal/ClientSideHandshakeImplTest.java      |  214 ++
 .../client/internal/ConnectionFactoryImplTest.java |  138 +
 .../internal/ExecuteFunctionOpRetryTest.java       |    4 +-
 .../internal/ExecuteRegionFunctionOpImplTest.java  |    4 +-
 .../internal/ExecuteRegionFunctionOpRetryTest.java |    4 +-
 .../internal/ExecuteRegionFunctionOpTest.java      |    4 +-
 .../ExecuteRegionFunctionSingleHopOpRetryTest.java |    4 +-
 .../cache/client/internal/GetAllOpJUnitTest.java   |    6 +-
 .../cache/client/internal/OpExecutorImplTest.java  |   64 +
 .../client/internal/OpExecutorImplUnitTest.java    |  151 +
 .../geode/cache/client/internal/PoolImplTest.java  |    3 +-
 .../client/internal/QueueManagerImplTest.java      |  192 ++
 .../cache/client/internal/TXFailoverOpTest.java    |    2 +-
 .../management/MXMemoryPoolListenerExample.java    |   44 +-
 .../org/apache/geode/cache/query/PerfQuery.java    |   60 +-
 .../functional/JavaSerializationJUnitTest.java     |    2 +-
 .../AbstractCompiledValueTestJUnitTest.java        |    4 +-
 .../query/internal/AttributeDescriptorTest.java    |    4 +-
 .../internal/CompiledAggregateFunctionTest.java    |    4 +-
 .../cache/query/internal/CompiledInJUnitTest.java  |   12 +-
 .../geode/cache/query/internal/QCompilerTest.java  |   32 +-
 .../QueryConfigurationServiceImplTest.java         |    6 +-
 .../cache/query/internal/QueryMonitorTest.java     |    2 +-
 .../QueryObjectSerializationJUnitTest.java         |   15 +-
 .../cache/query/internal/ResultsBagJUnitTest.java  |   82 +-
 .../ResultsBagLimitBehaviourJUnitTest.java         |  140 +-
 .../ResultsCollectionWrapperLimitJUnitTest.java    |   92 +-
 .../internal/StructBagLimitBehaviourJUnitTest.java |   24 +-
 .../cache/query/internal/StructSetJUnitTest.java   |    8 +-
 .../internal/index/CompactRangeIndexTest.java      |   18 +-
 .../internal/index/HashIndexSetJUnitTest.java      |   22 +-
 .../internal/index/IndexElemArrayJUnitTest.java    |   11 +-
 .../internal/index/MemoryIndexStoreJUnitTest.java  |    6 +-
 .../query/internal/types/TypeUtilsJUnitTest.java   |   18 +-
 .../org/apache/geode/cache/util/ObjectsTest.java   |    8 +-
 .../org/apache/geode/cache30/TestDiskRegion.java   |   23 +-
 .../java/org/apache/geode/cache30/TestHeapLRU.java |    2 +-
 .../geode/distributed/LocatorLauncherTest.java     |   43 +
 .../internal/ClusterElderManagerTest.java          |    4 +-
 .../internal/DistributionAdvisorTest.java          |    2 +-
 .../internal/DistributionConfigImplTest.java       |  692 +++++
 .../internal/DistributionConfigJUnitTest.java      |  497 ---
 .../internal/DistributionStatsTest.java            |   16 +-
 ...nternalConfigurationPersistenceServiceTest.java |    4 +-
 .../distributed/internal/InternalLocatorTest.java  |    3 +-
 .../internal/LocatorLoadSnapshotJUnitTest.java     |   24 +-
 .../distributed/internal/ReplyMessageTest.java     |   44 +
 .../internal/ServerLocationAndMemberIdTest.java    |    6 +-
 .../internal/StartupMessageDataJUnitTest.java      |   26 +-
 .../deadlock/UnsafeThreadLocalJUnitTest.java       |    2 +-
 .../internal/membership/InternalRoleJUnitTest.java |    2 +-
 .../auth/AbstractGMSAuthenticatorTestCase.java     |   26 +-
 .../GMSAuthenticatorWithAuthenticatorTest.java     |   72 +-
 .../GMSAuthenticatorWithSecurityManagerTest.java   |   60 +-
 .../org/apache/geode/internal/ByteArrayData.java   |   14 +-
 .../internal/CopyOnWriteHashSetJUnitTest.java      |   26 +-
 .../geode/internal/DataSerializableJUnitTest.java  |  862 +++---
 .../internal/DataSerializerHolderJUnitTest.java    |   34 +-
 .../DistributedSerializableObjectConfigTest.java   |   62 +
 ...lDataSerializerSerializationAcceptlistTest.java |  247 +-
 .../InternalDataSerializerShiroAcceptListTest.java |  163 +
 .../geode/internal/LineWrapUnitJUnitTest.java      |    4 +-
 .../apache/geode/internal/NanoTimerJUnitTest.java  |    4 +-
 .../geode/internal/ObjIdConcurrentMapTest.java     |    2 +-
 .../apache/geode/internal/ObjIdMapJUnitTest.java   |   44 +-
 .../internal/OneTaskOnlyDecoratorJUnitTest.java    |   48 +-
 .../internal/PutAllOperationContextJUnitTest.java  |    4 +-
 .../org/apache/geode/internal/SystemTimerTest.java |   10 +-
 .../internal/cache/AbstractCacheServerTest.java    |  178 ++
 .../internal/cache/AbstractDiskRegionTest.java     |    2 +-
 .../cache/AbstractDistributedRegionJUnitTest.java  |    2 +-
 .../internal/cache/AbstractRegionMapTest.java      |   14 +-
 .../cache/AbstractRegionMapTxApplyDestroyTest.java |   26 +-
 .../geode/internal/cache/BucketAdvisorTest.java    |   89 +
 .../internal/cache/BucketRegionJUnitTest.java      |    4 +-
 .../internal/cache/BucketRegionQueueHelper.java    |   16 +-
 .../internal/cache/BucketRegionQueueJUnitTest.java |  111 +-
 .../geode/internal/cache/BucketRegionTest.java     |  115 +-
 .../internal/cache/CacheOperationMessageTest.java  |    2 +-
 .../geode/internal/cache/DestroyMessageTest.java   |    2 +-
 .../geode/internal/cache/DiskIdJUnitTest.java      |    2 +-
 .../apache/geode/internal/cache/DiskUsageTest.java |   22 +-
 .../cache/DistributedCacheOperationTest.java       |   11 +-
 .../cache/DistributedPutAllOperationTest.java      |    2 +-
 ...tributedRegionFunctionStreamingMessageTest.java |    2 +-
 .../internal/cache/DistributedRegionJUnitTest.java |    6 +-
 .../cache/DistributedRemoveAllOperationTest.java   |    2 +-
 .../geode/internal/cache/EntryEventImplTest.java   |  102 +-
 .../cache/EntryEventSerializationTest.java         |    4 +-
 .../internal/cache/EnumListenerEventJUnitTest.java |    3 +-
 .../apache/geode/internal/cache/EventIDTest.java   |   48 +-
 ...eDisconnectedClientTransactionsMessageTest.java |    3 +-
 .../geode/internal/cache/ExpiryTaskTest.java       |  155 +
 .../cache/LatestLastAccessTimeMessageTest.java     |   11 +
 .../geode/internal/cache/LocalRegionTest.java      |   47 +
 .../internal/cache/NonLocalRegionEntryTest.java    |    2 +-
 .../geode/internal/cache/OldVLJUnitTest.java       |    8 +-
 .../internal/cache/OplogEntryIdMapJUnitTest.java   |   22 +-
 .../org/apache/geode/internal/cache/OplogTest.java |   56 +-
 .../cache/OrderedTombstoneMapJUnitTest.java        |    2 +-
 .../geode/internal/cache/OverflowOplogTest.java    |   53 +
 .../internal/cache/PRHARedundancyProviderTest.java |   76 +-
 .../cache/PartitionAttributesImplJUnitTest.java    |  306 +-
 .../cache/PartitionedRegionDataStoreTest.java      |   12 +-
 .../cache/PartitionedRegionQueryEvaluatorTest.java |   16 +-
 .../internal/cache/PartitionedRegionTest.java      |  130 +-
 .../internal/cache/ProxyBucketRegionTest.java      |   62 +
 .../cache/SearchLoadAndWriteProcessorTest.java     |   53 +-
 .../geode/internal/cache/SenderIdMonitorTest.java  |    7 +-
 .../cache/TXLastEventInTransactionUtilsTest.java   |   22 +-
 .../geode/internal/cache/TXManagerImplTest.java    |  136 +-
 .../cache/TXRegionLockRequestImplTest.java         |    2 +-
 .../geode/internal/cache/TXStateProxyImplTest.java |    2 +-
 .../geode/internal/cache/TXStateStubTest.java      |    2 +-
 .../apache/geode/internal/cache/TXStateTest.java   |    8 +-
 .../apache/geode/internal/cache/VLJUnitTest.java   |    8 +-
 .../internal/cache/ValueComparisonHelperTest.java  |    5 +-
 .../cache/backup/BackupDefinitionTest.java         |    2 +-
 .../internal/cache/backup/BackupServiceTest.java   |    2 +-
 .../FileSystemIncrementalBackupLocationTest.java   |    2 +-
 .../cache/backup/FinishBackupRequestTest.java      |    2 +-
 .../cache/backup/FinishBackupStepTest.java         |    2 +-
 .../cache/control/FilterByPathJUnitTest.java       |   10 +-
 .../cache/control/InternalResourceManagerTest.java |    2 +-
 .../control/RegionRedundancyStatusImplTest.java    |    4 +-
 .../cache/control/ResourceAdvisorTest.java         |    2 +-
 ...SerializableRegionRedundancyStatusImplTest.java |   56 +
 .../cache/entries/AbstractRegionEntryTest.java     |   12 +-
 .../cache/entries/DiskEntryHelperTest.java         |    4 +-
 .../event/NonDistributedEventTrackerTest.java      |    2 +-
 .../eviction/LRUListWithAsyncSortingTest.java      |    2 +-
 .../cache/execute/FunctionContextImplTest.java     |    2 +-
 .../cache/execute/LocalDataSetFunction.java        |    2 +-
 .../PartitionedRegionFunctionExecutorTest.java     |   55 +
 .../cache/execute/PerformanceTestFunction.java     |    5 +-
 .../extension/SimpleExtensionPointJUnitTest.java   |    6 +-
 .../cache/ha/EventIdOptimizationJUnitTest.java     |    4 +-
 .../geode/internal/cache/ha/HARegionQueueTest.java |    2 +-
 .../ha/QueueSynchronizationProcessorTest.java      |   18 +-
 .../cache/ha/ThreadIdentifierJUnitTest.java        |   12 +-
 .../cache/map/AbstractRegionMapPutTest.java        |    2 +-
 .../internal/cache/map/RegionMapDestroyTest.java   |    2 +-
 .../geode/internal/cache/map/RegionMapPutTest.java |   14 +-
 .../partitioned/FetchEntriesMessageJUnitTest.java  |    2 +-
 .../OfflineMembersDetailsJUnitTest.java            |    2 +-
 .../cache/partitioned/PartitionMessageTest.java    |    2 +-
 .../partitioned/PutPutReplyMessageJUnitTest.java   |    8 +-
 .../SingleThreadColocationLoggerTest.java          |    2 +-
 .../rebalance/BucketOperatorImplTest.java          |    4 +-
 .../rebalance/BucketOperatorWrapperTest.java       |   61 +-
 .../cache/partitioned/rebalance/MemberTest.java    |  107 +
 .../PartitionedRegionLoadModelJUnitTest.java       | 1118 +++++--
 .../cache/persistence/DefaultDiskDirsTest.java     |    6 +-
 .../PersistenceInitialImageAdvisorTest.java        |    5 +-
 .../entry/RegionEntryFactoryBuilderJUnitTest.java  |    5 +-
 .../cache/tier/sockets/BaseCommandJUnitTest.java   |    2 +-
 .../tier/sockets/CacheClientNotifierTest.java      |   99 +
 .../cache/tier/sockets/CacheClientProxyTest.java   |  178 ++
 .../tier/sockets/ClientHealthMonitorTest.java      |    4 +-
 .../tier/sockets/ClientProxyMembershipIDTest.java  |   64 +
 .../tier/sockets/ClientUpdateMessageImplTest.java  |  118 +
 .../cache/tier/sockets/ClientUserAuthsTest.java    |  630 ++++
 .../internal/cache/tier/sockets/HandshakeTest.java |   24 +
 .../cache/tier/sockets/MessageDispatcherTest.java  |  188 ++
 .../cache/tier/sockets/MessageIdExtractorTest.java |    8 +-
 .../cache/tier/sockets/MessageJUnitTest.java       |   52 +-
 .../tier/sockets/ObjectPartListJUnitTest.java      |    5 +-
 .../internal/cache/tier/sockets/PartTest.java      |    2 +-
 .../tier/sockets/RandomSubjectIdGeneratorTest.java |  148 +
 .../cache/tier/sockets/ServerConnectionTest.java   |  218 +-
 .../tier/sockets/command/CommitCommandTest.java    |    3 +-
 .../tier/sockets/command/ContainsKey66Test.java    |   82 +-
 .../tier/sockets/command/CreateRegionTest.java     |   78 +-
 .../tier/sockets/command/DestroyRegionTest.java    |   88 +-
 .../command/ExecuteRegionFunction66Test.java       |   22 +-
 .../command/ExecuteRegionFunctionGeode18Test.java  |   22 +-
 .../command/GatewayReceiverCommandTest.java        |  168 ++
 .../cache/tier/sockets/command/GetAll70Test.java   |   96 +-
 .../sockets/command/GetAllWithCallbackTest.java    |   90 +-
 .../GetClientPartitionAttributesCommand66Test.java |   24 +-
 .../tier/sockets/command/Invalidate70Test.java     |   96 +-
 .../cache/tier/sockets/command/KeySetTest.java     |   80 +-
 .../cache/tier/sockets/command/PingTest.java       |   62 +-
 .../cache/tier/sockets/command/Put70Test.java      |    2 +-
 .../sockets/command/PutUserCredentialsTest.java    |   79 +
 .../sockets/command/RegisterInterest61Test.java    |  110 +-
 .../command/RegisterInterestList66Test.java        |  117 +-
 .../cache/tier/sockets/command/RemoveAllTest.java  |  100 +-
 .../sockets/command/UnregisterInterestTest.java    |  115 +-
 .../cache/tx/AbstractPeerTXRegionStubTest.java     |    4 +-
 .../internal/cache/tx/ClientTXStateStubTest.java   |    4 +-
 .../cache/tx/PartitionedTXRegionStubTest.java      |   10 +-
 .../cache/tx/RemoteFetchEntryMessageTest.java      |    2 +-
 .../cache/tx/RemoteOperationMessageTest.java       |    4 +-
 .../cache/tx/RemotePutReplyMessageJUnitTest.java   |    8 +-
 .../cache/versions/AbstractVersionTagTestBase.java |    6 +-
 .../RegionVersionHolderBitSetJUnitTest.java        |    4 +-
 .../RegionVersionHolderRandomJUnitTest.java        |   23 +-
 .../cache/versions/RegionVersionVectorTest.java    |   10 +-
 .../AbstractGatewaySenderEventProcessorTest.java   |   32 +-
 .../cache/wan/GatewaySenderEventImplTest.java      |  134 +-
 ...entParallelGatewaySenderEventProcessorTest.java |    4 +-
 ...rallelGatewaySenderEventProcessorJUnitTest.java |   30 +-
 .../ParallelGatewaySenderEventProcessorTest.java   |    4 +-
 .../wan/parallel/ParallelGatewaySenderHelper.java  |   13 +-
 .../ParallelGatewaySenderQueueJUnitTest.java       |  220 +-
 .../ParallelQueueRemovalMessageJUnitTest.java      |   90 +-
 ...SerialGatewaySenderEventProcessorJUnitTest.java |   98 +-
 .../serial/SerialGatewaySenderQueueJUnitTest.java  |  101 +-
 .../TestSerialGatewaySenderEventProcessor.java     |    2 +-
 .../cache/xmlcache/AbstractEntityResolverTest.java |    3 +-
 .../cache/xmlcache/AbstractXmlParserJUnitTest.java |    2 +-
 .../cache/xmlcache/XmlGeneratorUtilsJUnitTest.java |   30 +-
 .../internal/classloader/ClassPathLoaderTest.java  |   11 +-
 .../internal/datasource/DataSourceFactoryTest.java |    4 +-
 .../geode/internal/jndi/ContextJUnitTest.java      |    8 +-
 .../internal/jta/functional/TestXACacheLoader.java |    2 +-
 .../geode/internal/lang/ClassUtilsJUnitTest.java   |  163 -
 .../internal/lang/InOutParameterJUnitTest.java     |   40 +-
 .../geode/internal/lang/ObjectUtilsJUnitTest.java  |    4 +-
 .../internal/lang/SystemPropertyHelperTest.java    |  148 +-
 .../apache/geode/internal/logging/BannerTest.java  |    9 +-
 .../geode/internal/logging/log4j/LogLevelTest.java |    2 +-
 .../monitoring/ThreadsMonitoringJUnitTest.java     |    2 +-
 .../internal/net/ByteBufferConcurrencyTest.java    |  131 +-
 .../geode/internal/net/ByteBufferVendorTest.java   |   10 +-
 .../geode/internal/net/NioPlainEngineTest.java     |   12 +-
 .../geode/internal/net/NioSslEngineTest.java       |   36 +-
 .../internal/net/SCClusterSocketCreatorTest.java   |   70 +
 .../apache/geode/internal/net/SSLConfigTest.java   |  184 ++
 .../net/SSLConfigurationFactoryJUnitTest.java      |  381 ---
 .../internal/net/SSLConfigurationFactoryTest.java  |  355 +++
 .../org/apache/geode/internal/net/SSLUtilTest.java |  120 +-
 .../geode/internal/net/SocketCreatorJUnitTest.java |  157 -
 .../geode/internal/net/SocketCreatorTest.java      |  269 ++
 .../offheap/AbstractStoredObjectTestBase.java      |    4 +-
 .../geode/internal/offheap/DataTypeJUnitTest.java  |   52 +-
 .../geode/internal/offheap/FragmentJUnitTest.java  |    6 +-
 .../internal/offheap/FreeListManagerTest.java      |  388 +--
 .../offheap/LifecycleListenerJUnitTest.java        |  118 +-
 .../MemoryAllocatorFillPatternJUnitTest.java       |   18 +-
 .../internal/offheap/MemoryAllocatorJUnitTest.java |   52 +-
 .../internal/offheap/MemoryBlockNodeJUnitTest.java |   11 +-
 .../offheap/MemoryInspectorImplJUnitTest.java      |   18 +-
 .../internal/offheap/OffHeapHelperJUnitTest.java   |    2 +-
 .../internal/offheap/OffHeapStorageJUnitTest.java  |    5 +-
 .../OffHeapStoredObjectAddressStackJUnitTest.java  |   16 +-
 .../offheap/OffHeapStoredObjectJUnitTest.java      |    2 +-
 .../offheap/RefCountChangeInfoJUnitTest.java       |   25 +-
 .../offheap/ReferenceCountHelperImplTest.java      |    2 +-
 .../internal/offheap/TinyMemoryBlockJUnitTest.java |    6 +-
 .../offheap/TinyStoredObjectJUnitTest.java         |    4 +-
 .../internal/ra/spi/JCALocalTransactionTest.java   |   12 +-
 .../security/IntegratedSecurityServiceTest.java    |  124 +-
 .../internal/security/SecurityServiceTest.java     |   72 +-
 .../ThreadLocalByteArrayCacheTest.java             |    2 +-
 .../geode/internal/size/ObjectTraverserPerf.java   |    2 +-
 .../size/SizeClassOnceObjectSizerJUnitTest.java    |    2 +-
 .../internal/statistics/CallbackSamplerTest.java   |    2 +-
 .../internal/statistics/FakeValueMonitor.java      |    4 +-
 .../internal/statistics/ResourceInstTest.java      |    8 +-
 .../internal/statistics/SampleCollectorTest.java   |   34 +-
 .../statistics/StatMonitorHandlerTest.java         |   18 +-
 ...MonitorHandlerWithEnabledMonitorThreadTest.java |   10 +-
 .../internal/statistics/StatisticsMonitorTest.java |   54 +-
 .../statistics/StatisticsTypeImplTest.java         |    4 +-
 .../internal/statistics/TestSampleHandler.java     |   46 +-
 .../meters/DoubleStatisticBindingTest.java         |    2 +-
 .../meters/LongStatisticBindingTest.java           |    2 +-
 .../apache/geode/internal/tcp/ConnectionTest.java  |   80 +-
 .../geode/internal/tcp/DirectReplySenderTest.java  |   43 +
 .../apache/geode/internal/tcp/MsgStreamerTest.java |    4 +-
 .../util/AbortableTaskServiceJUnitTest.java        |   93 +-
 .../internal/util/ArgumentRedactorJUnitTest.java   |  221 --
 .../geode/internal/util/ArgumentRedactorTest.java  |  675 +++++
 .../apache/geode/internal/util/ArrayUtilsTest.java |   18 +-
 .../apache/geode/internal/util/BlobHelperTest.java |   40 +-
 ...BlobHelperWithThreadContextClassLoaderTest.java |   43 +-
 .../internal/util/DelayedActionJUnitTest.java      |    9 +-
 .../apache/geode/internal/util/HostNameTest.java   |   21 +-
 .../internal/util/ProductVersionUtilTest.java      |   53 +
 .../org/apache/geode/internal/util/Valuable.java   |    4 +-
 .../CompactConcurrentHashSetJUnitTest.java         |    8 +-
 .../SemaphoreReadWriteLockJUnitTest.java           |   95 +-
 .../concurrent/StoppableCountDownLatchTest.java    |    4 +-
 .../redaction/CombinedSensitiveDictionaryTest.java |  130 +
 .../internal/util/redaction/ParserRegexTest.java   | 1006 +++++++
 .../util/redaction/RedactionDefaultsTest.java      |   80 +
 .../util/redaction/RegexRedactionStrategyTest.java |  396 +++
 .../redaction/SensitivePrefixDictionaryTest.java   |  160 +
 .../SensitiveSubstringDictionaryTest.java          |  160 +
 .../util/redaction/StringRedactionTest.java        |  254 ++
 .../management/internal/FederatingManagerTest.java |   12 +-
 .../internal/JmxRmiOpenTypesSerialFilterTest.java  |  351 ---
 .../management/internal/ManagementAgentTest.java   |   60 +
 .../api/LocatorClusterManagementServiceTest.java   |    4 +-
 ...ServerBridgeClientMembershipRegressionTest.java |    2 +-
 .../QueryDataFunctionApplyLimitClauseTest.java     |    8 +-
 .../stats/AggregateRegionStatsMonitorTest.java     |    5 +-
 .../stats/GatewaySenderOverflowMonitorTest.java    |    2 +-
 .../beans/stats/MBeanStatsMonitorTest.java         |   32 +-
 .../beans/stats/MemberLevelDiskMonitorTest.java    |    5 +-
 .../converters/AutoSerializerConverterTest.java    |    2 +-
 .../converters/ClassNameConverterTest.java         |    7 +-
 .../converters/GatewayReceiverConverterTest.java   |    4 +-
 .../converters/IndexConverterTest.java             |    2 +-
 .../configuration/converters/PdxConverterTest.java |    2 +-
 .../domain/CacheElementJUnitTest.java              |    2 +-
 .../configuration/domain/ConfigurationTest.java    |    2 +-
 .../mutators/DeploymentManagerTest.java            |    4 +-
 .../configuration/utils/XmlUtilsJUnitTest.java     |   15 +-
 .../validators/DeploymentValidatorTest.java        |    2 +-
 .../internal/json/QueryResultFormatterTest.java    |    2 +-
 .../operation/OperationHistoryManagerTest.java     |   11 +-
 .../operation/OperationStateConcurrentTest.java    |    2 +-
 .../internal/operation/OperationStateTest.java     |   44 +
 .../internal/security/ResourcePermissionTest.java  |    4 +-
 .../internal/util/ManagementUtilsTest.java         |   44 +
 ...nternalDistributedSystemMetricsServiceTest.java |    2 +-
 .../apache/geode/pdx/internal/EnumInfoTest.java    |    2 +-
 .../geode/pdx/internal/PdxInstanceImplTest.java    |    2 +-
 .../geode/pdx/internal/TypeRegistryTest.java       |    8 +-
 .../geode/pdx/internal/json/PdxToJSONTest.java     |   59 +
 .../security/GemFireSecurityExceptionTest.java     |    8 +-
 .../geode/security/NotAuthorizedExceptionTest.java |    8 +-
 .../test/java/org/apache/geode/sequence/Arrow.java |    6 +-
 .../apache/geode/sequence/DefaultLineMapper.java   |    2 +-
 .../geode/sequence/GemfireSequenceDisplay.java     |   46 +-
 .../org/apache/geode/sequence/HydraLineMapper.java |    5 +-
 .../java/org/apache/geode/sequence/Lifeline.java   |    6 +-
 .../org/apache/geode/sequence/LifelineState.java   |    2 +-
 .../java/org/apache/geode/sequence/LineMapper.java |    2 +-
 .../apache/geode/sequence/SelectGraphDialog.java   |   34 +-
 .../org/apache/geode/sequence/SequenceDiagram.java |   26 +-
 .../org/apache/geode/sequence/StateColorMap.java   |    6 +-
 .../java/org/apache/geode/sequence/TimeAxis.java   |    4 +-
 .../org/apache/geode/sequence/ZoomingPanel.java    |   28 +-
 .../geode/test/process/MainLauncherJUnitTest.java  |   48 +-
 .../java/org/apache/persistence/admin/Logger.java  |   10 +-
 .../org/apache/persistence/logging/Handler.java    |   14 +-
 .../java/org/apache/persistence/logging/Level.java |   12 +-
 .../org/apache/persistence/logging/LogRecord.java  |   24 +-
 .../org/apache/persistence/logging/Logger.java     |   32 +-
 .../persistence/logging/SimpleFormatter.java       |   10 +-
 .../apache/persistence/logging/StreamHandler.java  |   14 +-
 geode-core/src/test/resources/expected-pom.xml     |   57 +-
 .../org.mockito.plugins.MockMaker                  |   16 +
 .../cli/commands/golden-help-offline.properties    |   11 -
 .../geode/ClusterCommunicationsDUnitTest.java      |   53 +-
 ...overWithMixedVersionServersDistributedTest.java |   26 +-
 .../internal/cache/TxCommitMessageBCTestBase.java  |   17 +-
 .../RollingUpgrade2DUnitTestBase.java              |    7 +-
 .../rollingupgrade/RollingUpgradeDUnitTest.java    |   19 +-
 ...gradeHARegionNameOnDifferentServerVersions.java |    4 +-
 ...UpgradeOplogMagicSeqBackwardCompactibility.java |    2 +-
 .../RollingUpgradeVerifyXmlEntity.java             |    9 +-
 .../internal/net/SocketCreatorUpgradeTest.java     |  667 ++++
 .../AuthExpirationBackwardCompatibleDUnitTest.java |  729 +++++
 .../AuthExpirationTransactionUpgradeTest.java      |  315 ++
 .../ClientAuthenticationPart2DUnitTest.java        |    4 +-
 .../security/ClientAuthenticationTestCase.java     |   18 +-
 ...tAuthorizationLegacyConfigurationDUnitTest.java |    4 +-
 ...aAuthorizationUsingLegacySecurityDUnitTest.java |    4 +-
 ...onUsingLegacySecurityWithFailoverDUnitTest.java |   16 +-
 .../DeltaClientAuthorizationDUnitTest.java         |   18 +-
 .../test/version/VersionManagerUpgradeTest.java    |    4 +-
 geode-cq/build.gradle                              |    4 +-
 .../geode/cache/query/cq/CQDistributedTest.java    |    2 +-
 .../geode/cache/query/cq/CQMetricsDUnitTest.java   |    3 +-
 .../geode/cache/query/cq/dunit/CqDUnitTest.java    |  228 ++
 .../cache/query/cq/dunit/CqDataDUnitTest.java      |   78 +-
 .../query/cq/dunit/CqDataUsingPoolDUnitTest.java   |   52 +-
 .../cache/query/cq/dunit/CqPerfDUnitTest.java      |   15 +-
 .../query/cq/dunit/CqPerfUsingPoolDUnitTest.java   |   61 +-
 .../cache/query/cq/dunit/CqQueryDUnitTest.java     |   41 +-
 .../cq/dunit/CqQueryOptimizedExecuteDUnitTest.java |   13 +-
 .../query/cq/dunit/CqQueryUsingPoolDUnitTest.java  |  107 +-
 .../cq/dunit/CqResultSetUsingPoolDUnitTest.java    |   24 +-
 ...esultSetUsingPoolOptimizedExecuteDUnitTest.java |    4 +-
 .../cache/query/cq/dunit/CqStatsDUnitTest.java     |   10 +-
 .../query/cq/dunit/CqStatsUsingPoolDUnitTest.java  |   12 +-
 .../cache/query/cq/dunit/CqTimeTestListener.java   |   98 +-
 .../DestroyPartitionedRegionMessageDUnitTest.java  |    4 +-
 ...nvalidatePartitionedRegionMessageDUnitTest.java |    4 +-
 .../dunit/PartitionedRegionCqQueryDUnitTest.java   |   63 +-
 ...onedRegionCqQueryOptimizedExecuteDUnitTest.java |   21 +-
 .../query/cq/dunit/PrCqUsingPoolDUnitTest.java     |   44 +-
 .../cache/query/dunit/PdxQueryCQDUnitTest.java     |   51 +-
 .../cache/query/dunit/PdxQueryCQTestBase.java      |   91 +-
 .../query/dunit/QueryIndexUpdateRIDUnitTest.java   |  118 +-
 .../cache/query/dunit/QueryMonitorDUnitTest.java   |   38 +-
 .../query/dunit/QueryWithRangeIndexDUnitTest.java  |  206 ++
 ...igurationServiceConstraintsDistributedTest.java |    4 +-
 .../cache/PRDeltaPropagationDUnitTest.java         |   93 +-
 .../cache/PutAllClientServerDistributedTest.java   |  559 ++--
 .../cache/RemoteCQTransactionDUnitTest.java        |   10 +-
 .../internal/cache/ha/CQListGIIDUnitTest.java      |  103 +-
 .../internal/cache/ha/HADispatcherDUnitTest.java   |   49 +-
 .../tier/sockets/ClientToServerDeltaDUnitTest.java |  245 +-
 .../sockets/DeltaPropagationWithCQDUnitTest.java   |   16 +-
 ...ltaToRegionRelationCQRegistrationDUnitTest.java |  169 +-
 .../DurableClientCQClusterRestartDUnitTest.java    |  316 ++
 .../tier/sockets/DurableClientCQDUnitTest.java     |  154 +-
 .../tier/sockets/DurableClientCrashDUnitTest.java  |   10 +-
 .../sockets/DurableClientHAQueuedDUnitTest.java    |  138 +-
 .../sockets/DurableClientNetDownDUnitTest.java     |   18 +-
 .../tier/sockets/DurableClientSimpleDUnitTest.java |  270 +-
 .../cache/tier/sockets/DurableClientTestBase.java  |   39 +-
 .../cache/tier/sockets/DurableClientTestCase.java  |  204 +-
 .../management/CacheServerManagementDUnitTest.java |   24 +-
 .../AlterQueryServiceCommandDistributedTest.java   |    4 +-
 .../commands/DescribeClientCommandDUnitTest.java   |    1 -
 .../commands/DurableClientCommandsDUnitTest.java   |    1 -
 .../management/internal/pulse/TestCQDUnitTest.java |   10 +-
 .../internal/pulse/TestClientsDUnitTest.java       |   11 +-
 .../internal/pulse/TestServerDUnitTest.java        |    6 +-
 .../security/CQPDXPostProcessorDUnitTest.java      |    4 +-
 .../geode/security/CQPostProcessorDunitTest.java   |    2 +-
 .../ClientCQPostAuthorizationDUnitTest.java        |   12 +-
 .../security/ClientPostAuthorizationDUnitTest.java |    5 +-
 .../geode/security/ClientQueryAuthDUnitTest.java   |    2 +-
 .../geode/security/FilterPostAuthorization.java    |   34 +-
 .../geode/security/FilterPreAuthorization.java     |   16 +-
 .../geode/security/MultiUserAPIDUnitTest.java      |   78 +-
 .../security/MultiUserDurableCQAuthzDUnitTest.java |    6 +-
 .../org/apache/geode/security/ObjectWithAuthz.java |   16 +-
 .../CqSecurityAllowedUsersDistributedTest.java     |    2 +-
 .../CqSecurityForbiddenUsersDistributedTest.java   |    2 +-
 ...ctionedSerializablesServiceIntegrationTest.java |   39 +
 .../AnalyzeCQSerializablesIntegrationTest.java     |   38 +
 .../AnalyzeCQSerializablesJUnitTest.java           |   34 -
 .../apache/geode/codeAnalysis/excludedClasses.txt  |    2 -
 .../org/apache/geode/codeAnalysis/openBugs.txt     |   21 -
 .../cq/internal/CQDistributedSystemService.java    |   43 -
 .../internal/CQSanctionedSerializablesService.java |   27 +
 .../cache/query/cq/internal/ClientCQImpl.java      |  132 +-
 .../cache/query/cq/internal/CqConflatable.java     |   12 +-
 .../geode/cache/query/cq/internal/CqEventImpl.java |   42 +-
 .../geode/cache/query/cq/internal/CqQueryImpl.java |   66 +-
 .../cache/query/cq/internal/CqServiceImpl.java     |  144 +-
 .../query/cq/internal/CqServiceStatisticsImpl.java |   12 +-
 .../cache/query/cq/internal/CqServiceVsdStats.java |   50 +-
 .../cache/query/cq/internal/CqStatisticsImpl.java  |    8 +-
 .../cache/query/cq/internal/ServerCQImpl.java      |  102 +-
 .../cache/query/cq/internal/command/CloseCQ.java   |   11 +-
 .../query/cq/internal/command/ExecuteCQ61.java     |   30 +-
 .../query/cq/internal/command/GetCQStats.java      |    7 +-
 .../query/cq/internal/command/GetDurableCQs.java   |    8 +-
 .../cache/query/cq/internal/command/MonitorCQ.java |    7 +-
 .../cache/query/cq/internal/command/StopCQ.java    |   11 +-
 .../cache/query/cq/internal/ops/CreateCQOp.java    |   27 +-
 .../query/cq/internal/ops/CreateCQWithIROp.java    |   17 +-
 .../query/cq/internal/ops/GetDurableCQsOp.java     |    6 +-
 .../query/cq/internal/ops/ServerCQProxyImpl.java   |   33 +-
 ...e.distributed.internal.DistributedSystemService |   16 -
 ...alization.filter.SanctionedSerializablesService |   15 +
 .../cache/tier/sockets/command/CloseCQTest.java    |   27 +-
 .../cache/tier/sockets/command/StopCQTest.java     |   27 +-
 .../geode/test/dunit/rules/CQUnitTestRule.java     |    1 +
 .../tier/sockets/ClientServerMiscBCDUnitTest.java  |   10 +-
 .../geode-deployment-legacy/build.gradle           |   26 +-
 .../backup/BackupFileCopierIntegrationTest.java    |    2 +-
 .../deployment/JarDeployerIntegrationTest.java     |   28 +-
 .../internal/LegacyClasspathServiceImpl.java       |   23 +-
 .../geode/deployment/internal/DeployedJar.java     |   52 +-
 .../geode/deployment/internal/JarDeployer.java     |   34 +-
 .../legacy/LegacyJarDeploymentService.java         |   96 +-
 .../internal/JarDeployerDeadlockTest.java          |   10 +-
 .../src/test/resources/expected-pom.xml            |   17 -
 .../copy_on_read.html.md.erb                       |    2 +-
 .../data_regions/managing_data_regions.html.md.erb |    2 +-
 .../cluster_config/export-import.html.md.erb       |    9 +-
 geode-docs/developing/book_intro.html.md.erb       |    9 -
 ...ementing_write_behind_event_handler.html.md.erb |    6 +-
 .../geode_apis_compatible_with_redis.html.md.erb   |  240 --
 geode-docs/getting_started/book_intro.html.md.erb  |    3 +
 .../getting_started/intro_to_clients.html.md.erb   |  365 +++
 geode-docs/images/Apache_Tomcat_Homepage.png       |  Bin 0 -> 134725 bytes
 .../geode_apis_compatible_with_redis.svg           |   19 -
 .../disk_storage/how_disk_stores_work.html.md.erb  |    2 +-
 .../disk_storage/using_disk_stores.html.md.erb     |    5 -
 .../logging/configuring_log4j2.html.md.erb         |   10 +-
 .../managing/logging/how_logging_works.html.md.erb |    4 +-
 .../management/jmx_manager_operations.html.md.erb  |    4 +-
 ...t_communication_have_enough_sockets.html.md.erb |    2 +-
 ...twork_partitioning_management_works.html.md.erb |    2 +-
 .../security/authentication_examples.html.md.erb   |   25 +-
 .../security/authentication_overview.html.md.erb   |    4 +
 .../security/authorization_example.html.md.erb     |   18 +
 .../implementing_authentication.html.md.erb        |  289 +-
 .../implementing_authentication_expiry.html.md.erb |   70 +
 .../implementing_authorization.html.md.erb         |   13 +-
 .../troubleshooting/chapter_overview.html.md.erb   |    3 +
 .../log_messages_and_solutions.html.md.erb         | 1564 ++++++++++
 .../system_failure_and_recovery.html.md.erb        |   51 +-
 geode-docs/reference/statistics_list.html.md.erb   |    1 +
 .../topics/gemfire_properties.html.md.erb          |   20 +-
 .../topics/region_shortcuts_table.html.md.erb      |  515 +---
 geode-docs/rest_apps/rest_examples.html.md.erb     |    2 +-
 geode-docs/tools_modules/book_intro.html.md.erb    |    8 +
 .../tools_modules/geode_for_redis.html.md.erb      |  256 ++
 .../gfsh/command-pages/connect.html.md.erb         |    4 +-
 .../gfsh/command-pages/create.html.md.erb          |   18 +-
 .../gfsh/command-pages/import.html.md.erb          |   10 +-
 .../gfsh/command-pages/start.html.md.erb           |  562 +---
 .../gfsh/command-pages/wan_copy_region.html.md.erb |  192 ++
 .../gfsh/gfsh_command_index.html.md.erb            |    5 +-
 .../gfsh/quick_ref_commands_by_area.html.md.erb    |    3 +-
 .../http_session_mgmt/quick_start.html.md.erb      |   45 +-
 .../tc_installing_the_module.html.md.erb           |    9 +-
 .../tomcat_changing_gf_default_cfg.html.md.erb     |   31 +-
 .../tomcat_installing_the_module.html.md.erb       |   38 +-
 .../tomcat_setting_up_the_module.html.md.erb       |   72 +-
 .../weblogic_setting_up_the_module.html.md.erb     |    4 +-
 .../micrometer/micrometer-meters.html.md.erb       |    2 +-
 .../multisite_overview.html.md.erb                 |    5 -
 geode-dunit/build.gradle                           |    2 +-
 .../examples/AsyncInvokeCallableExampleTest.java   |   14 +-
 .../tests/ClusterStartupRuleDistributedTest.java   |   36 +
 .../ClusterStartupRuleLimitedVmCountTest.java      |   34 +
 .../DistributedDiskDirRuleDistributedTest.java     |   17 +-
 .../DistributedErrorCollectorDistributedTest.java  |    6 +-
 ...dExecutorServiceRuleLimitedThreadCountTest.java |  103 +
 ...butedExecutorServiceRuleLimitedVmCountTest.java |   37 +
 ...xecutorServiceRuleUnlimitedThreadCountTest.java |   75 +
 .../tests/DistributedRuleLimitedVmCountTest.java   |   34 +
 .../tests/MemberStarterRuleAwaitDUnitTest.java     |    2 +-
 .../MemberStarterRuleAwaitIntegrationTest.java     |    6 +-
 .../test/dunit/tests/BasicDistributedTest.java     |   14 +-
 .../tests/GetCurrentVmNumDistributedTest.java      |    3 +-
 .../geode/test/dunit/tests/VMDistributedTest.java  |   34 +-
 .../AnalyzeDUnitSerializablesIntegrationTest.java  |   65 +
 ...ctionedSerializablesServiceIntegrationTest.java |   39 +
 .../junit/rules/DiskDirRuleIntegrationTest.java    |    5 +-
 .../apache/geode/codeAnalysis/excludedClasses.txt  |    4 +
 .../codeAnalysis/sanctionedDataSerializables.txt   |   47 +
 .../cache/client/internal/LocatorTestBase.java     |    6 +-
 .../apache/geode/cache/query/QueryTestUtils.java   |   24 +-
 .../cache/query/cq/dunit/CqQueryTestListener.java  |  327 +-
 .../cache/query/dunit/CloseCacheAuthorization.java |    4 +-
 .../geode/cache/query/dunit/HelperTestCase.java    |    8 +-
 .../geode/cache/query/dunit/SecurityTestUtils.java |  108 +
 .../apache/geode/cache/query/dunit/TestObject.java |   42 +-
 .../OrderByPartitionedJUnitTestBase.java           |   48 +-
 .../functional/OrderByTestImplementation.java      |   89 +-
 .../internal/index/IndexTrackingTestHook.java      |    8 +-
 .../org/apache/geode/cache30/CacheXmlTestCase.java |   10 +-
 .../geode/cache30/MultiVMRegionTestCase.java       |  225 +-
 .../org/apache/geode/cache30/RegionTestCase.java   |  130 +-
 .../apache/geode/cache30/TestCacheCallback.java    |   15 +-
 .../apache/geode/cache30/TestCacheListener.java    |   30 +-
 .../org/apache/geode/cache30/TestCacheLoader.java  |    2 +-
 .../org/apache/geode/cache30/TestCacheWriter.java  |    8 +-
 .../cache/CustomerIDPartitionResolver.java         |    7 +-
 .../cache/PartitionedRegionGetSomeKeys.java        |    2 +-
 .../cache/execute/CustomerIDPartitionResolver.java |    6 +-
 .../cache/execute/PRColocationDUnitTestHelper.java |   33 -
 .../execute/PRColocationDistributedTestHelper.java |   33 +
 .../internal/cache/execute/data/Customer.java      |   17 +-
 .../geode/internal/cache/execute/data/Order.java   |   15 +-
 .../internal/cache/execute/data/Shipment.java      |   15 +-
 .../internal/cache/functions/TestFunction.java     |   72 +-
 .../cache/tier/sockets/CacheServerTestUtil.java    |   85 +-
 .../sockets/ClientServerMiscDUnitTestBase.java     |   27 +-
 .../cache/wan/AsyncEventQueueTestBase.java         |   97 +-
 .../org/apache/geode/management/MBeanUtil.java     |    6 +-
 .../management/internal/cli/HeadlessGfsh.java      |   22 +-
 .../commands/ExportLogsDistributedTestBase.java    |   10 +-
 .../ExportLogsStatsDistributedTestBase.java        |    3 +-
 .../commands/FunctionCommandsDUnitTestBase.java    |  310 --
 .../FunctionCommandsDistributedTestBase.java       |  311 ++
 .../cli/commands/GcCommandDUnitTestBase.java       |  116 -
 .../cli/commands/GcCommandDistributedTestBase.java |  116 +
 .../commands/GemfireDataCommandsDUnitTestBase.java |  365 ---
 .../GeodeDataCommandsDistributedTestBase.java      |  297 ++
 .../commands/ListIndexCommandDUnitTestBase.java    |   87 -
 .../ListIndexCommandDistributedTestBase.java       |   89 +
 .../cli/commands/QueryCommandDUnitTestBase.java    |  389 ---
 .../commands/QueryCommandDistributedTestBase.java  |  463 +++
 .../commands/QueryCommandIntegrationTestBase.java  |    4 +-
 .../RegionMembershipMBeanDUnitTestBase.java        |  386 ---
 .../RegionMembershipMBeanDistributedTestBase.java  |  383 +++
 .../commands/ShowDeadlockDistributedTestBase.java  |    3 +-
 .../ShowLogCommandDistributedTestBase.java         |    3 +-
 .../internal/configuration/ClusterConfig.java      |   95 +-
 .../configuration/ClusterConfigTestBase.java       |   12 +-
 .../apache/geode/pdx/JSONFormatVerifyUtility.java  |    4 +-
 .../security/ClientAuthorizationTestCase.java      |  158 +-
 .../apache/geode/security/SecurityTestUtils.java   |   49 +-
 .../generator/AuthzCredentialGenerator.java        |   37 +-
 .../security/generator/CredentialGenerator.java    |   35 +-
 .../generator/DummyAuthzCredentialGenerator.java   |   12 +-
 .../generator/LdapUserCredentialGenerator.java     |    2 +-
 .../generator/PKCSCredentialGenerator.java         |    4 +-
 .../security/generator/SSLCredentialGenerator.java |    8 +-
 .../UserPasswordWithExtraPropsAuthInit.java        |    9 +-
 .../generator/XmlAuthzCredentialGenerator.java     |   45 +-
 .../AbstractQuerySecurityDistributedTest.java      |    2 +-
 .../security/templates/DummyAuthorization.java     |   24 +-
 .../templates/FunctionSecurityPrmsHolder.java      |    6 +-
 .../security/templates/LdapUserAuthenticator.java  |   18 +-
 .../geode/security/templates/PKCSAuthInit.java     |    3 +-
 .../security/templates/PKCSAuthenticator.java      |   21 +-
 .../geode/security/templates/PKCSPrincipal.java    |    4 +-
 .../security/templates/UsernamePrincipal.java      |    4 +-
 .../geode/security/templates/XmlAuthorization.java |   79 +-
 .../geode/security/templates/XmlErrorHandler.java  |    4 +-
 .../org/apache/geode/test/dunit/Disconnect.java    |    2 +-
 .../geode/test/dunit/DistributedTestUtils.java     |    4 +-
 .../java/org/apache/geode/test/dunit/Host.java     |   10 +-
 .../java/org/apache/geode/test/dunit/Invoke.java   |    2 +-
 .../geode/test/dunit/SerializableCallable.java     |    6 +-
 .../geode/test/dunit/SerializableRunnable.java     |    6 +-
 .../geode/test/dunit/StoppableWaitCriterion.java   |    2 +-
 .../org/apache/geode/test/dunit/ThreadUtils.java   |    4 +-
 .../org/apache/geode/test/dunit/WaitCriterion.java |    4 +-
 .../dunit/cache/internal/JUnit4CacheTestCase.java  |   12 +-
 .../geode/test/dunit/internal/DUnitHost.java       |    2 +-
 .../geode/test/dunit/internal/DUnitLauncher.java   |   25 +-
 .../DUnitSanctionedSerializablesService.java       |   27 +
 .../test/dunit/internal/IdentifiableCallable.java  |    6 +-
 .../test/dunit/internal/IdentifiableRunnable.java  |    6 +-
 .../dunit/internal/JUnit4DistributedTestCase.java  |   63 +-
 .../geode/test/dunit/internal/ProcessHolder.java   |    4 +-
 .../geode/test/dunit/internal/ProcessManager.java  |   76 +-
 .../test/dunit/internal/StandAloneDUnitEnv.java    |    2 +-
 .../apache/geode/test/dunit/rules/CacheRule.java   |    2 +-
 .../geode/test/dunit/rules/CacheXmlRule.java       |   31 +-
 .../geode/test/dunit/rules/ClientCacheRule.java    |    2 +-
 .../apache/geode/test/dunit/rules/ClientVM.java    |    2 +-
 .../geode/test/dunit/rules/ClusterStartupRule.java |   36 +-
 .../test/dunit/rules/DistributedBlackboard.java    |    6 +-
 .../test/dunit/rules/DistributedDiskDirRule.java   |   18 +-
 .../dunit/rules/DistributedErrorCollector.java     |    4 +-
 .../rules/DistributedExecutorServiceRule.java      |  173 +-
 .../geode/test/dunit/rules/DistributedMap.java     |    2 +-
 .../test/dunit/rules/DistributedReference.java     |    8 +-
 .../rules/DistributedRestoreSystemProperties.java  |    8 +-
 .../geode/test/dunit/rules/DistributedRule.java    |    4 +-
 .../DistributedUseJacksonForJsonPathRule.java      |    8 +-
 .../apache/geode/test/dunit/rules/MemberVM.java    |    4 +-
 .../test/dunit/rules/SerializableFunction.java     |    7 +
 .../apache/geode/test/greplogs/LogConsumer.java    |    2 +-
 .../geode/test/junit/rules/ClientCacheRule.java    |    6 +-
 .../apache/geode/test/junit/rules/DiskDirRule.java |   14 +-
 .../geode/test/junit/rules/GfshCommandRule.java    |   22 +-
 .../junit/rules/LocatorLauncherStartupRule.java    |    5 +-
 .../geode/test/junit/rules/MemberStarterRule.java  |   29 +-
 .../junit/rules/ServerLauncherStartupRule.java     |    5 +-
 .../geode/test/junit/rules/ServerStarterRule.java  |   14 +-
 .../apache/geode/test/junit/rules/VMProvider.java  |    6 +-
 ...alization.filter.SanctionedSerializablesService |   15 +
 .../sanctioned-geode-dunit-serializables.txt       |  185 ++
 .../security/templates/PKCSPrincipalTest.java      |    2 +-
 .../security/templates/UsernamePrincipalTest.java  |    2 +-
 .../test/dunit/internal/VMEventNotifierTest.java   |    4 +-
 geode-dunit/src/test/resources/expected-pom.xml    |    5 +
 geode-for-redis/README.md                          |  326 ++
 geode-for-redis/build.gradle                       |  136 +
 .../gfsh.png                                       |  Bin
 ...CommandPipeliningNativeRedisAcceptanceTest.java |    0
 .../GeodeRedisServerStartupAcceptanceTest.java     |  217 ++
 .../apache/geode/redis/NativeRedisClusterTest.java |  109 +
 ...eRedisServerStartupUsingGfshAcceptanceTest.java |  167 +
 .../GlobPatternNativeRedisAcceptanceTest.java      |   32 +
 .../executor/UnknownNativeRedisAcceptanceTest.java |   32 +
 .../cluster/ClusterNativeRedisAcceptanceTest.java  |   31 +
 .../connection/AuthNativeRedisAcceptanceTest.java  |   79 +
 .../ClientNativeRedisAcceptanceTest.java           |   34 +
 .../connection/EchoNativeRedisAcceptanceTest.java  |   37 +
 .../connection/PingNativeRedisAcceptanceTest.java  |   33 +
 .../SelectNativeRedisAcceptanceTest.java           |   33 +
 .../hash/HScanNativeRedisAcceptanceTest.java       |   35 +
 .../hash/HashesNativeRedisAcceptanceTest.java      |   36 +
 .../hash/HincrByFloatNativeRedisAccetanceTest.java |   36 +
 .../executor/key/DelNativeRedisAcceptanceTest.java |   37 +
 .../key/DumpRestoreNativeRedisAcceptanceTest.java  |   37 +
 .../key/ExistsNativeRedisAcceptanceTest.java       |   37 +
 .../key/ExpireAtNativeRedisAcceptanceTest.java     |   37 +
 .../key/ExpireNativeRedisAcceptanceTest.java       |   37 +
 .../key/KeysNativeRedisAcceptanceTest.java         |   36 +
 .../key/PExpireAtNativeRedisAcceptanceTest.java    |   37 +
 .../key/PTTLNativeRedisAcceptanceTest.java         |   37 +
 .../key/PersistNativeRedisAcceptanceTest.java      |   37 +
 .../key/PexpireNativeRedisAcceptanceTest.java      |   37 +
 .../key/RenameNXNativeRedisAcceptanceTest.java     |   36 +
 .../key/RenameNativeRedisAcceptanceTest.java       |   36 +
 .../key/ScanNativeRedisAcceptanceTest.java         |   37 +
 .../executor/key/TTLNativeRedisAcceptanceTest.java |   35 +
 .../key/TypeNativeRedisAcceptanceTest.java         |   35 +
 .../key/UnlinkNativeRedisAcceptanceTest.java       |   37 +
 .../list/LIndexNativeRedisAcceptanceTest.java      |   36 +
 .../list/LLenNativeRedisAcceptanceTest.java        |   37 +
 .../list/LPopNativeRedisAcceptanceTest.java        |   37 +
 .../list/LPushNativeRedisAcceptanceTest.java       |   37 +
 .../list/LPushxNativeRedisAcceptanceTest.java      |   37 +
 .../list/LRangeNativeRedisAcceptanceTest.java      |   36 +
 .../LettucePubSubNativeRedisAcceptanceTest.java    |   32 +
 .../NativeRedisSubCommandsIntegrationTest.java     |   38 +
 .../pubsub/PubSubNativeRedisAcceptanceTest.java    |   88 +
 .../SubscriptionsNativeRedisAcceptanceTest.java    |   31 +
 .../server/DBSizeNativeRedisAcceptanceTest.java    |   32 +
 .../server/FlushAllNativeRedisAcceptanceTest.java  |   32 +
 .../server/FlushDBNativeRedisAcceptanceTest.java   |   32 +
 .../HitsMissesNativeRedisAcceptanceTest.java       |   31 +
 .../server/InfoNativeRedisAcceptanceTest.java      |   31 +
 .../server/InfoStatsNativeRedisAcceptanceTest.java |   41 +
 .../MemoryStatsNativeRedisAcceptanceTest.java      |   37 +
 .../server/SlowlogNativeRedisAcceptanceTest.java   |   31 +
 .../server/TimeNativeRedisAcceptanceTest.java      |   32 +
 .../set/SCardNativeRedisAcceptanceTest.java        |   34 +
 .../set/SDiffNativeRedisAcceptanceTest.java        |   37 +
 .../set/SDiffStoreNativeRedisAcceptanceTest.java   |   37 +
 .../set/SInterNativeRedisAcceptanceTest.java       |   37 +
 .../set/SInterStoreNativeRedisAcceptanceTest.java  |   37 +
 .../set/SIsMemberNativeRedisAcceptanceTest.java    |   36 +
 .../set/SMoveNativeRedisAcceptanceTest.java        |   37 +
 .../set/SPopNativeRedisAcceptanceTest.java         |   37 +
 .../set/SRandMemberNativeRedisAcceptanceTest.java  |   34 +
 .../set/SRemNativeRedisAcceptanceTest.java         |   37 +
 .../set/SScanNativeRedisAcceptanceTest.java        |   37 +
 .../set/SUnionNativeRedisAcceptanceTest.java       |   37 +
 .../set/SUnionStoreNativeRedisAcceptanceTest.java  |   36 +
 .../set/SetsNativeRedisAcceptanceTest.java         |   37 +
 .../sortedset/ZAddNativeRedisAcceptanceTest.java   |   36 +
 .../sortedset/ZCardNativeRedisAcceptanceTest.java  |   36 +
 .../sortedset/ZCountNativeRedisAcceptanceTest.java |   35 +
 .../ZIncrByNativeRedisIntegrationTest.java         |   35 +
 .../ZInterStoreNativeRedisAcceptanceTest.java      |   36 +
 .../ZLexCountNativeRedisAcceptanceTest.java        |   34 +
 .../ZPopMaxNativeRedisAcceptanceTest.java          |   36 +
 .../ZPopMinNativeRedisAcceptanceTest.java          |   36 +
 .../ZRangeByLexNativeRedisAcceptanceTest.java      |   34 +
 .../ZRangeByScoreNativeRedisAcceptanceTest.java    |   35 +
 .../sortedset/ZRangeNativeRedisAcceptanceTest.java |   36 +
 .../sortedset/ZRankNativeRedisAcceptanceTest.java  |   35 +
 .../sortedset/ZRemNativeRedisAcceptanceTest.java   |   34 +
 .../ZRemRangeByLexNativeRedisAcceptanceTest.java   |   34 +
 .../ZRemRangeByRankNativeRedisAcceptanceTest.java  |   35 +
 .../ZRemRangeByScoreNativeRedisAcceptanceTest.java |   35 +
 .../ZRevRangeByLexNativeRedisAcceptanceTest.java   |   34 +
 .../ZRevRangeByScoreNativeRedisAcceptanceTest.java |   36 +
 .../ZRevRangeNativeRedisAcceptanceTest.java        |   36 +
 .../ZRevRankNativeRedisAcceptanceTest.java         |   35 +
 .../sortedset/ZScanNativeRedisIntegrationTest.java |   35 +
 .../sortedset/ZScoreNativeRedisAcceptanceTest.java |   35 +
 .../ZUnionStoreNativeRedisAcceptanceTest.java      |   36 +
 .../string/AppendNativeRedisAcceptanceTest.java    |   35 +
 .../string/BitCountNativeRedisAcceptanceTest.java  |   35 +
 .../string/BitOpNativeRedisAcceptanceTest.java     |   35 +
 .../string/BitPosNativeRedisAcceptanceTest.java    |   31 +
 .../string/DecrByNativeRedisAcceptanceTest.java    |   35 +
 .../string/DecrNativeRedisAcceptanceTest.java      |   36 +
 .../string/GetBitNativeRedisAcceptanceTest.java    |   35 +
 .../string/GetNativeRedisAcceptanceTest.java       |   35 +
 .../string/GetRangeNativeRedisAcceptanceTest.java  |   36 +
 .../string/GetSetNativeRedisAcceptanceTest.java    |   36 +
 .../IncrByFloatNativeRedisAcceptanceTest.java      |   35 +
 .../string/IncrByNativeRedisAcceptanceTest.java    |   35 +
 .../string/IncrNativeRedisAcceptanceTest.java      |   36 +
 .../string/MGetNativeRedisAcceptanceTest.java      |   35 +
 .../string/MSetNXNativeRedisAcceptanceTest.java    |   36 +
 .../string/MSetNativeRedisAcceptanceTest.java      |   36 +
 .../string/PSetEXNativeRedisAcceptanceTest.java    |   36 +
 .../string/SetBitNativeRedisAcceptanceTest.java    |   36 +
 .../string/SetExNativeRedisAcceptanceTest.java     |   36 +
 .../string/SetNXNativeRedisAcceptanceTest.java     |   36 +
 .../string/SetNativeRedisAcceptanceTest.java       |   35 +
 .../string/SetRangeNativeRedisAcceptanceTest.java  |   36 +
 .../string/StringNativeRedisAcceptanceTest.java    |   36 +
 .../MemoryOverheadNativeRedisAcceptanceTest.java   |   64 +
 .../session/NativeRedisSessionAcceptanceTest.java  |   62 +
 ...NativeRedisSessionExpirationAcceptanceTest.java |   56 +
 .../resources/0001-configure-redis-tests.patch     | 2546 ++++++++++++++++
 .../resources/testcontainers.properties            |    0
 .../java/org/apache/geode/NativeRedisTestRule.java |   94 +
 .../java/org/apache/geode/redis/ClusterNode.java   |   76 +
 .../java/org/apache/geode/redis/ClusterNodes.java  |  126 +
 .../geode/redis/ConcurrentLoopingThreads.java      |  191 ++
 .../apache/geode/redis/GeodeRedisServerRule.java   |   86 +
 .../geode/redis/NativeRedisClusterTestRule.java    |  199 ++
 .../apache/geode/redis/RedisIntegrationTest.java   |   42 +
 .../proxy/ClusterNodesResponseProcessor.java       |   65 +
 .../proxy/ClusterSlotsResponseProcessor.java       |    0
 .../geode/redis/internal/proxy/HostPort.java       |    0
 .../redis/internal/proxy/MovedResponseHandler.java |   64 +
 .../internal/proxy/NoopRedisResponseProcessor.java |    0
 .../geode/redis/internal/proxy/RedisProxy.java     |   88 +
 .../internal/proxy/RedisProxyInboundHandler.java   |  195 ++
 .../internal/proxy/RedisProxyOutboundHandler.java  |   75 +
 .../internal/proxy/RedisResponseProcessor.java     |    0
 .../geode/redis/internal/ssl/TestSSLServer.java    | 1491 +++++++++
 .../geode/redis/mocks/MockBinarySubscriber.java    |   45 +
 .../apache/geode/redis/mocks/MockSubscriber.java   |  241 ++
 .../test/dunit/rules/RedisClusterStartupRule.java  |  273 ++
 .../commonTest/resources/redis-cluster-compose.yml |   65 +
 .../geode/redis/CheckPrimaryBucketFunction.java    |  137 +
 .../geode/redis/ExpiringSecurityManager.java       |   57 +
 .../apache/geode/redis/OutOfMemoryDUnitTest.java   |  373 +++
 .../org/apache/geode/redis/RedisDistDUnitTest.java |  229 ++
 .../java/org/apache/geode/redis/SSLDUnitTest.java  |  336 +++
 .../geode/redis/UserExpirationDUnitTest.java       |  113 +
 .../commands/executor/FlushAllDUnitTest.java       |  108 +
 .../internal/commands/executor/MovedDUnitTest.java |  172 ++
 .../cluster/ClusterSlotsAndNodesDUnitTest.java     |  317 ++
 .../cluster/JedisAndLettuceClusterDUnitTest.java   |   85 +
 .../commands/executor/hash/HExistsDUnitTest.java   |  134 +
 .../commands/executor/hash/HGetDUnitTest.java      |   89 +
 .../commands/executor/hash/HKeysDUnitTest.java     |  156 +
 .../commands/executor/hash/HMgetDUnitTest.java     |   96 +
 .../commands/executor/hash/HMsetDUnitTest.java     |  231 ++
 .../commands/executor/hash/HScanDunitTest.java     |  157 +
 .../commands/executor/hash/HSetNXDunitTest.java    |   85 +
 .../executor/hash/HashesAndCrashesDUnitTest.java   |  290 ++
 .../commands/executor/hash/HdelDUnitTest.java      |  164 +
 .../commands/executor/hash/HlenDUnitTest.java      |  164 +
 .../commands/executor/hash/HsetDUnitTest.java      |  232 ++
 .../commands/executor/hash/HstrlenDUnitTest.java   |   97 +
 .../commands/executor/hash/HvalsDUnitTest.java     |   96 +
 .../key/AbstractRenameRedirectionsDUnitTest.java   |  110 +
 .../commands/executor/key/ExpireDUnitTest.java     |  179 ++
 .../NativeRedisRenameRedirectionsDUnitTest.java    |   36 +
 .../commands/executor/key/PersistDUnitTest.java    |  114 +
 .../key/RadishRenameRedirectionsDUnitTest.java     |   45 +
 .../commands/executor/key/RenameDUnitTest.java     |  352 +++
 .../commands/executor/list/LPopDUnitTest.java      |  185 ++
 .../commands/executor/list/LPushDUnitTest.java     |  202 ++
 .../executor/pubsub/PubSubConcurrentDUnitTest.java |  295 ++
 .../commands/executor/pubsub/PubSubDUnitTest.java  |  490 +++
 .../commands/executor/set/SaddDUnitTest.java       |  150 +
 .../commands/executor/set/SremDUnitTest.java       |  173 ++
 .../commands/executor/sortedset/ZAddDUnitTest.java |  128 +
 .../sortedset/ZAddIncrOptionDUnitTest.java         |  230 ++
 .../commands/executor/sortedset/ZRemDUnitTest.java |  275 ++
 .../sortedset/ZRemRangeByLexDUnitTest.java         |  277 ++
 .../sortedset/ZRemRangeByRankDUnitTest.java        |  257 ++
 .../sortedset/ZRemRangeByScoreDUnitTest.java       |  258 ++
 .../commands/executor/string/MSetDUnitTest.java    |  193 ++
 .../commands/executor/string/MSetNXDUnitTest.java  |  183 ++
 .../commands/executor/string/StringsDUnitTest.java |  371 +++
 .../geode/redis/internal/data/DeltaDUnitTest.java  |  213 ++
 .../data/PartitionedRegionStatsUpdateTest.java     |  467 +++
 .../auth/AuthWhileServersRestartDUnitTest.java     |  134 +
 .../StringsKillMultipleServersDUnitTest.java       |  120 +
 .../cluster/RedisPartitionResolverDUnitTest.java   |  128 +
 .../geode/redis/session/RedisSessionDUnitTest.java |  157 +
 .../geode/redis/session/SessionDUnitTest.java      |  253 ++
 .../redis/session/SessionExpirationDUnitTest.java  |  177 ++
 .../redis/session/SessionsAndCrashesDUnitTest.java |  225 ++
 .../RedisSpringTestApplication.java                |    0
 .../SessionController.java                         |    0
 .../config/SessionListener.java                    |    0
 .../config/WebMvcConfig.java                       |   62 +
 .../AnalyzeRedisSerializablesIntegrationTest.java  |   37 +
 .../AbstractCommandPipeliningIntegrationTest.java  |  128 +
 .../redis/CommandPipeliningIntegrationTest.java    |    0
 .../geode/redis/ConcurrentLoopingThreadsTest.java  |  148 +
 .../redis/RedisCommandArgumentsTestHelper.java     |  130 +
 .../org/apache/geode/redis/RedisTestHelper.java    |   44 +
 .../geode/redis/internal/GeodeServerRunTest.java   |    0
 ...ctionedSerializablesServiceIntegrationTest.java |   40 +
 .../AbstractGlobPatternIntegrationTest.java        |  292 ++
 .../executor/AbstractUnknownIntegrationTest.java   |   64 +
 .../executor/GlobPatternIntegrationTest.java       |   32 +
 .../commands/executor/UnknownIntegrationTest.java  |   40 +
 .../cluster/AbstractClusterIntegrationTest.java    |   99 +
 .../executor/cluster/ClusterIntegrationTest.java   |   46 +
 .../common/UnsupportedCommandsIntegrationTest.java |   82 +
 .../connection/AbstractAuthIntegrationTest.java    |  287 ++
 .../connection/AbstractClientIntegrationTest.java  |  136 +
 .../connection/AbstractEchoIntegrationTest.java    |   56 +
 .../connection/AbstractPingIntegrationTest.java    |   74 +
 .../connection/AbstractSelectIntegrationTest.java  |   56 +
 .../executor/connection/AuthIntegrationTest.java   |  323 ++
 .../executor/connection/ClientIntegrationTest.java |   40 +
 .../executor/connection/EchoIntegrationTest.java   |   33 +
 .../executor/connection/PingIntegrationTest.java   |   33 +
 .../executor/connection/QuitIntegrationTest.java   |   83 +
 .../executor/connection/SelectIntegrationTest.java |   44 +
 .../hash/AbstractHScanIntegrationTest.java         |  607 ++++
 .../hash/AbstractHashesIntegrationTest.java        |  893 ++++++
 .../hash/AbstractHincrByFloatIntegrationTest.java  |  183 ++
 .../executor/hash/HScanIntegrationTest.java        |   49 +
 .../executor/hash/HashesIntegrationTest.java       |   31 +
 .../executor/hash/HincrByFloatIntegrationTest.java |   32 +
 .../executor/key/AbstractDelIntegrationTest.java   |  118 +
 .../key/AbstractDumpRestoreIntegrationTest.java    |  263 ++
 .../key/AbstractExistsIntegrationTest.java         |  190 ++
 .../key/AbstractExpireAtIntegrationTest.java       |  129 +
 .../key/AbstractExpireIntegrationTest.java         |  354 +++
 .../executor/key/AbstractKeysIntegrationTest.java  |  125 +
 .../key/AbstractPExpireAtIntegrationTest.java      |   72 +
 .../executor/key/AbstractPTTLIntegrationTest.java  |   65 +
 .../key/AbstractPersistIntegrationTest.java        |  144 +
 .../key/AbstractPexpireIntegrationTest.java        |  108 +
 .../key/AbstractRenameIntegrationTest.java         |  435 +++
 .../key/AbstractRenameNXIntegrationTest.java       |  445 +++
 .../executor/key/AbstractScanIntegrationTest.java  |  303 ++
 .../executor/key/AbstractTTLIntegrationTest.java   |   83 +
 .../executor/key/AbstractTypeIntegrationTest.java  |   78 +
 .../key/AbstractUnlinkIntegrationTest.java         |  118 +
 .../commands/executor/key/DelIntegrationTest.java  |   32 +
 .../executor/key/DumpRestoreIntegrationTest.java   |   69 +
 .../executor/key/ExistsIntegrationTest.java        |   32 +
 .../executor/key/ExpireAtIntegrationTest.java      |   32 +
 .../executor/key/ExpireIntegrationTest.java        |   32 +
 .../commands/executor/key/KeysIntegrationTest.java |   33 +
 .../executor/key/PExpireAtIntegrationTest.java     |   32 +
 .../commands/executor/key/PTTLIntegrationTest.java |   32 +
 .../executor/key/PersistIntegrationTest.java       |   31 +
 .../executor/key/PexpireIntegrationTest.java       |   32 +
 .../executor/key/RenameIntegrationTest.java        |   32 +
 .../executor/key/RenameNXIntegrationTest.java      |   32 +
 .../commands/executor/key/ScanIntegrationTest.java |   56 +
 .../commands/executor/key/TTLIntegrationTest.java  |   32 +
 .../commands/executor/key/TypeIntegrationTest.java |   33 +
 .../executor/key/UnlinkIntegrationTest.java        |   32 +
 .../list/AbstractLIndexIntegrationTest.java        |  145 +
 .../executor/list/AbstractLLenIntegrationTest.java |  104 +
 .../executor/list/AbstractLPopIntegrationTest.java |  115 +
 .../list/AbstractLPushIntegrationTest.java         |  118 +
 .../list/AbstractLPushxIntegrationTest.java        |  132 +
 .../list/AbstractLRangeIntegrationTest.java        |  186 ++
 .../executor/list/LIndexIntegrationTest.java       |   30 +
 .../executor/list/LLenIntegrationTest.java         |   31 +
 .../executor/list/LPopIntegrationTest.java         |   43 +
 .../executor/list/LPushIntegrationTest.java        |   30 +
 .../executor/list/LPushxIntegrationTest.java       |   30 +
 .../executor/list/LRangeIntegrationTest.java       |   30 +
 .../AbstractLettucePubSubIntegrationTest.java      |  384 +++
 .../pubsub/AbstractPubSubIntegrationTest.java      |  981 ++++++
 .../pubsub/AbstractSubCommandsIntegrationTest.java |  379 +++
 .../AbstractSubscriptionsIntegrationTest.java      |  198 ++
 .../pubsub/LettucePubSubIntegrationTest.java       |   32 +
 .../executor/pubsub/PubSubIntegrationTest.java     |   31 +
 .../pubsub/SubCommandsIntegrationTest.java         |   33 +
 .../pubsub/SubscriptionsIntegrationTest.java       |   53 +
 .../server/AbstractDBSizeIntegrationTest.java      |   53 +
 .../server/AbstractFlushAllIntegrationTest.java    |   67 +
 .../server/AbstractFlushDBIntegrationTest.java     |   59 +
 .../server/AbstractHitsMissesIntegrationTest.java  |  674 +++++
 .../server/AbstractInfoIntegrationTest.java        |  295 ++
 .../AbstractRedisInfoStatsIntegrationTest.java     |  319 ++
 .../AbstractRedisMemoryStatsIntegrationTest.java   |   91 +
 .../server/AbstractSlowlogIntegrationTest.java     |  148 +
 .../server/AbstractTimeIntegrationTest.java        |   74 +
 .../executor/server/CommandIntegrationTest.java    |  187 ++
 .../executor/server/DBSizeIntegrationTest.java     |   32 +
 .../executor/server/FlushAllIntegrationTest.java   |   39 +
 .../executor/server/FlushDBIntegrationTest.java    |   33 +
 .../executor/server/HitsMissesIntegrationTest.java |   32 +
 .../executor/server/InfoIntegrationTest.java       |   46 +
 .../executor/server/InfoStatsIntegrationTest.java  |   41 +
 .../executor/server/LolWutIntegrationTest.java     |  140 +
 .../server/MemoryStatsIntegrationTest.java         |   30 +
 .../executor/server/ShutdownIntegrationTest.java   |   65 +
 .../executor/server/SlowlogIntegrationTest.java    |   34 +
 .../executor/server/TimeIntegrationTest.java       |   32 +
 .../executor/set/AbstractSCardIntegrationTest.java |  105 +
 .../executor/set/AbstractSDiffIntegrationTest.java |  235 ++
 .../set/AbstractSDiffStoreIntegrationTest.java     |  235 ++
 .../set/AbstractSInterIntegrationTest.java         |  191 ++
 .../set/AbstractSInterStoreIntegrationTest.java    |  237 ++
 .../set/AbstractSIsMemberIntegrationTest.java      |  109 +
 .../executor/set/AbstractSMoveIntegrationTest.java |  243 ++
 .../executor/set/AbstractSPopIntegrationTest.java  |  196 ++
 .../set/AbstractSRandMemberIntegrationTest.java    |  165 +
 .../executor/set/AbstractSRemIntegrationTest.java  |  182 ++
 .../executor/set/AbstractSScanIntegrationTest.java |  469 +++
 .../set/AbstractSUnionIntegrationTest.java         |  189 ++
 .../set/AbstractSUnionStoreIntegrationTest.java    |  243 ++
 .../executor/set/AbstractSetsIntegrationTest.java  |  126 +
 .../executor/set/SCardIntegrationTest.java         |   29 +
 .../executor/set/SDiffIntegrationTest.java         |   31 +
 .../executor/set/SDiffStoreIntegrationTest.java    |   31 +
 .../executor/set/SInterIntegrationTest.java        |   31 +
 .../executor/set/SInterStoreIntegrationTest.java   |   31 +
 .../executor/set/SIsMemberIntegrationTest.java     |   31 +
 .../executor/set/SMoveIntegrationTest.java         |   31 +
 .../commands/executor/set/SPopIntegrationTest.java |   31 +
 .../executor/set/SRandMemberIntegrationTest.java   |   29 +
 .../commands/executor/set/SRemIntegrationTest.java |   31 +
 .../executor/set/SScanIntegrationTest.java         |   65 +
 .../executor/set/SUnionIntegrationTest.java        |   31 +
 .../executor/set/SUnionStoreIntegrationTest.java   |   31 +
 .../commands/executor/set/SetsIntegrationTest.java |   31 +
 .../sortedset/AbstractZAddIntegrationTest.java     |  484 +++
 .../sortedset/AbstractZCardIntegrationTest.java    |   88 +
 .../sortedset/AbstractZCountIntegrationTest.java   |  207 ++
 .../sortedset/AbstractZIncrByIntegrationTest.java  |  311 ++
 .../AbstractZInterStoreIntegrationTest.java        |  841 ++++++
 .../AbstractZLexCountIntegrationTest.java          |  247 ++
 .../sortedset/AbstractZPopMaxIntegrationTest.java  |  164 +
 .../sortedset/AbstractZPopMinIntegrationTest.java  |  177 ++
 .../AbstractZRangeByLexIntegrationTest.java        |  432 +++
 .../AbstractZRangeByScoreIntegrationTest.java      |  391 +++
 .../sortedset/AbstractZRangeIntegrationTest.java   |  158 +
 .../sortedset/AbstractZRankIntegrationTest.java    |  247 ++
 .../sortedset/AbstractZRemIntegrationTest.java     |  152 +
 .../AbstractZRemRangeByLexIntegrationTest.java     |  317 ++
 .../AbstractZRemRangeByRankIntegrationTest.java    |  205 ++
 .../AbstractZRemRangeByScoreIntegrationTest.java   |  271 ++
 .../AbstractZRevRangeByLexIntegrationTest.java     |  441 +++
 .../AbstractZRevRangeByScoreIntegrationTest.java   |  381 +++
 .../AbstractZRevRangeIntegrationTest.java          |  199 ++
 .../sortedset/AbstractZRevRankIntegrationTest.java |  141 +
 .../sortedset/AbstractZScanIntegrationTest.java    |  559 ++++
 .../sortedset/AbstractZScoreIntegrationTest.java   |   97 +
 .../AbstractZUnionStoreIntegrationTest.java        |  536 ++++
 .../executor/sortedset/ZAddIntegrationTest.java    |   31 +
 .../executor/sortedset/ZCardIntegrationTest.java   |   31 +
 .../executor/sortedset/ZCountIntegrationTest.java  |   30 +
 .../executor/sortedset/ZIncrByIntegrationTest.java |   30 +
 .../sortedset/ZInterStoreIntegrationTest.java      |   31 +
 .../sortedset/ZLexCountIntegrationTest.java        |   30 +
 .../executor/sortedset/ZPopMaxIntegrationTest.java |   31 +
 .../executor/sortedset/ZPopMinIntegrationTest.java |   31 +
 .../sortedset/ZRangeByLexIntegrationTest.java      |   30 +
 .../sortedset/ZRangeByScoreIntegrationTest.java    |   30 +
 .../executor/sortedset/ZRangeIntegrationTest.java  |   31 +
 .../executor/sortedset/ZRankIntegrationTest.java   |   31 +
 .../executor/sortedset/ZRemIntegrationTest.java    |   29 +
 .../sortedset/ZRemRangeByLexIntegrationTest.java   |   30 +
 .../sortedset/ZRemRangeByRankIntegrationTest.java  |   29 +
 .../sortedset/ZRemRangeByScoreIntegrationTest.java |   29 +
 .../sortedset/ZRevRangeByLexIntegrationTest.java   |   30 +
 .../sortedset/ZRevRangeByScoreIntegrationTest.java |   30 +
 .../sortedset/ZRevRangeIntegrationTest.java        |   31 +
 .../sortedset/ZRevRankIntegrationTest.java         |   30 +
 .../executor/sortedset/ZScanIntegrationTest.java   |   47 +
 .../executor/sortedset/ZScoreIntegrationTest.java  |   31 +
 .../sortedset/ZUnionStoreIntegrationTest.java      |   31 +
 .../string/AbstractAppendIntegrationTest.java      |  136 +
 .../string/AbstractBitCountIntegrationTest.java    |  112 +
 .../string/AbstractBitOpIntegrationTest.java       |  218 ++
 .../string/AbstractBitPosIntegrationTest.java      |  183 ++
 .../string/AbstractDecrByIntegrationTest.java      |  162 +
 .../string/AbstractDecrIntegrationTest.java        |   89 +
 .../string/AbstractGetBitIntegrationTest.java      |   89 +
 .../string/AbstractGetIntegrationTest.java         |   93 +
 .../string/AbstractGetRangeIntegrationTest.java    |  265 ++
 .../string/AbstractGetSetIntegrationTest.java      |  134 +
 .../string/AbstractIncrByFloatIntegrationTest.java |  183 ++
 .../string/AbstractIncrByIntegrationTest.java      |  137 +
 .../string/AbstractIncrIntegrationTest.java        |  121 +
 .../AbstractLettuceAppendIntegrationTest.java      |   61 +
 .../string/AbstractMGetIntegrationTest.java        |   97 +
 .../string/AbstractMSetIntegrationTest.java        |  159 +
 .../string/AbstractMSetNXIntegrationTest.java      |  172 ++
 .../string/AbstractPSetEXIntegrationTest.java      |   73 +
 .../string/AbstractSetBitIntegrationTest.java      |  106 +
 .../string/AbstractSetEXIntegrationTest.java       |   71 +
 .../string/AbstractSetIntegrationTest.java         |  545 ++++
 .../string/AbstractSetNXIntegrationTest.java       |  106 +
 .../string/AbstractSetRangeIntegrationTest.java    |  117 +
 .../string/AbstractStringIntegrationTest.java      |  154 +
 .../executor/string/AppendIntegrationTest.java     |   31 +
 .../executor/string/BitCountIntegrationTest.java   |   31 +
 .../executor/string/BitOpIntegrationTest.java      |   31 +
 .../executor/string/BitPosIntegrationTest.java     |   32 +
 .../executor/string/DecrByIntegrationTest.java     |   31 +
 .../executor/string/DecrIntegrationTest.java       |   31 +
 .../executor/string/GetBitIntegrationTest.java     |   31 +
 .../executor/string/GetIntegrationTest.java        |   31 +
 .../executor/string/GetRangeIntegrationTest.java   |   31 +
 .../executor/string/GetSetIntegrationTest.java     |   31 +
 .../string/IncrByFloatIntegrationTest.java         |   31 +
 .../executor/string/IncrByIntegrationTest.java     |   31 +
 .../executor/string/IncrIntegrationTest.java       |   31 +
 .../string/LettuceAppendIntegrationTest.java       |   31 +
 .../executor/string/MGetIntegrationTest.java       |   31 +
 .../executor/string/MSetIntegrationTest.java       |   31 +
 .../executor/string/MSetNXIntegrationTest.java     |   31 +
 .../executor/string/PSetEXIntegrationTest.java     |   31 +
 .../executor/string/SetBitIntegrationTest.java     |   31 +
 .../executor/string/SetEXIntegrationTest.java      |   31 +
 .../executor/string/SetIntegrationTest.java        |   31 +
 .../executor/string/SetNXIntegrationTest.java      |   31 +
 .../executor/string/SetRangeIntegrationTest.java   |   31 +
 .../executor/string/StringIntegrationTest.java     |   31 +
 .../AbstractMemoryOverheadIntegrationTest.java     |  327 ++
 .../data/MemoryOverheadIntegrationTest.java        |  108 +
 .../pubsub/SubscriptionsIntegrationTest.java       |  140 +
 .../LockingStripedCoordinatorIntegrationTest.java  |   67 +
 .../statistics/GeodeRedisStatsIntegrationTest.java |   57 +
 .../apache/geode/codeAnalysis/excludedClasses.txt  |   20 +
 .../codeAnalysis/sanctionedDataSerializables.txt   |   39 +
 .../collections/OrderedStatisticTreeBenchmark.java |   71 +
 .../data/collections/RedisHashMapBenchmark.java    |   71 +
 .../geode/redis/internal/GeodeRedisServer.java     |  161 +
 .../geode/redis/internal/GeodeRedisService.java    |  121 +
 .../geode/redis/internal/RedisConstants.java       |  106 +
 .../geode/redis/internal/RedisException.java       |   42 +
 .../geode/redis/internal/RedisProperties.java      |  105 +
 .../geode/redis/internal/commands/Command.java     |  234 ++
 .../commands/RedisCommandSupportLevel.java         |   23 +
 .../redis/internal/commands/RedisCommandType.java  |  594 ++++
 .../internal/commands/executor/BaseSetOptions.java |   57 +
 .../commands/executor/CommandExecutor.java         |   39 +
 .../internal/commands/executor/GlobPattern.java    |  134 +
 .../internal/commands/executor/RedisResponse.java  |  226 ++
 .../commands/executor/UnknownExecutor.java         |   41 +
 .../internal/commands/executor/cluster/CRC16.java  |   79 +
 .../commands/executor/cluster/ClusterExecutor.java |  196 ++
 .../executor/cluster/RedisPartitionResolver.java   |   35 +
 .../commands/executor/connection/AuthExecutor.java |   65 +
 .../executor/connection/ClientExecutor.java        |   81 +
 .../commands/executor/connection/EchoExecutor.java |   31 +
 .../commands/executor/connection/PingExecutor.java |   58 +
 .../commands/executor/connection/QuitExecutor.java |   32 +
 .../executor/connection/SelectExecutor.java        |   36 +
 .../commands/executor/hash/HDelExecutor.java       |   61 +
 .../commands/executor/hash/HExistsExecutor.java    |   55 +
 .../commands/executor/hash/HGetAllExecutor.java    |   55 +
 .../commands/executor/hash/HGetExecutor.java       |   55 +
 .../commands/executor/hash/HIncrByExecutor.java    |   77 +
 .../executor/hash/HIncrByFloatExecutor.java        |   79 +
 .../commands/executor/hash/HKeysExecutor.java      |   54 +
 .../commands/executor/hash/HLenExecutor.java       |   49 +
 .../commands/executor/hash/HMGetExecutor.java      |   57 +
 .../commands/executor/hash/HMSetExecutor.java      |   64 +
 .../commands/executor/hash/HScanExecutor.java      |   42 +
 .../commands/executor/hash/HSetExecutor.java       |   62 +
 .../commands/executor/hash/HSetNXExecutor.java     |   41 +
 .../commands/executor/hash/HStrLenExecutor.java    |   39 +
 .../commands/executor/hash/HValsExecutor.java      |   63 +
 .../executor/key/AbstractRenameExecutor.java       |   77 +
 .../executor/key/AbstractScanExecutor.java         |  129 +
 .../commands/executor/key/DelExecutor.java         |   48 +
 .../commands/executor/key/DumpExecutor.java        |   41 +
 .../commands/executor/key/ExistsExecutor.java      |   47 +
 .../commands/executor/key/ExpireAtExecutor.java    |   61 +
 .../commands/executor/key/ExpireExecutor.java      |   66 +
 .../commands/executor/key/KeysExecutor.java        |   54 +
 .../commands/executor/key/PExpireAtExecutor.java   |   26 +
 .../commands/executor/key/PExpireExecutor.java     |   26 +
 .../commands/executor/key/PTTLExecutor.java        |   27 +
 .../commands/executor/key/PersistExecutor.java     |   37 +
 .../commands/executor/key/RenameExecutor.java      |   48 +
 .../commands/executor/key/RenameNXExecutor.java    |   47 +
 .../commands/executor/key/RestoreExecutor.java     |  110 +
 .../commands/executor/key/RestoreOptions.java      |   42 +
 .../commands/executor/key/ScanExecutor.java        |  147 +
 .../commands/executor/key/TTLExecutor.java         |   61 +
 .../commands/executor/key/TypeExecutor.java        |   41 +
 .../commands/executor/list/LIndexExecutor.java     |   55 +
 .../commands/executor/list/LLenExecutor.java       |   38 +
 .../commands/executor/list/LPopExecutor.java       |   39 +
 .../commands/executor/list/LPushExecutor.java      |   47 +
 .../commands/executor/list/LPushXExecutor.java     |   23 +
 .../commands/executor/list/LRangeExecutor.java     |   48 +
 .../executor/pubsub/PsubscribeExecutor.java        |   45 +
 .../commands/executor/pubsub/PubSubExecutor.java   |   73 +
 .../commands/executor/pubsub/PublishExecutor.java  |   40 +
 .../executor/pubsub/PunsubscribeExecutor.java      |   37 +
 .../executor/pubsub/SubscribeExecutor.java         |   70 +
 .../executor/pubsub/UnsubscribeExecutor.java       |   37 +
 .../executor/server/CommandCommandExecutor.java    |   91 +
 .../commands/executor/server/DBSizeExecutor.java   |   33 +
 .../commands/executor/server/FlushAllExecutor.java |   41 +
 .../commands/executor/server/InfoExecutor.java     |  201 ++
 .../commands/executor/server/LolWutExecutor.java   |  180 ++
 .../commands/executor/server/SlowlogExecutor.java  |   46 +
 .../commands/executor/server/TimeExecutor.java     |   35 +
 .../commands/executor/set/SAddExecutor.java        |   42 +
 .../commands/executor/set/SCardExecutor.java       |   33 +
 .../commands/executor/set/SDiffExecutor.java       |   32 +
 .../commands/executor/set/SDiffStoreExecutor.java  |   31 +
 .../commands/executor/set/SInterExecutor.java      |   31 +
 .../commands/executor/set/SInterStoreExecutor.java |   32 +
 .../commands/executor/set/SIsMemberExecutor.java   |   36 +
 .../commands/executor/set/SMembersExecutor.java    |   36 +
 .../commands/executor/set/SMoveExecutor.java       |   44 +
 .../commands/executor/set/SPopExecutor.java        |   50 +
 .../commands/executor/set/SRandMemberExecutor.java |   43 +
 .../commands/executor/set/SRemExecutor.java        |   43 +
 .../commands/executor/set/SScanExecutor.java       |   43 +
 .../commands/executor/set/SUnionExecutor.java      |   31 +
 .../commands/executor/set/SUnionStoreExecutor.java |   30 +
 .../commands/executor/set/SetOpExecutor.java       |   65 +
 .../commands/executor/set/SetRandomExecutor.java   |   65 +
 .../sortedset/AbstractSortedSetRangeExecutor.java  |   53 +
 .../sortedset/AbstractSortedSetRangeOptions.java   |  167 +
 .../executor/sortedset/AbstractZPopExecutor.java   |   52 +
 .../executor/sortedset/AbstractZRankExecutor.java  |   46 +
 .../sortedset/SortedSetLexRangeOptions.java        |  116 +
 .../sortedset/SortedSetRankRangeOptions.java       |   97 +
 .../sortedset/SortedSetScoreRangeOptions.java      |   82 +
 .../commands/executor/sortedset/ZAddExecutor.java  |  146 +
 .../commands/executor/sortedset/ZAddOptions.java   |   45 +
 .../commands/executor/sortedset/ZAggregator.java   |   47 +
 .../commands/executor/sortedset/ZCardExecutor.java |   33 +
 .../executor/sortedset/ZCountExecutor.java         |   36 +
 .../executor/sortedset/ZIncrByExecutor.java        |   52 +
 .../executor/sortedset/ZInterStoreExecutor.java    |   45 +
 .../commands/executor/sortedset/ZKeyWeight.java    |   44 +
 .../executor/sortedset/ZLexCountExecutor.java      |   35 +
 .../executor/sortedset/ZPopMaxExecutor.java        |   31 +
 .../executor/sortedset/ZPopMinExecutor.java        |   31 +
 .../executor/sortedset/ZRangeByLexExecutor.java    |   48 +
 .../executor/sortedset/ZRangeByScoreExecutor.java  |   48 +
 .../executor/sortedset/ZRangeExecutor.java         |   47 +
 .../commands/executor/sortedset/ZRankExecutor.java |   24 +
 .../commands/executor/sortedset/ZRemExecutor.java  |   41 +
 .../executor/sortedset/ZRemRangeByLexExecutor.java |   34 +
 .../sortedset/ZRemRangeByRankExecutor.java         |   35 +
 .../sortedset/ZRemRangeByScoreExecutor.java        |   34 +
 .../executor/sortedset/ZRevRangeByLexExecutor.java |   36 +
 .../sortedset/ZRevRangeByScoreExecutor.java        |   37 +
 .../executor/sortedset/ZRevRangeExecutor.java      |   37 +
 .../executor/sortedset/ZRevRankExecutor.java       |   24 +
 .../commands/executor/sortedset/ZScanExecutor.java |   42 +
 .../executor/sortedset/ZScoreExecutor.java         |   37 +
 .../executor/sortedset/ZStoreExecutor.java         |  123 +
 .../executor/sortedset/ZUnionStoreExecutor.java    |   45 +
 .../executor/string/AbstractMSetExecutor.java      |   89 +
 .../commands/executor/string/AppendExecutor.java   |   44 +
 .../commands/executor/string/BitCountExecutor.java |   57 +
 .../commands/executor/string/BitOpExecutor.java    |  180 ++
 .../commands/executor/string/BitPosExecutor.java   |   80 +
 .../commands/executor/string/DecrByExecutor.java   |   55 +
 .../commands/executor/string/DecrExecutor.java     |   36 +
 .../commands/executor/string/GetBitExecutor.java   |   51 +
 .../commands/executor/string/GetExecutor.java      |   36 +
 .../commands/executor/string/GetRangeExecutor.java |   62 +
 .../commands/executor/string/GetSetExecutor.java   |   45 +
 .../commands/executor/string/IncrByExecutor.java   |   56 +
 .../executor/string/IncrByFloatExecutor.java       |   70 +
 .../commands/executor/string/IncrExecutor.java     |   37 +
 .../commands/executor/string/MGetExecutor.java     |   44 +
 .../commands/executor/string/MSetExecutor.java     |   49 +
 .../commands/executor/string/MSetNXExecutor.java   |   51 +
 .../commands/executor/string/PSetEXExecutor.java   |   24 +
 .../commands/executor/string/SetBitExecutor.java   |   72 +
 .../commands/executor/string/SetEXExecutor.java    |   70 +
 .../commands/executor/string/SetExecutor.java      |  228 ++
 .../commands/executor/string/SetNXExecutor.java    |   47 +
 .../commands/executor/string/SetOptions.java       |   43 +
 .../commands/executor/string/SetRangeExecutor.java |   64 +
 .../commands/executor/string/StrlenExecutor.java   |   34 +
 .../parameters/ClusterParameterRequirements.java   |   39 +
 .../internal/commands/parameters/Parameter.java    |  163 +
 .../RedisParametersMismatchException.java          |   24 +
 .../parameters/SlowlogParameterRequirements.java   |   73 +
 .../redis/internal/data/AbstractRedisData.java     |  398 +++
 .../geode/redis/internal/data/KeyHashUtil.java     |   63 +
 .../geode/redis/internal/data/NullRedisData.java   |  143 +
 .../internal/data/NullRedisDataStructures.java     |   24 +
 .../geode/redis/internal/data/NullRedisHash.java   |   63 +
 .../geode/redis/internal/data/NullRedisList.java   |   64 +
 .../geode/redis/internal/data/NullRedisSet.java    |   75 +
 .../redis/internal/data/NullRedisSortedSet.java    |  149 +
 .../geode/redis/internal/data/NullRedisString.java |  143 +
 .../internal/data/RedisCrossSlotException.java     |   26 +
 .../geode/redis/internal/data/RedisData.java       |  114 +
 .../internal/data/RedisDataMovedException.java     |   31 +
 .../geode/redis/internal/data/RedisDataType.java   |   51 +
 .../data/RedisDataTypeMismatchException.java       |   32 +
 .../geode/redis/internal/data/RedisHash.java       |  400 +++
 .../apache/geode/redis/internal/data/RedisKey.java |  106 +
 .../internal/data/RedisKeyExistsException.java     |   34 +
 .../geode/redis/internal/data/RedisList.java       |  269 ++
 .../apache/geode/redis/internal/data/RedisSet.java |  551 ++++
 .../geode/redis/internal/data/RedisSortedSet.java  |  945 ++++++
 .../geode/redis/internal/data/RedisString.java     |  493 +++
 .../data/collections/Bytes2ObjectOpenHashMap.java  | 1300 ++++++++
 .../data/collections/OrderStatisticsSet.java       |   76 +
 .../data/collections/OrderStatisticsTree.java      |  850 ++++++
 .../data/collections/SizeableByteArrayList.java    |  129 +
 ...bleBytes2ObjectOpenCustomHashMapWithCursor.java |  202 ++
 .../SizeableObjectOpenCustomHashSetWithCursor.java |  205 ++
 .../internal/data/collections/package-info.java    |   23 +
 .../data/delta/AddByteArrayDoublePairs.java        |   66 +
 .../internal/data/delta/AddByteArrayPairs.java     |   66 +
 .../redis/internal/data/delta/AddByteArrays.java   |   63 +
 .../redis/internal/data/delta/AppendByteArray.java |   44 +
 .../geode/redis/internal/data/delta/DeltaInfo.java |   24 +
 .../geode/redis/internal/data/delta/DeltaType.java |   33 +
 .../internal/data/delta/RemoveByteArrays.java      |   69 +
 .../internal/data/delta/RemoveElementsByIndex.java |   60 +
 .../data/delta/ReplaceByteArrayAtOffset.java       |   50 +
 .../data/delta/ReplaceByteArrayDoublePairs.java    |   62 +
 .../internal/data/delta/ReplaceByteArrays.java     |   57 +
 .../internal/data/delta/ReplaceByteAtOffset.java   |   48 +
 .../redis/internal/data/delta/SetByteArray.java    |   47 +
 .../data/delta/SetByteArrayAndTimestamp.java       |   52 +
 .../redis/internal/data/delta/SetTimestamp.java    |   44 +
 .../redis/internal/netty/ByteToCommandDecoder.java |  230 ++
 .../apache/geode/redis/internal/netty/Client.java  |  206 ++
 .../apache/geode/redis/internal/netty/Coder.java   |  670 +++++
 .../geode/redis/internal/netty/CoderException.java |    0
 .../internal/netty/ExecutionHandlerContext.java    |  514 ++++
 .../redis/internal/netty/NettyRedisServer.java     |  287 ++
 .../netty/RedisCommandParserException.java         |   41 +
 .../redis/internal/netty/StringBytesGlossary.java  |  266 ++
 .../pubsub/AbstractSubscriptionManager.java        |  238 ++
 .../pubsub/ChannelSubscriptionManager.java         |   60 +
 .../internal/pubsub/ClientSubscriptionManager.java |   58 +
 .../pubsub/ClientSubscriptionManagerImpl.java      |   78 +
 .../pubsub/PatternSubscriptionManager.java         |  133 +
 .../apache/geode/redis/internal/pubsub/PubSub.java |  115 +
 .../geode/redis/internal/pubsub/PubSubImpl.java    |  113 +
 .../geode/redis/internal/pubsub/Publisher.java     |  528 ++++
 .../redis/internal/pubsub/SubscribeResult.java     |    0
 .../geode/redis/internal/pubsub/Subscription.java  |   40 +
 .../redis/internal/pubsub/SubscriptionImpl.java    |  102 +
 .../redis/internal/pubsub/SubscriptionManager.java |   72 +
 .../geode/redis/internal/pubsub/Subscriptions.java |  266 ++
 .../internal/services/ActiveExpirationManager.java |   91 +
 .../RedisSanctionedSerializablesService.java       |   27 +
 .../redis/internal/services/RegionProvider.java    |  345 +++
 .../internal/services/cluster/RedisMemberInfo.java |  107 +
 .../cluster/RedisMemberInfoRetrievalFunction.java  |   88 +
 .../internal/services/cluster/SlotAdvisor.java     |  191 ++
 .../locking/LockingStripedCoordinator.java         |   87 +
 .../services/locking/RedisSecurityService.java     |   68 +
 .../internal/services/locking/StripedCallable.java |   30 +
 .../services/locking/StripedCoordinator.java       |   44 +
 .../services/locking/StripedExecutorService.java   |  511 ++++
 .../internal/services/locking/StripedObject.java   |   31 +
 .../internal/services/locking/StripedRunnable.java |   28 +
 .../redis/internal/statistics/GeodeRedisStats.java |  320 ++
 .../redis/internal/statistics/RedisStats.java      |  235 ++
 .../org.apache.geode.internal.cache.CacheService   |   16 +
 ...serialization.DataSerializableFixedIdRegistrant |   16 +
 ...alization.filter.SanctionedSerializablesService |   15 +
 .../sanctioned-geode-for-redis-serializables.txt   |    8 +
 .../src/performanceTest/benchmark.sh               |    0
 .../src/performanceTest/environment-setup.sh       |  124 +
 .../src/performanceTest/execute-operation.sh       |    0
 .../src/performanceTest/shacompare.sh              |    0
 .../src/performanceTest/summarize-batch-results.sh |    0
 .../performanceTest/summarize-operation-results.sh |    0
 .../geode/redis/internal/RedisCommandTypeTest.java |   38 +
 .../geode/redis/internal/RedisPropertiesTest.java  |  169 ++
 .../commands/executor/GlobPatternTest.java         |   88 +
 .../commands/executor/cluster/CRC16JUnitTest.java  |   54 +
 .../executor/connection/AuthExecutorTest.java      |   66 +
 .../executor/sortedset/ZScanExecutorTest.java      |   37 +
 .../geode/redis/internal/data/KeyHashUtilTest.java |   81 +
 .../geode/redis/internal/data/RedisHashTest.java   |  484 +++
 .../redis/internal/data/RedisKeyJUnitTest.java     |   40 +
 .../geode/redis/internal/data/RedisListTest.java   |  119 +
 .../geode/redis/internal/data/RedisSetTest.java    |  563 ++++
 .../redis/internal/data/RedisSortedSetTest.java    |  938 ++++++
 .../internal/data/RedisStringQuickCheckTest.java   |   83 +
 .../geode/redis/internal/data/RedisStringTest.java |  543 ++++
 .../data/collections/OrderStatisticsTreeTest.java  |  783 +++++
 .../OrderedStatisticTreeQuickCheckTest.java        |  143 +
 .../collections/SizeableByteArrayListTest.java     |   68 +
 ...tOpenCustomHashMapWithCursorQuickCheckTest.java |   92 +
 ...ytes2ObjectOpenCustomHashMapWithCursorTest.java |  395 +++
 ...eableObjectOpenCustomHashSetWithCursorTest.java |  284 ++
 .../geode/redis/internal/netty/ClientTest.java     |  199 ++
 .../geode/redis/internal/netty/CoderTest.java      |  276 ++
 .../redis/internal/netty/CommandJUnitTest.java     |  114 +
 .../netty/ExecutionHandlerContextTest.java         |  110 +
 .../pubsub/ChannelSubscriptionManagerTest.java     |  104 +
 .../pubsub/ClientSubscriptionManagerImplTest.java  |   94 +
 .../pubsub/PatternSubscriptionManagerTest.java     |  169 ++
 .../redis/internal/pubsub/PubSubImplTest.java      |   52 +
 .../geode/redis/internal/pubsub/PublisherTest.java |  196 ++
 .../internal/pubsub/SubscriptionImplTest.java      |   75 +
 .../pubsub/SubscriptionManagerTestBase.java        |  163 +
 .../internal/pubsub/SubscriptionsJUnitTest.java    |  412 +++
 .../services/LockingStripedCoordinatorTest.java    |   74 +
 .../services/RedisSecurityServiceTest.java         |   92 +
 .../internal/services/RegionProviderTest.java      |   74 +
 .../services/StripedExecutorServiceJUnitTest.java  |  329 ++
 .../RedisMemberInfoRetrievalFunctionTest.java      |  153 +
 .../services/cluster/RedisMemberInfoTest.java      |   93 +
 .../src/test/resources/expected-pom.xml            |  105 +
 geode-gfsh/build.gradle                            |  141 +-
 .../geode/gfsh/GfshWithSslAcceptanceTest.java      |  153 +
 .../management/internal/cli/NetstatDUnitTest.java  |    3 +-
 ...erQueryServiceCommandWithSecurityDUnitTest.java |    8 +-
 ...ueryServiceCommandWithoutSecurityDUnitTest.java |    2 +-
 ...TimeToLiveExpirationOnProxyRegionDUnitTest.java |    4 +-
 ...eRegionCommandWithNoClusterConfigDUnitTest.java |    3 +-
 ...DeployCommandFunctionRegistrationDUnitTest.java |    2 +-
 .../DeploySemanticVersionJarDUnitTest.java         |   66 +-
 .../cli/commands/DeployWithGroupsDUnitTest.java    |   23 +-
 .../cli/commands/DiskStoreCommandsDUnitTest.java   |   12 +-
 .../commands/ExecuteFunctionCommandDUnitTest.java  |    4 +-
 .../ExecuteFunctionCommandSecurityTest.java        |    4 +-
 .../ExportLogsOnServerManagerDistributedTest.java  |    3 +-
 .../commands/ExportStackTraceCommandDUnitTest.java |    4 +-
 .../cli/commands/FunctionCommandsDUnitTest.java    |   19 -
 .../commands/FunctionCommandsDistributedTest.java  |   19 +
 .../internal/cli/commands/GcCommandDUnitTest.java  |   18 -
 .../cli/commands/GcCommandDistributedTest.java     |   18 +
 .../cli/commands/GemfireDataCommandsDUnitTest.java |   19 -
 .../commands/GeodeDataCommandsDistributedTest.java |   19 +
 .../GfshHostNameVerificationDistributedTest.java   |    9 +-
 .../IndexCommandsShareConfigurationDUnitTest.java  |    6 +-
 .../cli/commands/ListIndexCommandDUnitTest.java    |   19 -
 .../commands/ListIndexCommandDistributedTest.java  |   19 +
 .../cli/commands/ListMembersCommandDUnitTest.java  |    6 +-
 .../OfflineDiskStoreCommandsDUnitTest.java         |    4 +-
 .../cli/commands/QueryCommandDUnitTest.java        |   18 -
 .../cli/commands/QueryCommandDistributedTest.java  |   41 +
 .../commands/RebalanceMembersColocationTest.java   |    4 +-
 ...ersistThroughClusterConfigurationDUnitTest.java |    1 -
 .../commands/RegionMembershipMBeanDUnitTest.java   |   18 -
 .../RegionMembershipMBeanDistributedTest.java      |   18 +
 .../cli/commands/RepeatedRebalanceDUnitTest.java   |    2 +-
 .../RepeatedRebalancePartitionResolver.java        |    4 +-
 .../commands/StatusRedundancyCommandDUnitTest.java |   37 +
 .../AnalyzeGfshSerializablesIntegrationTest.java   |   37 +
 .../AnalyzeGfshSerializablesJUnitTest.java         |   31 -
 ...ctionedSerializablesServiceIntegrationTest.java |   56 +
 .../GfshParserAutoCompletionIntegrationTest.java   |   17 +-
 .../internal/cli/HeadlessGfshIntegrationTest.java  |    6 +-
 .../ConfigurePDXCommandIntegrationTest.java        |    2 +-
 .../CreateRegionCommandIntegrationTest.java        |    2 +-
 .../commands/DescribeRegionIntegrationTest.java    |    6 +-
 .../cli/commands/ExportDataIntegrationTest.java    |    2 +-
 .../cli/commands/GetCommandIntegrationTest.java    |   10 +-
 .../commands/HTTPServiceSSLSupportJUnitTest.java   |    4 +-
 .../cli/commands/ListRegionIntegrationTest.java    |    8 +-
 .../cli/commands/PutCommandIntegrationTest.java    |    4 +-
 .../cli/commands/VersionCommandJUnitTest.java      |    7 +-
 .../GfshStatusCommandsIntegrationTest.java         |    6 +-
 .../functions/DataCommandFunctionJUnitTest.java    |    4 +-
 .../internal/cli/functions/Geode3544JUnitTest.java |   10 +-
 .../shell/JmxOperationInvokerIntegrationTest.java  |  179 ++
 .../apache/geode/codeAnalysis/excludedClasses.txt  |    2 -
 .../org/apache/geode/codeAnalysis/openBugs.txt     |   18 -
 .../management/GfshDistributedSystemService.java   |   43 -
 .../GfshSanctionedSerializablesService.java        |   27 +
 .../gfsh/console/GfeConsoleReaderFactory.java      |    2 +-
 .../apache/geode/management/cli/CliFunction.java   |    2 +-
 .../org/apache/geode/management/cli/Result.java    |   10 +-
 .../internal/cli/AbstractCliAroundInterceptor.java |   12 +-
 .../geode/management/internal/cli/CliUtils.java    |    3 +-
 .../management/internal/cli/CommandManager.java    |    4 +-
 .../management/internal/cli/CommandRequest.java    |    8 +-
 .../management/internal/cli/GfshParseResult.java   |    6 +-
 .../geode/management/internal/cli/Launcher.java    |   71 +-
 .../geode/management/internal/cli/LogWrapper.java  |    8 +-
 .../cli/commands/AlterAsyncEventQueueCommand.java  |    2 +-
 .../cli/commands/AlterGatewaySenderCommand.java    |    2 +-
 .../cli/commands/AlterRuntimeConfigCommand.java    |    3 +-
 .../cli/commands/ChangeLogLevelCommand.java        |    2 +-
 .../commands/CompactOfflineDiskStoreCommand.java   |    2 +-
 .../internal/cli/commands/ConnectCommand.java      |    3 +-
 .../cli/commands/CreateAsyncEventQueueCommand.java |    2 +-
 .../cli/commands/CreateDiskStoreCommand.java       |   27 +-
 .../cli/commands/CreateJndiBindingCommand.java     |    2 +-
 .../internal/cli/commands/DeployCommand.java       |   21 +-
 .../cli/commands/DescribeClientCommand.java        |    4 +-
 .../cli/commands/DescribeDiskStoreCommand.java     |    2 +-
 .../cli/commands/DestroyFunctionCommand.java       |    2 +-
 .../cli/commands/DestroyJndiBindingCommand.java    |    2 +-
 .../ExportClusterConfigurationCommand.java         |    2 +-
 .../internal/cli/commands/ExportConfigCommand.java |    2 +-
 .../internal/cli/commands/ExportLogsCommand.java   |    2 +-
 .../cli/commands/LauncherSignalListener.java       |    2 +-
 .../internal/cli/commands/ListDeployedCommand.java |    8 +-
 .../internal/cli/commands/ListFunctionCommand.java |    2 +-
 .../internal/cli/commands/ListGatewayCommand.java  |    2 +-
 .../internal/cli/commands/ListMembersCommand.java  |    2 +-
 .../internal/cli/commands/NetstatCommand.java      |    2 +-
 .../internal/cli/commands/RebalanceCommand.java    |    3 +-
 .../internal/cli/commands/RemoveCommand.java       |    4 +-
 .../internal/cli/commands/ShutdownCommand.java     |    4 +-
 .../cli/commands/StartGatewaySenderCommand.java    |    2 +-
 .../internal/cli/commands/StartLocatorCommand.java |    9 +-
 .../internal/cli/commands/StartMemberUtils.java    |    3 +-
 .../internal/cli/commands/StartServerCommand.java  |   45 +-
 .../cli/commands/StopGatewaySenderCommand.java     |  110 +-
 .../StopGatewaySenderOnMemberWithBeanImpl.java     |   65 +
 .../internal/cli/commands/UndeployCommand.java     |   44 +-
 .../commands/UpgradeOfflineDiskStoreCommand.java   |    2 +-
 .../converters/ClusterMemberIdNameConverter.java   |    2 +-
 .../converters/ConnectionEndpointConverter.java    |    2 +-
 .../internal/cli/converters/EnumConverter.java     |    2 +-
 .../internal/cli/converters/FilePathConverter.java |    2 +-
 .../cli/converters/GatewaySenderIdConverter.java   |    2 +-
 .../cli/converters/JarDirPathConverter.java        |    2 +-
 .../cli/converters/JarFilesPathConverter.java      |    2 +-
 .../LocatorDiscoveryConfigConverter.java           |    2 +-
 .../cli/converters/LocatorIdNameConverter.java     |    2 +-
 .../cli/domain/AsyncEventQueueDetails.java         |   14 +-
 .../cli/domain/ConnectToLocatorResult.java         |   12 +-
 .../internal/cli/domain/DataCommandRequest.java    |    4 +-
 .../internal/cli/domain/DataCommandResult.java     |   28 +-
 .../internal/cli/domain/DeploymentInfo.java        |   11 +-
 .../internal/cli/domain/DiskStoreDetails.java      |  105 +-
 .../cli/domain/EvictionAttributesInfo.java         |   22 +-
 .../cli/domain/FixedPartitionAttributesInfo.java   |   24 +-
 .../internal/cli/domain/IndexDetails.java          |    4 +-
 .../cli/domain/MemberConfigurationInfo.java        |    2 +-
 .../cli/domain/PartitionAttributesInfo.java        |   68 +-
 .../internal/cli/domain/RegionAttributesInfo.java  |    4 +-
 .../internal/cli/domain/RegionDescription.java     |   37 +-
 .../cli/domain/RegionDescriptionPerMember.java     |   32 +-
 .../internal/cli/domain/RegionInformation.java     |   46 +-
 .../internal/cli/domain/StackTracesPerMember.java  |    6 +-
 .../cli/functions/AlterGatewaySenderFunction.java  |   16 +-
 .../cli/functions/AsyncEventQueueFunctionArgs.java |   32 +-
 .../cli/functions/CreateRegionFunctionArgs.java    |    2 +-
 .../internal/cli/functions/DeployFunction.java     |   15 +-
 .../DestroyAsyncEventQueueFunctionArgs.java        |    4 +-
 .../functions/DestroyDiskStoreFunctionArgs.java    |    4 +-
 .../cli/functions/ExportConfigFunction.java        |    4 +-
 .../internal/cli/functions/ExportLogsFunction.java |   20 +-
 .../GatewaySenderDestroyFunctionArgs.java          |    4 +-
 .../cli/functions/GatewaySenderFunctionArgs.java   |   82 +-
 .../internal/cli/functions/ImportDataFunction.java |   49 +-
 .../internal/cli/functions/NetstatFunction.java    |    2 +-
 .../cli/functions/RegionCreateFunction.java        |   16 +-
 .../internal/cli/functions/RegionFunctionArgs.java |  106 +-
 .../internal/cli/functions/UndeployFunction.java   |   93 +-
 .../management/internal/cli/help/HelpBlock.java    |    8 +-
 .../geode/management/internal/cli/help/Helper.java |   11 +-
 .../geode/management/internal/cli/help/Topic.java  |    2 +-
 .../cli/remote/CommandExecutionContext.java        |    2 +-
 .../internal/cli/remote/CommandExecutor.java       |    2 +-
 .../internal/cli/remote/CommandStatementImpl.java  |    6 +-
 .../internal/cli/remote/MemberCommandService.java  |   14 +-
 .../cli/remote/OnlineCommandProcessor.java         |   12 +-
 .../cli/result/CommandResultException.java         |    2 +-
 .../management/internal/cli/result/Table.java      |    6 +-
 .../cli/result/model/AbstractResultModel.java      |    2 +-
 .../internal/cli/result/model/DataResultModel.java |    2 +-
 .../internal/cli/result/model/FileResultModel.java |   16 +-
 .../internal/cli/result/model/ResultModel.java     |    4 +-
 .../cli/result/model/TabularResultModel.java       |    2 +-
 .../geode/management/internal/cli/shell/Gfsh.java  |  107 +-
 .../management/internal/cli/shell/GfshConfig.java  |   72 +-
 .../internal/cli/shell/GfshExecutionStrategy.java  |    8 +-
 .../internal/cli/shell/JMXConnectionException.java |    2 +-
 .../internal/cli/shell/JmxOperationInvoker.java    |   80 +-
 .../internal/cli/shell/MultiCommandHelper.java     |    8 +-
 .../internal/cli/shell/ScriptExecutionDetails.java |   10 +-
 .../internal/cli/shell/jline/ANSIBuffer.java       |   10 +-
 .../internal/cli/shell/jline/ANSIHandler.java      |    6 +-
 .../internal/cli/util/CommandStringBuilder.java    |    4 +-
 .../internal/cli/util/DeploymentInfoTableUtil.java |    7 +-
 .../internal/cli/util/DiskStoreCompacter.java      |    2 +-
 .../cli/util/FixedPartitionAttributesInfo.java     |   24 +-
 .../internal/cli/util/GfshConsoleReader.java       |    2 +-
 .../internal/cli/util/HyphenFormatter.java         |    4 +-
 .../management/internal/cli/util/LogExporter.java  |   21 +-
 .../management/internal/cli/util/LogFilter.java    |    4 +-
 .../internal/cli/util/LogLevelExtractor.java       |    4 +-
 .../management/internal/cli/util/MergeLogs.java    |   10 +-
 .../internal/cli/util/ReadWriteFile.java           |    4 +-
 .../internal/cli/util/RegionAttributesDefault.java |    3 +-
 .../internal/cli/util/ThreePhraseGenerator.java    |    4 +-
 .../internal/web/http/support/HttpRequester.java   |   20 +-
 .../internal/web/shell/HttpOperationInvoker.java   |   12 +-
 .../web/shell/support/HttpInvocationHandler.java   |    2 +-
 .../web/shell/support/HttpMBeanProxyFactory.java   |    1 -
 ...e.distributed.internal.DistributedSystemService |   16 -
 ...alization.filter.SanctionedSerializablesService |   15 +
 .../sanctioned-geode-gfsh-serializables.txt        |    2 +-
 .../commands/AlterAsyncEventQueueCommandTest.java  |    2 +-
 .../commands/AlterGatewaySenderCommandTest.java    |    4 +-
 .../internal/cli/commands/ConnectCommandTest.java  |   27 +-
 .../cli/commands/CreateDiskStoreCommandTest.java   |   61 +-
 .../commands/CreateGatewaySenderCommandTest.java   |    2 +-
 .../cli/commands/CreateJndiBindingCommandTest.java |    2 +-
 .../cli/commands/CreateRegionCommandTest.java      |    2 +-
 .../commands/DescribeJndiBindingCommandTest.java   |    2 +-
 .../cli/commands/DescribeRegionJUnitTest.java      |    4 +-
 .../DestroyAsyncEventQueueCommandTest.java         |    4 +-
 .../commands/DestroyJndiBindingCommandTest.java    |    2 +-
 .../cli/commands/DestroyRegionCommandTest.java     |   10 +-
 .../cli/commands/DiskStoreCommandsUtilsTest.java   |    4 +-
 .../ExportClusterConfigurationCommandTest.java     |    6 +-
 .../cli/commands/ListAsyncEventQueuesTest.java     |   20 +-
 .../cli/commands/LogLevelInterceptorTest.java      |    6 +-
 .../cli/commands/StopGatewaySenderCommandTest.java |  155 +
 .../StopGatewaySenderOnMemberWithBeanImplTest.java |  122 +
 .../converters/BaseStringConverterJUnitTest.java   |    2 +-
 .../converters/ConfigPropertyConverterTest.java    |    2 +-
 .../converters/RegionPathConverterJUnitTest.java   |    2 +-
 .../functions/AlterGatewaySenderFunctionTest.java  |   10 +-
 .../internal/cli/functions/CliFunctionTest.java    |   62 +
 .../GatewayReceiverCreateFunctionTest.java         |   12 +-
 .../cli/functions/GetRegionsFunctionTest.java      |    2 +-
 .../cli/functions/ImportDataFunctionTest.java      |   78 +
 .../functions/RegionCreateFunctionJUnitTest.java   |   56 +-
 .../internal/cli/help/HelpBlockUnitTest.java       |    9 +-
 .../internal/cli/util/BytesToStringTest.java       |    8 +-
 .../internal/cli/util/CommentSkipHelperTest.java   |   24 +-
 .../internal/cli/util/HyphenFormatterTest.java     |   66 +-
 .../management/internal/cli/util/JdkToolTest.java  |    2 +-
 .../web/http/support/HttpRequesterTest.java        |    8 +-
 geode-gfsh/src/test/resources/expected-pom.xml     |   10 +
 geode-http-service/build.gradle                    |    3 +-
 .../cache/http/service/InternalHttpService.java    |   19 +-
 geode-jmh/build.gradle                             |   23 +
 .../benchmark/jmh/profilers/ObjectSizeAgent.java   |  158 +
 .../jmh/profilers/ObjectSizeProfiler.java          |   80 +
 .../jmh/profilers/ObjectSizeAgentTest.java         |  194 ++
 .../services/org.openjdk.jmh.profile.Profiler      |   14 +
 geode-junit/build.gradle                           |   20 +-
 .../AnalyzeJUnitSerializablesIntegrationTest.java  |   51 +
 .../apache/geode/test/compiler/JarBuilderTest.java |    2 +-
 .../geode/test/compiler/JavaCompilerTest.java      |   75 -
 ...ctionedSerializablesServiceIntegrationTest.java |   39 +
 .../rules/ExecutorServiceRuleIntegrationTest.java  |    2 +-
 .../test/junit/rules/TemporaryFileRuleTest.java    |    4 +-
 .../apache/geode/codeAnalysis/excludedClasses.txt  |    3 +
 .../codeAnalysis/sanctionedDataSerializables.txt   |  100 +
 .../src/main/java/com/examples/ds/Company.java     |    8 +-
 .../java/com/examples/ds/CompanySerializer.java    |    2 +-
 .../src/main/java/com/examples/ds/Employee.java    |   16 +-
 .../src/main/java/com/examples/ds/User.java        |    8 +-
 .../java/com/examples/snapshot/MyObjectPdx.java    |    2 +-
 .../main/java/org/apache/geode/DeltaTestImpl.java  |  121 +-
 .../java/org/apache/geode/TXWriterTestCase.java    |   30 +-
 .../admin/internal/HealthEvaluatorTestCase.java    |    6 +-
 .../org/apache/geode/cache/query/CacheUtils.java   |    2 +-
 .../geode/cache/query/MultithreadedTester.java     |    2 +-
 .../java/org/apache/geode/cache/query/Utils.java   |    7 +-
 .../org/apache/geode/cache/query/data/City.java    |    2 +-
 .../geode/cache/query/data/CollectionHolder.java   |   15 +-
 .../geode/cache/query/data/ComparableWrapper.java  |   14 +-
 .../org/apache/geode/cache/query/data/Country.java |   16 +-
 .../apache/geode/cache/query/data/District.java    |    4 +-
 .../apache/geode/cache/query/data/Employee.java    |   20 +-
 .../apache/geode/cache/query/data/Instrument.java  |   16 +-
 .../apache/geode/cache/query/data/Inventory.java   |   18 +-
 .../org/apache/geode/cache/query/data/Manager.java |    4 +-
 .../org/apache/geode/cache/query/data/PhoneNo.java |    8 +-
 .../apache/geode/cache/query/data/Portfolio.java   |  100 +-
 .../geode/cache/query/data/PortfolioData.java      |   18 +-
 .../geode/cache/query/data/PortfolioNoDS.java      |   30 +-
 .../geode/cache/query/data/PortfolioPdx.java       |   88 +-
 .../apache/geode/cache/query/data/Position.java    |   84 +-
 .../geode/cache/query/data/PositionNoDS.java       |   18 +-
 .../apache/geode/cache/query/data/PositionPdx.java |   88 +-
 .../cache/query/data/ProhibitedSecurityQuote.java  |    6 +-
 .../org/apache/geode/cache/query/data/Quote.java   |    2 +-
 .../apache/geode/cache/query/data/Restricted.java  |    2 +-
 .../geode/cache/query/data/SecurityMaster.java     |   10 +-
 .../org/apache/geode/cache/query/data/State.java   |    8 +-
 .../org/apache/geode/cache/query/data/Student.java |    4 +-
 .../apache/geode/cache/query/data/TestData.java    |    6 +-
 .../apache/geode/cache/query/data/TradingLine.java |   12 +-
 .../org/apache/geode/cache/query/data/Village.java |    6 +-
 .../NonDistinctOrderByTestImplementation.java      |  117 +-
 .../query/functional/StructSetOrResultsSet.java    |   66 +-
 .../org/apache/geode/cache/ssl/CertStores.java     |   17 +-
 .../apache/geode/cache/ssl/CertificateBuilder.java |  199 +-
 .../geode/cache/ssl/CertificateMaterial.java       |    9 +-
 .../geode/cache30/MyGatewayEventFilter1.java       |    6 +-
 .../AnalyzeDataSerializablesJUnitTestBase.java     |  337 ---
 .../AnalyzeDataSerializablesTestBase.java          |  383 +++
 ...SerializablesWithClassAnalysisRuleTestBase.java |   40 +
 .../AnalyzeSerializablesJUnitTestBase.java         |  358 ---
 .../codeAnalysis/AnalyzeSerializablesTestBase.java |  400 +++
 ...SerializablesWithClassAnalysisRuleTestBase.java |   43 +
 .../geode/codeAnalysis/ClassAndMethodDetails.java  |    4 +-
 .../apache/geode/codeAnalysis/ClassAndMethods.java |    4 +-
 .../codeAnalysis/ClassAndVariableDetails.java      |   10 +-
 .../geode/codeAnalysis/ClassAndVariables.java      |    4 +-
 .../geode/codeAnalysis/CompiledClassUtils.java     |   22 +-
 ...nedSerializablesServiceIntegrationTestBase.java |   89 +
 .../codeAnalysis/decode/CompiledAttribute.java     |    2 +-
 .../geode/codeAnalysis/decode/CompiledClass.java   |   18 +-
 .../geode/codeAnalysis/decode/CompiledCode.java    |    6 +-
 .../geode/codeAnalysis/decode/CompiledField.java   |    6 +-
 .../geode/codeAnalysis/decode/CompiledMethod.java  |   12 +-
 .../geode/codeAnalysis/decode/cp/CpUtf8.java       |   30 +-
 .../apache/geode/internal/AvailablePortHelper.java |   89 +-
 .../apache/geode/internal/UniquePortSupplier.java  |    2 +-
 .../geode/internal/cache/DiskRegionProperties.java |   26 +-
 .../internal/cache/DiskRegionTestingBase.java      |   10 +-
 .../cache/PartitionedRegionTestHelper.java         |    4 +-
 .../geode/internal/cache/SnapshotTestUtil.java     |    2 +-
 .../internal/cache/TestObjectWithIdentifier.java   |    4 +-
 .../org/apache/geode/internal/cache/TestUtils.java |    2 +-
 .../geode/internal/cache/UnitTestValueHolder.java  |    8 +-
 .../cache/control/TestMemoryThresholdListener.java |   80 +-
 .../internal/cache/eviction/LRUTestEntry.java      |   14 +-
 .../cache/eviction/TestEvictionController.java     |    2 +-
 .../geode/internal/cache/execute/data/CustId.java  |   12 +-
 .../geode/internal/cache/execute/data/OrderId.java |   16 +-
 .../internal/cache/execute/data/ShipmentId.java    |   16 +-
 .../geode/internal/cache/ha/ConflatableObject.java |   22 +-
 .../cache/ha/TestBlockingHARegionQueue.java        |   10 +-
 .../cache/wan/CustomAsyncEventListener.java        |    4 +-
 .../apache/geode/internal/cache/wan/Filter70.java  |    7 +-
 .../internal/cache/wan/MyGatewayEventFilter.java   |   12 +-
 .../cache/wan/MyGatewaySenderEventListener.java    |   10 +-
 .../cache/wan/MyGatewaySenderEventListener2.java   |   10 +-
 .../cache/wan/MyGatewayTransportFilter1.java       |    2 +-
 .../cache/wan/MyGatewayTransportFilter2.java       |    2 +-
 .../cache/wan/MyGatewayTransportFilter3.java       |    2 +-
 .../cache/wan/MyGatewayTransportFilter4.java       |    2 +-
 .../geode/internal/cache/wan/QueueListener.java    |    2 +-
 ...ilGatewaySenderFlushedCoordinatorJUnitTest.java |   14 +-
 .../cache/wan/WaitingAsyncEventListener.java       |    8 +-
 .../org/apache/geode/internal/jta/JTAUtils.java    |   16 +-
 .../internal/offheap/NullOffHeapMemoryStats.java   |    4 +-
 .../offheap/NullOutOfOffHeapMemoryListener.java    |    4 +-
 ...AbstractProcessStreamReaderIntegrationTest.java |   22 +-
 .../geode/internal/process/lang/AvailablePid.java  |    8 +-
 .../internal/statistics/StatSamplerTestCase.java   |   26 +-
 .../geode/internal/statistics/StatUtils.java       |    5 +-
 .../internal/statistics/TestStatisticsSampler.java |    5 +-
 .../internal/util/concurrent/cm/LoopHelpers.java   |    2 +-
 .../management/bean/stats/MBeanStatsTestCase.java  |   14 +-
 .../cli/commands/ToUpperResultCollector.java       |    2 +-
 .../internal/cli/domain/MyCacheListener.java       |    2 +-
 .../management/internal/cli/domain/Stock.java      |    8 +-
 .../geode/management/internal/cli/dto/Key.java     |    4 +-
 .../geode/management/internal/cli/dto/Key1.java    |    4 +-
 .../geode/management/internal/cli/dto/Key2.java    |    4 +-
 .../geode/management/internal/cli/dto/Value1.java  |   18 +-
 .../geode/management/internal/cli/dto/Value2.java  |   16 +-
 .../internal/cli/util/TestMethodAuthorizer.java    |    2 +-
 .../internal/configuration/ConfigGroup.java        |   45 +-
 .../management/internal/security/TestCommand.java  |    6 +-
 .../org/apache/geode/management/model/Order.java   |    4 +-
 .../java/org/apache/geode/pdx/DSInsidePdx.java     |   34 +-
 .../java/org/apache/geode/pdx/DomainObject.java    |   25 +-
 .../org/apache/geode/pdx/DomainObjectPdxAuto.java  |   10 +-
 .../main/java/org/apache/geode/pdx/Employee.java   |   20 +-
 .../main/java/org/apache/geode/pdx/NestedPdx.java  |   38 +-
 .../java/org/apache/geode/pdx/PdxInsideDS.java     |   30 +-
 .../java/org/apache/geode/pdx/SimpleClass.java     |   33 +-
 .../java/org/apache/geode/pdx/SimpleClass1.java    |   64 +-
 .../geode/pdx/TestObjectForJSONFormatter.java      |  128 +-
 .../geode/security/ExpirableSecurityManager.java   |   98 +
 .../apache/geode/security/PDXPostProcessor.java    |   10 +-
 .../apache/geode/security/SpySecurityManager.java  |    8 +-
 .../apache/geode/security/TestSecurityManager.java |   12 +-
 .../security/UpdatableUserAuthInitialize.java      |   76 +
 .../geode/security/query/UserPermissions.java      |    2 +-
 .../security/query/data/PdxQueryTestObject.java    |    6 +-
 .../apache/geode/security/query/data/PdxTrade.java |    2 +-
 .../geode/security/query/data/QueryTestObject.java |    6 +-
 .../templates/CountableUserPasswordAuthInit.java   |   38 +
 .../assertj/internal/AbstractLogFileAssert.java    |    4 +-
 .../apache/geode/test/compiler/ClassBuilder.java   |   22 +-
 .../geode/test/compiler/CompilationReporter.java   |   34 +
 .../geode/test/compiler/CompiledSourceCode.java    |   35 -
 .../geode/test/compiler/InMemoryClassFile.java     |   45 +
 .../geode/test/compiler/InMemoryFileManager.java   |   44 +
 .../geode/test/compiler/InMemoryJavaCompiler.java  |   88 +
 .../geode/test/compiler/InMemorySourceFile.java    |   88 +
 .../org/apache/geode/test/compiler/JarBuilder.java |   27 +-
 .../apache/geode/test/compiler/JavaCompiler.java   |  132 -
 .../geode/test/compiler/UncompiledSourceCode.java  |   82 -
 .../test/concurrent/CPUContentionService.java      |    4 +-
 .../test/concurrent/FileBasedCountDownLatch.java   |    4 +-
 .../geode/test/golden/ExecutableProcess.java       |    2 +-
 .../apache/geode/test/golden/GoldenComparator.java |   10 +-
 .../golden/PassWithExpectedProblemTestCase.java    |    4 +-
 .../assertions/AbstractResultModelAssert.java      |    2 +-
 .../ClusterManagementGetResultAssert.java          |    2 +-
 .../ClusterManagementListResultAssert.java         |    2 +-
 .../test/junit/assertions/CommandResultAssert.java |    6 +-
 .../junit/assertions/CommandResultExecution.java   |    4 +-
 .../assertions/TabularResultModelAnyRowAssert.java |    2 +-
 .../assertions/TabularResultModelColumnAssert.java |    2 +-
 .../assertions/TabularResultModelRowAssert.java    |    2 +-
 .../assertions/TabularResultModelSliceAssert.java  |    6 +-
 .../junit/categories/IgnoreInRepeatTestTasks.java  |   21 +
 .../categories/SanctionedSerializablesTest.java    |   21 +
 .../JUnitSanctionedSerializablesService.java       |   27 +
 .../geode/test/junit/rules/ClassAnalysisRule.java  |   69 +-
 .../geode/test/junit/rules/ConcurrencyRule.java    |   52 +-
 .../test/junit/rules/ExecutorServiceRule.java      |  104 +-
 .../test/junit/rules/ExpectedTimeoutRule.java      |   36 +-
 .../geode/test/junit/rules/GfshParserRule.java     |    6 +-
 .../apache/geode/test/junit/rules/JarFileRule.java |   16 +-
 .../apache/geode/test/junit/rules/RandomRule.java  |   48 +-
 .../geode/test/junit/rules/RequiresGeodeHome.java  |    9 +-
 .../geode/test/junit/rules/RestoreTCCLRule.java    |    4 +-
 .../apache/geode/test/junit/rules/RetryRule.java   |   12 +-
 .../apache/geode/test/junit/rules/RuleList.java    |   16 +-
 .../geode/test/junit/rules/TemporaryFileRule.java  |    2 +-
 .../geode/test/junit/rules/gfsh/GfshRule.java      |   32 +-
 .../geode/test/junit/rules/gfsh/GfshScript.java    |   10 +-
 .../test/junit/rules/gfsh/internal/OutputLine.java |    4 +-
 .../rules/serializable/SerializableRuleList.java   |    4 +-
 .../rules/serializable/SerializableTestName.java   |    4 +-
 .../rules/serializable/SerializableTimeout.java    |   38 +-
 .../test/junit/runners/GeodeParamsRunner.java      |  164 +
 .../geode/test/junit/runners/SuiteBlockRunner.java |    4 +-
 .../geode/test/junit/runners/TestRunner.java       |    2 +-
 .../test/junit/support/DefaultIgnoreCondition.java |    2 +-
 .../apache/geode/test/process/OutputFormatter.java |    2 +-
 .../geode/test/process/ProcessOutputReader.java    |   14 +-
 .../geode/test/process/ProcessStreamReader.java    |   14 +-
 .../apache/geode/test/process/ProcessWrapper.java  |   28 +-
 .../org/apache/geode/test/util/ResourceUtils.java  |   35 +-
 .../geode/test/util/StressNewTestHelper.java       |    7 +-
 .../org/apache/geode/test/version/TestVersion.java |    7 +-
 .../apache/geode/test/version/VersionManager.java  |    8 +
 .../java/org/apache/geode/util/JSR166TestCase.java |   48 +-
 .../java/parReg/query/unittest/NewPortfolio.java   |   44 +-
 .../main/java/parReg/query/unittest/Position.java  |   48 +-
 geode-junit/src/main/java/perffmwk/Formatter.java  |   18 +-
 geode-junit/src/main/java/util/TestException.java  |    2 +-
 ...alization.filter.SanctionedSerializablesService |   15 +
 .../sanctioned-geode-junit-serializables.txt       |  114 +
 .../geode/cache/ssl/CertificateBuildingTest.java   |   62 +
 .../test/compiler/InMemoryJavaCompilerTest.java    |   61 +
 .../test/compiler/InMemorySourceFileTest.java      |   45 +
 .../test/compiler/UncompiledSourceCodeTest.java    |   39 -
 .../test/junit/rules/ConcurrencyRuleTest.java      |   51 +-
 .../test/junit/rules/ExecutorServiceRuleTest.java  |    2 +-
 .../geode/test/junit/rules/RandomRuleTest.java     |   15 +
 .../geode/test/junit/rules/RuleListTest.java       |   22 +-
 .../junit/rules/examples/RuleAndClassRuleTest.java |    8 +-
 .../SerializableExternalResourceTest.java          |    4 +-
 .../serializable/SerializableRuleListTest.java     |    6 +-
 .../serializable/SerializableTestNameTest.java     |    2 +-
 .../serializable/SerializableTestWatcherTest.java  |    4 +-
 .../serializable/SerializableTimeoutTest.java      |   28 +-
 ...CategoryWithParameterizedRunnerFactoryTest.java |    2 +-
 .../test/junit/runners/ComparableDescription.java  |   89 +
 .../test/junit/runners/GeodeParamsRunnerTest.java  |  359 +++
 .../geode/test/util/WhatExtendsJUnitTest.java      |    4 +-
 geode-junit/src/test/resources/expected-pom.xml    |   30 +-
 geode-log4j/build.gradle                           |    1 -
 .../log4j/internal/impl/NonBlankStrings.java       |    5 +-
 .../internal/impl/LogWriterAppenderBenchmark.java  |    2 +-
 .../log4j/internal/impl/Log4jLoggingProvider.java  |   12 +-
 geode-logging/build.gradle                         |   60 +-
 .../apache/geode/logging/internal/OSProcess.java   |   10 +-
 .../logging/internal/executors/LoggingThread.java  |    2 +-
 .../api/message/GemFireParameterizedMessage.java   |   22 +-
 geode-lucene/build.gradle                          |    1 -
 geode-lucene/geode-lucene-test/build.gradle        |    1 -
 .../internal/repository/serializer/Type2.java      |    2 +-
 .../apache/geode/cache/lucene/test/Customer.java   |    4 +-
 .../cache/lucene/test/IndexRepositorySpy.java      |    2 +-
 .../cache/lucene/test/LuceneTestSerializer.java    |    2 +-
 .../org/apache/geode/cache/lucene/test/Page.java   |   12 +-
 .../org/apache/geode/cache/lucene/test/Person.java |   20 +-
 .../apache/geode/cache/lucene/test/TestObject.java |    4 +-
 .../geode/cache/lucene/EvictionDUnitTest.java      |   11 +-
 .../geode/cache/lucene/ExpirationDUnitTest.java    |    4 +-
 .../lucene/LuceneClientSecurityDUnitTest.java      |    8 +-
 ...uceneClientSecurityPostProcessingDUnitTest.java |    4 +-
 ...urityWithRegionCreatedBeforeIndexDUnitTest.java |    4 +-
 .../lucene/LuceneCommandsSecurityDUnitTest.java    |   44 +-
 ...urityWithRegionCreatedBeforeIndexDUnitTest.java |   17 +-
 .../apache/geode/cache/lucene/LuceneDUnitTest.java |   12 +-
 .../cache/lucene/LuceneIndexCreationDUnitTest.java |   22 +-
 .../LuceneIndexCreationOnFixedPRDUnitTest.java     |    4 +-
 .../cache/lucene/LuceneIndexDestroyDUnitTest.java  |  120 +-
 .../cache/lucene/LuceneQueriesAccessorBase.java    |   12 +-
 .../cache/lucene/LuceneQueriesClientDUnitTest.java |    4 +-
 .../geode/cache/lucene/LuceneQueriesDUnitTest.java |    6 +-
 .../LuceneQueriesReindexClientDUnitTest.java       |    4 +-
 .../lucene/LuceneQueriesReindexDUnitTest.java      |   12 +-
 ...hRegionCreatedBeforeReindexClientDUnitTest.java |    4 +-
 ...iesWithRegionCreatedBeforeReindexDUnitTest.java |    4 +-
 ...eriesWithReindexFlagEnabledClientDUnitTest.java |    4 +-
 ...ceneQueriesWithReindexFlagEnabledDUnitTest.java |    4 +-
 .../cache/lucene/MixedObjectIndexDUnitTest.java    |   68 +-
 .../geode/cache/lucene/PaginationDUnitTest.java    |   13 +-
 .../geode/cache/lucene/RebalanceDUnitTest.java     |    4 +-
 .../lucene/RebalanceWithRedundancyDUnitTest.java   |    4 +-
 ...ncyWithRegionCreatedBeforeReindexDUnitTest.java |   14 +-
 .../IndexRepositoryFactoryDistributedTest.java     |    2 +-
 .../cli/DestroyLuceneIndexCommandsDUnitTest.java   |   60 +-
 .../management/LuceneManagementDUnitTest.java      |    8 +-
 .../test/LuceneDistributedTestUtilities.java       |    2 +-
 .../FlatFormatPdxSerializerIntegrationTest.java    |    2 +-
 .../apache/geode/cache/lucene/LocalCacheRule.java  |    4 +-
 .../lucene/LuceneIndexCreationIntegrationTest.java |   12 +-
 ...eneIndexCreationPersistenceIntegrationTest.java |    8 +-
 .../LuceneIndexMaintenanceIntegrationTest.java     |    9 +-
 .../cache/lucene/LuceneQueriesIntegrationTest.java |   37 +-
 .../LuceneQueriesPersistenceIntegrationTest.java   |    4 +-
 .../NestedObjectSeralizerIntegrationTest.java      |   94 +-
 .../IndexRepositoryFactoryIntegrationTest.java     |    2 +-
 ...ctionedSerializablesServiceIntegrationTest.java |   39 +
 .../cli/LuceneIndexCommandsIntegrationTest.java    |   32 +-
 .../repository/IndexRepositoryImplJUnitTest.java   |   13 +-
 .../LuceneIndexXmlParserIntegrationJUnitTest.java  |   10 +-
 .../lucene/test/LuceneFunctionSecurityTest.java    |    4 +-
 .../AnalyzeLuceneSerializablesIntegrationTest.java |   38 +
 .../AnalyzeLuceneSerializablesJUnitTest.java       |   35 -
 .../apache/geode/codeAnalysis/excludedClasses.txt  |    2 -
 .../org/apache/geode/codeAnalysis/openBugs.txt     |   21 -
 .../codeAnalysis/sanctionedDataSerializables.txt   |    1 -
 .../lucene/LuceneIndexDestroyedException.java      |    4 +-
 .../cache/lucene/LuceneIndexExistsException.java   |    6 +-
 .../cache/lucene/LuceneIndexNotFoundException.java |    4 +-
 .../internal/CreateRegionProcessorForLucene.java   |    8 +-
 .../lucene/internal/DestroyLuceneIndexMessage.java |   28 +-
 .../lucene/internal/LuceneBucketListener.java      |    2 +-
 .../internal/LuceneDistributedSystemService.java   |   43 -
 .../cache/lucene/internal/LuceneEventListener.java |    4 +-
 .../LuceneFileRegionColocationListener.java        |    4 +-
 .../internal/LuceneIndexCreationProfile.java       |   50 +-
 .../lucene/internal/LuceneIndexFactoryImpl.java    |   12 +-
 .../internal/LuceneIndexForPartitionedRegion.java  |   18 +-
 .../cache/lucene/internal/LuceneIndexImpl.java     |   38 +-
 .../cache/lucene/internal/LuceneIndexStats.java    |   12 +-
 .../lucene/internal/LuceneQueryFactoryImpl.java    |    4 +-
 .../cache/lucene/internal/LuceneQueryImpl.java     |   18 +-
 .../lucene/internal/LuceneRegionListener.java      |   42 +-
 .../lucene/internal/LuceneResultStructImpl.java    |   10 +-
 .../LuceneSanctionedSerializablesService.java      |   27 +
 .../cache/lucene/internal/LuceneServiceImpl.java   |   81 +-
 .../internal/PageableLuceneQueryResultsImpl.java   |    8 +-
 .../internal/PartitionedRepositoryManager.java     |   10 +-
 .../internal/cli/LuceneDestroyIndexInfo.java       |    2 +-
 .../lucene/internal/cli/LuceneIndexDetails.java    |   30 +-
 .../cache/lucene/internal/cli/LuceneQueryInfo.java |    8 +-
 .../cli/commands/LuceneCreateIndexCommand.java     |    2 +-
 .../cli/commands/LuceneDestroyIndexCommand.java    |    2 +-
 .../cli/commands/LuceneSearchIndexCommand.java     |    2 +-
 .../cli/functions/LuceneSearchIndexFunction.java   |    2 +-
 .../lucene/internal/directory/FileIndexInput.java  |   18 +-
 .../distributed/LuceneFunctionContext.java         |    6 +-
 .../internal/distributed/LuceneQueryFunction.java  |    2 +-
 .../lucene/internal/distributed/TopEntries.java    |    2 +-
 .../internal/distributed/TopEntriesCollector.java  |    2 +-
 .../distributed/TopEntriesCollectorManager.java    |   19 +-
 .../distributed/TopEntriesFunctionCollector.java   |    8 +-
 .../distributed/WaitUntilFlushedFunction.java      |    2 +-
 .../WaitUntilFlushedFunctionContext.java           |    4 +-
 .../cache/lucene/internal/filesystem/ChunkKey.java |   12 +-
 .../cache/lucene/internal/filesystem/File.java     |    2 +-
 .../internal/filesystem/FileInputStream.java       |   16 +-
 .../internal/filesystem/FileOutputStream.java      |    4 +-
 .../internal/filesystem/FileSystemStats.java       |    2 +-
 .../management/LuceneIndexStatsMonitor.java        |   12 +-
 .../internal/management/LuceneServiceBridge.java   |   18 +-
 .../internal/management/LuceneServiceMBean.java    |   12 +-
 .../management/ManagementIndexListener.java        |    2 +-
 .../internal/partition/BucketTargetingMap.java     |    2 +-
 .../internal/repository/IndexRepositoryImpl.java   |   12 +-
 .../serializer/HeterogeneousLuceneSerializer.java  |    6 +-
 .../serializer/ReflectionLuceneSerializer.java     |    8 +-
 .../repository/serializer/SerializerUtil.java      |    2 +-
 .../cache/lucene/internal/results/PageResults.java |    2 +-
 .../lucene/internal/xml/LuceneIndexCreation.java   |   22 +-
 .../cache/lucene/internal/xml/LuceneXmlParser.java |    6 +-
 .../lucene/management/LuceneIndexMetrics.java      |   57 +-
 .../lucene/management/configuration/Index.java     |   12 +-
 ...e.distributed.internal.DistributedSystemService |   16 -
 ...serialization.DataSerializableFixedIdRegistrant |   16 +
 ...alization.filter.SanctionedSerializablesService |   15 +
 .../IndexRepositoryImplPerformanceTest.java        |   44 +-
 .../repository/LuceneIndexMemoryOverheadTest.java  |   14 +-
 .../lucene/FlatFormatSerializerJUnitTest.java      |    4 +-
 .../internal/LuceneEventListenerJUnitTest.java     |    2 +-
 .../LuceneIndexCreationProfileJUnitTest.java       |    5 +-
 .../LuceneIndexForPartitionedRegionTest.java       |    4 +-
 .../lucene/internal/LuceneQueryImplJUnitTest.java  |    6 +-
 .../internal/LuceneResultStructImpJUnitTest.java   |   10 +-
 .../internal/LuceneServiceImplJUnitTest.java       |    7 +-
 .../PageableLuceneQueryResultsImplJUnitTest.java   |   37 +-
 .../PartitionedRepositoryManagerJUnitTest.java     |   19 +-
 .../RawLuceneRepositoryManagerJUnitTest.java       |    4 +-
 .../internal/StringQueryProviderJUnitTest.java     |    1 -
 .../cli/commands/LuceneIndexCommandsJUnitTest.java |   60 +-
 .../LuceneCreateIndexFunctionJUnitTest.java        |    4 +-
 .../LuceneDestroyIndexFunctionJUnitTest.java       |   91 +-
 .../LuceneSearchIndexFunctionJUnitTest.java        |    2 +-
 .../directory/DumpDirectoryFilesJUnitTest.java     |    6 +-
 .../distributed/DistributedScoringJUnitTest.java   |    4 +-
 .../internal/distributed/EntryScoreJUnitTest.java  |    4 +-
 .../LuceneQueryFunctionContextJUnitTest.java       |    3 -
 .../distributed/LuceneQueryFunctionJUnitTest.java  |   14 +-
 .../distributed/TopEntriesCollectorJUnitTest.java  |   19 +-
 .../TopEntriesFunctionCollectorJUnitTest.java      |   10 +-
 .../internal/distributed/TopEntriesJUnitTest.java  |   12 +-
 .../WaitUntilFlushedFunctionJUnitTest.java         |   10 +-
 .../internal/filesystem/ChunkKeyJUnitTest.java     |    2 -
 .../lucene/internal/filesystem/FileJUnitTest.java  |    2 -
 .../internal/filesystem/FileSystemJUnitTest.java   |   14 +-
 .../internal/partition/BucketTargetingMapTest.java |    2 +-
 .../results/LuceneGetPageFunctionJUnitTest.java    |    4 +-
 .../internal/results/PageResultsJUnitTest.java     |    5 -
 .../xml/LuceneIndexXmlGeneratorJUnitTest.java      |    8 +-
 .../xml/LuceneIndexXmlParserJUnitTest.java         |   32 +-
 geode-lucene/src/test/resources/expected-pom.xml   |    5 -
 .../LuceneSearchWithRollingUpgradeDUnit.java       |    2 +-
 .../LuceneSearchWithRollingUpgradeTestBase.java    |    5 +-
 geode-management/build.gradle                      |    3 +
 ...lyzeManagementSerializablesIntegrationTest.java |   37 +
 .../AnalyzeManagementSerializablesJUnitTest.java   |   28 -
 ...ctionedSerializablesServiceIntegrationTest.java |   40 +
 .../management/api/ClusterManagementException.java |    2 +-
 .../management/api/ClusterManagementOperation.java |    2 +
 .../api/ClusterManagementOperationResult.java      |    8 +-
 .../api/ClusterManagementRealizationResult.java    |    4 +-
 .../management/api/ClusterManagementResult.java    |    8 +-
 .../client/ClusterManagementServiceBuilder.java    |    2 +-
 .../internal/ClientClusterManagementService.java   |    2 +-
 .../geode/management/configuration/ClassName.java  |    8 +-
 .../geode/management/configuration/Deployment.java |   67 +-
 .../geode/management/configuration/DiskStore.java  |    2 +-
 .../geode/management/configuration/HasFile.java    |    4 +-
 .../geode/management/configuration/IndexType.java  |    2 +-
 .../geode/management/configuration/Links.java      |    4 +-
 .../geode/management/configuration/Region.java     |    8 +-
 .../ManagementSanctionedSerializablesService.java  |   27 +
 .../operation/RebalanceRegionResultImpl.java       |    2 +-
 .../management/operation/RebalanceOperation.java   |   16 +-
 .../geode/management/runtime/CacheServerInfo.java  |   18 +-
 .../management/runtime/MemberInformation.java      |    6 +-
 .../runtime/RestoreRedundancyResults.java          |    2 +-
 .../management/runtime/RuntimeRegionInfo.java      |    2 +-
 ...alization.filter.SanctionedSerializablesService |   15 +
 .../sanctioned-geode-management-serializables.txt  |   42 -
 .../sanctioned-geode-management-serializables.txt  |   42 +
 .../ConfigurationJsonMappingTest.java              |    2 +-
 .../api/ClusterManagementListResultTest.java       |    2 +-
 .../geode/management/api/EntityGroupInfoTest.java  |    2 +-
 .../org/apache/geode/management/api/LinksTest.java |    2 +-
 .../management/api/RealizationResultTest.java      |    2 +-
 .../configuration/AutoSerializerTest.java          |    2 +-
 .../management/configuration/ClassNameTest.java    |    2 +-
 .../management/configuration/DeploymentTest.java   |    2 +-
 .../geode/management/configuration/PdxTest.java    |    2 +-
 .../geode/management/configuration/RegionTest.java |    2 +-
 .../src/test/resources/expected-pom.xml            |    5 +
 .../src/test/script/update-management-wiki.sh      |   25 +-
 geode-membership/build.gradle                      |   69 +-
 ...lyzeMembershipSerializablesIntegrationTest.java |   69 +
 .../AnalyzeMembershipSerializablesJUnitTest.java   |   68 -
 .../membership/GMSMembershipViewJUnitTest.java     |   37 +-
 .../MembershipDependenciesJUnitTest.java           |    2 +-
 .../membership/gms/GMSMemberDataJUnitTest.java     |    1 -
 .../membership/gms/GMSMembershipJUnitTest.java     |   86 +-
 .../internal/membership/gms/GMSUtilTest.java       |    4 +-
 .../membership/gms/MembershipIntegrationTest.java  |    7 +-
 ...ctionedSerializablesServiceIntegrationTest.java |   40 +
 .../gms/fd/GMSHealthMonitorJUnitTest.java          |   40 +-
 .../gms/locator/GMSLocatorIntegrationTest.java     |    1 -
 .../gms/membership/GMSJoinLeaveJUnitTest.java      |  118 +-
 .../gms/messenger/GMSEncryptJUnitTest.java         |    4 +-
 .../gms/messenger/GMSQuorumCheckerJUnitTest.java   |   36 +-
 .../gms/messenger/JGroupsMessengerJUnitTest.java   |   12 +-
 .../gms/messenger/StatRecorderJUnitTest.java       |    4 +-
 .../apache/geode/codeAnalysis/excludedClasses.txt  |    1 -
 .../codeAnalysis/sanctionedDataSerializables.txt   |    4 +-
 .../internal/membership/api/LifecycleListener.java |    6 +-
 .../internal/membership/api/MemberDataBuilder.java |    2 +-
 .../internal/membership/api/MemberIdentifier.java  |    8 +-
 .../internal/membership/api/MembershipConfig.java  |    2 +-
 .../membership/api/MembershipLocatorBuilder.java   |    2 +-
 .../internal/membership/api/MembershipView.java    |   36 +-
 .../internal/membership/gms/GMSMemberData.java     |  154 +-
 .../internal/membership/gms/GMSMembership.java     |  151 +-
 .../internal/membership/gms/GMSMembershipView.java |  104 +-
 .../internal/membership/gms/GMSUtil.java           |    6 +-
 .../membership/gms/LifecycleListenerNoOp.java      |    2 +-
 .../membership/gms/MemberDataBuilderImpl.java      |    6 +-
 .../membership/gms/MemberIdentifierImpl.java       |  236 +-
 .../gms/MembershipLocatorBuilderImpl.java          |    3 +-
 .../MembershipSanctionedSerializablesService.java  |   27 +
 .../internal/membership/gms/Services.java          |  217 +-
 .../internal/membership/gms/SuspectMember.java     |    4 +-
 .../membership/gms/fd/GMSHealthMonitor.java        |  100 +-
 .../gms/locator/FindCoordinatorRequest.java        |   42 +-
 .../gms/locator/FindCoordinatorResponse.java       |   28 +-
 .../membership/gms/locator/GMSLocator.java         |    4 +-
 .../gms/locator/MembershipLocatorImpl.java         |   10 +-
 .../membership/gms/locator/PrimaryHandler.java     |    4 +-
 .../membership/gms/membership/GMSJoinLeave.java    |  268 +-
 .../gms/messages/AbstractGMSMessage.java           |    4 +-
 .../gms/messages/HeartbeatRequestMessage.java      |    2 +-
 .../gms/messages/InstallViewMessage.java           |   30 +-
 .../gms/messages/JoinRequestMessage.java           |    9 +-
 .../gms/messages/JoinResponseMessage.java          |   13 +-
 .../gms/messages/LeaveRequestMessage.java          |    4 +-
 .../gms/messages/RemoveMemberMessage.java          |    4 +-
 .../gms/messages/SuspectMembersMessage.java        |    2 +-
 .../membership/gms/messages/SuspectRequest.java    |   10 +-
 .../membership/gms/messages/ViewAckMessage.java    |   20 +-
 .../membership/gms/messenger/AddressManager.java   |    4 +-
 .../membership/gms/messenger/GMSEncrypt.java       |   14 +-
 .../membership/gms/messenger/GMSMemberWrapper.java |    2 +-
 .../membership/gms/messenger/GMSPingPonger.java    |    4 +-
 .../membership/gms/messenger/GMSQuorumChecker.java |   18 +-
 .../membership/gms/messenger/JGAddress.java        |   18 +-
 .../membership/gms/messenger/JGroupsMessenger.java |   72 +-
 .../gms/messenger/MembershipInformationImpl.java   |    2 +-
 .../membership/gms/messenger/StatRecorder.java     |    2 +-
 .../membership/gms/messenger/Transport.java        |    6 +-
 .../internal/membership/utils/AvailablePort.java   |  117 +-
 ...alization.filter.SanctionedSerializablesService |   15 +
 .../src/test/resources/expected-pom.xml            |    5 -
 geode-memcached/build.gradle                       |    2 +
 ...alyzeMemcachedSerializablesIntegrationTest.java |   37 +
 .../AnalyzeMemcachedSerializablesJUnitTest.java    |   31 -
 ...ctionedSerializablesServiceIntegrationTest.java |   40 +
 .../memcached/DomainObjectsAsValuesJUnitTest.java  |   16 +-
 .../memcached/GemcachedBinaryClientJUnitTest.java  |    5 +-
 .../memcached/GemcachedDevelopmentJUnitTest.java   |    9 +-
 .../org/apache/geode/codeAnalysis/openBugs.txt     |   22 -
 .../codeAnalysis/sanctionedDataSerializables.txt   |    1 -
 .../apache/geode/internal/memcached/Command.java   |    2 +-
 .../internal/memcached/ConnectionHandler.java      |    4 +-
 .../internal/memcached/GeodeMemcachedService.java  |    8 +-
 .../geode/internal/memcached/KeyWrapper.java       |   18 +-
 .../MemcachedDistributedSystemService.java         |   43 -
 .../MemcachedSanctionedSerializablesService.java   |   27 +
 .../geode/internal/memcached/RequestReader.java    |   39 +-
 .../geode/internal/memcached/ValueWrapper.java     |   20 +-
 .../memcached/commands/AbstractCommand.java        |   11 +-
 .../internal/memcached/commands/AppendCommand.java |    4 +-
 .../memcached/commands/DecrementCommand.java       |    7 +-
 .../internal/memcached/commands/DeleteCommand.java |    2 +-
 .../memcached/commands/FlushAllCommand.java        |   14 +-
 .../internal/memcached/commands/GetCommand.java    |    6 +-
 .../memcached/commands/IncrementCommand.java       |    7 +-
 .../memcached/commands/PrependCommand.java         |    4 +-
 .../memcached/commands/StorageCommand.java         |    7 +-
 .../geode/memcached/GemFireMemcachedServer.java    |   75 +-
 ...e.distributed.internal.DistributedSystemService |    1 -
 ...alization.filter.SanctionedSerializablesService |   15 +
 .../src/test/resources/expected-pom.xml            |    5 +
 geode-old-client-support/build.gradle              |    1 -
 .../apache/geode/OldClientSupportDUnitTest.java    |  257 --
 .../geode/OldClientSupportDistributedTest.java     |  272 ++
 .../com/gemstone/gemfire/GemFireException.java     |    6 +-
 .../gemstone/gemfire/OldClientSupportProvider.java |   20 +-
 .../gemfire/cache/execute/FunctionException.java   |    6 +-
 .../execute/FunctionInvocationTargetException.java |    2 +-
 geode-pulse/build.gradle                           |    2 +
 geode-pulse/geode-pulse-test/build.gradle          |    1 -
 .../tools/pulse/tests/DataBrowserResultLoader.java |    5 +-
 .../geode/tools/pulse/tests/JMXProperties.java     |    2 +-
 .../org/apache/geode/tools/pulse/tests/Region.java |    8 +-
 .../geode/tools/pulse/tests/RegionOnMember.java    |    4 +-
 .../org/apache/geode/tools/pulse/tests/Server.java |   10 +-
 .../geode/tools/pulse/tests/ServerObject.java      |   14 +-
 .../pulse/tests/rules/ScreenshotOnFailureRule.java |    6 +-
 .../geode/tools/pulse/tests/rules/ServerRule.java  |    4 +-
 .../tools/pulse/tests/rules/WebDriverRule.java     |    4 +-
 .../AnalyzePulseSerializablesIntegrationTest.java  |   36 +
 .../context/PulseControllerTestContext.java        |    2 +-
 .../apache/geode/codeAnalysis/excludedClasses.txt  |    1 +
 .../internal/controllers/PulseController.java      |    8 +-
 .../geode/tools/pulse/internal/data/Cluster.java   |    6 +-
 .../tools/pulse/internal/data/DataBrowser.java     |    2 +-
 .../pulse/internal/data/JmxManagerFinder.java      |    2 +-
 .../tools/pulse/internal/data/PulseConfig.java     |   22 +-
 .../tools/pulse/internal/data/PulseConstants.java  |    2 +-
 .../tools/pulse/internal/data/PulseVersion.java    |    2 +-
 .../internal/service/ClusterRegionService.java     |    2 +-
 .../internal/service/ClusterRegionsService.java    |    2 +-
 .../service/ClusterSelectedRegionService.java      |    2 +-
 .../ClusterSelectedRegionsMemberService.java       |    2 +-
 .../tools/pulse/internal/util/ConnectionUtil.java  |    2 +-
 .../tools/pulse/internal/util/IPAddressUtil.java   |    2 +-
 geode-pulse/src/main/webapp/META-INF/NOTICE        |    2 +-
 geode-pulse/src/main/webapp/clusterDetail.html     |    2 +-
 geode-pulse/src/main/webapp/scripts/lib/common.js  |    4 +-
 .../src/main/webapp/scripts/lib/excanvas.js        |    2 +-
 geode-pulse/src/main/webapp/scripts/lib/jit.js     |   12 +-
 .../src/main/webapp/scripts/lib/jquery-1.7.2.js    |    2 +-
 .../main/webapp/scripts/lib/jquery.jqGrid.src.js   |    4 +-
 .../webapp/scripts/lib/jquery.ztree.core-3.5.js    |    2 +-
 .../main/webapp/scripts/multiselect/jquery-ui.js   |    2 +-
 .../main/webapp/scripts/multiselect/prettify.js    |    4 +-
 .../webapp/scripts/pulsescript/MemberDetails.js    |    2 +-
 .../webapp/scripts/pulsescript/PulseCallbacks.js   |   18 +-
 .../webapp/scripts/pulsescript/PulseFunctions.js   |   54 +-
 .../webapp/scripts/pulsescript/clusterDetail.js    |   38 +-
 .../src/main/webapp/scripts/pulsescript/common.js  |   38 +-
 .../scripts/pulsescript/pages/DataBrowser.js       |   22 +-
 .../scripts/pulsescript/pages/DataBrowserQuery.js  |   16 +-
 .../pulsescript/pages/DataBrowserQueryHistory.js   |    4 +-
 .../data/JMXDataUpdaterGetDoubleAttributeTest.java |   16 +-
 .../tools/pulse/tests/ui/PulseAutomatedTest.java   |    2 +-
 .../geode/tools/pulse/tests/ui/PulseTestUtils.java |   36 +-
 geode-rebalancer/build.gradle                      |    1 +
 .../util/AutoBalancerIntegrationJUnitTest.java     |   31 +-
 .../org/apache/geode/cache/util/AutoBalancer.java  |   59 +-
 geode-serialization/ANALYZE_SERIALIZABLES.md       |  116 +
 geode-serialization/build.gradle                   |    9 +-
 ...eSerializationSerializablesIntegrationTest.java |   37 +
 ...ctionedSerializablesServiceIntegrationTest.java |   40 +
 ...ationWhenFilterIsAlreadySetIntegrationTest.java |   53 +
 ...enObjectInputFilterNotFoundIntegrationTest.java |  108 +
 ...nputFilterApiSetFilterBlankIntegrationTest.java |   62 +
 ...jectInputFilterApiSetFilterIntegrationTest.java |   60 +
 ...InputFilterApiSetFilterNullIntegrationTest.java |   61 +
 .../apache/geode/codeAnalysis/excludedClasses.txt  |    0
 .../internal/serialization/BasicSerializable.java  |    3 -
 .../geode/internal/serialization/DSCODE.java       |    2 +-
 .../serialization/DSFIDNotFoundException.java      |   10 +-
 .../internal/serialization/DSFIDSerializer.java    |    9 +-
 .../serialization/DataSerializableFixedID.java     |   40 +-
 .../DataSerializableFixedIdRegistrant.java         |   29 +
 .../DataSerializableFixedIdRegistrar.java          |   27 +
 .../geode/internal/serialization/KnownVersion.java |   72 +-
 ...erializationSanctionedSerializablesService.java |   27 +
 .../serialization/SerializationVersions.java       |    6 +-
 .../serialization/ThreadLocalByteArrayCache.java   |    2 +-
 .../serialization/VersionedDataInputStream.java    |    4 +-
 .../serialization/VersionedDataOutputStream.java   |    8 +-
 .../serialization/VersionedDataStream.java         |    3 +
 .../internal/serialization/filter/ApiPackage.java  |   41 +
 .../filter/FilterAlreadyConfiguredException.java   |   36 +
 .../serialization/filter/FilterConfiguration.java  |   27 +
 .../serialization/filter/FilterPattern.java        |   28 +
 .../serialization/filter/GlobalSerialFilter.java   |   30 +
 .../filter/GlobalSerialFilterConfiguration.java    |  126 +
 .../GlobalSerialFilterConfigurationFactory.java    |   29 +
 .../filter/GlobalSerialFilterFactory.java          |   30 +
 .../Java9ReflectiveObjectInputFilterApi.java       |   64 +
 .../filter/JmxSerialFilterConfiguration.java       |   73 +
 .../JmxSerialFilterConfigurationFactory.java       |   28 +
 .../filter/NullStreamSerialFilter.java             |   28 +
 .../serialization/filter/ObjectInputFilterApi.java |   88 +
 .../filter/ObjectInputFilterApiFactory.java        |   24 +
 .../filter/ObjectInputFilterInvocationHandler.java |  109 +
 .../filter/ObjectInputFilterUtils.java             |   61 +
 .../filter/OpenMBeanFilterPattern.java             |   68 +
 .../filter/ReflectiveFacadeGlobalSerialFilter.java |  102 +
 .../ReflectiveFacadeGlobalSerialFilterFactory.java |   46 +
 .../filter/ReflectiveFacadeStreamSerialFilter.java |  112 +
 .../ReflectiveFacadeStreamSerialFilterFactory.java |   39 +
 .../filter/ReflectiveObjectInputFilterApi.java     |  238 ++
 .../ReflectiveObjectInputFilterApiFactory.java     |   45 +
 .../filter/SanctionedSerializables.java            |   99 +
 .../SanctionedSerializablesFilterPattern.java      |  111 +
 .../filter/SanctionedSerializablesService.java     |   39 +
 .../filter/SerializableObjectConfig.java           |   31 +
 .../serialization/filter/StreamSerialFilter.java   |   32 +
 .../filter/StreamSerialFilterFactory.java          |   24 +
 ...ertyGlobalSerialFilterConfigurationFactory.java |   68 +
 ...ropertyJmxSerialFilterConfigurationFactory.java |   55 +
 .../filter/UnableToSetSerialFilterException.java   |   36 +
 .../internal/DSFIDSerializerImpl.java              |   23 +-
 .../internal/SerializationContextImpl.java         |    3 +-
 ...alization.filter.SanctionedSerializablesService |   15 +
 ...anctioned-geode-serialization-serializables.txt |    6 +
 .../serialization/ByteArrayDataInputTest.java      |   16 +-
 .../geode/internal/serialization/DSCODETest.java   |    2 +-
 .../serialization/KnownVersionJUnitTest.java       |   10 +-
 .../SerializationDependenciesJUnitTest.java        |   48 -
 .../SerializationDependenciesTest.java             |   49 +
 .../serialization/filter/ApiPackageTest.java       |   61 +
 .../GlobalSerialFilterConfigurationTest.java       |  118 +
 .../JmxSerialFilterConfigurationFactoryTest.java   |   74 +
 .../filter/JmxSerialFilterConfigurationTest.java   |  165 +
 .../filter/NullObjectInputFilterTest.java          |   35 +
 .../ObjectInputFilterInvocationHandlerTest.java    |   97 +
 .../filter/ObjectInputFilterUtilsTest.java         |   94 +
 .../filter/OpenMBeanFilterPatternTest.java         |  142 +
 ...lectiveFacadeGlobalSerialFilterFactoryTest.java |   76 +
 .../ReflectiveFacadeGlobalSerialFilterTest.java    |  168 ++
 ...flectiveFacadeObjectInputFilterFactoryTest.java |   84 +
 .../ReflectiveFacadeObjectInputFilterTest.java     |  175 ++
 .../ReflectiveObjectInputFilterApiFactoryTest.java |   69 +
 .../filter/ReflectiveObjectInputFilterApiTest.java |  228 ++
 .../SanctionedSerializablesFilterPatternTest.java  |  206 ++
 .../filter/SanctionedSerializablesTest.java        |   95 +
 .../filter/SerialFilterAssertions.java             |   69 +
 .../filter/SerializableObjectConfigTest.java       |   46 +
 ...GlobalSerialFilterConfigurationFactoryTest.java |  144 +
 ...rtyJmxSerialFilterConfigurationFactoryTest.java |   94 +
 .../internal/DSFIDSerializerImplTest.java          |   44 +
 .../src/test/resources/expected-pom.xml            |   10 +
 geode-server-all/build.gradle                      |   81 +
 .../geode/GeodeServerAllJarIntegrationTest.java    |   79 +
 .../resources/dependency_classpath.txt             |   98 +
 .../src/test/resources/expected-pom.xml            |  150 +
 geode-tcp-server/build.gradle                      |   42 +-
 .../tcpserver/AdvancedSocketCreatorImpl.java       |    4 +-
 .../internal/tcpserver/InetSocketWrapper.java      |    8 -
 .../internal/tcpserver/ShutdownRequest.java        |    2 +-
 .../internal/tcpserver/ShutdownResponse.java       |    2 +-
 .../distributed/internal/tcpserver/TcpClient.java  |  301 +-
 .../internal/tcpserver/HostAndPortTest.java        |   20 +-
 .../internal/tcpserver/TcpClientTest.java          |  636 ++++
 .../tcpserver/TcpServerDependenciesTest.java       |    1 +
 .../internal/tcpserver/TcpServerJUnitTest.java     |  282 --
 .../internal/tcpserver/TcpServerTest.java          |  285 ++
 .../src/test/resources/expected-pom.xml            |    5 +
 .../org.mockito.plugins.MockMaker                  |   16 +
 .../TcpServerProductVersionDUnitTest.java          |  281 --
 .../TcpServerProductVersionUpgradeTest.java        |  281 ++
 geode-unsafe/build.gradle                          |    8 +-
 .../internal/sun/misc/SignalHandlerTest.java       |    5 +-
 .../geode/unsafe/internal/sun/misc/SignalTest.java |    5 +-
 .../internal/sun/nio/ch/DirectBufferTest.java      |    8 +-
 geode-wan/build.gradle                             |    5 +-
 .../commands/WanCopyRegionCommandDUnitTest.java    | 1527 ++++++++++
 .../internal/cache/UpdateVersionDUnitTest.java     |   92 +-
 ...ueueOverflowMBeanAttributesDistributedTest.java |    4 +-
 .../cache/wan/CacheClientNotifierDUnitTest.java    |    8 +-
 .../cache/wan/GatewayReceiverMBeanDUnitTest.java   |   39 +-
 ...nderOverflowMBeanAttributesDistributedTest.java |    8 +-
 .../cache/wan/Simple2CacheServerDUnitTest.java     |   30 +-
 .../geode/internal/cache/wan/WANTestBase.java      |  479 +--
 .../ConcurrentParallelGatewaySenderDUnitTest.java  |   52 +-
 ...ParallelGatewaySenderOperation_1_DUnitTest.java |   40 +-
 ...ParallelGatewaySenderOperation_2_DUnitTest.java |   86 +-
 .../ConcurrentWANPropagation_1_DUnitTest.java      |   34 +-
 .../ConcurrentWANPropagation_2_DUnitTest.java      |   42 +-
 .../cache/wan/disttx/DistTXWANDUnitTest.java       |   12 +-
 .../misc/AuthenticationExpiredWANDunitTest.java    |  172 ++
 .../misc/CommonParallelGatewaySenderDUnitTest.java |   31 +-
 .../KeepEventsOnGatewaySenderQueueDUnitTest.java   |    2 +-
 .../NewWANConcurrencyCheckForDestroyDUnitTest.java |   64 +-
 .../wan/misc/NewWanAuthenticationDUnitTest.java    |   10 +-
 .../cache/wan/misc/PDXNewWanDUnitTest.java         |  126 +-
 ...atedRegion_ParallelWANPersistenceDUnitTest.java |   52 +-
 ...atedRegion_ParallelWANPropagationDUnitTest.java |   78 +-
 .../misc/SenderWithTransportFilterDUnitTest.java   |   18 +-
 ...hutdownAllPersistentGatewaySenderDUnitTest.java |    8 +-
 .../cache/wan/misc/WANLocatorServerDUnitTest.java  |    8 +-
 .../internal/cache/wan/misc/WANSSLDUnitTest.java   |   27 +-
 .../cache/wan/misc/WanAutoDiscoveryDUnitTest.java  |  107 +-
 ...elGatewaySenderAndCQDurableClientDUnitTest.java |  503 ++++
 .../ParallelGatewaySenderOperationsDUnitTest.java  |  154 +-
 ...arallelGatewaySenderQueueOverflowDUnitTest.java |   88 +-
 .../parallel/ParallelWANConflationDUnitTest.java   |   40 +-
 ...ANPersistenceEnabledGatewaySenderDUnitTest.java |  428 ++-
 ...arallelWANPropagationClientServerDUnitTest.java |    8 +-
 ...rallelWANPropagationConcurrentOpsDUnitTest.java |   42 +-
 .../parallel/ParallelWANPropagationDUnitTest.java  |    4 +-
 .../ParallelWANPropagationLoopBackDUnitTest.java   |   10 +-
 .../wan/parallel/ParallelWANStatsDUnitTest.java    |  343 +--
 .../cache/wan/serial/GatewayReceiverDUnitTest.java |   12 +-
 ...erialGatewaySenderAlterOperationsDUnitTest.java |   32 +-
 ...lGatewaySenderDistributedDeadlockDUnitTest.java |   22 +-
 .../SerialGatewaySenderEventListenerDUnitTest.java |   16 +-
 ...rialGatewaySenderOperationsDistributedTest.java |   60 +-
 .../serial/SerialGatewaySenderQueueDUnitTest.java  |   59 +-
 ...ANPersistenceEnabledGatewaySenderDUnitTest.java |   54 +-
 .../wan/serial/SerialWANPropagationDUnitTest.java  |  156 +-
 .../SerialWANPropagationLoopBackDUnitTest.java     |   78 +-
 ...lWANPropagation_PartitionedRegionDUnitTest.java |   38 +-
 .../cache/wan/serial/SerialWANStatsDUnitTest.java  |  355 +--
 .../CreateGatewayReceiverCommandDUnitTest.java     |    4 +-
 .../PauseGatewaySenderCommandDUnitTest.java        |    7 +-
 .../StopGatewaySenderCommandDUnitTest.java         |  168 +-
 .../cache/wan/wancommand/WANCommandUtils.java      |   10 +-
 .../geode/management/AEQManagementDUnitTest.java   |    4 +-
 .../geode/management/WANManagementDUnitTest.java   |   40 +-
 .../AlterRegionCommandWithRemoteLocator.java       |    2 +-
 ...rConfigurationIndexWithFromClauseDUnitTest.java |    4 +-
 .../WANClusterConfigurationDUnitTest.java          |    1 -
 ...ewayReceiverXmlParsingValidationsJUnitTest.java |   28 +-
 ...ctionedSerializablesServiceIntegrationTest.java |   39 +
 .../WanCommandAutoCompletionIntegrationTest.java   |   50 +
 .../AnalyzeWANSerializablesIntegrationTest.java    |   38 +
 .../AnalyzeWANSerializablesJUnitTest.java          |   35 -
 .../cache/wan/misc/WANConfigurationJUnitTest.java  |   10 +-
 .../apache/geode/codeAnalysis/excludedClasses.txt  |    2 -
 .../org/apache/geode/codeAnalysis/openBugs.txt     |   21 -
 .../internal/locator/wan/LocatorJoinMessage.java   |   21 +-
 .../locator/wan/RemoteLocatorJoinRequest.java      |    8 +-
 .../locator/wan/RemoteLocatorJoinResponse.java     |   10 +-
 .../internal/locator/wan/RemoteLocatorRequest.java |    8 +-
 .../locator/wan/RemoteLocatorResponse.java         |    6 +-
 .../wan/internal/AbstractRemoteGatewaySender.java  |   85 +-
 .../wan/internal/GatewayReceiverFactoryImpl.java   |   50 +-
 .../cache/wan/internal/GatewayReceiverImpl.java    |   16 +-
 .../GatewaySenderEventRemoteDispatcher.java        |  231 +-
 .../wan/internal/GatewaySenderFactoryImpl.java     |  200 +-
 .../wan/internal/WANDistributedSystemService.java  |   43 -
 .../WANSanctionedSerializablesService.java         |   27 +
 .../wan/internal/WanCopyRegionFunctionService.java |  123 +
 ...gionFunctionServiceAlreadyRunningException.java |   24 +
 .../cli/commands/WanCopyRegionCommand.java         |  138 +
 .../client/locator/GatewaySenderBatchOp.java       |   73 +-
 .../internal/client/locator/LocatorDiscovery.java  |   10 +-
 .../wan/internal/client/locator/LocatorHelper.java |   61 +-
 .../locator/LocatorMembershipListenerImpl.java     |   47 +-
 .../wan/internal/client/locator/SenderProxy.java   |    4 +-
 .../internal/client/locator/WANFactoryImpl.java    |   47 +-
 .../client/locator/WanLocatorDiscovererImpl.java   |   12 +-
 .../parallel/ParallelGatewaySenderImpl.java        |   49 +-
 ...currentParallelGatewaySenderEventProcessor.java |    6 +-
 .../RemoteParallelGatewaySenderEventProcessor.java |   68 +-
 ...oncurrentSerialGatewaySenderEventProcessor.java |    2 +-
 .../RemoteSerialGatewaySenderEventProcessor.java   |    6 +-
 .../internal/serial/SerialGatewaySenderImpl.java   |   58 +-
 .../cli/functions/WanCopyRegionFunction.java       |  215 ++
 .../functions/WanCopyRegionFunctionDelegate.java   |  452 +++
 ...e.distributed.internal.DistributedSystemService |   15 -
 .../org.apache.geode.internal.cache.CacheService   |    1 +
 ...serialization.DataSerializableFixedIdRegistrant |   16 +
 ...alization.filter.SanctionedSerializablesService |   15 +
 .../org.springframework.shell.core.CommandMarker   |    1 +
 .../sanctioned-geode-wan-serializables.txt         |    6 +
 .../wan/internal/AckReaderThreadJUnitTest.java     |   10 +-
 .../wan/internal/GatewayReceiverImplTest.java      |    8 +-
 ...atewaySenderEventRemoteDispatcherJUnitTest.java |   78 +-
 .../internal/WanCopyRegionFunctionServiceTest.java |  186 ++
 .../cli/commands/WanCopyRegionCommandTest.java     |   49 +
 .../locator/LocatorMembershipListenerTest.java     |    2 +-
 .../parallel/ParallelGatewaySenderImplTest.java    |   47 +-
 .../serial/SerialGatewaySenderImplTest.java        |   42 -
 .../WanCopyRegionFunctionDelegateTest.java         |  665 ++++
 .../cli/functions/WanCopyRegionFunctionTest.java   |  142 +
 geode-wan/src/test/resources/expected-pom.xml      |    5 +
 ...ateGatewaySenderMixedSiteOneCurrentSiteTwo.java |   13 +-
 .../cache/wan/WANRollingUpgradeDUnitTest.java      |   24 +-
 ...adeEventProcessingOldSiteOneCurrentSiteTwo.java |    3 +-
 ...ipleReceiversDefinedInClusterConfiguration.java |    4 +-
 .../WANRollingUpgradeNewSenderProcessOldEvent.java |    5 +-
 ...eCacheServerProfileToMembersOlderThan1dot5.java |    4 +-
 .../AnalyzeWebApiSerializablesIntegrationTest.java |   38 +
 .../AnalyzeWebApiSerializablesJUnitTest.java       |   28 -
 ...ctionedSerializablesServiceIntegrationTest.java |   39 +
 .../rest/internal/web/controllers/Customer.java    |   34 +-
 .../geode/rest/internal/web/controllers/Item.java  |   42 +-
 .../WebApiSanctionedSerializablesService.java      |   27 +
 .../web/controllers/AbstractBaseController.java    |    3 +-
 .../web/controllers/PdxBasedCrudController.java    |    6 +-
 .../web/controllers/QueryAccessController.java     |    2 +-
 .../support/RestServersResultCollector.java        |    2 +-
 .../CustomMappingJackson2HttpMessageConverter.java |    6 +-
 .../web/security/GeodeAuthenticationProvider.java  |    2 +-
 .../web/security/RestSecurityConfiguration.java    |    2 +-
 .../rest/internal/web/util/IdentifiableUtils.java  |   12 +-
 .../geode/rest/internal/web/util/JSONUtils.java    |    2 +-
 .../geode/rest/internal/web/util/JsonWriter.java   |  104 +-
 .../geode/rest/internal/web/util/NumberUtils.java  |    4 +-
 ...alization.filter.SanctionedSerializablesService |   15 +
 .../sanctioned-geode-web-api-serializables.txt     |    0
 geode-web-api/src/main/webapp/META-INF/NOTICE      |    2 +-
 .../rest/internal/web/util/JsonWriterTest.java     |   48 +
 geode-web-management/build.gradle                  |    4 +
 .../rest/LocatorLauncherContextLoader.java         |    2 +-
 .../internal/rest/LocatorWebContext.java           |    6 +-
 .../internal/rest/MockLocatorContextLoader.java    |    4 +-
 ...usterManagementSecurityRestIntegrationTest.java |    4 +-
 .../rest/DeployManagementIntegrationTest.java      |    4 +-
 .../internal/rest/DeploymentIntegrationTest.java   |   11 +-
 .../internal/rest/PdxIntegrationTest.java          |    2 +-
 .../rest/RegionManagementIntegrationTest.java      |    2 +-
 .../internal/rest/ManagementLoggingFilter.java     |   10 +-
 .../DeploymentManagementController.java            |    4 +-
 .../rest/controllers/PingManagementController.java |    2 +-
 .../CustomMappingJackson2HttpMessageConverter.java |    2 +-
 .../rest/security/GeodeAuthenticationProvider.java |    2 +-
 .../rest/security/RestSecurityConfiguration.java   |    2 +-
 .../src/main/webapp/META-INF/NOTICE                |    2 +-
 geode-web/build.gradle                             |    4 +-
 .../AlterRuntimeCommandDistributedTest.java        |   57 +-
 .../commands/ClusterConfigurationDUnitTest.java    |    3 +-
 .../ConnectCommandWithSSLMultiKeyTest.java         |    2 +-
 .../cli/commands/ConnectCommandWithSSLTest.java    |    4 +-
 .../commands/DescribeConfigCommandDUnitTest.java   |    4 +-
 .../cli/commands/ExportConfigCommandDUnitTest.java |    4 +-
 .../FunctionCommandsOverHttpDUnitTest.java         |   29 -
 .../FunctionCommandsOverHttpDistributedTest.java   |   29 +
 .../cli/commands/GcCommandOverHttpDUnitTest.java   |   24 -
 .../commands/GcCommandOverHttpDistributedTest.java |   24 +
 .../GemfireDataCommandsOverHttpDUnitTest.java      |   24 -
 .../GeodeDataCommandsOverHttpDistributedTest.java  |   26 +
 .../ListIndexCommandOverHttpDUnitTest.java         |   30 -
 .../ListIndexCommandOverHttpDistributedTest.java   |   30 +
 .../commands/QueryCommandOverHttpDUnitTest.java    |   25 -
 .../QueryCommandOverHttpDistributedTest.java       |   42 +
 .../RegionMembershipMBeanOverHttpDUnitTest.java    |   25 -
 ...gionMembershipMBeanOverHttpDistributedTest.java |   26 +
 .../security/LogNoPasswordDistributedTest.java     |    2 +-
 .../internal/cli/commands/CommandOverHttpTest.java |    4 +-
 .../ShellCommandsControllerProcessCommandTest.java |    5 +-
 .../support/LoginHandlerInterceptor.java           |    6 +-
 geode-web/src/main/webapp/META-INF/NOTICE          |    2 +-
 .../LoginHandlerInterceptorRequestHeaderTest.java  |    2 +-
 gradle.properties                                  |    4 +-
 gradle/code-analysis.gradle                        |   26 +-
 gradle/japicmp.gradle                              |   44 +-
 gradle/java.gradle                                 |   97 +-
 gradle/javaVersions.gradle                         |   77 +
 gradle/jmh.gradle                                  |   16 +
 gradle/multi-process-test.gradle                   |   60 +-
 gradle/spotless.gradle                             |   16 +-
 gradle/test.gradle                                 |   27 +-
 settings.gradle                                    |   16 +-
 static-analysis/pmd-rules/build.gradle             |    7 +-
 6038 files changed, 214297 insertions(+), 147165 deletions(-)
 delete mode 100644 boms/build.gradle
 create mode 100644 buildSrc/src/main/groovy/org/apache/geode/gradle/japicmp/GeodeSpiRegressionRule.groovy
 delete mode 100644 buildSrc/src/main/groovy/org/apache/geode/gradle/testing/dockerized/DockerTestWorkerConfig.groovy
 delete mode 100644 buildSrc/src/main/groovy/org/apache/geode/gradle/testing/dockerized/DockerizedTestPlugin.groovy
 create mode 100644 buildSrc/src/main/groovy/org/apache/geode/gradle/testing/isolation/IsolatedTestPlugin.groovy
 delete mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/dockerized/DockerConnectionAcceptor.java
 delete mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/dockerized/DockerMessagingServer.java
 delete mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/dockerized/DockerProcess.java
 delete mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/dockerized/DockerProcessLauncher.java
 delete mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/dockerized/WildcardBindingInetAddressFactory.java
 create mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/isolation/CompletableProcess.java
 create mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/isolation/PortRange.java
 create mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/isolation/PortRangeContext.java
 create mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/isolation/PortRangeProcessLauncher.java
 create mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/repeat/ExecutionTrackingTestClassProcessor.java
 create mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/repeat/ExecutionTrackingTestResultProcessor.java
 create mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/repeat/RepeatTestExecuter.java
 delete mode 100644 buildSrc/src/main/java/org/apache/geode/gradle/testing/repeat/RepeatableTestExecuter.java
 delete mode 100644 buildSrc/src/main/resources/META-INF/gradle-plugins/geode-dockerized-test.properties
 create mode 100644 buildSrc/src/main/resources/META-INF/gradle-plugins/geode-isolated-test.properties
 create mode 100644 buildSrc/src/test/java/org/apache/geode/gradle/test/isolation/PortRangeTest.java
 create mode 100644 buildSrc/src/test/java/org/apache/geode/gradle/testing/isolation/WorkingDirectoryIsolatorTest.java
 delete mode 100644 ci/images/test-container/Dockerfile
 create mode 100644 dev-tools/release-testing/README.md
 create mode 100755 dev-tools/release-testing/smoketest_rc.sh
 create mode 100755 dev-tools/release/print_announce_email.sh
 create mode 100644 extensions/geode-modules/src/test/java/org/apache/geode/modules/session/bootstrap/AbstractCacheTest.java
 create mode 100644 extensions/geode-modules/src/test/java/org/apache/geode/modules/session/bootstrap/ClientServerCacheTest.java
 create mode 100644 extensions/geode-modules/src/test/java/org/apache/geode/modules/session/bootstrap/PeerToPeerCacheTest.java
 delete mode 100644 geode-apis-compatible-with-redis/README.md
 delete mode 100644 geode-apis-compatible-with-redis/build.gradle
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/NativeRedisClusterTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/GeodeRedisServerStartUpAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/GlobPatternNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/UnknownNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/cluster/ClusterNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/connection/AuthNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/connection/EchoNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/connection/PingNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/connection/SelectNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/hash/HScanNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/hash/HashesNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/hash/HincrByFloatNativeRedisAccetanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/hash/MemoryOverheadNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/DelNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/ExistsNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/ExpireAtNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/ExpireNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/KeysNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/PExpireAtNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/PTTLNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/PersistNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/PexpireNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/RenameNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/ScanNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/TTLNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/TypeNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/key/UnlinkNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/pubsub/LettucePubSubNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/pubsub/PubSubNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/pubsub/SubscriptionsNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/server/DBSizeNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/server/FlushAllNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/server/FlushDBNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/server/HitsMissesNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/server/InfoNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/server/InfoStatsNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/server/MemoryStatsNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/server/ShutDownNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/server/SlowlogNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/server/TimeNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/set/SDiffNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/set/SInterNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/set/SIsMemberNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/set/SMoveNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/set/SPopNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/set/SRemNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/set/SScanNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/set/SUnionNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/set/SetsNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/sortedset/ZAddNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/sortedset/ZCardNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/sortedset/ZIncrByNativeRedisIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/sortedset/ZRemNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/sortedset/ZScoreNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/AppendMemoryNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/AppendNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/BitCountNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/BitOpNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/BitPosNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/DecrByNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/DecrNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/GetBitNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/GetNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/GetRangeNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/GetSetNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/IncrByFloatNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/IncrByNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/IncrNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/MGetNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/MSetNXNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/MSetNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/PSetEXNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/SetBitNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/SetExNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/SetNXNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/SetNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/SetRangeNativeRedisAcceptanceTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/executor/string/StringNativeRedisAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/session/NativeRedisSessionAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/java/session/NativeRedisSessionExpirationAcceptanceTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/acceptanceTest/resources/0001-configure-redis-tests.patch
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/NativeRedisTestRule.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/ClusterNode.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/ClusterNodes.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/ConcurrentLoopingThreads.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/GeodeRedisServerRule.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/NativeRedisClusterTestRule.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/RedisIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/internal/proxy/ClusterNodesResponseProcessor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/internal/proxy/MovedResponseHandler.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/internal/proxy/RedisProxy.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/internal/proxy/RedisProxyInboundHandler.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/internal/proxy/RedisProxyOutboundHandler.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/mocks/MockBinarySubscriber.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/redis/mocks/MockSubscriber.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/java/org/apache/geode/test/dunit/rules/RedisClusterStartupRule.java
 delete mode 100644 geode-apis-compatible-with-redis/src/commonTest/resources/redis-cluster-compose.yml
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/CheckPrimaryBucketFunction.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/EnsurePrimaryStaysPutDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/GeodeRedisServerStartupDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/OutOfMemoryDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/RedisDistDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/cluster/RedisPartitionResolverDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/data/DeltaDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/data/PartitionedRegionStatsUpdateTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/CrashAndNoRepeatDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/FlushAllDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/InfoDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/cluster/ClusterSlotsAndNodesDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/cluster/JedisAndLettuceClusterDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HExistsDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HGetDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HKeysDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HMgetDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HMsetDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HScanDunitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HSetNXDunitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HashesAndCrashesDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HdelDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HlenDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HsetDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HstrlenDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/hash/HvalsDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/key/ExpireDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/key/PersistDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/key/RenameDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/pubsub/PubSubDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/set/SaddDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/set/SremDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/sortedset/ZAddDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/sortedset/ZCardDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/sortedset/ZRemDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/string/StringsDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/session/RedisSessionDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/session/SessionDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/session/SessionExpirationDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/session/SessionsAndCrashesDUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/session/springRedisTestApplication/config/DUnitSocketAddressResolver.java
 delete mode 100755 geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/session/springRedisTestApplication/config/WebMvcConfig.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeRedisSerializablesIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/AbstractCommandPipeliningIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/RedisCommandArgumentsTestHelper.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/RedisTestHelper.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/SSLTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/AbstractGlobPatternIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/AbstractUnknownIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/GlobPatternIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/UnknownIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/cluster/AbstractClusterIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/cluster/ClusterIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/common/UnsupportedCommandsIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/connection/AbstractEchoIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/connection/AbstractPingIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/connection/AbstractSelectIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/connection/AuthIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/connection/EchoIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/connection/PingIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/connection/QuitIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/connection/SelectIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/hash/AbstractHScanIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/hash/AbstractHashesIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/hash/AbstractHincrByFloatIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/hash/AbstractMemoryOverheadIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/hash/HScanIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/hash/HashesIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/hash/HincrByFloatIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/hash/MemoryOverheadIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractDelIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractExistsIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractExpireAtIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractExpireIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractKeysIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractPExpireAtIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractPTTLIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractPersistIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractPexpireIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractRenameIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractScanIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractTTLIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractTypeIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/AbstractUnlinkIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/DelIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/ExistsIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/ExpireAtIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/ExpireIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/KeysIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/PExpireAtIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/PTTLIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/PersistIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/PexpireIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/RenameIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/ScanIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/TTLIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/TypeIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/key/UnlinkIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/pubsub/AbstractLettucePubSubIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/pubsub/AbstractPubSubIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/pubsub/AbstractSubscriptionsIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/pubsub/LettucePubSubIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/pubsub/PubSubIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/pubsub/SubscriptionsIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/AbstractDBSizeIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/AbstractFlushAllIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/AbstractFlushDBIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/AbstractHitsMissesIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/AbstractInfoIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/AbstractRedisInfoStatsIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/AbstractRedisMemoryStatsIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/AbstractShutDownIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/AbstractSlowlogIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/AbstractTimeIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/DBSizeIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/FlushAllIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/FlushDBIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/HitsMissesIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/InfoIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/InfoStatsIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/MemoryStatsIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/ShutdownIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/SlowlogIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/TimeIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/AbstractSDiffIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/AbstractSInterIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/AbstractSIsMemberIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/AbstractSMoveIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/AbstractSPopIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/AbstractSRemIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/AbstractSScanIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/AbstractSUnionIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/AbstractSetsIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/SDiffIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/SInterIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/SIsMemberIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/SMoveIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/SPopIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/SRemIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/SScanIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/SUnionIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/SetsIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/sortedset/AbstractZAddIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/sortedset/AbstractZCardIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/sortedset/AbstractZIncrByIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/sortedset/AbstractZRemIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/sortedset/AbstractZScoreIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/sortedset/ZAddIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/sortedset/ZCardIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/sortedset/ZIncrByIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/sortedset/ZRemIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/sortedset/ZScoreIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractAppendIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractAppendMemoryIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractBitCountIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractBitOpIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractBitPosIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractDecrByIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractDecrIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractGetBitIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractGetIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractGetRangeIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractGetSetIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractIncrByFloatIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractIncrByIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractIncrIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractLettuceAppendIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractMGetIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractMSetIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractMSetNXIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractPSetEXIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractSetBitIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractSetEXIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractSetIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractSetNXIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractSetRangeIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AbstractStringIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AppendIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/AppendMemoryIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/BitCountIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/BitOpIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/BitPosIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/DecrByIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/DecrIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/GetBitIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/GetIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/GetRangeIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/GetSetIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/IncrByFloatIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/IncrByIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/IncrIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/LettuceAppendIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/MGetIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/MSetIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/MSetNXIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/PSetEXIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/SetBitIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/SetEXIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/SetIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/SetNXIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/SetRangeIntegrationTest.java
 delete mode 100755 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/string/StringIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/internal/pubsub/SubscriptionsIntegrationTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/java/org/apache/geode/redis/mocks/DummySubscription.java
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/resources/org/apache/geode/codeAnalysis/openBugs.txt
 delete mode 100644 geode-apis-compatible-with-redis/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
 delete mode 100644 geode-apis-compatible-with-redis/src/jmh/java/org/apache/geode/redis/internal/collections/Object2ObjectOpenCustomHashmapWithCursorBenchmark.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/GeodeRedisServer.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/GeodeRedisService.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/ParameterRequirements/ClusterParameterRequirements.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/ParameterRequirements/EvenParameterRequirements.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/ParameterRequirements/ExactParameterRequirements.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/ParameterRequirements/MaximumParameterRequirements.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/ParameterRequirements/MinimumParameterRequirements.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/ParameterRequirements/MultipleParameterRequirements.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/ParameterRequirements/OddParameterRequirements.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/ParameterRequirements/ParameterRequirements.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/ParameterRequirements/RedisParametersMismatchException.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/ParameterRequirements/SlowlogParameterRequirements.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/ParameterRequirements/SpopParameterRequirements.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/ParameterRequirements/UnspecifiedParameterRequirements.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/PassiveExpirationManager.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/RedisCommandSupportLevel.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/RedisCommandType.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/RedisConstants.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/RedisDistributedSystemService.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/RegionProvider.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/SlotAdvisor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/cluster/RedisMemberInfo.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/cluster/RedisMemberInfoRetrievalFunction.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/collections/Object2ObjectOpenCustomHashMapWithCursor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/AbstractRedisData.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/ByteArrayWrapper.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/CommandHelper.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisData.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisDataStructures.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisHash.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisSet.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisSortedSet.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisString.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisData.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisDataCommandsFunctionExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisDataType.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisDataTypeMismatchException.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisHash.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisHashCommandsFunctionExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisKey.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisKeyCommandsFunctionExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSet.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSetCommandsFunctionExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSortedSet.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSortedSetCommandsFunctionExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisString.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisStringCommandsFunctionExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/delta/AddsDeltaInfo.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/delta/AppendDeltaInfo.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/delta/DeltaInfo.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/delta/DeltaType.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/delta/RemsDeltaInfo.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/delta/TimestampDeltaInfo.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/AbstractExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/BaseSetOptions.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/CommandFunction.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/Executor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/GlobPattern.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/RedisCommandsFunctionInvoker.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/RedisResponse.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/SingleResultCollector.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/SingleResultRedisFunction.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/StripedExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/SynchronizedStripedExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/UnknownExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/cluster/CRC16.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/cluster/ClusterExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/cluster/RedisPartitionResolver.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/connection/AuthExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/connection/EchoExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/connection/PingExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/connection/QuitExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/connection/SelectExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HDelExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HExistsExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HGetAllExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HGetExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HIncrByExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HIncrByFloatExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HKeysExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HLenExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HMGetExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HMSetExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HScanExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HSetExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HSetNXExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HStrLenExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HValsExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/HashExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/RedisHashCommands.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/hash/RedisHashCommandsFunctionInvoker.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/AbstractScanExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/DelExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/ExistsExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/ExpireAtExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/ExpireExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/KeysExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/PExpireAtExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/PExpireExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/PTTLExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/PersistExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/RedisKeyCommands.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/RedisKeyCommandsFunctionInvoker.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/RenameExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/RenameFunction.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/ScanExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/TTLExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/key/TypeExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/pubsub/PsubscribeExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/pubsub/PublishExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/pubsub/PunsubscribeExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/pubsub/SubscribeExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/pubsub/UnsubscribeExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/server/DBSizeExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/server/FlushAllExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/server/InfoExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/server/ShutDownExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/server/SlowlogExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/server/TimeExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/RedisSetCommands.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/RedisSetCommandsFunctionInvoker.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SAddExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SCardExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SDiffExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SDiffStoreExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SInterExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SInterStoreExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SIsMemberExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SMembersExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SMoveExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SPopExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SRandMemberExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SRemExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SScanExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SUnionExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SUnionStoreExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SetExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/set/SetOpExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/sortedset/RedisSortedSetCommands.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/sortedset/RedisSortedSetCommandsFunctionInvoker.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/sortedset/ZAddExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/sortedset/ZAddOptions.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/sortedset/ZCardExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/sortedset/ZIncrByExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/sortedset/ZRemExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/sortedset/ZScoreExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/AppendExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/BitCountExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/BitOpExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/BitPosExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/DecrByExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/DecrExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/GetBitExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/GetExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/GetRangeExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/GetSetExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/IncrByExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/IncrByFloatExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/IncrExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/MGetExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/MSetExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/MSetNXExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/PSetEXExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/RedisStringCommands.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/RedisStringCommandsFunctionInvoker.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/SetBitExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/SetEXExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/SetExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/SetNXExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/SetOptions.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/SetRangeExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/StringExecutor.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/executor/string/StrlenExecutor.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/netty/ByteToCommandDecoder.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/netty/Client.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/netty/Coder.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/netty/Command.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/netty/ExecutionHandlerContext.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/netty/NettyRedisServer.java
 delete mode 100755 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/netty/RedisCommandParserException.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/pubsub/AbstractSubscription.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/pubsub/ChannelSubscription.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/pubsub/PatternSubscription.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/pubsub/PubSub.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/pubsub/PubSubImpl.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/pubsub/PublishResultCollector.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/pubsub/Subscription.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/pubsub/Subscriptions.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/statistics/GeodeRedisStats.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/statistics/RedisStats.java
 delete mode 100644 geode-apis-compatible-with-redis/src/main/resources/META-INF/services/org.apache.geode.distributed.internal.DistributedSystemService
 delete mode 100644 geode-apis-compatible-with-redis/src/main/resources/META-INF/services/org.apache.geode.internal.cache.CacheService
 delete mode 100755 geode-apis-compatible-with-redis/src/main/resources/org/apache/geode/redis/internal/sanctioned-geode-apis-compatible-with-redis-serializables.txt
 delete mode 100755 geode-apis-compatible-with-redis/src/performanceTest/environment-setup.sh
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/RegionProviderJUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/SupportedCommandsJUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/collections/Object2ObjectOpenCustomHashMapWithCursorQuickCheckTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/collections/Object2ObjectOpenCustomHashMapWithCursorTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/data/RedisHashTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/data/RedisKeyJUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/data/RedisSetTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/data/RedisSortedSetTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/data/RedisStringTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/executor/cluster/CRC16JUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/netty/CommandJUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/pubsub/PubSubImplJUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/pubsub/SubscriptionsJUnitTest.java
 delete mode 100644 geode-apis-compatible-with-redis/src/test/resources/expected-pom.xml
 delete mode 100644 geode-assembly/src/acceptanceTest/java/org/apache/geode/management/LocatorManagerConfiguresJmxSerialFilterAcceptanceTest.java
 delete mode 100644 geode-assembly/src/acceptanceTest/java/org/apache/geode/management/ServerManagerConfiguresJmxSerialFilterAcceptanceTest.java
 create mode 100644 geode-assembly/src/acceptanceTest/java/org/apache/geode/serialization/filter/StartLocatorGlobalSerialFilterAcceptanceTest.java
 create mode 100644 geode-assembly/src/acceptanceTest/java/org/apache/geode/serialization/filter/StartLocatorJmxSerialFilterAcceptanceTest.java
 create mode 100644 geode-assembly/src/acceptanceTest/java/org/apache/geode/serialization/filter/StartServerGlobalSerialFilterAcceptanceTest.java
 create mode 100644 geode-assembly/src/acceptanceTest/java/org/apache/geode/serialization/filter/StartServerJmxSerialFilterAcceptanceTest.java
 create mode 100644 geode-assembly/src/integrationTest/java/org/apache/geode/GfshDependencyJarIntegrationTest.java
 delete mode 100644 geode-assembly/src/integrationTest/java/org/apache/geode/rest/internal/web/RestRegionAPIDUnitTest.java
 create mode 100644 geode-assembly/src/integrationTest/java/org/apache/geode/rest/internal/web/RestRegionAPIIntegrationTest.java
 create mode 100644 geode-assembly/src/integrationTest/resources/gfsh_dependency_classpath.txt
 create mode 100644 geode-assembly/src/upgradeTest/java/org/apache/geode/management/RollingUpgradeWithSslDUnitTest.java
 create mode 100644 geode-assembly/src/upgradeTest/resources/org/apache/geode/management/gemfire.properties
 create mode 100644 geode-common/src/main/java/org/apache/geode/internal/lang/SystemProperty.java
 create mode 100644 geode-common/src/main/java/org/apache/geode/internal/lang/utils/ClassUtils.java
 create mode 100644 geode-common/src/main/java/org/apache/geode/internal/lang/utils/function/Checked.java
 create mode 100644 geode-common/src/main/java/org/apache/geode/internal/version/ComponentVersion.java
 create mode 100644 geode-common/src/main/java/org/apache/geode/internal/version/DistributionVersion.java
 create mode 100644 geode-common/src/test/java/org/apache/geode/internal/lang/SystemPropertyTest.java
 create mode 100644 geode-common/src/test/java/org/apache/geode/internal/lang/utils/ClassUtilsTest.java
 create mode 100644 geode-common/src/test/java/org/apache/geode/internal/lang/utils/function/CheckedTest.java
 create mode 100644 geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/CacheXmlJdbcMappingIntegrationTest.java
 create mode 100644 geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/NonSerializedEmployee.java
 create mode 100644 geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/CacheXmlJdbcMappingIntegrationTest.FieldMappings.cache.xml
 create mode 100644 geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/CacheXmlJdbcMappingIntegrationTest.FieldMappingsColumnNamesWithUnderscores.cache.xml
 create mode 100644 geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/CacheXmlJdbcMappingIntegrationTest.NoFieldMappings.cache.xml
 create mode 100644 geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/CacheXmlJdbcMappingIntegrationTest.NoFieldMappingsWithNonSerializedClass.cache.xml
 create mode 100644 geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/CacheXmlJdbcMappingIntegrationTest.WrongPdxName.cache.xml
 create mode 100644 geode-connectors/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeConnectorsSerializablesIntegrationTest.java
 delete mode 100644 geode-connectors/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeConnectorsSerializablesJUnitTest.java
 create mode 100644 geode-connectors/src/integrationTest/java/org/apache/geode/connectors/jdbc/internal/ConnectorsSanctionedSerializablesServiceIntegrationTest.java
 delete mode 100644 geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/ConnectorsDistributedSystemService.java
 create mode 100644 geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/ConnectorsSanctionedSerializablesService.java
 delete mode 100644 geode-connectors/src/main/resources/META-INF/services/org.apache.geode.distributed.internal.DistributedSystemService
 create mode 100644 geode-connectors/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 create mode 100644 geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/xml/RegionMappingConfigurationTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/cache/ValidateSerializableObjectsDistributedTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/cache/query/dunit/PdxMultiThreadQueryDUnitTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/distributed/FailDeserializationFunction.java
 delete mode 100644 geode-core/src/distributedTest/java/org/apache/geode/distributed/LocatorLauncherTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/distributed/internal/BadCacheLoaderDUnitTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/distributed/internal/P2PMessagingConcurrencyDUnitTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/internal/cache/LatestLastAccessTimeMessageDistributedTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/internal/cache/TestDeltaSerializableSizeableObject.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/internal/cache/control/RebalanceOperationComplexDistributedTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/internal/cache/control/RebalanceOperationComplexPart2DistributedTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/SlowDispatcherDUnitTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/security/AuthExpirationDUnitTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/security/AuthExpirationFunctionDUnitTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/security/AuthExpirationMultiServerDUnitTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/security/AuthExpirationTransactionDUnitTest.java
 create mode 100644 geode-core/src/distributedTest/java/org/apache/geode/security/DurableClientFailoverDUnitTest.java
 create mode 100755 geode-core/src/distributedTest/resources/org/apache/geode/internal/cache/RebalanceOperationComplex-client.xml
 create mode 100755 geode-core/src/distributedTest/resources/org/apache/geode/internal/cache/RebalanceOperationComplex-server.xml
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplIntegrationTest.java
 delete mode 100644 geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
 delete mode 100644 geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexMaintainceJUnitTest.java
 create mode 100755 geode-core/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeCoreSerializablesIntegrationTest.java
 delete mode 100644 geode-core/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeCoreSerializablesJUnitTest.java
 delete mode 100644 geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/InternalDistributedSystemJUnitTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/tcpserver/TCPServerSSLInegrationTest.java
 delete mode 100644 geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/tcpserver/TCPServerSSLJUnitTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/CoreSanctionedSerializablesServiceIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionCompactorClearOplogAfterRecoveryIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PoolManagerIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/net/SSLConfigurationFactoryIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/net/SocketCreatorIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/LocatorLauncherGlobalSerialFilterBlankIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/LocatorLauncherGlobalSerialFilterExistsIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/LocatorLauncherGlobalSerialFilterIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/LocatorLauncherGlobalSerialFilterPropertyBlankIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/LocatorLauncherGlobalSerialFilterPropertyEmptyIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/LocatorLauncherJmxSerialFilterIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/LocatorLauncherJmxSerialFilterPropertyBlankIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/LocatorLauncherJmxSerialFilterPropertyEmptyIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/LocatorLauncherJmxSerialFilterPropertyExistsIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/LocatorLauncherWithJmxManager.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/SerialFilterAssertions.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ServerLauncherGlobalSerialFilterBlankIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ServerLauncherGlobalSerialFilterExistsIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ServerLauncherGlobalSerialFilterIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ServerLauncherGlobalSerialFilterPropertyBlankIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ServerLauncherGlobalSerialFilterPropertyEmptyIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ServerLauncherJmxSerialFilterIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ServerLauncherJmxSerialFilterPropertyBlankIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ServerLauncherJmxSerialFilterPropertyEmptyIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ServerLauncherJmxSerialFilterPropertyExistsIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ServerLauncherWithJmxManager.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/util/ProductVersionUtilTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/internal/util/redaction/ArgumentRedactorIntegrationTest.java
 delete mode 100644 geode-core/src/integrationTest/java/org/apache/geode/management/internal/LocatorManagerConfiguresJmxSerialFilterIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/management/internal/ManagementAgentIntegrationTest.java
 delete mode 100644 geode-core/src/integrationTest/java/org/apache/geode/management/internal/ServerManagerConfiguresJmxSerialFilterIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/java/org/apache/geode/management/internal/security/SecurityWithExpirationIntegrationTest.java
 create mode 100644 geode-core/src/integrationTest/resources/META-INF/services/org.apache.geode.internal.version.ComponentVersion
 create mode 100644 geode-core/src/integrationTest/resources/META-INF/services/org.apache.geode.internal.version.DistributionVersion
 copy geode-core/src/{test => integrationTest}/resources/shiro.ini (100%)
 create mode 100644 geode-core/src/jmh/java/org/apache/geode/internal/util/concurrent/ConcurrentHashMapObjectBenchmark.java
 create mode 100644 geode-core/src/jmh/java/org/apache/geode/internal/util/concurrent/MpmcFifoQueueBenchmark.java
 create mode 100644 geode-core/src/jmh/java/org/apache/geode/internal/util/concurrent/MpmcLifoQueueBenchmark.java
 create mode 100644 geode-core/src/jmh/java/org/apache/geode/internal/util/concurrent/MpmcMapBenchmark.java
 create mode 100644 geode-core/src/jmh/java/org/apache/geode/internal/util/concurrent/MpmcMapLongBenchmark.java
 create mode 100644 geode-core/src/jmh/java/org/apache/geode/internal/util/concurrent/SpmcFifoQueueBenchmark.java
 delete mode 100644 geode-core/src/main/java/org/apache/geode/distributed/internal/DistributedSystemService.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/CoreSanctionedSerializablesService.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/DistributedSerializableObjectConfig.java
 delete mode 100644 geode-core/src/main/java/org/apache/geode/internal/EmptyInputStreamFilter.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/GeodeVersion.java
 delete mode 100644 geode-core/src/main/java/org/apache/geode/internal/InputStreamFilter.java
 delete mode 100644 geode-core/src/main/java/org/apache/geode/internal/ObjectInputStreamFilterWrapper.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/SystemDescription.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientReAuthenticateMessage.java
 delete mode 100644 geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ObjectPartList651.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/RandomSubjectIdGenerator.java
 delete mode 100644 geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/SerializedObjectPartList.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/SubjectIdGenerator.java
 delete mode 100644 geode-core/src/main/java/org/apache/geode/internal/cache/wan/InternalGatewayQueueEvent.java
 delete mode 100644 geode-core/src/main/java/org/apache/geode/internal/lang/ClassUtils.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/util/ProductVersionUtil.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/util/redaction/CombinedSensitiveDictionary.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/util/redaction/ParserRegex.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/util/redaction/RedactionDefaults.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/util/redaction/RedactionStrategy.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/util/redaction/RegexRedactionStrategy.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/util/redaction/SensitiveDataDictionary.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/util/redaction/SensitivePrefixDictionary.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/util/redaction/SensitiveSubstringDictionary.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/util/redaction/StringRedaction.java
 delete mode 100644 geode-core/src/main/java/org/apache/geode/management/internal/JmxRmiOpenTypesSerialFilter.java
 delete mode 100644 geode-core/src/main/java/org/apache/geode/management/internal/JmxRmiSerialFilter.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/security/AuthenticationExpiredException.java
 create mode 100644 geode-core/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 create mode 100644 geode-core/src/main/resources/META-INF/services/org.apache.geode.internal.version.ComponentVersion
 create mode 100644 geode-core/src/test/java/org/apache/geode/cache/client/internal/AuthenticateUserOpTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/cache/client/internal/ClientSideHandshakeImplTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/cache/client/internal/ConnectionFactoryImplTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/cache/client/internal/OpExecutorImplTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/cache/client/internal/OpExecutorImplUnitTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/cache/client/internal/QueueManagerImplTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionConfigImplTest.java
 delete mode 100644 geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionConfigJUnitTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/distributed/internal/ReplyMessageTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/DistributedSerializableObjectConfigTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/InternalDataSerializerShiroAcceptListTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/AbstractCacheServerTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/OverflowOplogTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/control/SerializableRegionRedundancyStatusImplTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/execute/PartitionedRegionFunctionExecutorTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/rebalance/MemberTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxyTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientProxyMembershipIDTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientUserAuthsTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/MessageDispatcherTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/RandomSubjectIdGeneratorTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/GatewayReceiverCommandTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutUserCredentialsTest.java
 delete mode 100644 geode-core/src/test/java/org/apache/geode/internal/lang/ClassUtilsJUnitTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/net/SCClusterSocketCreatorTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/net/SSLConfigTest.java
 delete mode 100644 geode-core/src/test/java/org/apache/geode/internal/net/SSLConfigurationFactoryJUnitTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/net/SSLConfigurationFactoryTest.java
 delete mode 100644 geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorJUnitTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/tcp/DirectReplySenderTest.java
 delete mode 100644 geode-core/src/test/java/org/apache/geode/internal/util/ArgumentRedactorJUnitTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/util/ArgumentRedactorTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/util/ProductVersionUtilTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/util/redaction/CombinedSensitiveDictionaryTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/util/redaction/ParserRegexTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/util/redaction/RedactionDefaultsTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/util/redaction/RegexRedactionStrategyTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/util/redaction/SensitivePrefixDictionaryTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/util/redaction/SensitiveSubstringDictionaryTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/util/redaction/StringRedactionTest.java
 delete mode 100644 geode-core/src/test/java/org/apache/geode/management/internal/JmxRmiOpenTypesSerialFilterTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/management/internal/ManagementAgentTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/pdx/internal/json/PdxToJSONTest.java
 mode change 100755 => 100644 geode-core/src/test/resources/expected-pom.xml
 create mode 100644 geode-core/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
 create mode 100644 geode-core/src/upgradeTest/java/org/apache/geode/internal/net/SocketCreatorUpgradeTest.java
 create mode 100644 geode-core/src/upgradeTest/java/org/apache/geode/security/AuthExpirationBackwardCompatibleDUnitTest.java
 create mode 100644 geode-core/src/upgradeTest/java/org/apache/geode/security/AuthExpirationTransactionUpgradeTest.java
 create mode 100644 geode-cq/src/distributedTest/java/org/apache/geode/cache/query/cq/dunit/CqDUnitTest.java
 create mode 100644 geode-cq/src/distributedTest/java/org/apache/geode/cache/query/dunit/QueryWithRangeIndexDUnitTest.java
 create mode 100644 geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/DurableClientCQClusterRestartDUnitTest.java
 create mode 100644 geode-cq/src/integrationTest/java/org/apache/geode/cache/query/cq/internal/CQSanctionedSerializablesServiceIntegrationTest.java
 create mode 100755 geode-cq/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeCQSerializablesIntegrationTest.java
 delete mode 100755 geode-cq/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeCQSerializablesJUnitTest.java
 delete mode 100644 geode-cq/src/integrationTest/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
 delete mode 100644 geode-cq/src/integrationTest/resources/org/apache/geode/codeAnalysis/openBugs.txt
 delete mode 100644 geode-cq/src/main/java/org/apache/geode/cache/query/cq/internal/CQDistributedSystemService.java
 create mode 100644 geode-cq/src/main/java/org/apache/geode/cache/query/cq/internal/CQSanctionedSerializablesService.java
 delete mode 100644 geode-cq/src/main/resources/META-INF/services/org.apache.geode.distributed.internal.DistributedSystemService
 create mode 100644 geode-cq/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 delete mode 100644 geode-docs/developing/geode_apis_compatible_with_redis.html.md.erb
 create mode 100644 geode-docs/getting_started/intro_to_clients.html.md.erb
 create mode 100644 geode-docs/images/Apache_Tomcat_Homepage.png
 delete mode 100644 geode-docs/images_svg/geode_apis_compatible_with_redis.svg
 create mode 100644 geode-docs/managing/security/implementing_authentication_expiry.html.md.erb
 create mode 100644 geode-docs/managing/troubleshooting/log_messages_and_solutions.html.md.erb
 create mode 100644 geode-docs/tools_modules/geode_for_redis.html.md.erb
 create mode 100644 geode-docs/tools_modules/gfsh/command-pages/wan_copy_region.html.md.erb
 create mode 100644 geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/rules/tests/ClusterStartupRuleDistributedTest.java
 create mode 100644 geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/rules/tests/ClusterStartupRuleLimitedVmCountTest.java
 create mode 100644 geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/rules/tests/DistributedExecutorServiceRuleLimitedThreadCountTest.java
 create mode 100644 geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/rules/tests/DistributedExecutorServiceRuleLimitedVmCountTest.java
 create mode 100644 geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/rules/tests/DistributedExecutorServiceRuleUnlimitedThreadCountTest.java
 create mode 100644 geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/rules/tests/DistributedRuleLimitedVmCountTest.java
 create mode 100644 geode-dunit/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeDUnitSerializablesIntegrationTest.java
 create mode 100644 geode-dunit/src/integrationTest/java/org/apache/geode/test/dunit/internal/DUnitSanctionedSerializablesServiceIntegrationTest.java
 create mode 100644 geode-dunit/src/integrationTest/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
 create mode 100644 geode-dunit/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
 create mode 100644 geode-dunit/src/main/java/org/apache/geode/cache/query/dunit/SecurityTestUtils.java
 delete mode 100644 geode-dunit/src/main/java/org/apache/geode/internal/cache/execute/PRColocationDUnitTestHelper.java
 create mode 100644 geode-dunit/src/main/java/org/apache/geode/internal/cache/execute/PRColocationDistributedTestHelper.java
 delete mode 100644 geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsDUnitTestBase.java
 create mode 100644 geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsDistributedTestBase.java
 delete mode 100644 geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/GcCommandDUnitTestBase.java
 create mode 100644 geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/GcCommandDistributedTestBase.java
 delete mode 100644 geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/GemfireDataCommandsDUnitTestBase.java
 create mode 100644 geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/GeodeDataCommandsDistributedTestBase.java
 delete mode 100644 geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandDUnitTestBase.java
 create mode 100644 geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandDistributedTestBase.java
 delete mode 100644 geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/QueryCommandDUnitTestBase.java
 create mode 100644 geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/QueryCommandDistributedTestBase.java
 delete mode 100644 geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/RegionMembershipMBeanDUnitTestBase.java
 create mode 100644 geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/RegionMembershipMBeanDistributedTestBase.java
 create mode 100644 geode-dunit/src/main/java/org/apache/geode/test/dunit/internal/DUnitSanctionedSerializablesService.java
 create mode 100644 geode-dunit/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 create mode 100644 geode-dunit/src/main/resources/org/apache/geode/test/dunit/internal/sanctioned-geode-dunit-serializables.txt
 create mode 100644 geode-for-redis/README.md
 create mode 100644 geode-for-redis/build.gradle
 rename {geode-apis-compatible-with-redis => geode-for-redis}/gfsh.png (100%)
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/acceptanceTest/java/org/apache/geode/redis/CommandPipeliningNativeRedisAcceptanceTest.java (100%)
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/GeodeRedisServerStartupAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/NativeRedisClusterTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GeodeRedisServerStartupUsingGfshAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/GlobPatternNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/UnknownNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/cluster/ClusterNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/connection/AuthNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/connection/ClientNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/connection/EchoNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/connection/PingNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/connection/SelectNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/hash/HScanNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/hash/HashesNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/hash/HincrByFloatNativeRedisAccetanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/DelNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/DumpRestoreNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/ExistsNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/ExpireAtNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/ExpireNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/KeysNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/PExpireAtNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/PTTLNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/PersistNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/PexpireNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/RenameNXNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/RenameNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/ScanNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/TTLNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/TypeNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/key/UnlinkNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/LIndexNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/LLenNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/LPopNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/LPushNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/LPushxNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/list/LRangeNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/LettucePubSubNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/NativeRedisSubCommandsIntegrationTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/PubSubNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/SubscriptionsNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/server/DBSizeNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/server/FlushAllNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/server/FlushDBNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/server/HitsMissesNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/server/InfoNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/server/InfoStatsNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/server/MemoryStatsNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/server/SlowlogNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/server/TimeNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SCardNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SDiffNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SDiffStoreNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SInterNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SInterStoreNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SIsMemberNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SMoveNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SPopNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SRandMemberNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SRemNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SScanNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SUnionNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SUnionStoreNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/set/SetsNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZAddNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZCardNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZCountNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZIncrByNativeRedisIntegrationTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZInterStoreNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZLexCountNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZPopMaxNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZPopMinNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRangeByLexNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRangeByScoreNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRangeNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRankNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemRangeByLexNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemRangeByRankNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemRangeByScoreNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRevRangeByLexNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRevRangeByScoreNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRevRangeNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRevRankNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZScanNativeRedisIntegrationTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZScoreNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZUnionStoreNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/AppendNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/BitCountNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/BitOpNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/BitPosNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/DecrByNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/DecrNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/GetBitNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/GetNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/GetRangeNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/GetSetNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/IncrByFloatNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/IncrByNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/IncrNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/MGetNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/MSetNXNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/MSetNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/PSetEXNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/SetBitNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/SetExNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/SetNXNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/SetNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/SetRangeNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/commands/executor/string/StringNativeRedisAcceptanceTest.java
 create mode 100755 geode-for-redis/src/acceptanceTest/java/org/apache/geode/redis/internal/data/MemoryOverheadNativeRedisAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/session/NativeRedisSessionAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/java/session/NativeRedisSessionExpirationAcceptanceTest.java
 create mode 100644 geode-for-redis/src/acceptanceTest/resources/0001-configure-redis-tests.patch
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/acceptanceTest/resources/testcontainers.properties (100%)
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/NativeRedisTestRule.java
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/ClusterNode.java
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/ClusterNodes.java
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/ConcurrentLoopingThreads.java
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/GeodeRedisServerRule.java
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/NativeRedisClusterTestRule.java
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/RedisIntegrationTest.java
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/internal/proxy/ClusterNodesResponseProcessor.java
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/commonTest/java/org/apache/geode/redis/internal/proxy/ClusterSlotsResponseProcessor.java (100%)
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/commonTest/java/org/apache/geode/redis/internal/proxy/HostPort.java (100%)
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/internal/proxy/MovedResponseHandler.java
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/commonTest/java/org/apache/geode/redis/internal/proxy/NoopRedisResponseProcessor.java (100%)
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/internal/proxy/RedisProxy.java
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/internal/proxy/RedisProxyInboundHandler.java
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/internal/proxy/RedisProxyOutboundHandler.java
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/commonTest/java/org/apache/geode/redis/internal/proxy/RedisResponseProcessor.java (100%)
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/internal/ssl/TestSSLServer.java
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/mocks/MockBinarySubscriber.java
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/redis/mocks/MockSubscriber.java
 create mode 100644 geode-for-redis/src/commonTest/java/org/apache/geode/test/dunit/rules/RedisClusterStartupRule.java
 create mode 100644 geode-for-redis/src/commonTest/resources/redis-cluster-compose.yml
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/CheckPrimaryBucketFunction.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/ExpiringSecurityManager.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/OutOfMemoryDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/RedisDistDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/SSLDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/UserExpirationDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/FlushAllDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/MovedDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/cluster/ClusterSlotsAndNodesDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/cluster/JedisAndLettuceClusterDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HExistsDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HGetDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HKeysDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HMgetDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HMsetDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HScanDunitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HSetNXDunitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HashesAndCrashesDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HdelDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HlenDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HsetDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HstrlenDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/hash/HvalsDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractRenameRedirectionsDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/key/ExpireDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/key/NativeRedisRenameRedirectionsDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/key/PersistDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/key/RadishRenameRedirectionsDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/key/RenameDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/list/LPopDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/list/LPushDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/PubSubConcurrentDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/PubSubDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/set/SaddDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/set/SremDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZAddDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZAddIncrOptionDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemRangeByLexDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemRangeByRankDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemRangeByScoreDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/string/MSetDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/string/MSetNXDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/string/StringsDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/data/DeltaDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/data/PartitionedRegionStatsUpdateTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/auth/AuthWhileServersRestartDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/executor/string/StringsKillMultipleServersDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/services/cluster/RedisPartitionResolverDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/session/RedisSessionDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/session/SessionDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/session/SessionExpirationDUnitTest.java
 create mode 100644 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/session/SessionsAndCrashesDUnitTest.java
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/distributedTest/java/org/apache/geode/redis/session/springRedisTestApplication/RedisSpringTestApplication.java (100%)
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/distributedTest/java/org/apache/geode/redis/session/springRedisTestApplication/SessionController.java (100%)
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/distributedTest/java/org/apache/geode/redis/session/springRedisTestApplication/config/SessionListener.java (100%)
 create mode 100755 geode-for-redis/src/distributedTest/java/org/apache/geode/redis/session/springRedisTestApplication/config/WebMvcConfig.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeRedisSerializablesIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/AbstractCommandPipeliningIntegrationTest.java
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/integrationTest/java/org/apache/geode/redis/CommandPipeliningIntegrationTest.java (100%)
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/ConcurrentLoopingThreadsTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/RedisCommandArgumentsTestHelper.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/RedisTestHelper.java
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/integrationTest/java/org/apache/geode/redis/internal/GeodeServerRunTest.java (100%)
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/RedisSanctionedSerializablesServiceIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/AbstractGlobPatternIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/AbstractUnknownIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/GlobPatternIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/UnknownIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/cluster/AbstractClusterIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/cluster/ClusterIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/common/UnsupportedCommandsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/connection/AbstractAuthIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/connection/AbstractClientIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/connection/AbstractEchoIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/connection/AbstractPingIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/connection/AbstractSelectIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/connection/AuthIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/connection/ClientIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/connection/EchoIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/connection/PingIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/connection/QuitIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/connection/SelectIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/hash/AbstractHScanIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/hash/AbstractHashesIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/hash/AbstractHincrByFloatIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/hash/HScanIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/hash/HashesIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/hash/HincrByFloatIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractDelIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractDumpRestoreIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractExistsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractExpireAtIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractExpireIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractKeysIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractPExpireAtIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractPTTLIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractPersistIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractPexpireIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractRenameIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractRenameNXIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractScanIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractTTLIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractTypeIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/AbstractUnlinkIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/DelIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/DumpRestoreIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/ExistsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/ExpireAtIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/ExpireIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/KeysIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/PExpireAtIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/PTTLIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/PersistIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/PexpireIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/RenameIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/RenameNXIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/ScanIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/TTLIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/TypeIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/key/UnlinkIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/AbstractLIndexIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/AbstractLLenIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/AbstractLPopIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/AbstractLPushIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/AbstractLPushxIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/AbstractLRangeIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/LIndexIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/LLenIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/LPopIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/LPushIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/LPushxIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/list/LRangeIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/AbstractLettucePubSubIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/AbstractPubSubIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/AbstractSubCommandsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/AbstractSubscriptionsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/LettucePubSubIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/PubSubIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/SubCommandsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/pubsub/SubscriptionsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractDBSizeIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractFlushAllIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractFlushDBIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractHitsMissesIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractInfoIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractRedisInfoStatsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractRedisMemoryStatsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractSlowlogIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractTimeIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/CommandIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/DBSizeIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/FlushAllIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/FlushDBIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/HitsMissesIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/InfoIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/InfoStatsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/LolWutIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/MemoryStatsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/ShutdownIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/SlowlogIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/TimeIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSCardIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSDiffIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSDiffStoreIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSInterIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSInterStoreIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSIsMemberIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSMoveIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSPopIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSRandMemberIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSRemIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSScanIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSUnionIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSUnionStoreIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSetsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SCardIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SDiffIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SDiffStoreIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SInterIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SInterStoreIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SIsMemberIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SMoveIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SPopIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SRandMemberIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SRemIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SScanIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SUnionIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SUnionStoreIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/SetsIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZAddIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZCardIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZCountIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZIncrByIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZInterStoreIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZLexCountIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZPopMaxIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZPopMinIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRangeByLexIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRangeByScoreIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRangeIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRankIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRemIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRemRangeByLexIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRemRangeByRankIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRemRangeByScoreIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRevRangeByLexIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRevRangeByScoreIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRevRangeIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRevRankIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZScanIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZScoreIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZUnionStoreIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZAddIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZCardIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZCountIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZIncrByIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZInterStoreIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZLexCountIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZPopMaxIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZPopMinIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRangeByLexIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRangeByScoreIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRangeIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRankIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemRangeByLexIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemRangeByRankIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemRangeByScoreIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRevRangeByLexIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRevRangeByScoreIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRevRangeIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRevRankIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZScanIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZScoreIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZUnionStoreIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractAppendIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractBitCountIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractBitOpIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractBitPosIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractDecrByIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractDecrIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractGetBitIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractGetIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractGetRangeIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractGetSetIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractIncrByFloatIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractIncrByIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractIncrIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractLettuceAppendIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractMGetIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractMSetIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractMSetNXIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractPSetEXIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractSetBitIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractSetEXIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractSetIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractSetNXIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractSetRangeIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AbstractStringIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/AppendIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/BitCountIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/BitOpIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/BitPosIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/DecrByIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/DecrIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/GetBitIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/GetIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/GetRangeIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/GetSetIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/IncrByFloatIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/IncrByIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/IncrIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/LettuceAppendIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/MGetIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/MSetIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/MSetNXIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/PSetEXIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/SetBitIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/SetEXIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/SetIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/SetNXIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/SetRangeIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/string/StringIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/data/AbstractMemoryOverheadIntegrationTest.java
 create mode 100755 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/data/MemoryOverheadIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/pubsub/SubscriptionsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/services/LockingStripedCoordinatorIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/statistics/GeodeRedisStatsIntegrationTest.java
 create mode 100644 geode-for-redis/src/integrationTest/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
 create mode 100644 geode-for-redis/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
 create mode 100644 geode-for-redis/src/jmh/java/org/apache/geode/redis/internal/data/collections/OrderedStatisticTreeBenchmark.java
 create mode 100644 geode-for-redis/src/jmh/java/org/apache/geode/redis/internal/data/collections/RedisHashMapBenchmark.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/GeodeRedisServer.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/GeodeRedisService.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/RedisConstants.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/RedisException.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/RedisProperties.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/Command.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/RedisCommandSupportLevel.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/RedisCommandType.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/BaseSetOptions.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/CommandExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/GlobPattern.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/RedisResponse.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/UnknownExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/cluster/CRC16.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/cluster/ClusterExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/cluster/RedisPartitionResolver.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/connection/AuthExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/connection/ClientExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/connection/EchoExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/connection/PingExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/connection/QuitExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/connection/SelectExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HDelExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HExistsExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HGetAllExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HGetExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HIncrByExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HIncrByFloatExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HKeysExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HLenExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HMGetExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HMSetExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HScanExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HSetExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HSetNXExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HStrLenExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/hash/HValsExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/AbstractRenameExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/AbstractScanExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/DelExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/DumpExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/ExistsExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/ExpireAtExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/ExpireExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/KeysExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/PExpireAtExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/PExpireExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/PTTLExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/PersistExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/RenameExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/RenameNXExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/RestoreExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/RestoreOptions.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/ScanExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/TTLExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/key/TypeExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/list/LIndexExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/list/LLenExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/list/LPopExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/list/LPushExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/list/LPushXExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/list/LRangeExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/pubsub/PsubscribeExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/pubsub/PubSubExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/pubsub/PublishExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/pubsub/PunsubscribeExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/pubsub/SubscribeExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/pubsub/UnsubscribeExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/server/CommandCommandExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/server/DBSizeExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/server/FlushAllExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/server/InfoExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/server/LolWutExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/server/SlowlogExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/server/TimeExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SAddExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SCardExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SDiffExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SDiffStoreExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SInterExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SInterStoreExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SIsMemberExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SMembersExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SMoveExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SPopExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SRandMemberExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SRemExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SScanExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SUnionExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SUnionStoreExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SetOpExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/set/SetRandomExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractSortedSetRangeExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractSortedSetRangeOptions.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZPopExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/AbstractZRankExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/SortedSetLexRangeOptions.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/SortedSetRankRangeOptions.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/SortedSetScoreRangeOptions.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZAddExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZAddOptions.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZAggregator.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZCardExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZCountExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZIncrByExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZInterStoreExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZKeyWeight.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZLexCountExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZPopMaxExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZPopMinExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRangeByLexExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRangeByScoreExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRangeExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRankExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemRangeByLexExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemRangeByRankExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRemRangeByScoreExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRevRangeByLexExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRevRangeByScoreExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRevRangeExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZRevRankExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZScanExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZScoreExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZStoreExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZUnionStoreExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/AbstractMSetExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/AppendExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/BitCountExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/BitOpExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/BitPosExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/DecrByExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/DecrExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/GetBitExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/GetExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/GetRangeExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/GetSetExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/IncrByExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/IncrByFloatExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/IncrExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/MGetExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/MSetExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/MSetNXExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/PSetEXExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/SetBitExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/SetEXExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/SetExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/SetNXExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/SetOptions.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/SetRangeExecutor.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/string/StrlenExecutor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/parameters/ClusterParameterRequirements.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/parameters/Parameter.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/parameters/RedisParametersMismatchException.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/parameters/SlowlogParameterRequirements.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/AbstractRedisData.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/KeyHashUtil.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisData.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisDataStructures.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisHash.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisList.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisSet.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisSortedSet.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/NullRedisString.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisCrossSlotException.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisData.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisDataMovedException.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisDataType.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisDataTypeMismatchException.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisHash.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisKey.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisKeyExistsException.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisList.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSet.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSortedSet.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisString.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/collections/Bytes2ObjectOpenHashMap.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/collections/OrderStatisticsSet.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/collections/OrderStatisticsTree.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/collections/SizeableByteArrayList.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/collections/SizeableBytes2ObjectOpenCustomHashMapWithCursor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/collections/SizeableObjectOpenCustomHashSetWithCursor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/collections/package-info.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/AddByteArrayDoublePairs.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/AddByteArrayPairs.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/AddByteArrays.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/AppendByteArray.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/DeltaInfo.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/DeltaType.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/RemoveByteArrays.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/RemoveElementsByIndex.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/ReplaceByteArrayAtOffset.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/ReplaceByteArrayDoublePairs.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/ReplaceByteArrays.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/ReplaceByteAtOffset.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/SetByteArray.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/SetByteArrayAndTimestamp.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/delta/SetTimestamp.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/netty/ByteToCommandDecoder.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/netty/Client.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/netty/Coder.java
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/main/java/org/apache/geode/redis/internal/netty/CoderException.java (100%)
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/netty/ExecutionHandlerContext.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/netty/NettyRedisServer.java
 create mode 100755 geode-for-redis/src/main/java/org/apache/geode/redis/internal/netty/RedisCommandParserException.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/netty/StringBytesGlossary.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/AbstractSubscriptionManager.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/ChannelSubscriptionManager.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/ClientSubscriptionManager.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/ClientSubscriptionManagerImpl.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/PatternSubscriptionManager.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/PubSub.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/PubSubImpl.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/Publisher.java
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/main/java/org/apache/geode/redis/internal/pubsub/SubscribeResult.java (100%)
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/Subscription.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/SubscriptionImpl.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/SubscriptionManager.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/pubsub/Subscriptions.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/ActiveExpirationManager.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/RedisSanctionedSerializablesService.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/RegionProvider.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/cluster/RedisMemberInfo.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/cluster/RedisMemberInfoRetrievalFunction.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/cluster/SlotAdvisor.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/locking/LockingStripedCoordinator.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/locking/RedisSecurityService.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/locking/StripedCallable.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/locking/StripedCoordinator.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/locking/StripedExecutorService.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/locking/StripedObject.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/services/locking/StripedRunnable.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/statistics/GeodeRedisStats.java
 create mode 100644 geode-for-redis/src/main/java/org/apache/geode/redis/internal/statistics/RedisStats.java
 create mode 100644 geode-for-redis/src/main/resources/META-INF/services/org.apache.geode.internal.cache.CacheService
 create mode 100644 geode-for-redis/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.DataSerializableFixedIdRegistrant
 create mode 100644 geode-for-redis/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 create mode 100755 geode-for-redis/src/main/resources/org/apache/geode/redis/internal/services/sanctioned-geode-for-redis-serializables.txt
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/performanceTest/benchmark.sh (100%)
 create mode 100755 geode-for-redis/src/performanceTest/environment-setup.sh
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/performanceTest/execute-operation.sh (100%)
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/performanceTest/shacompare.sh (100%)
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/performanceTest/summarize-batch-results.sh (100%)
 rename {geode-apis-compatible-with-redis => geode-for-redis}/src/performanceTest/summarize-operation-results.sh (100%)
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/RedisCommandTypeTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/RedisPropertiesTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/commands/executor/GlobPatternTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/commands/executor/cluster/CRC16JUnitTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/commands/executor/connection/AuthExecutorTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/commands/executor/sortedset/ZScanExecutorTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/KeyHashUtilTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/RedisHashTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/RedisKeyJUnitTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/RedisListTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/RedisSetTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/RedisSortedSetTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/RedisStringQuickCheckTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/RedisStringTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/collections/OrderStatisticsTreeTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/collections/OrderedStatisticTreeQuickCheckTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/collections/SizeableByteArrayListTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/collections/SizeableBytes2ObjectOpenCustomHashMapWithCursorQuickCheckTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/collections/SizeableBytes2ObjectOpenCustomHashMapWithCursorTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/data/collections/SizeableObjectOpenCustomHashSetWithCursorTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/netty/ClientTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/netty/CoderTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/netty/CommandJUnitTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/netty/ExecutionHandlerContextTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/pubsub/ChannelSubscriptionManagerTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/pubsub/ClientSubscriptionManagerImplTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/pubsub/PatternSubscriptionManagerTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/pubsub/PubSubImplTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/pubsub/PublisherTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/pubsub/SubscriptionImplTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/pubsub/SubscriptionManagerTestBase.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/pubsub/SubscriptionsJUnitTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/services/LockingStripedCoordinatorTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/services/RedisSecurityServiceTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/services/RegionProviderTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/services/StripedExecutorServiceJUnitTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/services/cluster/RedisMemberInfoRetrievalFunctionTest.java
 create mode 100644 geode-for-redis/src/test/java/org/apache/geode/redis/internal/services/cluster/RedisMemberInfoTest.java
 create mode 100644 geode-for-redis/src/test/resources/expected-pom.xml
 create mode 100644 geode-gfsh/src/acceptanceTest/java/org/apache/geode/gfsh/GfshWithSslAcceptanceTest.java
 delete mode 100644 geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsDUnitTest.java
 create mode 100644 geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsDistributedTest.java
 delete mode 100644 geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/GcCommandDUnitTest.java
 create mode 100644 geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/GcCommandDistributedTest.java
 delete mode 100644 geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
 create mode 100644 geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/GeodeDataCommandsDistributedTest.java
 delete mode 100644 geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandDUnitTest.java
 create mode 100644 geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandDistributedTest.java
 delete mode 100644 geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/QueryCommandDUnitTest.java
 create mode 100644 geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/QueryCommandDistributedTest.java
 delete mode 100644 geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/RegionMembershipMBeanDUnitTest.java
 create mode 100644 geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/RegionMembershipMBeanDistributedTest.java
 create mode 100755 geode-gfsh/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeGfshSerializablesIntegrationTest.java
 delete mode 100755 geode-gfsh/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeGfshSerializablesJUnitTest.java
 create mode 100644 geode-gfsh/src/integrationTest/java/org/apache/geode/gfsh/internal/management/GfshSanctionedSerializablesServiceIntegrationTest.java
 create mode 100644 geode-gfsh/src/integrationTest/java/org/apache/geode/management/internal/cli/shell/JmxOperationInvokerIntegrationTest.java
 delete mode 100644 geode-gfsh/src/integrationTest/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
 delete mode 100644 geode-gfsh/src/integrationTest/resources/org/apache/geode/codeAnalysis/openBugs.txt
 delete mode 100644 geode-gfsh/src/main/java/org/apache/geode/gfsh/internal/management/GfshDistributedSystemService.java
 create mode 100644 geode-gfsh/src/main/java/org/apache/geode/gfsh/internal/management/GfshSanctionedSerializablesService.java
 create mode 100644 geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/StopGatewaySenderOnMemberWithBeanImpl.java
 delete mode 100644 geode-gfsh/src/main/resources/META-INF/services/org.apache.geode.distributed.internal.DistributedSystemService
 create mode 100644 geode-gfsh/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 create mode 100644 geode-gfsh/src/test/java/org/apache/geode/management/internal/cli/commands/StopGatewaySenderCommandTest.java
 create mode 100644 geode-gfsh/src/test/java/org/apache/geode/management/internal/cli/commands/StopGatewaySenderOnMemberWithBeanImplTest.java
 create mode 100644 geode-gfsh/src/test/java/org/apache/geode/management/internal/cli/functions/CliFunctionTest.java
 create mode 100644 geode-gfsh/src/test/java/org/apache/geode/management/internal/cli/functions/ImportDataFunctionTest.java
 create mode 100644 geode-jmh/src/main/java/org/apache/geode/benchmark/jmh/profilers/ObjectSizeAgent.java
 create mode 100644 geode-jmh/src/main/java/org/apache/geode/benchmark/jmh/profilers/ObjectSizeProfiler.java
 create mode 100644 geode-jmh/src/test/java/org/apache/geode/benchmark/jmh/profilers/ObjectSizeAgentTest.java
 create mode 100644 geode-jmh/src/test/resources/META-INF/services/org.openjdk.jmh.profile.Profiler
 create mode 100644 geode-junit/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeJUnitSerializablesIntegrationTest.java
 delete mode 100644 geode-junit/src/integrationTest/java/org/apache/geode/test/compiler/JavaCompilerTest.java
 create mode 100644 geode-junit/src/integrationTest/java/org/apache/geode/test/junit/internal/JUnitSanctionedSerializablesServiceIntegrationTest.java
 create mode 100644 geode-junit/src/integrationTest/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
 create mode 100644 geode-junit/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
 delete mode 100644 geode-junit/src/main/java/org/apache/geode/codeAnalysis/AnalyzeDataSerializablesJUnitTestBase.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/codeAnalysis/AnalyzeDataSerializablesTestBase.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/codeAnalysis/AnalyzeDataSerializablesWithClassAnalysisRuleTestBase.java
 delete mode 100644 geode-junit/src/main/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTestBase.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesTestBase.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesWithClassAnalysisRuleTestBase.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/codeAnalysis/SanctionedSerializablesServiceIntegrationTestBase.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/security/ExpirableSecurityManager.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/security/UpdatableUserAuthInitialize.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/security/templates/CountableUserPasswordAuthInit.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/test/compiler/CompilationReporter.java
 delete mode 100644 geode-junit/src/main/java/org/apache/geode/test/compiler/CompiledSourceCode.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/test/compiler/InMemoryClassFile.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/test/compiler/InMemoryFileManager.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/test/compiler/InMemoryJavaCompiler.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/test/compiler/InMemorySourceFile.java
 delete mode 100644 geode-junit/src/main/java/org/apache/geode/test/compiler/JavaCompiler.java
 delete mode 100644 geode-junit/src/main/java/org/apache/geode/test/compiler/UncompiledSourceCode.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/test/junit/categories/IgnoreInRepeatTestTasks.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/test/junit/categories/SanctionedSerializablesTest.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/test/junit/internal/JUnitSanctionedSerializablesService.java
 create mode 100644 geode-junit/src/main/java/org/apache/geode/test/junit/runners/GeodeParamsRunner.java
 create mode 100644 geode-junit/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 create mode 100644 geode-junit/src/main/resources/org/apache/geode/test/junit/internal/sanctioned-geode-junit-serializables.txt
 create mode 100644 geode-junit/src/test/java/org/apache/geode/cache/ssl/CertificateBuildingTest.java
 create mode 100644 geode-junit/src/test/java/org/apache/geode/test/compiler/InMemoryJavaCompilerTest.java
 create mode 100644 geode-junit/src/test/java/org/apache/geode/test/compiler/InMemorySourceFileTest.java
 delete mode 100644 geode-junit/src/test/java/org/apache/geode/test/compiler/UncompiledSourceCodeTest.java
 create mode 100644 geode-junit/src/test/java/org/apache/geode/test/junit/runners/ComparableDescription.java
 create mode 100644 geode-junit/src/test/java/org/apache/geode/test/junit/runners/GeodeParamsRunnerTest.java
 create mode 100644 geode-lucene/src/integrationTest/java/org/apache/geode/cache/lucene/internal/LuceneSanctionedSerializablesServiceIntegrationTest.java
 create mode 100644 geode-lucene/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeLuceneSerializablesIntegrationTest.java
 delete mode 100644 geode-lucene/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeLuceneSerializablesJUnitTest.java
 delete mode 100644 geode-lucene/src/integrationTest/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
 delete mode 100644 geode-lucene/src/integrationTest/resources/org/apache/geode/codeAnalysis/openBugs.txt
 delete mode 100644 geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneDistributedSystemService.java
 create mode 100644 geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneSanctionedSerializablesService.java
 delete mode 100644 geode-lucene/src/main/resources/META-INF/services/org.apache.geode.distributed.internal.DistributedSystemService
 create mode 100644 geode-lucene/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.DataSerializableFixedIdRegistrant
 create mode 100644 geode-lucene/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 create mode 100644 geode-management/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeManagementSerializablesIntegrationTest.java
 delete mode 100644 geode-management/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeManagementSerializablesJUnitTest.java
 create mode 100644 geode-management/src/integrationTest/java/org/apache/geode/management/internal/ManagementSanctionedSerializablesServiceIntegrationTest.java
 create mode 100644 geode-management/src/main/java/org/apache/geode/management/internal/ManagementSanctionedSerializablesService.java
 create mode 100644 geode-management/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 delete mode 100644 geode-management/src/main/resources/org/apache/geode/internal/sanctioned-geode-management-serializables.txt
 create mode 100644 geode-management/src/main/resources/org/apache/geode/management/internal/sanctioned-geode-management-serializables.txt
 create mode 100644 geode-membership/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeMembershipSerializablesIntegrationTest.java
 delete mode 100644 geode-membership/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeMembershipSerializablesJUnitTest.java
 create mode 100644 geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/gms/MembershipSanctionedSerializablesServiceIntegrationTest.java
 delete mode 100644 geode-membership/src/integrationTest/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
 create mode 100644 geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/MembershipSanctionedSerializablesService.java
 create mode 100644 geode-membership/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 create mode 100644 geode-memcached/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeMemcachedSerializablesIntegrationTest.java
 delete mode 100755 geode-memcached/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeMemcachedSerializablesJUnitTest.java
 create mode 100644 geode-memcached/src/integrationTest/java/org/apache/geode/internal/memcached/MemcachedSanctionedSerializablesServiceIntegrationTest.java
 delete mode 100644 geode-memcached/src/integrationTest/resources/org/apache/geode/codeAnalysis/openBugs.txt
 delete mode 100644 geode-memcached/src/main/java/org/apache/geode/internal/memcached/MemcachedDistributedSystemService.java
 create mode 100644 geode-memcached/src/main/java/org/apache/geode/internal/memcached/MemcachedSanctionedSerializablesService.java
 delete mode 100644 geode-memcached/src/main/resources/META-INF/services/org.apache.geode.distributed.internal.DistributedSystemService
 create mode 100644 geode-memcached/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 delete mode 100644 geode-old-client-support/src/distributedTest/java/org/apache/geode/OldClientSupportDUnitTest.java
 create mode 100644 geode-old-client-support/src/distributedTest/java/org/apache/geode/OldClientSupportDistributedTest.java
 create mode 100644 geode-pulse/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzePulseSerializablesIntegrationTest.java
 create mode 100644 geode-pulse/src/integrationTest/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
 create mode 100644 geode-serialization/ANALYZE_SERIALIZABLES.md
 create mode 100644 geode-serialization/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeSerializationSerializablesIntegrationTest.java
 create mode 100644 geode-serialization/src/integrationTest/java/org/apache/geode/internal/serialization/SerializationSanctionedSerializablesServiceIntegrationTest.java
 create mode 100644 geode-serialization/src/integrationTest/java/org/apache/geode/internal/serialization/filter/GlobalSerialFilterConfigurationWhenFilterIsAlreadySetIntegrationTest.java
 create mode 100644 geode-serialization/src/integrationTest/java/org/apache/geode/internal/serialization/filter/GlobalSerialFilterConfigurationWhenObjectInputFilterNotFoundIntegrationTest.java
 create mode 100644 geode-serialization/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ReflectiveObjectInputFilterApiSetFilterBlankIntegrationTest.java
 create mode 100644 geode-serialization/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ReflectiveObjectInputFilterApiSetFilterIntegrationTest.java
 create mode 100644 geode-serialization/src/integrationTest/java/org/apache/geode/internal/serialization/filter/ReflectiveObjectInputFilterApiSetFilterNullIntegrationTest.java
 copy geode-web-api/src/main/resources/org/apache/geode/internal/sanctioned-geode-web-api-serializables.txt => geode-serialization/src/integrationTest/resources/org/apache/geode/codeAnalysis/excludedClasses.txt (100%)
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/DataSerializableFixedIdRegistrant.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/DataSerializableFixedIdRegistrar.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/SerializationSanctionedSerializablesService.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/ApiPackage.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/FilterAlreadyConfiguredException.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/FilterConfiguration.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/FilterPattern.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/GlobalSerialFilter.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/GlobalSerialFilterConfiguration.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/GlobalSerialFilterConfigurationFactory.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/GlobalSerialFilterFactory.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/Java9ReflectiveObjectInputFilterApi.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/JmxSerialFilterConfiguration.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/JmxSerialFilterConfigurationFactory.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/NullStreamSerialFilter.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/ObjectInputFilterApi.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/ObjectInputFilterApiFactory.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/ObjectInputFilterInvocationHandler.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/ObjectInputFilterUtils.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/OpenMBeanFilterPattern.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/ReflectiveFacadeGlobalSerialFilter.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/ReflectiveFacadeGlobalSerialFilterFactory.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/ReflectiveFacadeStreamSerialFilter.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/ReflectiveFacadeStreamSerialFilterFactory.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/ReflectiveObjectInputFilterApi.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/ReflectiveObjectInputFilterApiFactory.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/SanctionedSerializables.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/SanctionedSerializablesFilterPattern.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/SanctionedSerializablesService.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/SerializableObjectConfig.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/StreamSerialFilter.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/StreamSerialFilterFactory.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/SystemPropertyGlobalSerialFilterConfigurationFactory.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/SystemPropertyJmxSerialFilterConfigurationFactory.java
 create mode 100644 geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/UnableToSetSerialFilterException.java
 create mode 100644 geode-serialization/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 create mode 100644 geode-serialization/src/main/resources/org/apache/geode/internal/serialization/sanctioned-geode-serialization-serializables.txt
 delete mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/SerializationDependenciesJUnitTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/SerializationDependenciesTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/ApiPackageTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/GlobalSerialFilterConfigurationTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/JmxSerialFilterConfigurationFactoryTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/JmxSerialFilterConfigurationTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/NullObjectInputFilterTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/ObjectInputFilterInvocationHandlerTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/ObjectInputFilterUtilsTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/OpenMBeanFilterPatternTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/ReflectiveFacadeGlobalSerialFilterFactoryTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/ReflectiveFacadeGlobalSerialFilterTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/ReflectiveFacadeObjectInputFilterFactoryTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/ReflectiveFacadeObjectInputFilterTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/ReflectiveObjectInputFilterApiFactoryTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/ReflectiveObjectInputFilterApiTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/SanctionedSerializablesFilterPatternTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/SanctionedSerializablesTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/SerialFilterAssertions.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/SerializableObjectConfigTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/SystemPropertyGlobalSerialFilterConfigurationFactoryTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/filter/SystemPropertyJmxSerialFilterConfigurationFactoryTest.java
 create mode 100644 geode-serialization/src/test/java/org/apache/geode/internal/serialization/internal/DSFIDSerializerImplTest.java
 create mode 100644 geode-server-all/build.gradle
 create mode 100644 geode-server-all/src/integrationTest/java/org/apache/geode/GeodeServerAllJarIntegrationTest.java
 create mode 100644 geode-server-all/src/integrationTest/resources/dependency_classpath.txt
 create mode 100644 geode-server-all/src/test/resources/expected-pom.xml
 create mode 100644 geode-tcp-server/src/test/java/org/apache/geode/distributed/internal/tcpserver/TcpClientTest.java
 delete mode 100644 geode-tcp-server/src/test/java/org/apache/geode/distributed/internal/tcpserver/TcpServerJUnitTest.java
 create mode 100644 geode-tcp-server/src/test/java/org/apache/geode/distributed/internal/tcpserver/TcpServerTest.java
 create mode 100644 geode-tcp-server/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
 delete mode 100644 geode-tcp-server/src/upgradeTest/java/org/apache/geode/distributed/internal/tcpserver/TcpServerProductVersionDUnitTest.java
 create mode 100644 geode-tcp-server/src/upgradeTest/java/org/apache/geode/distributed/internal/tcpserver/TcpServerProductVersionUpgradeTest.java
 create mode 100644 geode-wan/src/distributedTest/java/org/apache/geode/cache/wan/internal/cli/commands/WanCopyRegionCommandDUnitTest.java
 create mode 100644 geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/misc/AuthenticationExpiredWANDunitTest.java
 create mode 100644 geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderAndCQDurableClientDUnitTest.java
 create mode 100644 geode-wan/src/integrationTest/java/org/apache/geode/cache/wan/internal/WANSanctionedSerializablesServiceIntegrationTest.java
 create mode 100644 geode-wan/src/integrationTest/java/org/apache/geode/cache/wan/internal/cli/commands/WanCommandAutoCompletionIntegrationTest.java
 create mode 100644 geode-wan/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeWANSerializablesIntegrationTest.java
 delete mode 100644 geode-wan/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeWANSerializablesJUnitTest.java
 delete mode 100644 geode-wan/src/integrationTest/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
 delete mode 100644 geode-wan/src/integrationTest/resources/org/apache/geode/codeAnalysis/openBugs.txt
 delete mode 100644 geode-wan/src/main/java/org/apache/geode/cache/wan/internal/WANDistributedSystemService.java
 create mode 100644 geode-wan/src/main/java/org/apache/geode/cache/wan/internal/WANSanctionedSerializablesService.java
 create mode 100644 geode-wan/src/main/java/org/apache/geode/cache/wan/internal/WanCopyRegionFunctionService.java
 create mode 100644 geode-wan/src/main/java/org/apache/geode/cache/wan/internal/WanCopyRegionFunctionServiceAlreadyRunningException.java
 create mode 100644 geode-wan/src/main/java/org/apache/geode/cache/wan/internal/cli/commands/WanCopyRegionCommand.java
 create mode 100644 geode-wan/src/main/java/org/apache/geode/management/internal/cli/functions/WanCopyRegionFunction.java
 create mode 100644 geode-wan/src/main/java/org/apache/geode/management/internal/cli/functions/WanCopyRegionFunctionDelegate.java
 delete mode 100644 geode-wan/src/main/resources/META-INF/services/org.apache.geode.distributed.internal.DistributedSystemService
 create mode 100644 geode-wan/src/main/resources/META-INF/services/org.apache.geode.internal.cache.CacheService
 create mode 100644 geode-wan/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.DataSerializableFixedIdRegistrant
 create mode 100644 geode-wan/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 create mode 100644 geode-wan/src/main/resources/META-INF/services/org.springframework.shell.core.CommandMarker
 create mode 100644 geode-wan/src/test/java/org/apache/geode/cache/wan/internal/WanCopyRegionFunctionServiceTest.java
 create mode 100644 geode-wan/src/test/java/org/apache/geode/cache/wan/internal/cli/commands/WanCopyRegionCommandTest.java
 create mode 100644 geode-wan/src/test/java/org/apache/geode/management/internal/cli/functions/WanCopyRegionFunctionDelegateTest.java
 create mode 100644 geode-wan/src/test/java/org/apache/geode/management/internal/cli/functions/WanCopyRegionFunctionTest.java
 create mode 100644 geode-web-api/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeWebApiSerializablesIntegrationTest.java
 delete mode 100644 geode-web-api/src/integrationTest/java/org/apache/geode/codeAnalysis/AnalyzeWebApiSerializablesJUnitTest.java
 create mode 100644 geode-web-api/src/integrationTest/java/org/apache/geode/rest/internal/WebApiSanctionedSerializablesServiceIntegrationTest.java
 create mode 100644 geode-web-api/src/main/java/org/apache/geode/rest/internal/WebApiSanctionedSerializablesService.java
 create mode 100644 geode-web-api/src/main/resources/META-INF/services/org.apache.geode.internal.serialization.filter.SanctionedSerializablesService
 rename geode-web-api/src/main/resources/org/apache/geode/{ => rest}/internal/sanctioned-geode-web-api-serializables.txt (100%)
 create mode 100644 geode-web-api/src/test/java/org/apache/geode/rest/internal/web/util/JsonWriterTest.java
 delete mode 100644 geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsOverHttpDUnitTest.java
 create mode 100644 geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/FunctionCommandsOverHttpDistributedTest.java
 delete mode 100644 geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/GcCommandOverHttpDUnitTest.java
 create mode 100644 geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/GcCommandOverHttpDistributedTest.java
 delete mode 100644 geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/GemfireDataCommandsOverHttpDUnitTest.java
 create mode 100644 geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/GeodeDataCommandsOverHttpDistributedTest.java
 delete mode 100644 geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandOverHttpDUnitTest.java
 create mode 100644 geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandOverHttpDistributedTest.java
 delete mode 100644 geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/QueryCommandOverHttpDUnitTest.java
 create mode 100644 geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/QueryCommandOverHttpDistributedTest.java
 delete mode 100644 geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/RegionMembershipMBeanOverHttpDUnitTest.java
 create mode 100644 geode-web/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/RegionMembershipMBeanOverHttpDistributedTest.java
 create mode 100644 gradle/javaVersions.gradle

[geode] 09/20: GEODE-9132: Remove ClearPRMessage from sanctionedDataSerializables.txt

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 585829567f4990294af8aa8cb6bb0d09342f3835
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Thu Apr 15 17:12:10 2021 -0700

    GEODE-9132: Remove ClearPRMessage from sanctionedDataSerializables.txt
---
 .../org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt b/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
index 29218c9..6dac4a0 100644
--- a/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
+++ b/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
@@ -1374,14 +1374,6 @@ org/apache/geode/internal/cache/partitioned/BucketSizeMessage$BucketSizeReplyMes
 fromData,27
 toData,27
 
-org/apache/geode/internal/cache/partitioned/ClearPRMessage,2
-fromData,30
-toData,44
-
-org/apache/geode/internal/cache/partitioned/ClearPRMessage$ClearReplyMessage,2
-fromData,17
-toData,17
-
 org/apache/geode/internal/cache/partitioned/ColocatedRegionDetails,2
 fromData,81
 toData,133

[geode] 19/20: GEODE-9194: Feature/region stats update (#6430)

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit bed0734f729efb5a9ba564fa71191c377ec95714
Author: mhansonp <ha...@vmware.com>
AuthorDate: Tue Jul 13 09:34:54 2021 -0700

    GEODE-9194: Feature/region stats update (#6430)
    
    * GEODE-9194: add PR Region Clear statistics
---
 .../cache/RegionClearStatsDistributedTest.java     |  13 +-
 .../cache/PartitionedRegionClearDUnitTest.java     | 139 ++++++++-------
 ...tionedRegionLocalMaxMemoryOffHeapDUnitTest.java |   2 +-
 .../partitioned/PRQueryCacheClosedJUnitTest.java   |  14 +-
 .../cache/query/partitioned/PRQueryJUnitTest.java  |  47 ++---
 .../partitioned/PRQueryRegionClosedJUnitTest.java  |  16 +-
 .../PRQueryRegionDestroyedJUnitTest.java           |   5 +-
 .../geode/internal/cache/ColocatedPRJUnitTest.java |   4 +-
 .../cache/PartitionedRegionCreationJUnitTest.java  |   4 +-
 .../cache/PartitionedRegionStatsJUnitTest.java     | 198 ++++++++++++++++++++-
 .../geode/internal/cache/AbstractRegion.java       |   2 +
 .../geode/internal/cache/AbstractRegionMap.java    | 169 +++++++++---------
 .../apache/geode/internal/cache/BucketRegion.java  |  24 ++-
 .../geode/internal/cache/CachePerfStats.java       |  79 ++++----
 .../geode/internal/cache/DummyCachePerfStats.java  |  10 ++
 .../geode/internal/cache/GemFireCacheImpl.java     |  15 +-
 .../apache/geode/internal/cache/LocalRegion.java   |  17 +-
 .../geode/internal/cache/PartitionedRegion.java    |  31 +++-
 .../internal/cache/PartitionedRegionClear.java     |  24 +--
 .../internal/cache/PartitionedRegionStats.java     |  47 +++++
 .../geode/internal/cache/RegionPerfStats.java      |  25 ++-
 .../apache/geode/internal/cache/RegionStats.java   |   4 +-
 .../geode/internal/cache/CachePerfStatsTest.java   |  64 +++----
 .../internal/cache/PartitionedRegionTest.java      |  13 +-
 .../cache/PartitionedRegionTestHelper.java         | 130 +++++++-------
 25 files changed, 669 insertions(+), 427 deletions(-)

diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache/RegionClearStatsDistributedTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache/RegionClearStatsDistributedTest.java
index e0214b7..888a996 100755
--- a/geode-core/src/distributedTest/java/org/apache/geode/cache/RegionClearStatsDistributedTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache/RegionClearStatsDistributedTest.java
@@ -38,7 +38,6 @@ import org.apache.geode.test.dunit.rules.DistributedRule;
 /**
  * verifies the count of clear operation
  */
-@SuppressWarnings("serial")
 public class RegionClearStatsDistributedTest implements Serializable {
 
   private static final String REGION_NAME = RegionClearStatsDistributedTest.class.getSimpleName();
@@ -58,7 +57,7 @@ public class RegionClearStatsDistributedTest implements Serializable {
   public CacheRule cacheRule = new CacheRule();
 
   @Before
-  public void setUp() throws Exception {
+  public void setUp() {
     server1 = getVM(0);
     client1 = getVM(1);
   }
@@ -96,7 +95,7 @@ public class RegionClearStatsDistributedTest implements Serializable {
   private int createCache(DataPolicy dataPolicy) throws IOException {
     cacheRule.createCache();
 
-    AttributesFactory factory = new AttributesFactory();
+    AttributesFactory<String, String> factory = new AttributesFactory<>();
     factory.setScope(Scope.DISTRIBUTED_ACK);
     factory.setDataPolicy(dataPolicy);
 
@@ -129,7 +128,7 @@ public class RegionClearStatsDistributedTest implements Serializable {
             .setMinConnections(1).setReadTimeout(20000).setPingInterval(10000).setRetryAttempts(1)
             .create(getClass().getSimpleName());
 
-    AttributesFactory factory = new AttributesFactory();
+    AttributesFactory<String, String> factory = new AttributesFactory<>();
     factory.setScope(Scope.DISTRIBUTED_ACK);
     factory.setPoolName(pool.getName());
 
@@ -148,7 +147,7 @@ public class RegionClearStatsDistributedTest implements Serializable {
             .setMinConnections(1).setReadTimeout(20000).setPingInterval(10000).setRetryAttempts(1)
             .create(getClass().getSimpleName());
 
-    AttributesFactory factory = new AttributesFactory();
+    AttributesFactory<String, String> factory = new AttributesFactory<>();
     factory.setScope(Scope.DISTRIBUTED_ACK);
     factory.setPoolName(pool.getName());
     factory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE);
@@ -157,7 +156,7 @@ public class RegionClearStatsDistributedTest implements Serializable {
   }
 
   private void doPutsAndClear() {
-    Region region = cacheRule.getCache().getRegion(REGION_NAME);
+    Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
 
     region.put(KEY1, VALUE1);
     region.put(KEY2, VALUE2);
@@ -169,7 +168,7 @@ public class RegionClearStatsDistributedTest implements Serializable {
   }
 
   private void validateClearCountStat() {
-    assertThat(cacheRule.getCache().getCachePerfStats().getRegionClearCount())
+    assertThat(cacheRule.getCache().getCachePerfStats().getClearCount())
         .isEqualTo(EXPECTED_CLEAR_COUNT_STAT_VALUE);
   }
 }
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java
index b871926..64fb284 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java
@@ -14,6 +14,7 @@
  */
 package org.apache.geode.internal.cache;
 
+import static org.apache.geode.distributed.ConfigurationProperties.ENABLE_TIME_STATISTICS;
 import static org.apache.geode.internal.Assert.fail;
 import static org.apache.geode.test.dunit.rules.ClusterStartupRule.getCache;
 import static org.apache.geode.test.dunit.rules.ClusterStartupRule.getClientCache;
@@ -40,10 +41,13 @@ import org.apache.geode.cache.RegionFactory;
 import org.apache.geode.cache.RegionShortcut;
 import org.apache.geode.cache.client.ClientRegionShortcut;
 import org.apache.geode.cache.util.CacheWriterAdapter;
+import org.apache.geode.test.dunit.Invoke;
 import org.apache.geode.test.dunit.SerializableCallableIF;
 import org.apache.geode.test.dunit.rules.ClientVM;
 import org.apache.geode.test.dunit.rules.ClusterStartupRule;
+import org.apache.geode.test.dunit.rules.DistributedRestoreSystemProperties;
 import org.apache.geode.test.dunit.rules.MemberVM;
+import org.apache.geode.util.internal.GeodeGlossary;
 
 public class PartitionedRegionClearDUnitTest implements Serializable {
   protected static final String REGION_NAME = "testPR";
@@ -60,10 +64,17 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
   @Rule
   public ClusterStartupRule cluster = new ClusterStartupRule(7);
 
+  @Rule
+  public DistributedRestoreSystemProperties distributedRestoreSystemProperties =
+      new DistributedRestoreSystemProperties();
+
   @Before
   public void setUp() throws Exception {
+    Invoke.invokeInEveryVM(
+        () -> System.setProperty(GeodeGlossary.GEMFIRE_PREFIX + "enable-time-statistics", "true"));
     locator = cluster.startLocatorVM(0);
     locatorPort = locator.getPort();
+    getProperties().setProperty(ENABLE_TIME_STATISTICS, "true");
     dataStore1 = cluster.startServerVM(1, getProperties(), locatorPort);
     dataStore2 = cluster.startServerVM(2, getProperties(), locatorPort);
     dataStore3 = cluster.startServerVM(3, getProperties(), locatorPort);
@@ -79,11 +90,10 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
   }
 
   protected Properties getProperties() {
-    Properties properties = new Properties();
-    return properties;
+    return new Properties();
   }
 
-  private Region getRegion(boolean isClient) {
+  private <K, V> Region<K, V> getRegion(boolean isClient) {
     if (isClient) {
       return getClientCache().getRegion(REGION_NAME);
     } else {
@@ -96,15 +106,16 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
   }
 
   private void initClientCache() {
-    Region region = getClientCache().createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
-        .create(REGION_NAME);
+    Region<Object, Object> region =
+        getClientCache().createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
+            .create(REGION_NAME);
     region.registerInterestForAllKeys(InterestResultPolicy.KEYS);
   }
 
   private void initDataStore(boolean withWriter) {
-    RegionFactory factory = getCache().createRegionFactory(getRegionShortCut())
+    RegionFactory<Object, Object> factory = getCache().createRegionFactory(getRegionShortCut())
         .setPartitionAttributes(
-            new PartitionAttributesFactory().setTotalNumBuckets(TOTAL_BUCKET_NUM).create());
+            new PartitionAttributesFactory<>().setTotalNumBuckets(TOTAL_BUCKET_NUM).create());
     if (withWriter) {
       factory.setCacheWriter(new CountingCacheWriter());
     }
@@ -128,10 +139,10 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
         fail("Wrong region type:" + shortcut);
       }
     }
-    RegionFactory factory = getCache().createRegionFactory(shortcut)
+    RegionFactory<Object, Object> factory = getCache().createRegionFactory(shortcut)
         .setPartitionAttributes(
-            new PartitionAttributesFactory().setTotalNumBuckets(10).setLocalMaxMemory(0).create())
-        .setPartitionAttributes(new PartitionAttributesFactory().setTotalNumBuckets(10).create());
+            new PartitionAttributesFactory<>().setTotalNumBuckets(10).setLocalMaxMemory(0).create())
+        .setPartitionAttributes(new PartitionAttributesFactory<>().setTotalNumBuckets(10).create());
     if (withWriter) {
       factory.setCacheWriter(new CountingCacheWriter());
     }
@@ -140,9 +151,9 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
     destroysByRegion = new HashMap<>();
   }
 
-  private void feed(boolean isClient) {
-    Region region = getRegion(isClient);
-    IntStream.range(0, NUM_ENTRIES).forEach(i -> region.put(i, "value" + i));
+  private void putRecords(boolean isClient, int numEntries) {
+    Region<Object, Object> region = getRegion(isClient);
+    IntStream.range(0, numEntries).forEach(i -> region.put(i, "value" + i));
   }
 
   private void verifyServerRegionSize(int expectedNum) {
@@ -160,43 +171,28 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
 
       for (BucketRegion bucket : region.getDataStore().getAllLocalBucketRegions()) {
         if (clearCount == 0) {
-          clearCount = bucket.getCachePerfStats().getBucketClearCount();
+          clearCount = bucket.getPartitionedRegion().getPrStats().getBucketClearCount();
         }
-        assertThat(bucket.getCachePerfStats().getBucketClearCount()).isEqualTo(bucketCount);
+        assertThat(bucket.getPartitionedRegion().getPrStats().getBucketClearCount())
+            .isEqualTo(bucketCount);
       }
 
-      CachePerfStats stats = region.getRegionCachePerfStats();
-
-      assertThat(stats.getRegionClearCount()).isEqualTo(1);
-      assertThat(stats.getPartitionedRegionClearLocalDuration())
-          .isGreaterThan(0);
+      CachePerfStats stats = region.getCachePerfStats();
       if (isCoordinator) {
-        assertThat(stats.getPartitionedRegionClearTotalDuration())
-            .isGreaterThan(0);
-      } else {
-        assertThat(stats.getPartitionedRegionClearTotalDuration())
-            .isEqualTo(0);
+        assertThat(stats.getClearCount()).isEqualTo(1);
       }
     });
   }
 
   private void verifyClientRegionSize(int expectedNum) {
     client1.invoke(() -> verifyRegionSize(true, expectedNum));
-    // TODO: notify register clients
-    // client2.invoke(()->verifyRegionSize(true, expectedNum));
   }
 
-  SerializableCallableIF<Integer> getWriterClears = () -> {
-    int clears =
-        clearsByRegion.get(REGION_NAME) == null ? 0 : clearsByRegion.get(REGION_NAME).get();
-    return clears;
-  };
+  SerializableCallableIF<Integer> getWriterClears =
+      () -> clearsByRegion.get(REGION_NAME) == null ? 0 : clearsByRegion.get(REGION_NAME).get();
 
-  SerializableCallableIF<Integer> getWriterDestroys = () -> {
-    int destroys =
-        destroysByRegion.get(REGION_NAME) == null ? 0 : destroysByRegion.get(REGION_NAME).get();
-    return destroys;
-  };
+  SerializableCallableIF<Integer> getWriterDestroys =
+      () -> destroysByRegion.get(REGION_NAME) == null ? 0 : destroysByRegion.get(REGION_NAME).get();
 
   SerializableCallableIF<Integer> getBucketRegionWriterClears = () -> {
     int clears = 0;
@@ -225,11 +221,11 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
     accessor.invoke(() -> initAccessor(accessorWithWriter));
     // make sure only datastore3 has cacheWriter
     dataStore1.invoke(() -> {
-      Region region = getRegion(false);
+      Region<Object, Object> region = getRegion(false);
       region.getAttributesMutator().setCacheWriter(null);
     });
     dataStore2.invoke(() -> {
-      Region region = getRegion(false);
+      Region<Object, Object> region = getRegion(false);
       region.getAttributesMutator().setCacheWriter(null);
     });
   }
@@ -240,14 +236,14 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
     client1.invoke(this::initClientCache);
     client2.invoke(this::initClientCache);
 
-    accessor.invoke(() -> feed(false));
+    accessor.invoke(() -> putRecords(false, NUM_ENTRIES));
     verifyServerRegionSize(NUM_ENTRIES);
     dataStore3.invoke(() -> getRegion(false).clear());
     verifyServerRegionSize(0);
 
     // do the region destroy to compare that the same callbacks will be triggered
     dataStore3.invoke(() -> {
-      Region region = getRegion(false);
+      Region<Object, Object> region = getRegion(false);
       region.destroyRegion();
     });
 
@@ -271,14 +267,14 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
     client1.invoke(this::initClientCache);
     client2.invoke(this::initClientCache);
 
-    accessor.invoke(() -> feed(false));
+    accessor.invoke(() -> putRecords(false, NUM_ENTRIES));
     verifyServerRegionSize(NUM_ENTRIES);
     dataStore1.invoke(() -> getRegion(false).clear());
     verifyServerRegionSize(0);
 
     // do the region destroy to compare that the same callbacks will be triggered
     dataStore1.invoke(() -> {
-      Region region = getRegion(false);
+      Region<Object, Object> region = getRegion(false);
       region.destroyRegion();
     });
 
@@ -302,14 +298,14 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
     client1.invoke(this::initClientCache);
     client2.invoke(this::initClientCache);
 
-    accessor.invoke(() -> feed(false));
+    accessor.invoke(() -> putRecords(false, NUM_ENTRIES));
     verifyServerRegionSize(NUM_ENTRIES);
     accessor.invoke(() -> getRegion(false).clear());
     verifyServerRegionSize(0);
 
     // do the region destroy to compare that the same callbacks will be triggered
     accessor.invoke(() -> {
-      Region region = getRegion(false);
+      Region<Object, Object> region = getRegion(false);
       region.destroyRegion();
     });
 
@@ -333,14 +329,14 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
     client1.invoke(this::initClientCache);
     client2.invoke(this::initClientCache);
 
-    accessor.invoke(() -> feed(false));
+    accessor.invoke(() -> putRecords(false, NUM_ENTRIES));
     verifyServerRegionSize(NUM_ENTRIES);
     accessor.invoke(() -> getRegion(false).clear());
     verifyServerRegionSize(0);
 
     // do the region destroy to compare that the same callbacks will be triggered
     accessor.invoke(() -> {
-      Region region = getRegion(false);
+      Region<Object, Object> region = getRegion(false);
       region.destroyRegion();
     });
 
@@ -369,12 +365,12 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
       PartitionedRegion region = (PartitionedRegion) getRegion(false);
 
       for (BucketRegion bucket : region.getDataStore().getAllLocalBucketRegions()) {
-        long clearCount = bucket.getCachePerfStats().getRegionClearCount();
+        long clearCount = bucket.getCachePerfStats().getClearCount();
         assertThat(clearCount).isEqualTo(0);
       }
     });
 
-    accessor.invoke(() -> feed(false));
+    accessor.invoke(() -> putRecords(false, NUM_ENTRIES));
     verifyServerRegionSize(NUM_ENTRIES);
     dataStore1.invoke(() -> getRegion(false).clear());
     verifyServerRegionSize(0);
@@ -388,11 +384,7 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
     // The accessor shouldn't increment the region clear count
     accessor.invoke(() -> {
       PartitionedRegion region = (PartitionedRegion) getRegion(false);
-
-      assertThat(region.getRegionCachePerfStats()).isNull();
-      assertThat(region.getCachePerfStats().getRegionClearCount()).isEqualTo(0);
-      assertThat(region.getCachePerfStats().getPartitionedRegionClearLocalDuration()).isEqualTo(0);
-      assertThat(region.getCachePerfStats().getPartitionedRegionClearTotalDuration()).isEqualTo(0);
+      assertThat(region.getCachePerfStats().getClearCount()).isZero();
     });
   }
 
@@ -402,7 +394,7 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
     client1.invoke(this::initClientCache);
     client2.invoke(this::initClientCache);
 
-    client1.invoke(() -> feed(true));
+    client1.invoke(() -> putRecords(true, NUM_ENTRIES));
     verifyClientRegionSize(NUM_ENTRIES);
     verifyServerRegionSize(NUM_ENTRIES);
 
@@ -412,7 +404,7 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
 
     // do the region destroy to compare that the same callbacks will be triggered
     client1.invoke(() -> {
-      Region region = getRegion(true);
+      Region<Object, Object> region = getRegion(true);
       region.destroyRegion();
     });
 
@@ -430,13 +422,38 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
         .isEqualTo(0);
   }
 
+  @Test
+  public void testClearCount() {
+    configureServers(false, true);
+    client1.invoke(this::initClientCache);
+    client2.invoke(this::initClientCache);
+
+    accessor.invoke(() -> putRecords(false, NUM_ENTRIES));
+    verifyServerRegionSize(NUM_ENTRIES);
+    dataStore1.invoke(() -> {
+      PartitionedRegion partitionedRegion = (PartitionedRegion) getRegion(false);
+      assertThat(partitionedRegion.getCachePerfStats().getClearCount()).isEqualTo(0L);
+    });
+    dataStore1.invoke(() -> getRegion(false).clear());
+    verifyServerRegionSize(0);
+    dataStore1.invoke(() -> {
+      PartitionedRegion partitionedRegion = (PartitionedRegion) getRegion(false);
+      assertThat(partitionedRegion.getCachePerfStats().getClearCount()).isEqualTo(1L);
+    });
+
+    verifyDatastoreStats(dataStore1, true);
+    verifyDatastoreStats(dataStore2, false);
+    verifyDatastoreStats(dataStore3, false);
+  }
+
+
   public static HashMap<String, AtomicInteger> clearsByRegion = new HashMap<>();
   public static HashMap<String, AtomicInteger> destroysByRegion = new HashMap<>();
 
-  private static class CountingCacheWriter extends CacheWriterAdapter {
+  private static class CountingCacheWriter extends CacheWriterAdapter<Object, Object> {
     @Override
-    public void beforeRegionClear(RegionEvent event) throws CacheWriterException {
-      Region region = event.getRegion();
+    public void beforeRegionClear(RegionEvent<Object, Object> event) throws CacheWriterException {
+      Region<Object, Object> region = event.getRegion();
       AtomicInteger clears = clearsByRegion.get(region.getName());
       if (clears == null) {
         clears = new AtomicInteger(1);
@@ -449,8 +466,8 @@ public class PartitionedRegionClearDUnitTest implements Serializable {
     }
 
     @Override
-    public void beforeRegionDestroy(RegionEvent event) throws CacheWriterException {
-      Region region = event.getRegion();
+    public void beforeRegionDestroy(RegionEvent<Object, Object> event) throws CacheWriterException {
+      Region<Object, Object> region = event.getRegion();
       AtomicInteger destroys = destroysByRegion.get(region.getName());
       if (destroys == null) {
         destroys = new AtomicInteger(1);
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java
index ef1baa2..a1481ea 100755
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java
@@ -61,7 +61,7 @@ public class PartitionedRegionLocalMaxMemoryOffHeapDUnitTest
       long recoveryDelay, EvictionAttributes evictionAttributes) {
     RegionAttributes<?, ?> regionAttributes = PartitionedRegionTestHelper.createRegionAttrsForPR(
         redundancy, localMaxMemory, recoveryDelay, evictionAttributes, null);
-    AttributesFactory attributesFactory = new AttributesFactory(regionAttributes);
+    AttributesFactory<?, ?> attributesFactory = new AttributesFactory<>(regionAttributes);
     attributesFactory.setOffHeap(true);
     return attributesFactory.create();
   }
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryCacheClosedJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryCacheClosedJUnitTest.java
index 018491f..c777158 100755
--- a/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryCacheClosedJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryCacheClosedJUnitTest.java
@@ -85,7 +85,7 @@ public class PRQueryCacheClosedJUnitTest {
    *
    */
   @Test
-  public void testQueryOnSingleDataStoreWithCacheClose() throws Exception {
+  public void testQueryOnSingleDataStoreWithCacheClose() {
 
     logger.info(
         "PRQueryRegionDestroyedJUnitTest#testQueryOnSingleDataStoreWithCacheClose: Test Started  ");
@@ -93,10 +93,11 @@ public class PRQueryCacheClosedJUnitTest {
     logger.info(
         "PRQueryRegionDestroyedJUnitTest#testQueryOnSingleDataStoreWithCacheClose: creating PR Region ");
 
-    final Region region =
+    final Region<Integer, PortfolioData> region =
         PartitionedRegionTestHelper.createPartitionedRegion(regionName, localMaxMemory, redundancy);
 
-    final Region localRegion = PartitionedRegionTestHelper.createLocalRegion(localRegionName);
+    final Region<Integer, PortfolioData> localRegion =
+        PartitionedRegionTestHelper.createLocalRegion(localRegionName);
 
     final StringBuilder errorBuf = new StringBuilder();
 
@@ -131,9 +132,9 @@ public class PRQueryCacheClosedJUnitTest {
 
           try {
 
-            SelectResults resSetPR = region.query(s);
+            SelectResults<PortfolioData> resSetPR = region.query(s);
 
-            SelectResults resSetLocal = localRegion.query(s);
+            SelectResults<PortfolioData> resSetLocal = localRegion.query(s);
 
             String failureString =
                 PartitionedRegionTestHelper.compareResultSets(resSetPR, resSetLocal);
@@ -212,7 +213,6 @@ public class PRQueryCacheClosedJUnitTest {
       fail(
           "PRQueryCacheClosedJUnitTest#testQueryOnSingleDataStoreWithCacheClose: Test failed because of exception "
               + e);
-
     }
 
     logger.info("PRQueryCacheClosedJUnitTest#testQueryOnSingleDataStoreWithCacheClose: Test Ended");
@@ -223,7 +223,7 @@ public class PRQueryCacheClosedJUnitTest {
    * Populates the region with the Objects stores in the data Object array.
    *
    */
-  private void populateData(Region region, Object[] data) {
+  private void populateData(Region<Integer, PortfolioData> region, PortfolioData[] data) {
     logger.info("PRQueryCacheClosedJUnitTest#populateData: Populating Data in the PR Region ");
     for (int j = 0; j < data.length; j++) {
       region.put(j, data[j]);
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryJUnitTest.java
index 4a2ee90..00c78fd 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryJUnitTest.java
@@ -25,16 +25,15 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.LogWriter;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.Region;
-import org.apache.geode.cache.RegionShortcut;
-import org.apache.geode.cache.query.CacheUtils;
 import org.apache.geode.cache.query.Query;
 import org.apache.geode.cache.query.QueryService;
 import org.apache.geode.cache.query.SelectResults;
 import org.apache.geode.cache.query.data.PortfolioData;
 import org.apache.geode.internal.Assert;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.PartitionedRegionTestHelper;
+import org.apache.geode.pdx.PdxInstance;
 import org.apache.geode.test.junit.categories.OQLQueryTest;
 
 /**
@@ -44,15 +43,16 @@ import org.apache.geode.test.junit.categories.OQLQueryTest;
  */
 @Category({OQLQueryTest.class})
 public class PRQueryJUnitTest {
-  String regionName = "portfolios";
+  final String regionName = "portfolios";
 
   LogWriter logger = null;
 
   @Before
-  public void setUp() throws Exception {
+  public void setUp() {
     if (logger == null) {
       logger = PartitionedRegionTestHelper.getLogger();
     }
+
   }
 
   /**
@@ -63,7 +63,8 @@ public class PRQueryJUnitTest {
    */
   @Test
   public void testQueryOnSingleDataStore() throws Exception {
-    Region region = PartitionedRegionTestHelper.createPartitionedRegion(regionName, "100", 0);
+    Region<Integer, Object> region =
+        PartitionedRegionTestHelper.createPartitionedRegion(regionName, "100", 0);
     PortfolioData[] portfolios = new PortfolioData[100];
     for (int j = 0; j < 100; j++) {
       portfolios[j] = new PortfolioData(j);
@@ -72,7 +73,7 @@ public class PRQueryJUnitTest {
       populateData(region, portfolios);
 
       String queryString = "ID < 5";
-      SelectResults resSet = region.query(queryString);
+      SelectResults<PortfolioData> resSet = region.query(queryString);
       Assert.assertTrue(resSet.size() == 5);
 
       queryString = "ID > 5 and ID <=15";
@@ -85,24 +86,26 @@ public class PRQueryJUnitTest {
 
   @Test
   public void testQueryWithNullProjectionValue() throws Exception {
-    Region region = PartitionedRegionTestHelper.createPartitionedRegion(regionName, "100", 0);
+    Region<String, HashMap<String, String>> region =
+        PartitionedRegionTestHelper.createPartitionedRegion(regionName, "100", 0);
     int size = 10;
-    HashMap value = null;
+    HashMap<String, String> value;
     for (int j = 0; j < size; j++) {
-      value = new HashMap();
+      value = new HashMap<>();
       value.put("account" + j, "account" + j);
       region.put("" + j, value);
     }
 
     String queryString = "Select p.get('account') from " + SEPARATOR + region.getName() + " p ";
-    Query query = region.getCache().getQueryService().newQuery(queryString);
-    SelectResults sr = (SelectResults) query.execute();
+    Query query = PartitionedRegionTestHelper.getCache().getQueryService().newQuery(queryString);
+    SelectResults<HashMap<String, String>> sr =
+        (SelectResults<HashMap<String, String>>) query.execute();
     Assert.assertTrue(sr.size() == size);
 
     try {
       queryString = "Select p.get('acc') from " + SEPARATOR + region.getName() + " p ";
-      query = region.getCache().getQueryService().newQuery(queryString);
-      sr = (SelectResults) query.execute();
+      query = PartitionedRegionTestHelper.getCache().getQueryService().newQuery(queryString);
+      sr = (SelectResults<HashMap<String, String>>) query.execute();
       Assert.assertTrue(sr.size() == 10);
       for (Object r : sr.asList()) {
         if (r != null) {
@@ -116,7 +119,8 @@ public class PRQueryJUnitTest {
 
   @Test
   public void testOrderByQuery() throws Exception {
-    Region region = PartitionedRegionTestHelper.createPartitionedRegion(regionName, "100", 0);
+    Region<Integer, Object> region =
+        PartitionedRegionTestHelper.createPartitionedRegion(regionName, "100", 0);
     String[] values = new String[100];
     for (int j = 0; j < 100; j++) {
       values[j] = "" + j;
@@ -127,7 +131,7 @@ public class PRQueryJUnitTest {
 
       String queryString =
           "Select distinct p from " + SEPARATOR + region.getName() + " p order by p";
-      Query query = region.getCache().getQueryService().newQuery(queryString);
+      Query query = PartitionedRegionTestHelper.getCache().getQueryService().newQuery(queryString);
       SelectResults sr = (SelectResults) query.execute();
 
       Assert.assertTrue(sr.size() == 100);
@@ -138,9 +142,12 @@ public class PRQueryJUnitTest {
 
   @Test
   public void testNestedPRQuery() throws Exception {
-    Cache cache = CacheUtils.getCache();
-    QueryService queryService = CacheUtils.getCache().getQueryService();
-    Region region = cache.createRegionFactory(RegionShortcut.PARTITION).create("TEST_REGION");
+
+    Region<String, PdxInstance> region =
+        PartitionedRegionTestHelper.createPartitionedRegion("TEST_REGION");
+
+    InternalCache cache = PartitionedRegionTestHelper.getCache();
+    QueryService queryService = cache.getQueryService();
     Query query = queryService.newQuery(
         "SELECT distinct COUNT(*) FROM (SELECT DISTINCT tr.id, tr.domain FROM " + SEPARATOR
             + "TEST_REGION tr)");
@@ -178,7 +185,7 @@ public class PRQueryJUnitTest {
    * Populates the region with the Objects stores in the data Object array.
    *
    */
-  private void populateData(Region region, Object[] data) {
+  private void populateData(Region<Integer, Object> region, Object[] data) {
     for (int j = 0; j < data.length; j++) {
       region.put(j, data[j]);
     }
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryRegionClosedJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryRegionClosedJUnitTest.java
index 094aaa6..8fb01556 100755
--- a/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryRegionClosedJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryRegionClosedJUnitTest.java
@@ -55,8 +55,6 @@ public class PRQueryRegionClosedJUnitTest {
   boolean encounteredException = false;
   static final int delayQuery = 1000;
 
-
-
   @Before
   public void setUp() throws Exception {
     if (logger == null) {
@@ -75,16 +73,17 @@ public class PRQueryRegionClosedJUnitTest {
    *
    */
   @Test
-  public void testQueryingWithRegionClose() throws Exception {
+  public void testQueryingWithRegionClose() {
 
     logger.info("PRQueryRegionClosedJUnitTest#testQueryingWithRegionClose: Test Started  ");
 
     logger.info("PRQueryRegionClosedJUnitTest#testQueryingWithRegionClose: creating PR Region ");
 
-    final Region region =
+    final Region<Integer, PortfolioData> region =
         PartitionedRegionTestHelper.createPartitionedRegion(regionName, localMaxMemory, redundancy);
 
-    final Region localRegion = PartitionedRegionTestHelper.createLocalRegion(localRegionName);
+    final Region<Integer, PortfolioData> localRegion =
+        PartitionedRegionTestHelper.createLocalRegion(localRegionName);
 
     final StringBuilder errorBuf = new StringBuilder();
 
@@ -119,8 +118,8 @@ public class PRQueryRegionClosedJUnitTest {
 
           try {
 
-            SelectResults resSetPR = region.query(s);
-            SelectResults resSetLocal = localRegion.query(s);
+            SelectResults<PortfolioData> resSetPR = region.query(s);
+            SelectResults<PortfolioData> resSetLocal = localRegion.query(s);
             String failureString =
                 PartitionedRegionTestHelper.compareResultSets(resSetPR, resSetLocal);
             Thread.sleep(delayQuery);
@@ -155,7 +154,6 @@ public class PRQueryRegionClosedJUnitTest {
             StringWriter sw = new StringWriter();
             qe.printStackTrace(new PrintWriter(sw));
             errorBuf.append(sw);
-
           }
 
         }
@@ -215,7 +213,7 @@ public class PRQueryRegionClosedJUnitTest {
    * Populates the region with the Objects stores in the data Object array.
    *
    */
-  private void populateData(Region region, Object[] data) {
+  private void populateData(Region<Integer, PortfolioData> region, PortfolioData[] data) {
     logger.info("PRQueryRegionClosedJUnitTest#populateData: Populating Data in the PR Region ");
     for (int j = 0; j < data.length; j++) {
       region.put(j, data[j]);
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryRegionDestroyedJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryRegionDestroyedJUnitTest.java
index 0d0a7de..683ae17 100755
--- a/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryRegionDestroyedJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRQueryRegionDestroyedJUnitTest.java
@@ -83,10 +83,11 @@ public class PRQueryRegionDestroyedJUnitTest {
 
     logger.info("PRQueryRegionDestroyedJUnitTest#testQueryOnSingleDataStore: creating PR Region ");
 
-    final Region region =
+    final Region<Integer, PortfolioData> region =
         PartitionedRegionTestHelper.createPartitionedRegion(regionName, localMaxMemory, redundancy);
 
-    final Region localRegion = PartitionedRegionTestHelper.createLocalRegion(localRegionName);
+    final Region<Integer, PortfolioData> localRegion =
+        PartitionedRegionTestHelper.createLocalRegion(localRegionName);
 
     final StringBuilder errorBuf = new StringBuilder();
 
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/ColocatedPRJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/ColocatedPRJUnitTest.java
index edf4ce9..871249e 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/ColocatedPRJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/ColocatedPRJUnitTest.java
@@ -31,13 +31,13 @@ public class ColocatedPRJUnitTest {
   @Test
   public void destroyColocatedPRCheckForLeak() {
     PartitionedRegion parent =
-        (PartitionedRegion) PartitionedRegionTestHelper.createPartionedRegion("PARENT");
+        (PartitionedRegion) PartitionedRegionTestHelper.createPartitionedRegion("PARENT");
     List<PartitionedRegion> colocatedList = parent.getColocatedByList();
     assertEquals(0, colocatedList.size());
     PartitionAttributes PRatts =
         new PartitionAttributesFactory().setColocatedWith(SEPARATOR + "PARENT").create();
     PartitionedRegion child =
-        (PartitionedRegion) PartitionedRegionTestHelper.createPartionedRegion("CHILD", PRatts);
+        (PartitionedRegion) PartitionedRegionTestHelper.createPartitionedRegion("CHILD", PRatts);
     assertTrue(colocatedList.contains(child));
     child.destroyRegion();
     assertFalse(colocatedList.contains(child));
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionCreationJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionCreationJUnitTest.java
index d0ed63e..5212dc3 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionCreationJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionCreationJUnitTest.java
@@ -274,7 +274,7 @@ public class PartitionedRegionCreationJUnitTest {
   @Test
   public void testPartionedRegionInitialization() throws RegionExistsException {
     String PRName = "testpartionedRegionInitialization";
-    PartitionedRegionTestHelper.createPartionedRegion(PRName);
+    PartitionedRegionTestHelper.createPartitionedRegion(PRName);
 
     Region root = (PartitionedRegionTestHelper
         .getExistingRegion(PartitionedRegionHelper.PR_ROOT_REGION_NAME));
@@ -371,7 +371,7 @@ public class PartitionedRegionCreationJUnitTest {
     public void run() {
       String prName = "PartitionedRegionCreationJUnitTest_" + getPRNumber();
       try {
-        Region region = PartitionedRegionTestHelper.createPartionedRegion(prName);
+        Region region = PartitionedRegionTestHelper.createPartitionedRegion(prName);
         PRRegionList.add(region);
         updatePRCreate();
       } catch (RegionExistsException rex) {
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionStatsJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionStatsJUnitTest.java
index 6b935d7..e7da6b9 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionStatsJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionStatsJUnitTest.java
@@ -15,14 +15,23 @@
 
 package org.apache.geode.internal.cache;
 
-import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
+import static org.apache.geode.internal.cache.PartitionedRegionStats.bucketClearsId;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import java.io.File;
 import java.io.IOException;
 import java.util.Random;
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.stream.IntStream;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.logging.log4j.Logger;
@@ -35,10 +44,12 @@ import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.DataPolicy;
 import org.apache.geode.cache.EvictionAction;
 import org.apache.geode.cache.EvictionAttributes;
+import org.apache.geode.cache.Operation;
 import org.apache.geode.cache.PartitionAttributesFactory;
 import org.apache.geode.cache.PartitionedRegionStorageException;
 import org.apache.geode.cache.RegionExistsException;
 import org.apache.geode.cache.RegionFactory;
+import org.apache.geode.internal.statistics.StatisticsClock;
 import org.apache.geode.logging.internal.log4j.api.LogService;
 
 /**
@@ -48,6 +59,7 @@ import org.apache.geode.logging.internal.log4j.api.LogService;
  */
 public class PartitionedRegionStatsJUnitTest {
   private static final File DISK_DIR = new File("PRStatsTest");
+  public static final int NUMBER_OF_BUCKETS = 13;
   Logger logger = null;
 
   @Before
@@ -61,12 +73,10 @@ public class PartitionedRegionStatsJUnitTest {
     FileUtils.deleteDirectory(DISK_DIR);
   }
 
-  private PartitionedRegion createPR(String name, int lmax) {
+  private PartitionedRegion createPRWithCache(String name, int lmax, Cache cache) {
     PartitionAttributesFactory<Object, Object> paf = new PartitionAttributesFactory<>();
-    paf.setLocalMaxMemory(lmax).setRedundantCopies(0).setTotalNumBuckets(13); // set low to
-                                                                              // reduce
-                                                                              // logging
-    Cache cache = PartitionedRegionTestHelper.createCache();
+    // set low to reduce logging
+    paf.setLocalMaxMemory(lmax).setRedundantCopies(0).setTotalNumBuckets(NUMBER_OF_BUCKETS);
     PartitionedRegion pr;
     try {
       RegionFactory<Object, Object> regionFactory = cache.createRegionFactory();
@@ -78,13 +88,21 @@ public class PartitionedRegionStatsJUnitTest {
     return pr;
   }
 
+  private PartitionedRegion createPR(String name, int lmax) {
+    PartitionAttributesFactory<Object, Object> paf = new PartitionAttributesFactory<>();
+    // set low to reduce logging
+    paf.setLocalMaxMemory(lmax).setRedundantCopies(0).setTotalNumBuckets(NUMBER_OF_BUCKETS);
+
+    Cache cache = PartitionedRegionTestHelper.createCache();
+    return createPRWithCache(name, lmax, cache);
+  }
+
   private PartitionedRegion createPRWithEviction(String name, int lmax,
       boolean diskSync,
       boolean persistent) {
     PartitionAttributesFactory<Object, Object> paf = new PartitionAttributesFactory<>();
-    paf.setLocalMaxMemory(lmax).setRedundantCopies(0).setTotalNumBuckets(13); // set low to
-                                                                              // reduce
-                                                                              // logging
+    paf.setLocalMaxMemory(lmax).setRedundantCopies(0).setTotalNumBuckets(NUMBER_OF_BUCKETS);
+
     Cache cache = PartitionedRegionTestHelper.createCache();
     RegionFactory<Object, Object> regionFactory = cache.createRegionFactory();
     regionFactory.setPartitionAttributes(paf.create());
@@ -485,4 +503,166 @@ public class PartitionedRegionStatsJUnitTest {
 
     return bytes;
   }
+
+  @Test
+  public void incBucketClearCountIncrementsClears() {
+    String regionName = "testStats";
+    int localMaxMemory = 100;
+    PartitionedRegion pr = createPR(regionName + 1, localMaxMemory);
+
+    final long startTime = pr.getPrStats().startBucketClear();
+    pr.getPrStats().endBucketClear(startTime);
+
+    assertThat(pr.getPrStats().getStats().getLong(bucketClearsId)).isEqualTo(1L);
+    assertThat(pr.getCachePerfStats().getClearCount()).isEqualTo(0L);
+  }
+
+  @Test
+  public void bucketClearsWrapsFromMaxLongToNegativeValue() {
+    String regionName = "testStats";
+    int localMaxMemory = 100;
+    PartitionedRegion pr = createPR(regionName + 1, localMaxMemory);
+    PartitionedRegionStats partitionedRegionStats = pr.getPrStats();
+    partitionedRegionStats.getStats().incLong(bucketClearsId, Long.MAX_VALUE);
+
+    final long startTime = 1L;
+    partitionedRegionStats.endBucketClear(startTime);
+    assertThat(partitionedRegionStats.getBucketClearCount()).isNegative();
+  }
+
+  @Test
+  public void testPartitionedRegionClearStats() {
+    String regionName = "testStats";
+    int localMaxMemory = 100;
+    PartitionedRegion pr = createPR(regionName + 1, localMaxMemory);
+
+    final int bucketMax = pr.getTotalNumberOfBuckets();
+    for (long i = 0L; i < 10000; i++) {
+      try {
+        pr.put(i, i);
+      } catch (PartitionedRegionStorageException ex) {
+        this.logger.warn(ex);
+      }
+    }
+
+    assertThat(pr.getPrStats().getTotalBucketCount()).isEqualTo(bucketMax);
+    assertThat(pr.size()).isEqualTo(10000);
+    pr.clear();
+    assertThat(pr.size()).isEqualTo(0);
+    assertThat(pr.getPrStats().getStats().getLong(bucketClearsId)).isEqualTo(bucketMax);
+  }
+
+  @Test
+  public void testBasicPartitionedRegionClearTimeStat() {
+    String regionName = "testStats";
+    int localMaxMemory = 100;
+    PartitionedRegion pr = createPR(regionName + 1, localMaxMemory);
+    assertThat(pr.getPrStats().getBucketClearTime()).isEqualTo(0L);
+
+    long startTime = pr.getPrStats().startBucketClear();
+    startTime -= 137L;
+    pr.getPrStats().endBucketClear(startTime);
+    assertThat(pr.getPrStats().getBucketClearTime()).isGreaterThanOrEqualTo(137L);
+  }
+
+  private void putRecords(PartitionedRegion pr) {
+    IntStream.range(0, 1000).forEach(i -> pr.put(i, i));
+  }
+
+
+  @Test
+  public void testFullPartitionedRegionClearTimeStat() {
+    String regionName = "testStats";
+    final int localMaxMemory = 700;
+    final int LOTS_OF_RECORDS = 1000;
+    AtomicLong fakeTime = new AtomicLong(System.nanoTime());
+
+    // If one optimizes the code and converts to a lambda spy will fail
+    @SuppressWarnings({"Anonymous2MethodRef", "Convert2Lambda"})
+    StatisticsClock statisticsClock = spy(new StatisticsClock() {
+      @Override
+      public long getTime() {
+        return fakeTime.getAndIncrement();
+      }
+    });
+    InternalCache cache = PartitionedRegionTestHelper.createCache();
+    when(cache.getStatisticsClock()).thenReturn(statisticsClock);
+    PartitionedRegion pr = spy(createPR(regionName + 1, localMaxMemory));
+    when(pr.getStatisticsClock()).thenReturn(statisticsClock);
+
+    putRecords(pr);
+
+    assertThat(pr.size()).isEqualTo(LOTS_OF_RECORDS);
+
+    assertThat(pr.getPrStats().getBucketClearCount()).isEqualTo(0L);
+
+    assertThat(pr.getPrStats().getBucketClearTime()).isEqualTo(0L);
+
+
+    pr.clear();
+
+    // We know the clock should be called 7189 times if everything is working as expected
+    verify(statisticsClock, times(7189)).getTime();
+
+    assertThat(pr.getPrStats().getBucketClearCount()).isGreaterThan(0L);
+    assertThat(pr.getPrStats().getBucketClearTime())
+        .describedAs(
+            "Bucket Clear Time should be the number of buckets "
+                + "because of the fake clock that just increments")
+        .isEqualTo(NUMBER_OF_BUCKETS);
+  }
+
+  @Test
+  public void testBasicPartitionedRegionClearsInProgressStat() {
+    String regionName = "testStats";
+    int localMaxMemory = 100;
+    PartitionedRegion pr = createPR(regionName + 1, localMaxMemory);
+    assertThat(pr.getPrStats().getBucketClearsInProgress()).isEqualTo(0L);
+
+    final long startTime = pr.getPrStats().startBucketClear();
+    assertThat(pr.getPrStats().getBucketClearsInProgress()).isEqualTo(1L);
+    pr.getPrStats().endBucketClear(startTime);
+    assertThat(pr.getPrStats().getBucketClearsInProgress()).isEqualTo(0L);
+  }
+
+  @Test
+  public void testFullPartitionedRegionClearsInProgressStat() {
+    String regionName = "testStats";
+    int localMaxMemory = 100;
+    PartitionedRegion pr = spy(createPR(regionName + 1, localMaxMemory));
+    for (long i = 0L; i < 100; i++) {
+      try {
+        pr.put(i, i);
+      } catch (PartitionedRegionStorageException ex) {
+        this.logger.warn(ex);
+      }
+    }
+    PartitionedRegionStats partitionedRegionStats = spy(pr.getPrStats());
+    when(pr.getPrStats()).thenReturn(partitionedRegionStats);
+
+    BucketRegion actualBucketRegion = pr.getBucketRegion(0L);
+    assertThat((Object) actualBucketRegion).isNotNull();
+    InternalRegionArguments arguments = mock(InternalRegionArguments.class);
+    when(arguments.getPartitionedRegion()).thenReturn(pr);
+    when(arguments.getBucketAdvisor()).thenReturn(actualBucketRegion.getBucketAdvisor());
+    when(arguments.getPartitionedRegionBucketRedundancy())
+        .thenReturn(actualBucketRegion.getRedundancyLevel());
+    when(arguments.isUsedForPartitionedRegionBucket()).thenReturn(true);
+
+    BucketRegion bucketRegion =
+        new BucketRegion(pr.getName(), pr.getBucketRegion(0L).getAttributes(), pr.getRoot(),
+            PartitionedRegionTestHelper.getCache(), arguments,
+            pr.getStatisticsClock());
+    bucketRegion = spy(bucketRegion);
+
+
+    assertThat(pr.size()).isEqualTo(100);
+    RegionEventImpl event = new RegionEventImpl(bucketRegion, Operation.REGION_CLEAR, null,
+        false, bucketRegion.getMyId(), bucketRegion.generateEventID());
+    bucketRegion.basicClear(event);
+    assertThat(bucketRegion.getPartitionedRegion().getPrStats().getBucketClearCount())
+        .isEqualTo(1L);
+    verify(partitionedRegionStats, times(1)).startBucketClear();
+    verify(partitionedRegionStats, times(1)).endBucketClear(anyLong());
+  }
 }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
index 77b7083..150232d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
@@ -505,6 +505,8 @@ public abstract class AbstractRegion implements InternalRegion, AttributesMutato
     checkForLimitedOrNoAccess();
     RegionEventImpl regionEvent = new RegionEventImpl(this, Operation.REGION_CLEAR, null, false,
         getMyId(), generateEventID());
+
+
     basicClear(regionEvent);
   }
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java
index 5a49b19..55ee5ee 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java
@@ -14,6 +14,7 @@
  */
 package org.apache.geode.internal.cache;
 
+
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -337,20 +338,6 @@ public abstract class AbstractRegionMap extends BaseRegionMap
     }
   }
 
-  void incClearCount(LocalRegion lr) {
-    if (lr != null && !(lr instanceof HARegion)) {
-      CachePerfStats stats = lr.getCachePerfStats();
-      if (stats != null) {
-        if (lr.isUsedForPartitionedRegionBucket()) {
-          stats.incBucketClearCount();
-        } else {
-          stats.incRegionClearCount();
-        }
-
-      }
-    }
-  }
-
   private void _mapClear() {
     Executor executor = null;
     InternalCache cache = owner.getCache();
@@ -385,90 +372,96 @@ public abstract class AbstractRegionMap extends BaseRegionMap
     if (logger.isDebugEnabled()) {
       logger.debug("Clearing entries for {} rvv={}", _getOwner(), rvv);
     }
-    LocalRegion lr = _getOwner();
+    final LocalRegion lr = _getOwner();
     RegionVersionVector localRvv = lr.getVersionVector();
-    incClearCount(lr);
-    // lock for size calcs if the region might have tombstones
-    Object lockObj = lr.getConcurrencyChecksEnabled() ? lr.getSizeGuard() : new Object();
-    synchronized (lockObj) {
-      if (rvv == null) {
-        int delta = 0;
-        try {
-          delta = sizeInVM(); // TODO soplog need to determine if stats should
-                              // reflect only size in memory or the complete thing
-        } catch (GemFireIOException e) {
-          // ignore rather than throwing an exception during cache close
-        }
-        int tombstones = lr.getTombstoneCount();
-        _mapClear();
-        _getOwner().updateSizeOnClearRegion(delta - tombstones);
-        _getOwner().incTombstoneCount(-tombstones);
-        if (delta != 0) {
-          incEntryCount(-delta);
-        }
-      } else {
-        int delta = 0;
-        int tombstones = 0;
-        VersionSource myId = _getOwner().getVersionMember();
-        if (localRvv != rvv) {
-          localRvv.recordGCVersions(rvv);
-        }
-        final boolean isTraceEnabled = logger.isTraceEnabled();
-        for (RegionEntry re : regionEntries()) {
-          synchronized (re) {
-            Token value = re.getValueAsToken();
-            // if it's already being removed or the entry is being created we leave it alone
-            if (value == Token.REMOVED_PHASE1 || value == Token.REMOVED_PHASE2) {
-              continue;
-            }
 
-            VersionSource id = re.getVersionStamp().getMemberID();
-            if (id == null) {
-              id = myId;
-            }
-            if (rvv.contains(id, re.getVersionStamp().getRegionVersion())) {
-              if (isTraceEnabled) {
-                logger.trace("region clear op is removing {} {}", re.getKey(),
-                    re.getVersionStamp());
+    final long startTime = lr.startClear();
+
+    try {
+      // lock for size calcs if the region might have tombstones
+      Object lockObj = lr.getConcurrencyChecksEnabled() ? lr.getSizeGuard() : new Object();
+      synchronized (lockObj) {
+        if (rvv == null) {
+          int delta = 0;
+          try {
+            delta = sizeInVM(); // TODO soplog need to determine if stats should
+            // reflect only size in memory or the complete thing
+          } catch (GemFireIOException e) {
+            // ignore rather than throwing an exception during cache close
+          }
+          int tombstones = lr.getTombstoneCount();
+          _mapClear();
+          _getOwner().updateSizeOnClearRegion(delta - tombstones);
+          _getOwner().incTombstoneCount(-tombstones);
+          if (delta != 0) {
+            incEntryCount(-delta);
+          }
+        } else {
+          int delta = 0;
+          int tombstones = 0;
+          VersionSource myId = _getOwner().getVersionMember();
+          if (localRvv != rvv) {
+            localRvv.recordGCVersions(rvv);
+          }
+          final boolean isTraceEnabled = logger.isTraceEnabled();
+          for (RegionEntry re : regionEntries()) {
+            synchronized (re) {
+              Token value = re.getValueAsToken();
+              // if it's already being removed or the entry is being created we leave it alone
+              if (value == Token.REMOVED_PHASE1 || value == Token.REMOVED_PHASE2) {
+                continue;
               }
 
-              boolean tombstone = re.isTombstone();
-              // note: it.remove() did not reliably remove the entry so we use remove(K,V) here
-              if (getEntryMap().remove(re.getKey(), re)) {
-                if (OffHeapClearRequired.doesClearNeedToCheckForOffHeap()) {
-                  GatewaySenderEventImpl.release(re.getValue()); // OFFHEAP _getValue ok
-                }
-                // If this is an overflow only region, we need to free the entry on
-                // disk at this point.
-                try {
-                  re.removePhase1(lr, true);
-                } catch (RegionClearedException e) {
-                  // do nothing, it's already cleared.
+              VersionSource id = re.getVersionStamp().getMemberID();
+              if (id == null) {
+                id = myId;
+              }
+              if (rvv.contains(id, re.getVersionStamp().getRegionVersion())) {
+                if (isTraceEnabled) {
+                  logger.trace("region clear op is removing {} {}", re.getKey(),
+                      re.getVersionStamp());
                 }
-                re.removePhase2();
-                lruEntryDestroy(re);
-                if (tombstone) {
-                  _getOwner().incTombstoneCount(-1);
-                  tombstones += 1;
-                } else {
-                  delta += 1;
+
+                boolean tombstone = re.isTombstone();
+                // note: it.remove() did not reliably remove the entry so we use remove(K,V) here
+                if (getEntryMap().remove(re.getKey(), re)) {
+                  if (OffHeapClearRequired.doesClearNeedToCheckForOffHeap()) {
+                    GatewaySenderEventImpl.release(re.getValue()); // OFFHEAP _getValue ok
+                  }
+                  // If this is an overflow only region, we need to free the entry on
+                  // disk at this point.
+                  try {
+                    re.removePhase1(lr, true);
+                  } catch (RegionClearedException e) {
+                    // do nothing, it's already cleared.
+                  }
+                  re.removePhase2();
+                  lruEntryDestroy(re);
+                  if (tombstone) {
+                    _getOwner().incTombstoneCount(-1);
+                    tombstones += 1;
+                  } else {
+                    delta += 1;
+                  }
                 }
+              } else { // rvv does not contain this entry so it is retained
+                result.add(id);
               }
-            } else { // rvv does not contain this entry so it is retained
-              result.add(id);
             }
           }
-        }
-        _getOwner().updateSizeOnClearRegion(delta);
-        incEntryCount(-delta);
-        incEntryCount(-tombstones);
-        if (logger.isDebugEnabled()) {
-          logger.debug("Size after clearing = {}", getEntryMap().size());
-        }
-        if (isTraceEnabled && getEntryMap().size() < 20) {
-          _getOwner().dumpBackingMap();
+          _getOwner().updateSizeOnClearRegion(delta);
+          incEntryCount(-delta);
+          incEntryCount(-tombstones);
+          if (logger.isDebugEnabled()) {
+            logger.debug("Size after clearing = {}", getEntryMap().size());
+          }
+          if (isTraceEnabled && getEntryMap().size() < 20) {
+            _getOwner().dumpBackingMap();
+          }
         }
       }
+    } finally {
+      lr.endClear(startTime);
     }
     return result;
   }
@@ -696,7 +689,7 @@ public abstract class AbstractRegionMap extends BaseRegionMap
         }
         // incEntryCount is called for a tombstone because scheduleTombstone does entryCount--.
         incEntryCount(1); // we are creating an entry that was recovered from disk including
-                          // tombstone
+        // tombstone
       }
       lruEntryUpdate(newRe);
       needsCallback = true;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
index 4e6ee18..21475c9 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
@@ -588,8 +588,8 @@ public class BucketRegion extends DistributedRegion implements Bucket {
     // get rvvLock
     Set<InternalDistributedMember> participants =
         getCacheDistributionAdvisor().adviseInvalidateRegion();
-
     try {
+
       obtainWriteLocksForClear(regionEvent, participants);
       // no need to dominate my own rvv.
       // Clear is on going here, there won't be GII for this member
@@ -2149,13 +2149,6 @@ public class BucketRegion extends DistributedRegion implements Bucket {
 
   @Override
   void updateSizeOnClearRegion(int sizeBeforeClear) {
-    // This method is only called when the bucket is destroyed. If we
-    // start supporting clear of partitioned regions, this logic needs to change
-    // we can't just set these counters to zero, because there could be
-    // concurrent operations that are also updating these stats. For example,
-    // a destroy could have already been applied to the map, and then updates
-    // the stat after we reset it, making the state negative.
-
     final PartitionedRegionDataStore prDs = partitionedRegion.getDataStore();
     long oldMemValue;
 
@@ -2598,4 +2591,19 @@ public class BucketRegion extends DistributedRegion implements Bucket {
     basicClear(regionEvent, false);
   }
 
+  @Override
+  public long startClear() {
+    return getPartitionedRegion().getPrStats().startBucketClear();
+  }
+
+  @Override
+  public void endClear(long startTime) {
+    getPartitionedRegion().getPrStats().endBucketClear(startTime);
+  }
+
+  @Override
+  public void clear() {
+    throw new UnsupportedOperationException("BucketRegion.clear should never be called");
+  }
+
 }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java
index 6f18b55..5a92124 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java
@@ -118,11 +118,9 @@ public class CachePerfStats {
   static final int indexUpdateInProgressId;
   static final int indexUpdateCompletedId;
   static final int indexUpdateTimeId;
-  static final int bucketClearsId;
-  static final int regionClearsId;
-  static final int partitionedRegionClearLocalDurationId;
-  static final int partitionedRegionClearTotalDurationId;
-
+  static final int clearsId;
+  static final int clearTimeId;
+  static final int clearsInProgressId;
   private static final int indexInitializationInProgressId;
   private static final int indexInitializationCompletedId;
   private static final int indexInitializationTimeId;
@@ -292,14 +290,12 @@ public class CachePerfStats {
         "Current number of regions configured for reliablity that are missing required roles with Limited access";
     final String reliableRegionsMissingNoAccessDesc =
         "Current number of regions configured for reliablity that are missing required roles with No access";
-    final String regionClearsDesc =
+    final String clearsDesc =
         "The total number of times a clear has been done on this cache.";
-    final String bucketClearsDesc =
-        "The total number of times a clear has been done on this region and it's bucket regions";
-    final String partitionedRegionClearLocalDurationDesc =
-        "The time in nanoseconds partitioned region clear has been running for the region on this member";
-    final String partitionedRegionClearTotalDurationDesc =
-        "The time in nanoseconds partitioned region clear has been running for the region with this member as coordinator.";
+    final String clearTimeDesc =
+        "The total time spent performing clears in nanoseconds.";
+    final String clearsInProgressDesc =
+        "The number of clears currently in progress.";
     final String metaDataRefreshCountDesc =
         "Total number of times the meta data is refreshed due to hopping observed.";
     final String conflatedEventsDesc =
@@ -481,13 +477,10 @@ public class CachePerfStats {
             f.createLongCounter("retries",
                 "Number of times a concurrent destroy followed by a create has caused an entry operation to need to retry.",
                 "operations"),
-            f.createLongCounter("regionClears", regionClearsDesc, "operations"),
-            f.createLongCounter("bucketClears", bucketClearsDesc, "operations"),
-            f.createLongCounter("partitionedRegionClearLocalDuration",
-                partitionedRegionClearLocalDurationDesc, "nanoseconds"),
-            f.createLongCounter("partitionedRegionClearTotalDuration",
-                partitionedRegionClearTotalDurationDesc, "nanoseconds"),
-            f.createLongGauge("diskTasksWaiting",
+            f.createLongCounter("clears", clearsDesc, "operations"),
+            f.createLongGauge("clearsInProgress", clearsInProgressDesc, "operations"),
+            f.createLongCounter("clearTime", clearTimeDesc, "nanoseconds"),
+            f.createIntGauge("diskTasksWaiting",
                 "Current number of disk tasks (oplog compactions, asynchronous recoveries, etc) that are waiting for a thread to run the operation",
                 "operations"),
             f.createLongCounter("conflatedEvents", conflatedEventsDesc, "operations"),
@@ -630,11 +623,9 @@ public class CachePerfStats {
     eventsQueuedId = type.nameToId("eventsQueued");
 
     retriesId = type.nameToId("retries");
-    regionClearsId = type.nameToId("regionClears");
-    bucketClearsId = type.nameToId("bucketClears");
-    partitionedRegionClearLocalDurationId = type.nameToId("partitionedRegionClearLocalDuration");
-    partitionedRegionClearTotalDurationId = type.nameToId("partitionedRegionClearTotalDuration");
-
+    clearsId = type.nameToId("clears");
+    clearTimeId = type.nameToId("clearTime");
+    clearsInProgressId = type.nameToId("clearsInProgress");
     diskTasksWaitingId = type.nameToId("diskTasksWaiting");
     evictorJobsStartedId = type.nameToId("evictorJobsStarted");
     evictorJobsCompletedId = type.nameToId("evictorJobsCompleted");
@@ -1423,36 +1414,32 @@ public class CachePerfStats {
     };
   }
 
-  public long getRegionClearCount() {
-    return stats.getLong(regionClearsId);
-  }
-
-  public long getBucketClearCount() {
-    return stats.getLong(bucketClearsId);
-  }
-
-  public long getPartitionedRegionClearLocalDuration() {
-    return stats.getLong(partitionedRegionClearLocalDurationId);
+  public long getClearCount() {
+    return stats.getLong(clearsId);
   }
 
-  public long getPartitionedRegionClearTotalDuration() {
-    return stats.getLong(partitionedRegionClearTotalDurationId);
-  }
-
-  public void incRegionClearCount() {
-    stats.incLong(regionClearsId, 1L);
+  public long startClear() {
+    stats.incLong(clearsInProgressId, 1L);
+    return getTime();
   }
 
-  public void incBucketClearCount() {
-    stats.incLong(bucketClearsId, 1L);
+  public long endClear(long startTime) {
+    long timeTaken = 0L;
+    if (clock.isEnabled()) {
+      timeTaken = getTime() - startTime;
+      stats.incLong(clearTimeId, timeTaken);
+    }
+    stats.incLong(clearsInProgressId, -1L);
+    stats.incLong(clearsId, 1L);
+    return timeTaken;
   }
 
-  public void incPartitionedRegionClearLocalDuration(long durationNanos) {
-    stats.incLong(partitionedRegionClearLocalDurationId, durationNanos);
+  public long getClearTime() {
+    return stats.getLong(clearTimeId);
   }
 
-  public void incPartitionedRegionClearTotalDuration(long durationNanos) {
-    stats.incLong(partitionedRegionClearTotalDurationId, durationNanos);
+  public long getClearsInProgress() {
+    return stats.getLong(clearsInProgressId);
   }
 
   public long getConflatedEventsCount() {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DummyCachePerfStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DummyCachePerfStats.java
index 1e3d30b..3b6a7bb 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DummyCachePerfStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DummyCachePerfStats.java
@@ -374,4 +374,14 @@ public class DummyCachePerfStats extends CachePerfStats {
     };
   }
 
+  @Override
+  public long startClear() {
+    return 0L;
+  }
+
+  @Override
+  public long endClear(long startTime) {
+    return 0L;
+  }
+
 }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index 3cc44f1..4b14592 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -1012,9 +1012,9 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
       // Create the CacheStatistics
       statisticsClock = StatisticsClockFactory.clock(system.getConfig().getEnableTimeStatistics());
       cachePerfStats = cachePerfStatsFactory.create(
-          internalDistributedSystem.getStatisticsManager(), statisticsClock);
+          internalDistributedSystem.getStatisticsManager(), getStatisticsClock());
 
-      transactionManager = txManagerImplFactory.create(cachePerfStats, this, statisticsClock);
+      transactionManager = txManagerImplFactory.create(cachePerfStats, this, getStatisticsClock());
       dm.addMembershipListener(transactionManager);
 
       creationDate = new Date();
@@ -2102,7 +2102,7 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
     synchronized (heapEvictorLock) {
       stopper.checkCancelInProgress(null);
       if (heapEvictor == null) {
-        heapEvictor = heapEvictorFactory.create(this, statisticsClock);
+        heapEvictor = heapEvictorFactory.create(this, getStatisticsClock());
       }
       return heapEvictor;
     }
@@ -2114,7 +2114,7 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
     synchronized (offHeapEvictorLock) {
       stopper.checkCancelInProgress(null);
       if (offHeapEvictor == null) {
-        offHeapEvictor = new OffHeapEvictor(this, statisticsClock);
+        offHeapEvictor = new OffHeapEvictor(this, getStatisticsClock());
       }
       return offHeapEvictor;
     }
@@ -3057,7 +3057,7 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
               region = internalRegionArgs.getInternalMetaRegion();
             } else if (isPartitionedRegion) {
               region = new PartitionedRegion(name, attrs, null, this, internalRegionArgs,
-                  statisticsClock, ColocationLoggerFactory.create());
+                  getStatisticsClock(), ColocationLoggerFactory.create());
             } else {
               // Abstract region depends on the default pool existing so lazily initialize it
               // if necessary.
@@ -3066,10 +3066,11 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
               }
               if (attrs.getScope().isLocal()) {
                 region =
-                    new LocalRegion(name, attrs, null, this, internalRegionArgs, statisticsClock);
+                    new LocalRegion(name, attrs, null, this, internalRegionArgs,
+                        getStatisticsClock());
               } else {
                 region = new DistributedRegion(name, attrs, null, this, internalRegionArgs,
-                    statisticsClock);
+                    getStatisticsClock());
               }
             }
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
index 1c0abe4..b71fb29 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
@@ -8460,7 +8460,6 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
 
     RegionEventImpl event = new ClientRegionEventImpl(this, Operation.REGION_CLEAR, callbackArg,
         false, client.getDistributedMember(), client, eventId);
-
     basicClear(event, true);
   }
 
@@ -8654,7 +8653,12 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
   @Override
   void basicLocalClear(RegionEventImpl rEvent) {
     getDataView().checkSupportsRegionClear();
-    cmnClearRegion(rEvent, false/* cacheWrite */, false/* useRVV */);
+    final long startTime = startClear();
+    try {
+      cmnClearRegion(rEvent, false/* cacheWrite */, false/* useRVV */);
+    } finally {
+      endClear(startTime);
+    }
   }
 
   @Override
@@ -10899,6 +10903,15 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
     }
   }
 
+  public long startClear() {
+    return getCachePerfStats().startClear();
+  }
+
+  public void endClear(long startTime) {
+    getCachePerfStats().endClear(startTime);
+  }
+
+
   @Override
   public long getVersionForMember(VersionSource member) {
     throw new IllegalStateException("Operation only implemented for disk region");
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
index 91adc45..c5999c8 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
@@ -571,13 +571,6 @@ public class PartitionedRegion extends LocalRegion
     return partitionListeners;
   }
 
-  public CachePerfStats getRegionCachePerfStats() {
-    if (dataStore != null && dataStore.getAllLocalBucketRegions().size() > 0) {
-      BucketRegion bucket = dataStore.getAllLocalBucketRegions().iterator().next();
-      return bucket.getCachePerfStats();
-    }
-    return null;
-  }
 
   /**
    * Return canonical representation for a bucket (for logging)
@@ -8086,6 +8079,11 @@ public class PartitionedRegion extends LocalRegion
       maxTimeInRetry = maxTime;
     }
 
+    public RetryTimeKeeper(long maxTime) {
+      this.maxTimeInRetry = maxTime;
+    }
+
+
     /**
      * wait for {@link PartitionedRegionHelper#DEFAULT_WAIT_PER_RETRY_ITERATION}, updating the total
      * wait time. Use this method when the same node has been selected for consecutive attempts with
@@ -10145,10 +10143,25 @@ public class PartitionedRegion extends LocalRegion
   }
 
   @Override
+  public void endClear(long startTime) {
+    getCachePerfStats().endClear(startTime);
+  }
+
+  @Override
+  public long startClear() {
+    return getCachePerfStats().startClear();
+  }
+
+  @Override
   void cmnClearRegion(RegionEventImpl regionEvent, boolean cacheWrite, boolean useRVV) {
     // Synchronized to avoid other threads invoking clear on this vm/node.
-    synchronized (clearLock) {
-      partitionedRegionClear.doClear(regionEvent, cacheWrite);
+    final long startTime = startClear();
+    try {
+      synchronized (clearLock) {
+        partitionedRegionClear.doClear(regionEvent, cacheWrite);
+      }
+    } finally {
+      endClear(startTime);
     }
   }
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
index 8403306..cd9cef2 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
@@ -19,6 +19,7 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.logging.log4j.Logger;
 
@@ -46,9 +47,7 @@ public class PartitionedRegionClear {
   private static final Logger logger = LogService.getLogger();
 
   protected static final String CLEAR_OPERATION = "_clearOperation";
-
-  private final int retryTime = 2 * 60 * 1000;
-
+  private static final long RETRY_TIME = TimeUnit.MINUTES.toMillis(2);
   private final PartitionedRegion partitionedRegion;
 
   private final DistributedLockService distributedLockService;
@@ -194,7 +193,7 @@ public class PartitionedRegionClear {
    */
   public Set<Integer> clearRegionLocal(RegionEventImpl regionEvent) {
     Set<Integer> clearedBuckets = new HashSet<>();
-    long clearStartTime = System.nanoTime();
+
     setMembershipChange(false);
     // Synchronized to handle the requester departure.
     synchronized (lockForListenerAndClientNotification) {
@@ -203,7 +202,7 @@ public class PartitionedRegionClear {
         try {
           boolean retry;
           do {
-            waitForPrimary(new PartitionedRegion.RetryTimeKeeper(retryTime));
+            waitForPrimary(new PartitionedRegion.RetryTimeKeeper(RETRY_TIME));
             RegionEventImpl bucketRegionEvent;
             for (BucketRegion localPrimaryBucketRegion : partitionedRegion.getDataStore()
                 .getAllLocalPrimaryBucketRegions()) {
@@ -228,11 +227,7 @@ public class PartitionedRegionClear {
           doAfterClear(regionEvent);
         } finally {
           partitionedRegion.getDataStore().unlockBucketCreationForRegionClear();
-          if (clearedBuckets.size() != 0 && partitionedRegion.getCachePerfStats() != null) {
-            partitionedRegion.getRegionCachePerfStats().incRegionClearCount();
-            partitionedRegion.getRegionCachePerfStats()
-                .incPartitionedRegionClearLocalDuration(System.nanoTime() - clearStartTime);
-          }
+
         }
       } else {
         // Non data-store with client queue and listener
@@ -435,14 +430,12 @@ public class PartitionedRegionClear {
 
   void doClear(RegionEventImpl regionEvent, boolean cacheWrite) {
     String lockName = CLEAR_OPERATION + partitionedRegion.getName();
-    long clearStartTime = 0;
 
     allServerVersionsSupportPartitionRegionClear();
 
     try {
       // distributed lock to make sure only one clear op is in progress in the cluster.
       acquireDistributedClearLock(lockName);
-      clearStartTime = System.nanoTime();
 
       // Force all primary buckets to be created before clear.
       assignAllPrimaryBuckets();
@@ -483,11 +476,6 @@ public class PartitionedRegionClear {
       }
     } finally {
       releaseDistributedClearLock(lockName);
-      CachePerfStats stats = partitionedRegion.getRegionCachePerfStats();
-      if (stats != null) {
-        partitionedRegion.getRegionCachePerfStats()
-            .incPartitionedRegionClearTotalDuration(System.nanoTime() - clearStartTime);
-      }
     }
   }
 
@@ -514,7 +502,7 @@ public class PartitionedRegionClear {
     }
   }
 
-  class LockForListenerAndClientNotification {
+  static class LockForListenerAndClientNotification {
 
     private boolean locked = false;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionStats.java
index 8e2cf51..3affce5 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionStats.java
@@ -176,8 +176,17 @@ public class PartitionedRegionStats {
   private static final int prMetaDataSentCountId;
 
   private static final int localMaxMemoryId;
+  static final int bucketClearsId;
+  static final int bucketClearTimeId;
+  static final int bucketClearsInProgressId;
 
   static {
+    final String bucketClearsDesc =
+        "The total number of times a bucket of this partitioned region has been cleared";
+    final String bucketClearTimeDesc =
+        "The total amount of time, in nanoseconds, spent clearing buckets on this partitioned region";
+    final String bucketClearsInProgressDesc =
+        "The current number bucket clears on this partitioned region that are in progress";
 
     StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
     type = f.createType("PartitionedRegionStats",
@@ -426,6 +435,9 @@ public class PartitionedRegionStats {
 
             f.createLongGauge("localMaxMemory",
                 "local max memory in bytes for this region on this member", "bytes"),
+            f.createLongCounter("bucketClears", bucketClearsDesc, "operations"),
+            f.createLongCounter("bucketClearTime", bucketClearTimeDesc, "nanoseconds"),
+            f.createLongCounter("bucketClearsInProgress", bucketClearsInProgressDesc, "operations")
         });
 
     bucketCountId = type.nameToId("bucketCount");
@@ -530,6 +542,10 @@ public class PartitionedRegionStats {
     prMetaDataSentCountId = type.nameToId("prMetaDataSentCount");
 
     localMaxMemoryId = type.nameToId("localMaxMemory");
+
+    bucketClearsId = type.nameToId("bucketClears");
+    bucketClearsInProgressId = type.nameToId("bucketClearsInProgress");
+    bucketClearTimeId = type.nameToId("bucketClearTime");
   }
 
   private final Statistics stats;
@@ -1191,6 +1207,20 @@ public class PartitionedRegionStats {
     stats.incLong(putLocalTimeId, delta);
   }
 
+  public long startBucketClear() {
+    stats.incLong(bucketClearsInProgressId, 1L);
+    return clock.getTime();
+  }
+
+  public void endBucketClear(long start) {
+    stats.incLong(bucketClearsId, 1);
+    stats.incLong(bucketClearsInProgressId, -1L);
+    if (clock.isEnabled()) {
+      long delta = clock.getTime() - start;
+      stats.incLong(bucketClearTimeId, delta);
+    }
+  }
+
   public void incPRMetaDataSentCount() {
     stats.incLong(prMetaDataSentCountId, 1);
   }
@@ -1198,4 +1228,21 @@ public class PartitionedRegionStats {
   public long getPRMetaDataSentCount() {
     return stats.getLong(prMetaDataSentCountId);
   }
+
+  public long getBucketClearCount() {
+    return stats.getLong(bucketClearsId);
+  }
+
+  public void incBucketClearTime(Long nanoseconds) {
+    stats.incLong(bucketClearTimeId, nanoseconds);
+  }
+
+  public long getBucketClearTime() {
+    return stats.getLong(bucketClearTimeId);
+  }
+
+  public long getBucketClearsInProgress() {
+    return stats.getLong(bucketClearsInProgressId);
+  }
+
 }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionPerfStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionPerfStats.java
index cfdc8b6..54c7e1d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionPerfStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionPerfStats.java
@@ -519,16 +519,29 @@ class RegionPerfStats extends CachePerfStats implements RegionStats {
     cachePerfStats.incEvictWorkTime(delta);
   }
 
+  private void startClearLocal() {
+    stats.incLong(clearsInProgressId, 1L);
+  }
+
+  private void endClearLocal(long timeTaken) {
+    stats.incLong(clearsInProgressId, -1L);
+    stats.incLong(clearsId, 1L);
+    if (clock.isEnabled()) {
+      stats.incLong(clearTimeId, timeTaken);
+    }
+  }
+
   @Override
-  public void incRegionClearCount() {
-    stats.incLong(regionClearsId, 1L);
-    cachePerfStats.incRegionClearCount();
+  public long startClear() {
+    startClearLocal();
+    return cachePerfStats.startClear();
   }
 
   @Override
-  public void incBucketClearCount() {
-    stats.incLong(bucketClearsId, 1L);
-    cachePerfStats.incBucketClearCount();
+  public long endClear(long startTime) {
+    long timeTaken = cachePerfStats.endClear(startTime);
+    endClearLocal(timeTaken);
+    return timeTaken;
   }
 
   @Override
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionStats.java
index 8f1e0a4..6898f6d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionStats.java
@@ -135,9 +135,9 @@ public interface RegionStats {
 
   void incEvictWorkTime(long delta);
 
-  void incBucketClearCount();
+  long startClear();
 
-  void incRegionClearCount();
+  long endClear(long startTime);
 
   void incPRQueryRetries();
 
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java
index a80e667..c9b9126 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java
@@ -14,9 +14,10 @@
  */
 package org.apache.geode.internal.cache;
 
-import static org.apache.geode.internal.cache.CachePerfStats.bucketClearsId;
 import static org.apache.geode.internal.cache.CachePerfStats.cacheListenerCallsCompletedId;
 import static org.apache.geode.internal.cache.CachePerfStats.cacheWriterCallsCompletedId;
+import static org.apache.geode.internal.cache.CachePerfStats.clearTimeId;
+import static org.apache.geode.internal.cache.CachePerfStats.clearsId;
 import static org.apache.geode.internal.cache.CachePerfStats.createsId;
 import static org.apache.geode.internal.cache.CachePerfStats.deltaFailedUpdatesId;
 import static org.apache.geode.internal.cache.CachePerfStats.deltaFullValuesRequestedId;
@@ -43,14 +44,11 @@ import static org.apache.geode.internal.cache.CachePerfStats.loadsCompletedId;
 import static org.apache.geode.internal.cache.CachePerfStats.missesId;
 import static org.apache.geode.internal.cache.CachePerfStats.netloadsCompletedId;
 import static org.apache.geode.internal.cache.CachePerfStats.netsearchesCompletedId;
-import static org.apache.geode.internal.cache.CachePerfStats.partitionedRegionClearLocalDurationId;
-import static org.apache.geode.internal.cache.CachePerfStats.partitionedRegionClearTotalDurationId;
 import static org.apache.geode.internal.cache.CachePerfStats.previouslySeenEventsId;
 import static org.apache.geode.internal.cache.CachePerfStats.putAllsId;
 import static org.apache.geode.internal.cache.CachePerfStats.putTimeId;
 import static org.apache.geode.internal.cache.CachePerfStats.putsId;
 import static org.apache.geode.internal.cache.CachePerfStats.queryExecutionsId;
-import static org.apache.geode.internal.cache.CachePerfStats.regionClearsId;
 import static org.apache.geode.internal.cache.CachePerfStats.removeAllsId;
 import static org.apache.geode.internal.cache.CachePerfStats.retriesId;
 import static org.apache.geode.internal.cache.CachePerfStats.txCommitChangesId;
@@ -432,60 +430,30 @@ public class CachePerfStatsTest {
 
   @Test
   public void getClearsDelegatesToStatistics() {
-    statistics.incLong(regionClearsId, Long.MAX_VALUE);
+    statistics.incLong(clearsId, Long.MAX_VALUE);
 
-    assertThat(cachePerfStats.getRegionClearCount()).isEqualTo(Long.MAX_VALUE);
+    assertThat(cachePerfStats.getClearCount()).isEqualTo(Long.MAX_VALUE);
   }
 
   @Test
   public void incRegionClearCountIncrementsClears() {
-    cachePerfStats.incRegionClearCount();
+    cachePerfStats.stats.incLong(clearsId, 1L);
 
-    assertThat(statistics.getLong(regionClearsId)).isEqualTo(1L);
+    assertThat(statistics.getLong(clearsId)).isEqualTo(1L);
   }
 
-  @Test
-  public void incBucketClearCountIncrementsClears() {
-    cachePerfStats.incBucketClearCount();
-
-    assertThat(statistics.getLong(bucketClearsId)).isEqualTo(1L);
-  }
-
-  @Test
-  public void incPartitionedRegionClearLocalDurationIncrementsPartitionedRegionClearLocalDuration() {
-    cachePerfStats.incPartitionedRegionClearLocalDuration(100L);
-
-    assertThat(statistics.getLong(partitionedRegionClearLocalDurationId)).isEqualTo(100L);
-  }
-
-
-
-  @Test
-  public void incPartitionedRegionClearTotalDurationIncrementsPartitionedRegionClearTotalDuration() {
-    cachePerfStats.incPartitionedRegionClearTotalDuration(100L);
 
-    assertThat(statistics.getLong(partitionedRegionClearTotalDurationId)).isEqualTo(100L);
-  }
 
   /**
    * Characterization test: {@code clears} currently wraps to negative from max long value.
    */
   @Test
   public void regionClearsWrapsFromMaxLongToNegativeValue() {
-    statistics.incLong(regionClearsId, Long.MAX_VALUE);
-
-    cachePerfStats.incRegionClearCount();
-
-    assertThat(cachePerfStats.getRegionClearCount()).isNegative();
-  }
-
-  @Test
-  public void bucketClearsWrapsFromMaxLongToNegativeValue() {
-    statistics.incLong(bucketClearsId, Long.MAX_VALUE);
+    statistics.incLong(clearsId, Long.MAX_VALUE);
 
-    cachePerfStats.incBucketClearCount();
+    cachePerfStats.stats.incLong(clearsId, 1L);
 
-    assertThat(cachePerfStats.getBucketClearCount()).isNegative();
+    assertThat(cachePerfStats.getClearCount()).isNegative();
   }
 
   @Test
@@ -1282,4 +1250,18 @@ public class CachePerfStatsTest {
 
     assertThat(statistics.getLong(previouslySeenEventsId)).isEqualTo(1L);
   }
+
+  @Test
+  public void testBasicClearTime() {
+    assertThat(cachePerfStats.getStats().getLong(clearTimeId)).isEqualTo(0L);
+    assertThat(cachePerfStats.getClearTime()).isEqualTo(0L);
+
+    cachePerfStats.getStats().incLong(clearTimeId, 1L);
+    assertThat(cachePerfStats.getStats().getLong(clearTimeId)).isEqualTo(1L);
+    assertThat(cachePerfStats.getClearTime()).isEqualTo(1L);
+
+    cachePerfStats.stats.incLong(clearTimeId, 1L);
+    assertThat(cachePerfStats.getStats().getLong(clearTimeId)).isEqualTo(2L);
+    assertThat(cachePerfStats.getClearTime()).isEqualTo(2L);
+  }
 }
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java
index 02c7a9d..02298c7 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java
@@ -93,9 +93,7 @@ public class PartitionedRegionTest {
   private InternalCache cache;
   private InternalDistributedSystem system;
   private DistributionManager distributionManager;
-  private InternalResourceManager resourceManager;
   private AttributesFactory attributesFactory;
-
   private PartitionedRegion partitionedRegion;
 
   @Rule
@@ -109,9 +107,9 @@ public class PartitionedRegionTest {
     InternalResourceManager resourceManager = mock(InternalResourceManager.class);
 
     cache = mock(InternalCache.class);
-    attributesFactory = new AttributesFactory();
+    attributesFactory = new AttributesFactory<>();
     attributesFactory.setPartitionAttributes(
-        new PartitionAttributesFactory().setTotalNumBuckets(1).setRedundantCopies(1).create());
+        new PartitionAttributesFactory<>().setTotalNumBuckets(1).setRedundantCopies(1).create());
 
     when(cache.getDistributedSystem())
         .thenReturn(system);
@@ -211,6 +209,7 @@ public class PartitionedRegionTest {
     verify(spyPartitionedRegion)
         .updatePRConfig(partitionRegionConfig, false);
 
+    assertThat(verifyOurNode).isNotNull();
     assertThat(verifyOurNode.isCacheLoaderAttached())
         .isEqualTo(cacheLoader != null);
     assertThat(verifyOurNode.isCacheWriterAttached())
@@ -231,7 +230,6 @@ public class PartitionedRegionTest {
     // ARRANGE
     EntryEventImpl clientEvent = mock(EntryEventImpl.class);
     InternalDistributedMember primaryMember = mock(InternalDistributedMember.class);
-    InternalDistributedMember secondaryMember = mock(InternalDistributedMember.class);
     PartitionedRegion spyPartitionedRegion = spy(partitionedRegion);
 
     when(clientEvent.getOperation())
@@ -256,7 +254,6 @@ public class PartitionedRegionTest {
   public void getBucketNodeForReadOrWriteReturnsSecondaryNodeForNonRegisterInterest() {
     // ARRANGE
     EntryEventImpl clientEvent = mock(EntryEventImpl.class);
-    InternalDistributedMember primaryMember = mock(InternalDistributedMember.class);
     InternalDistributedMember secondaryMember = mock(InternalDistributedMember.class);
     PartitionedRegion spyPartitionedRegion = spy(partitionedRegion);
 
@@ -281,7 +278,6 @@ public class PartitionedRegionTest {
   @Test
   public void getBucketNodeForReadOrWriteReturnsSecondaryNodeWhenClientEventIsNotPresent() {
     // ARRANGE
-    InternalDistributedMember primaryMember = mock(InternalDistributedMember.class);
     InternalDistributedMember secondaryMember = mock(InternalDistributedMember.class);
     PartitionedRegion spyPartitionedRegion = spy(partitionedRegion);
 
@@ -303,7 +299,6 @@ public class PartitionedRegionTest {
   @Test
   public void getBucketNodeForReadOrWriteReturnsSecondaryNodeWhenClientEventOperationIsNotPresent() {
     // ARRANGE
-    InternalDistributedMember primaryMember = mock(InternalDistributedMember.class);
     InternalDistributedMember secondaryMember = mock(InternalDistributedMember.class);
     PartitionedRegion spyPartitionedRegion = spy(partitionedRegion);
 
@@ -326,7 +321,6 @@ public class PartitionedRegionTest {
   public void updateBucketMapsForInterestRegistrationWithSetOfKeysFetchesPrimaryBucketsForRead() {
     // ARRANGE
     InternalDistributedMember primaryMember = mock(InternalDistributedMember.class);
-    InternalDistributedMember secondaryMember = mock(InternalDistributedMember.class);
     PartitionedRegion spyPartitionedRegion = spy(partitionedRegion);
 
     doReturn(primaryMember)
@@ -346,7 +340,6 @@ public class PartitionedRegionTest {
   public void updateBucketMapsForInterestRegistrationWithAllKeysFetchesPrimaryBucketsForRead() {
     // ARRANGE
     InternalDistributedMember primaryMember = mock(InternalDistributedMember.class);
-    InternalDistributedMember secondaryMember = mock(InternalDistributedMember.class);
     PartitionedRegion spyPartitionedRegion = spy(partitionedRegion);
 
     doReturn(primaryMember)
diff --git a/geode-junit/src/main/java/org/apache/geode/internal/cache/PartitionedRegionTestHelper.java b/geode-junit/src/main/java/org/apache/geode/internal/cache/PartitionedRegionTestHelper.java
index f5bddbc..c43ce01 100644
--- a/geode-junit/src/main/java/org/apache/geode/internal/cache/PartitionedRegionTestHelper.java
+++ b/geode-junit/src/main/java/org/apache/geode/internal/cache/PartitionedRegionTestHelper.java
@@ -14,8 +14,10 @@
  */
 package org.apache.geode.internal.cache;
 
+import static org.apache.geode.distributed.ConfigurationProperties.ENABLE_TIME_STATISTICS;
 import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
 import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
+import static org.mockito.Mockito.spy;
 
 import java.io.Serializable;
 import java.util.Objects;
@@ -35,10 +37,10 @@ import org.apache.geode.cache.PartitionResolver;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.RegionAttributes;
 import org.apache.geode.cache.RegionExistsException;
+import org.apache.geode.cache.RegionFactory;
 import org.apache.geode.cache.Scope;
 import org.apache.geode.cache.query.SelectResults;
 import org.apache.geode.cache.query.types.ObjectType;
-import org.apache.geode.distributed.DistributedSystem;
 
 
 /**
@@ -52,29 +54,33 @@ public class PartitionedRegionTestHelper
 {
   static InternalCache cache = null;
 
+  public static InternalCache getCache() {
+    return cache;
+  }
+
   /**
    * This method creates a partitioned region with all the default values. The cache created is a
    * loner, so this is only suitable for single VM tests.
    *
    */
 
-  public static Region createPartionedRegion(String regionname) throws RegionExistsException {
-    return createPartionedRegion(regionname, new PartitionAttributesFactory().create());
+  public static <K, V> Region<K, V> createPartitionedRegion(String regionName)
+      throws RegionExistsException {
+    return createPartitionedRegion(regionName, new PartitionAttributesFactory<K, V>().create());
   }
 
   /**
    * This method creates a partitioned region with the given PR attributes. The cache created is a
    * loner, so this is only suitable for single VM tests.
    */
-  public static Region createPartionedRegion(String regionname, PartitionAttributes prattribs)
+  public static <K, V> Region<K, V> createPartitionedRegion(String regionName,
+      PartitionAttributes<K, V> partitionAttributes)
       throws RegionExistsException {
-    AttributesFactory attribFactory = new AttributesFactory();
-    attribFactory.setDataPolicy(DataPolicy.PARTITION);
-    attribFactory.setPartitionAttributes(prattribs);
-    RegionAttributes regionAttribs = attribFactory.create();
-
-    Region partitionedregion = createCache().createRegion(regionname, regionAttribs);
-    return partitionedregion;
+    createCache();
+    RegionFactory<K, V> regionFactory = cache.createRegionFactory();
+    regionFactory.setDataPolicy(DataPolicy.PARTITION);
+    regionFactory.setPartitionAttributes(partitionAttributes);
+    return regionFactory.create(regionName);
   }
 
 
@@ -83,14 +89,12 @@ public class PartitionedRegionTestHelper
    * so this is only suitable for single VM tests.
    */
 
-  public static Region createLocalRegion(String regionName) throws RegionExistsException {
-
-    AttributesFactory attr = new AttributesFactory();
-
-    attr.setScope(Scope.LOCAL);
-    Region localRegion = createCache().createRegion(regionName, attr.create());
-
-    return localRegion;
+  public static <K, V> Region<K, V> createLocalRegion(String regionName)
+      throws RegionExistsException {
+    createCache();
+    RegionFactory<K, V> regionFactory = cache.createRegionFactory();
+    regionFactory.setScope(Scope.LOCAL);
+    return regionFactory.create(regionName);
   }
 
   /**
@@ -98,8 +102,6 @@ public class PartitionedRegionTestHelper
    * SelectResults#CollectionType#ElementType()
    */
   public static String compareResultSets(SelectResults sr1, SelectResults sr2) {
-
-
     ObjectType type1, type2;
     String failureString = null;
     type1 = sr1.getCollectionType().getElementType();
@@ -117,13 +119,10 @@ public class PartitionedRegionTestHelper
     } else {
       getLogger().error("PartitionedRegionTestHelper#compareTwoQueryResults: Classes are : "
           + type1.getClass().getName() + " " + type2.getClass().getName());
-      failureString =
-          "PartitionedRegionTestHelper#compareResultSets: FAILED:Search result Type is different in both the cases"
-              + type1.getClass().getName() + " " + type2.getClass().getName();
-
       Assert.fail(
           "PartitionedRegionTestHelper#compareResultSets: FAILED:Search result Type is different in both the cases");
-      return failureString;
+      return "PartitionedRegionTestHelper#compareResultSets: FAILED:Search result Type is different in both the cases"
+          + type1.getClass().getName() + " " + type2.getClass().getName();
     }
     if ((sr1.size()) == (sr2.size())) {
       getLogger().info(
@@ -133,18 +132,19 @@ public class PartitionedRegionTestHelper
     } else {
       getLogger().error(
           "PartitionedRegionTestHelper#compareResultSets: FAILED:Search resultSet size are different in both the cases");
-      failureString =
-          "PartitionedRegionTestHelper#compareResultSets: FAILED:Search resultSet size are different in both the cases"
-              + sr1.size() + " " + sr2.size();
+
       Assert.fail(
           "PartitionedRegionTestHelper#compareResultSets: FAILED:Search resultSet size are different in both the cases");
 
+      return "PartitionedRegionTestHelper#compareResultSets: FAILED:Search resultSet size are different in both the cases"
+          + sr1.size() + " " + sr2.size();
+
     }
-    return failureString;
+    return null;
   }
 
   /**
-   * This is a function to create partitioned region with following paramaters:
+   * This is a function to create partitioned region with following parameters:
    * </p>
    * 1) name
    * </p>
@@ -155,13 +155,9 @@ public class PartitionedRegionTestHelper
    * The cache created is a loner, so this is only suitable for single VM tests.
    */
 
-  public static Region createPartitionedRegion(String regionName, String localMaxMemory,
+  public static <K, V> Region<K, V> createPartitionedRegion(String regionName,
+      String localMaxMemory,
       int redundancy) {
-    Region pr = null;
-    PartitionAttributes pa;
-    PartitionAttributesFactory paf = new PartitionAttributesFactory();
-    AttributesFactory af = new AttributesFactory();
-    RegionAttributes ra;
     // setting property
     // setting partition attributes to partitionAttributesFactory
     int lmax;
@@ -171,16 +167,19 @@ public class PartitionedRegionTestHelper
       throw new IllegalArgumentException(
           "localMaxMemory must be an integer (" + localMaxMemory + ")");
     }
-    pa = paf.setLocalMaxMemory(lmax).setRedundantCopies(redundancy).create();
-    // setting attribute factor
-    af.setPartitionAttributes(pa);
-    // creating region attributes
-    ra = af.create();
     cache = createCache();
+    RegionFactory<K, V> regionFactory = cache.createRegionFactory();
+    PartitionAttributesFactory<K, V> paf = new PartitionAttributesFactory<>();
+    paf.setLocalMaxMemory(lmax);
+    paf.setRedundantCopies(redundancy);
+    regionFactory.setPartitionAttributes(paf.create());
+
+    Region<K, V> pr;
+
     try {
-      pr = cache.createRegion(regionName, ra);
+      pr = regionFactory.create(regionName);
     } catch (RegionExistsException rex) {
-      pr = cache.getRegion(regionName);
+      pr = regionFactory.create(regionName);
     }
     return pr;
   }
@@ -190,8 +189,7 @@ public class PartitionedRegionTestHelper
    *
    */
   public static SerializableObject createPRSerializableObject(String name, int id) {
-    Object obj = new SerializableObject(name, id);
-    return (SerializableObject) obj;
+    return new SerializableObject(name, id);
 
   }
 
@@ -205,13 +203,12 @@ public class PartitionedRegionTestHelper
       Properties dsp = new Properties();
       dsp.setProperty(MCAST_PORT, "0");
       dsp.setProperty(LOCATORS, "");
-      DistributedSystem sys = DistributedSystem.connect(dsp);
+      dsp.setProperty(ENABLE_TIME_STATISTICS, "true");
+      CacheFactory cacheFactory = new CacheFactory(dsp);
       try {
-        cache = (InternalCache) CacheFactory.create(sys);
-      } catch (CacheExistsException exp) {
-        cache = (InternalCache) CacheFactory.getInstance(sys);
-      } catch (RegionExistsException rex) {
-        cache = (InternalCache) CacheFactory.getInstance(sys);
+        cache = spy((InternalCache) cacheFactory.create());
+      } catch (CacheExistsException | RegionExistsException exp) {
+        cache = spy((InternalCache) cacheFactory.create()); // hmm not happy here.
       }
     }
     return cache;
@@ -233,7 +230,7 @@ public class PartitionedRegionTestHelper
    * This method is used to return existing region.
    *
    */
-  public static Region getExistingRegion(String PRName) {
+  public static <K, V> Region<K, V> getExistingRegion(String PRName) {
     createCache();
     return cache.getRegion(PRName);
   }
@@ -247,34 +244,28 @@ public class PartitionedRegionTestHelper
     return createCache().getLogger();
   }
 
-  public static RegionAttributes createRegionAttrsForPR(int red, int localMaxMem) {
+  public static <K, V> RegionAttributes<K, V> createRegionAttrsForPR(int red, int localMaxMem) {
     return createRegionAttrsForPR(red, localMaxMem,
         PartitionAttributesFactory.RECOVERY_DELAY_DEFAULT);
   }
 
-  public static RegionAttributes createRegionAttrsForPR(int red, int localMaxMem,
-      PartitionResolver resolver) {
-    return createRegionAttrsForPR(red, localMaxMem,
-        PartitionAttributesFactory.RECOVERY_DELAY_DEFAULT, null, resolver);
-  }
-
   /**
-   * This function creates Region attributes with provided scope,redundancy and localmaxMemory
+   * This function creates Region attributes with provided scope,redundancy and localMaxMemory
    */
-  public static RegionAttributes createRegionAttrsForPR(int red, int localMaxMem,
+  public static <K, V> RegionAttributes<K, V> createRegionAttrsForPR(int red, int localMaxMem,
       long recoveryDelay) {
     return createRegionAttrsForPR(red, localMaxMem, recoveryDelay, null, null);
   }
 
   /**
-   * This function creates Region attributes with provided scope,redundancy and localmaxMemory
+   * This function creates Region attributes with provided scope,redundancy and localMaxMemory
    */
-  public static RegionAttributes createRegionAttrsForPR(int red, int localMaxMem,
-      long recoveryDelay, EvictionAttributes evictionAttrs, PartitionResolver resolver) {
+  public static <K, V> RegionAttributes<K, V> createRegionAttrsForPR(int red, int localMaxMem,
+      long recoveryDelay, EvictionAttributes evictionAttrs, PartitionResolver<K, V> resolver) {
 
-    AttributesFactory attr = new AttributesFactory();
+    AttributesFactory<K, V> attr = new AttributesFactory<>();
     attr.setDataPolicy(DataPolicy.PARTITION);
-    PartitionAttributesFactory paf = new PartitionAttributesFactory();
+    PartitionAttributesFactory<K, V> paf = new PartitionAttributesFactory<>();
     paf.setRedundantCopies(red).setLocalMaxMemory(localMaxMem).setRecoveryDelay(recoveryDelay);
     if (resolver != null) {
       paf.setPartitionResolver(resolver);
@@ -284,7 +275,6 @@ public class PartitionedRegionTestHelper
     attr.setEvictionAttributes(evictionAttrs);
     return attr.create();
   }
-
 }
 
 
@@ -293,9 +283,9 @@ public class PartitionedRegionTestHelper
  */
 
 class SerializableObject implements Serializable {
-  String str;
+  final String str;
 
-  int i;
+  final int i;
 
   public SerializableObject(String str, int i) {
     this.str = str;

[geode] 14/20: GEODE-9132: Always acquire write lock for PR clear

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 7e2ee0911f742fdaa855745e2e9fd3357db568e6
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Wed Apr 21 15:24:06 2021 -0700

    GEODE-9132: Always acquire write lock for PR clear
---
 ...gionClearWithConcurrentOperationsDUnitTest.java | 110 ++++++++---------
 .../internal/cache/PartitionedRegionClear.java     | 115 ++++++++++++------
 .../internal/cache/PartitionedRegionClearTest.java | 131 +++++++++++++++++----
 3 files changed, 246 insertions(+), 110 deletions(-)

diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
index 7ef187f..710ae6f 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
@@ -14,6 +14,9 @@
  */
 package org.apache.geode.internal.cache;
 
+import static java.time.Duration.ofMillis;
+import static org.apache.geode.distributed.ConfigurationProperties.MAX_WAIT_TIME_RECONNECT;
+import static org.apache.geode.distributed.ConfigurationProperties.MEMBER_TIMEOUT;
 import static org.apache.geode.internal.util.ArrayUtils.asList;
 import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
 import static org.apache.geode.test.dunit.VM.getVM;
@@ -21,6 +24,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
 import java.io.Serializable;
+import java.time.Duration;
 import java.time.Instant;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -73,11 +77,16 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
 
   private static final int BUCKETS = 13;
   private static final String REGION_NAME = "PartitionedRegion";
+  private static final Duration WORK_DURATION = Duration.ofSeconds(15);
 
   @Rule
   public DistributedRule distributedRule = new DistributedRule(3);
   @Rule
-  public CacheRule cacheRule = CacheRule.builder().createCacheInAll().build();
+  public CacheRule cacheRule = CacheRule.builder()
+      .addSystemProperty(MAX_WAIT_TIME_RECONNECT, "1000")
+      .addSystemProperty(MEMBER_TIMEOUT, "2000")
+      .createCacheInAll()
+      .build();
 
   private VM server1;
   private VM server2;
@@ -106,15 +115,15 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     createRegions(regionShortcut);
 
     // Let all VMs continuously execute puts and gets for 60 seconds.
-    final int workMillis = 60000;
+    // final int workMillis = 60000;
     final int entries = 15000;
     List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
-        server1.invokeAsync(() -> executePuts(entries, workMillis)),
-        server2.invokeAsync(() -> executeGets(entries, workMillis)),
-        accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
+        server1.invokeAsync(() -> executePuts(entries, WORK_DURATION)),
+        server2.invokeAsync(() -> executeGets(entries, WORK_DURATION)),
+        accessor.invokeAsync(() -> executeRemoves(entries, WORK_DURATION)));
 
     // Clear the region every second for 60 seconds.
-    getVM(coordinatorVM.getVmId()).invoke(() -> executeClears(workMillis, 1000));
+    getVM(coordinatorVM.getVmId()).invoke(() -> executeClears(WORK_DURATION, ofMillis(1000)));
 
     // Let asyncInvocations finish.
     for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
@@ -142,17 +151,17 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     createRegions(regionShortcut);
 
     // Let all VMs continuously execute putAll and removeAll for 15 seconds.
-    final int workMillis = 15000;
+    // final int workMillis = 15000;
     List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
-        server1.invokeAsync(() -> executePutAlls(0, 2000, workMillis)),
-        server1.invokeAsync(() -> executeRemoveAlls(0, 2000, workMillis)),
-        server2.invokeAsync(() -> executePutAlls(2000, 4000, workMillis)),
-        server2.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)),
-        accessor.invokeAsync(() -> executePutAlls(4000, 6000, workMillis)),
-        accessor.invokeAsync(() -> executeRemoveAlls(4000, 6000, workMillis)));
+        server1.invokeAsync(() -> executePutAlls(0, 2000, WORK_DURATION)),
+        server1.invokeAsync(() -> executeRemoveAlls(0, 2000, WORK_DURATION)),
+        server2.invokeAsync(() -> executePutAlls(2000, 4000, WORK_DURATION)),
+        server2.invokeAsync(() -> executeRemoveAlls(2000, 4000, WORK_DURATION)),
+        accessor.invokeAsync(() -> executePutAlls(4000, 6000, WORK_DURATION)),
+        accessor.invokeAsync(() -> executeRemoveAlls(4000, 6000, WORK_DURATION)));
 
     // Clear the region every half second for 15 seconds.
-    getVM(coordinatorVM.getVmId()).invoke(() -> executeClears(workMillis, 500));
+    getVM(coordinatorVM.getVmId()).invoke(() -> executeClears(WORK_DURATION, ofMillis(500)));
 
     // Let asyncInvocations finish.
     for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
@@ -226,12 +235,12 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
 
     // Let all VMs (except the one to kill) continuously execute gets, put and removes for 30"
-    final int workMillis = 30000;
+    // final int workMillis = 30000;
     List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
-        server1.invokeAsync(() -> executeGets(entries, workMillis)),
-        server1.invokeAsync(() -> executePuts(entries, workMillis)),
-        accessor.invokeAsync(() -> executeGets(entries, workMillis)),
-        accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
+        server1.invokeAsync(() -> executeGets(entries, WORK_DURATION)),
+        server1.invokeAsync(() -> executePuts(entries, WORK_DURATION)),
+        accessor.invokeAsync(() -> executeGets(entries, WORK_DURATION)),
+        accessor.invokeAsync(() -> executeRemoves(entries, WORK_DURATION)));
 
     // Retry the clear operation on the region until success (server2 will go down, but other
     // members will eventually become primary for those buckets previously hosted by server2).
@@ -278,12 +287,12 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
 
     // Let all VMs (except the one to kill) continuously execute gets, put and removes for 30"
-    final int workMillis = 30000;
+    // final int workMillis = 30000;
     List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
-        server1.invokeAsync(() -> executeGets(entries, workMillis)),
-        server1.invokeAsync(() -> executePuts(entries, workMillis)),
-        accessor.invokeAsync(() -> executeGets(entries, workMillis)),
-        accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
+        server1.invokeAsync(() -> executeGets(entries, WORK_DURATION)),
+        server1.invokeAsync(() -> executePuts(entries, WORK_DURATION)),
+        accessor.invokeAsync(() -> executeGets(entries, WORK_DURATION)),
+        accessor.invokeAsync(() -> executeRemoves(entries, WORK_DURATION)));
 
     // Clear the region.
     getVM(coordinatorVM.getVmId()).invoke(() -> {
@@ -315,10 +324,10 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
 
     // Let all VMs continuously execute putAll/removeAll for 30 seconds.
-    final int workMillis = 30000;
+    // final int workMillis = 30000;
     List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
-        server1.invokeAsync(() -> executePutAlls(0, 6000, workMillis)),
-        accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)));
+        server1.invokeAsync(() -> executePutAlls(0, 6000, WORK_DURATION)),
+        accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, WORK_DURATION)));
 
     // Retry the clear operation on the region until success (server2 will go down, but other
     // members will eventually become primary for those buckets previously hosted by server2).
@@ -360,10 +369,9 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     createRegions(RegionShortcut.PARTITION);
     server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
 
-    final int workMillis = 30000;
     List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
-        server1.invokeAsync(() -> executePutAlls(0, 6000, workMillis)),
-        accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)));
+        server1.invokeAsync(() -> executePutAlls(0, 6000, WORK_DURATION)),
+        accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, WORK_DURATION)));
 
     // Clear the region.
     getVM(coordinatorVM.getVmId()).invoke(() -> {
@@ -520,12 +528,12 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   }
 
   /**
-   * Continuously execute get operations on the PartitionedRegion for the given durationInMillis.
+   * Continuously execute get operations on the PartitionedRegion for the given duration.
    */
-  private void executeGets(final int numEntries, final long durationInMillis) {
+  private void executeGets(final int numEntries, final Duration duration) {
     Cache cache = cacheRule.getCache();
     Region<String, String> region = cache.getRegion(REGION_NAME);
-    Instant finishTime = Instant.now().plusMillis(durationInMillis);
+    Instant finishTime = Instant.now().plusMillis(duration.toMillis());
 
     while (Instant.now().isBefore(finishTime)) {
       // Region might have been cleared in between, that's why we check for null.
@@ -537,12 +545,12 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   }
 
   /**
-   * Continuously execute put operations on the PartitionedRegion for the given durationInMillis.
+   * Continuously execute put operations on the PartitionedRegion for the given duration.
    */
-  private void executePuts(final int numEntries, final long durationInMillis) {
+  private void executePuts(final int numEntries, final Duration duration) {
     Cache cache = cacheRule.getCache();
     Region<String, String> region = cache.getRegion(REGION_NAME);
-    Instant finishTime = Instant.now().plusMillis(durationInMillis);
+    Instant finishTime = Instant.now().plusMillis(duration.toMillis());
 
     while (Instant.now().isBefore(finishTime)) {
       IntStream.range(0, numEntries).forEach(i -> region.put(String.valueOf(i), "Value_" + i));
@@ -550,16 +558,15 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   }
 
   /**
-   * Continuously execute putAll operations on the PartitionedRegion for the given
-   * durationInMillis.
+   * Continuously execute putAll operations on the PartitionedRegion for the given duration.
    */
-  private void executePutAlls(final int startKey, final int finalKey, final long durationInMillis) {
+  private void executePutAlls(final int startKey, final int finalKey, final Duration duration) {
     Cache cache = cacheRule.getCache();
     Map<String, String> valuesToInsert = new HashMap<>();
     Region<String, String> region = cache.getRegion(REGION_NAME);
     IntStream.range(startKey, finalKey)
         .forEach(i -> valuesToInsert.put(String.valueOf(i), "Value_" + i));
-    Instant finishTime = Instant.now().plusMillis(durationInMillis);
+    Instant finishTime = Instant.now().plusMillis(duration.toMillis());
 
     while (Instant.now().isBefore(finishTime)) {
       region.putAll(valuesToInsert);
@@ -567,13 +574,12 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   }
 
   /**
-   * Continuously execute remove operations on the PartitionedRegion for the given
-   * durationInMillis.
+   * Continuously execute remove operations on the PartitionedRegion for the given duration.
    */
-  private void executeRemoves(final int numEntries, final long durationInMillis) {
+  private void executeRemoves(final int numEntries, final Duration duration) {
     Cache cache = cacheRule.getCache();
     Region<String, String> region = cache.getRegion(REGION_NAME);
-    Instant finishTime = Instant.now().plusMillis(durationInMillis);
+    Instant finishTime = Instant.now().plusMillis(duration.toMillis());
 
     while (Instant.now().isBefore(finishTime)) {
       // Region might have been cleared in between, that's why we check for null.
@@ -585,16 +591,14 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   }
 
   /**
-   * Continuously execute removeAll operations on the PartitionedRegion for the given
-   * durationInMillis.
+   * Continuously execute removeAll operations on the PartitionedRegion for the given duration.
    */
-  private void executeRemoveAlls(final int startKey, final int finalKey,
-      final long durationInMillis) {
+  private void executeRemoveAlls(final int startKey, final int finalKey, final Duration duration) {
     Cache cache = cacheRule.getCache();
     List<String> keysToRemove = new ArrayList<>();
     Region<String, String> region = cache.getRegion(REGION_NAME);
     IntStream.range(startKey, finalKey).forEach(i -> keysToRemove.add(String.valueOf(i)));
-    Instant finishTime = Instant.now().plusMillis(durationInMillis);
+    Instant finishTime = Instant.now().plusMillis(duration.toMillis());
 
     while (Instant.now().isBefore(finishTime)) {
       region.removeAll(keysToRemove);
@@ -622,13 +626,13 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   }
 
   /**
-   * Continuously execute clear operations on the PartitionedRegion every periodInMillis for the
-   * given durationInMillis.
+   * Continuously execute clear operations on the PartitionedRegion every period for the
+   * given duration.
    */
-  private void executeClears(final long durationInMillis, final long periodInMillis) {
+  private void executeClears(final Duration duration, final Duration period) {
     Cache cache = cacheRule.getCache();
     Region<String, String> region = cache.getRegion(REGION_NAME);
-    long minimumInvocationCount = durationInMillis / periodInMillis;
+    long minimumInvocationCount = duration.toMillis() / period.toMillis();
 
     for (int invocationCount = 0; invocationCount < minimumInvocationCount; invocationCount++) {
       region.clear();
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
index 569f78c..b8597c1 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
@@ -23,6 +23,7 @@ import java.util.Set;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.CancelException;
+import org.apache.geode.annotations.VisibleForTesting;
 import org.apache.geode.cache.CacheWriterException;
 import org.apache.geode.cache.Operation;
 import org.apache.geode.cache.OperationAbortedException;
@@ -30,10 +31,12 @@ import org.apache.geode.cache.PartitionedRegionPartialClearException;
 import org.apache.geode.cache.asyncqueue.AsyncEventQueue;
 import org.apache.geode.cache.asyncqueue.internal.AsyncEventQueueImpl;
 import org.apache.geode.cache.partition.PartitionRegionHelper;
+import org.apache.geode.distributed.DistributedLockService;
 import org.apache.geode.distributed.internal.DistributionManager;
 import org.apache.geode.distributed.internal.MembershipListener;
 import org.apache.geode.distributed.internal.ReplyException;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.cache.PartitionedRegionClearMessage.PartitionedRegionClearResponse;
 import org.apache.geode.internal.serialization.KnownVersion;
 import org.apache.geode.logging.internal.log4j.api.LogService;
 
@@ -47,6 +50,8 @@ public class PartitionedRegionClear {
 
   private final PartitionedRegion partitionedRegion;
 
+  private final DistributedLockService distributedLockService;
+
   protected final LockForListenerAndClientNotification lockForListenerAndClientNotification =
       new LockForListenerAndClientNotification();
 
@@ -55,8 +60,35 @@ public class PartitionedRegionClear {
   protected final PartitionedRegionClearListener partitionedRegionClearListener =
       new PartitionedRegionClearListener();
 
+  private final ColocationLeaderRegionProvider colocationLeaderRegionProvider;
+  private final AssignBucketsToPartitions assignBucketsToPartitions;
+  private final UpdateAttributesProcessorFactory updateAttributesProcessorFactory;
+
   public PartitionedRegionClear(PartitionedRegion partitionedRegion) {
+    this(partitionedRegion,
+        partitionedRegion.getPartitionedRegionLockService(),
+        ColocationHelper::getLeaderRegion,
+        PartitionRegionHelper::assignBucketsToPartitions,
+        pr -> new UpdateAttributesProcessor(pr, true));
+  }
+
+  @VisibleForTesting
+  PartitionedRegionClear(PartitionedRegion partitionedRegion,
+      DistributedLockService distributedLockService,
+      ColocationLeaderRegionProvider colocationLeaderRegionProvider,
+      AssignBucketsToPartitions assignBucketsToPartitions,
+      UpdateAttributesProcessorFactory updateAttributesProcessorFactory) {
     this.partitionedRegion = partitionedRegion;
+    this.distributedLockService = distributedLockService;
+    this.colocationLeaderRegionProvider = colocationLeaderRegionProvider;
+    this.assignBucketsToPartitions = assignBucketsToPartitions;
+    this.updateAttributesProcessorFactory = updateAttributesProcessorFactory;
+
+    // TODO: initialize needs to move out of constructor to prevent escape of reference to 'this'
+    initialize();
+  }
+
+  private void initialize() {
     partitionedRegion.getDistributionManager()
         .addMembershipListener(partitionedRegionClearListener);
   }
@@ -67,7 +99,7 @@ public class PartitionedRegionClear {
 
   void acquireDistributedClearLock(String clearLock) {
     try {
-      partitionedRegion.getPartitionedRegionLockService().lock(clearLock, -1, -1);
+      distributedLockService.lock(clearLock, -1, -1);
     } catch (IllegalStateException e) {
       partitionedRegion.lockCheckReadiness();
       throw e;
@@ -76,7 +108,7 @@ public class PartitionedRegionClear {
 
   void releaseDistributedClearLock(String clearLock) {
     try {
-      partitionedRegion.getPartitionedRegionLockService().unlock(clearLock);
+      distributedLockService.unlock(clearLock);
     } catch (IllegalStateException e) {
       partitionedRegion.lockCheckReadiness();
     } catch (Exception ex) {
@@ -303,7 +335,7 @@ public class PartitionedRegionClear {
   protected Set<Integer> attemptToSendPartitionedRegionClearMessage(RegionEventImpl event,
       PartitionedRegionClearMessage.OperationType op)
       throws ForceReattemptException {
-    Set<Integer> bucketsOperated = new HashSet<>();
+    Set<Integer> clearedBuckets = new HashSet<>();
 
     if (partitionedRegion.getPRRoot() == null) {
       if (logger.isDebugEnabled()) {
@@ -311,8 +343,10 @@ public class PartitionedRegionClear {
             "Partition region {} failed to initialize. Remove its profile from remote members.",
             this.partitionedRegion);
       }
-      new UpdateAttributesProcessor(partitionedRegion, true).distribute(false);
-      return bucketsOperated;
+      updateAttributesProcessorFactory
+          .create(partitionedRegion)
+          .distribute(false);
+      return clearedBuckets;
     }
 
     final Set<InternalDistributedMember> configRecipients =
@@ -325,9 +359,9 @@ public class PartitionedRegionClear {
 
       if (prConfig != null) {
         for (Node node : prConfig.getNodes()) {
-          InternalDistributedMember idm = node.getMemberId();
-          if (!idm.equals(partitionedRegion.getMyId())) {
-            configRecipients.add(idm);
+          InternalDistributedMember memberId = node.getMemberId();
+          if (!memberId.equals(partitionedRegion.getMyId())) {
+            configRecipients.add(memberId);
           }
         }
       }
@@ -336,29 +370,29 @@ public class PartitionedRegionClear {
     }
 
     try {
-      PartitionedRegionClearMessage.PartitionedRegionClearResponse resp =
-          new PartitionedRegionClearMessage.PartitionedRegionClearResponse(
-              partitionedRegion.getSystem(), configRecipients);
-      PartitionedRegionClearMessage partitionedRegionClearMessage =
-          new PartitionedRegionClearMessage(configRecipients, partitionedRegion, resp, op, event);
-      partitionedRegionClearMessage.send();
+      PartitionedRegionClearResponse clearResponse =
+          new PartitionedRegionClearResponse(partitionedRegion.getSystem(), configRecipients);
+      PartitionedRegionClearMessage clearMessage =
+          new PartitionedRegionClearMessage(configRecipients, partitionedRegion, clearResponse, op,
+              event);
+      clearMessage.send();
 
-      resp.waitForRepliesUninterruptibly();
-      bucketsOperated = resp.bucketsCleared;
+      clearResponse.waitForRepliesUninterruptibly();
+      clearedBuckets = clearResponse.bucketsCleared;
 
     } catch (ReplyException e) {
-      Throwable t = e.getCause();
-      if (t instanceof ForceReattemptException) {
-        throw (ForceReattemptException) t;
+      Throwable cause = e.getCause();
+      if (cause instanceof ForceReattemptException) {
+        throw (ForceReattemptException) cause;
       }
-      if (t instanceof PartitionedRegionPartialClearException) {
-        throw new PartitionedRegionPartialClearException(t.getMessage(), t);
+      if (cause instanceof PartitionedRegionPartialClearException) {
+        throw (PartitionedRegionPartialClearException) cause;
       }
       logger.warn(
           "PartitionedRegionClear#sendPartitionedRegionClearMessage: Caught exception during ClearRegionMessage send and waiting for response",
           e);
     }
-    return bucketsOperated;
+    return clearedBuckets;
   }
 
   /**
@@ -412,14 +446,9 @@ public class PartitionedRegionClear {
         invokeCacheWriter(regionEvent);
       }
 
-      // Check if there are any listeners or clients interested. If so, then clear write
-      // locks needs to be taken on all local and remote primary buckets in order to
-      // preserve the ordering of client events (for concurrent operations on the region).
-      boolean acquireClearLockForNotification =
-          (partitionedRegion.hasAnyClientsInterested() || partitionedRegion.hasListener());
-      if (acquireClearLockForNotification) {
-        obtainLockForClear(regionEvent);
-      }
+      // clear write locks need to be taken on all local and remote primary buckets
+      // whether or not the partitioned region has any listeners clients interested
+      obtainLockForClear(regionEvent);
       try {
         Set<Integer> bucketsCleared = clearRegion(regionEvent);
 
@@ -435,9 +464,7 @@ public class PartitionedRegionClear {
           throw new PartitionedRegionPartialClearException(message);
         }
       } finally {
-        if (acquireClearLockForNotification) {
-          releaseLockForClear(regionEvent);
-        }
+        releaseLockForClear(regionEvent);
       }
     } finally {
       releaseDistributedClearLock(lockName);
@@ -458,8 +485,8 @@ public class PartitionedRegionClear {
   }
 
   protected void assignAllPrimaryBuckets() {
-    PartitionedRegion leader = ColocationHelper.getLeaderRegion(partitionedRegion);
-    PartitionRegionHelper.assignBucketsToPartitions(leader);
+    PartitionedRegion leader = colocationLeaderRegionProvider.getLeaderRegion(partitionedRegion);
+    assignBucketsToPartitions.assignBucketsToPartitions(leader);
   }
 
   protected void handleClearFromDepartedMember(InternalDistributedMember departedMember) {
@@ -505,6 +532,24 @@ public class PartitionedRegionClear {
     return membershipChange;
   }
 
+  @FunctionalInterface
+  @VisibleForTesting
+  interface ColocationLeaderRegionProvider {
+    PartitionedRegion getLeaderRegion(PartitionedRegion partitionedRegion);
+  }
+
+  @FunctionalInterface
+  @VisibleForTesting
+  interface AssignBucketsToPartitions {
+    void assignBucketsToPartitions(PartitionedRegion partitionedRegion);
+  }
+
+  @FunctionalInterface
+  @VisibleForTesting
+  interface UpdateAttributesProcessorFactory {
+    UpdateAttributesProcessor create(PartitionedRegion partitionedRegion);
+  }
+
   protected class PartitionedRegionClearListener implements MembershipListener {
 
     @Override
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java
index 721d236..376fc8e 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java
@@ -22,6 +22,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.catchThrowable;
 import static org.mockito.ArgumentCaptor.forClass;
 import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doNothing;
@@ -42,7 +43,6 @@ import org.mockito.ArgumentCaptor;
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.PartitionedRegionPartialClearException;
 import org.apache.geode.cache.Region;
-import org.apache.geode.cache.asyncqueue.AsyncEventQueue;
 import org.apache.geode.distributed.DistributedLockService;
 import org.apache.geode.distributed.internal.DMStats;
 import org.apache.geode.distributed.internal.DistributionManager;
@@ -50,41 +50,74 @@ import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.MembershipListener;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.cache.PartitionedRegion.RetryTimeKeeper;
+import org.apache.geode.internal.cache.PartitionedRegionClear.AssignBucketsToPartitions;
+import org.apache.geode.internal.cache.PartitionedRegionClear.ColocationLeaderRegionProvider;
 import org.apache.geode.internal.cache.PartitionedRegionClear.PartitionedRegionClearListener;
+import org.apache.geode.internal.cache.PartitionedRegionClear.UpdateAttributesProcessorFactory;
 import org.apache.geode.internal.cache.PartitionedRegionClearMessage.OperationType;
 import org.apache.geode.internal.cache.partitioned.RegionAdvisor;
 import org.apache.geode.internal.serialization.KnownVersion;
 
 public class PartitionedRegionClearTest {
 
-  private GemFireCacheImpl cache;
-  private HashSet<AsyncEventQueue> allAEQs = new HashSet<>();
   private PartitionedRegionClear partitionedRegionClear;
   private DistributionManager distributionManager;
   private PartitionedRegion partitionedRegion;
   private RegionAdvisor regionAdvisor;
   private InternalDistributedMember internalDistributedMember;
+  private DistributedLockService distributedLockService;
 
   @Before
   public void setUp() {
-
-    cache = mock(GemFireCacheImpl.class);
+    AssignBucketsToPartitions assignBucketsToPartitions = mock(AssignBucketsToPartitions.class);
+    GemFireCacheImpl cache = mock(GemFireCacheImpl.class);
+    ColocationLeaderRegionProvider colocationLeaderRegionProvider =
+        mock(ColocationLeaderRegionProvider.class);
+    distributedLockService = mock(DistributedLockService.class);
     distributionManager = mock(DistributionManager.class);
+    FilterProfile filterProfile = mock(FilterProfile.class);
     internalDistributedMember = mock(InternalDistributedMember.class);
     partitionedRegion = mock(PartitionedRegion.class);
     regionAdvisor = mock(RegionAdvisor.class);
+    UpdateAttributesProcessorFactory updateAttributesProcessorFactory =
+        mock(UpdateAttributesProcessorFactory.class);
+
+    when(cache.getAsyncEventQueues(false))
+        .thenReturn(emptySet());
+    when(colocationLeaderRegionProvider.getLeaderRegion(any()))
+        .thenReturn(partitionedRegion);
+    when(distributedLockService.lock(anyString(), anyInt(), anyInt()))
+        .thenReturn(true);
+    when(distributionManager.getDistributionManagerId())
+        .thenReturn(internalDistributedMember);
+    when(distributionManager.getId())
+        .thenReturn(internalDistributedMember);
+    when(internalDistributedMember.getVersion())
+        .thenReturn(KnownVersion.CURRENT);
+    when(partitionedRegion.getCache())
+        .thenReturn(cache);
+    when(partitionedRegion.getDistributionManager())
+        .thenReturn(distributionManager);
+    when(partitionedRegion.getName())
+        .thenReturn("prRegion");
+    when(partitionedRegion.getRegionAdvisor())
+        .thenReturn(regionAdvisor);
+    when(partitionedRegion.getFilterProfile())
+        .thenReturn(filterProfile);
+    when(filterProfile.getFilterRoutingInfoPart1(any(), any(), any()))
+        .thenReturn(mock(FilterRoutingInfo.class));
+    when(filterProfile.getFilterRoutingInfoPart2(any(), any()))
+        .thenReturn(mock(FilterRoutingInfo.class));
+    when(regionAdvisor.getDistributionManager())
+        .thenReturn(distributionManager);
+    when(updateAttributesProcessorFactory.create(any()))
+        .thenReturn(mock(UpdateAttributesProcessor.class));
 
-    when(distributionManager.getDistributionManagerId()).thenReturn(internalDistributedMember);
-    when(distributionManager.getId()).thenReturn(internalDistributedMember);
-    when(internalDistributedMember.getVersion()).thenReturn(KnownVersion.CURRENT);
-    when(partitionedRegion.getCache()).thenReturn(cache);
-    when(cache.getAsyncEventQueues(false)).thenReturn(allAEQs);
-    when(partitionedRegion.getDistributionManager()).thenReturn(distributionManager);
-    when(partitionedRegion.getName()).thenReturn("prRegion");
-    when(partitionedRegion.getRegionAdvisor()).thenReturn(regionAdvisor);
-    when(regionAdvisor.getDistributionManager()).thenReturn(distributionManager);
+    doNothing().when(distributedLockService).unlock(anyString());
 
-    partitionedRegionClear = new PartitionedRegionClear(partitionedRegion);
+    partitionedRegionClear = new PartitionedRegionClear(partitionedRegion, distributedLockService,
+        colocationLeaderRegionProvider, assignBucketsToPartitions,
+        updateAttributesProcessorFactory);
   }
 
   @Test
@@ -115,9 +148,7 @@ public class PartitionedRegionClearTest {
   @Test
   public void acquireDistributedClearLockGetsDistributedLock() {
     // arrange
-    DistributedLockService distributedLockService = mock(DistributedLockService.class);
     String lockName = PartitionedRegionClear.CLEAR_OPERATION + partitionedRegion.getName();
-    when(partitionedRegion.getPartitionedRegionLockService()).thenReturn(distributedLockService);
 
     // act
     partitionedRegionClear.acquireDistributedClearLock(lockName);
@@ -129,9 +160,7 @@ public class PartitionedRegionClearTest {
   @Test
   public void releaseDistributedClearLockReleasesDistributedLock() {
     // arrange
-    DistributedLockService distributedLockService = mock(DistributedLockService.class);
     String lockName = PartitionedRegionClear.CLEAR_OPERATION + partitionedRegion.getName();
-    when(partitionedRegion.getPartitionedRegionLockService()).thenReturn(distributedLockService);
 
     // act
     partitionedRegionClear.releaseDistributedClearLock(lockName);
@@ -567,6 +596,7 @@ public class PartitionedRegionClearTest {
   public void doClearAcquiresAndReleasesDistributedClearLockAndCreatesAllPrimaryBuckets() {
     // arrange
     RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+    when(regionEvent.clone()).thenReturn(regionEvent);
 
     // partial mocking to stub some methods and verify
     PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
@@ -587,6 +617,7 @@ public class PartitionedRegionClearTest {
   public void doClearInvokesCacheWriterWhenCacheWriteIsSet() {
     // arrange
     RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+    when(regionEvent.clone()).thenReturn(regionEvent);
 
     // partial mocking to stub some methods and verify
     PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
@@ -605,6 +636,7 @@ public class PartitionedRegionClearTest {
   public void doClearDoesNotInvokesCacheWriterWhenCacheWriteIsNotSet() {
     // arrange
     RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+    when(regionEvent.clone()).thenReturn(regionEvent);
 
     // partial mocking to stub some methods and verify
     PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
@@ -669,12 +701,13 @@ public class PartitionedRegionClearTest {
   }
 
   @Test
-  public void doClearDoesNotObtainLockForClearWhenRegionHasNoListenerAndNoClientInterest() {
+  public void doClearObtainsLockForClearWhenRegionHasNoListenerAndNoClientInterest() {
     // arrange
     RegionEventImpl regionEvent = mock(RegionEventImpl.class);
 
     when(partitionedRegion.hasAnyClientsInterested()).thenReturn(false);
     when(partitionedRegion.hasListener()).thenReturn(false);
+    when(regionEvent.clone()).thenReturn(regionEvent);
 
     // partial mocking to stub some methods and verify
     PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
@@ -688,8 +721,8 @@ public class PartitionedRegionClearTest {
     spyPartitionedRegionClear.doClear(regionEvent, false);
 
     // assert
-    verify(spyPartitionedRegionClear, never()).obtainLockForClear(regionEvent);
-    verify(spyPartitionedRegionClear, never()).releaseLockForClear(regionEvent);
+    verify(spyPartitionedRegionClear).obtainLockForClear(regionEvent);
+    verify(spyPartitionedRegionClear).releaseLockForClear(regionEvent);
   }
 
   @Test
@@ -867,6 +900,60 @@ public class PartitionedRegionClearTest {
         .isNotNull();
   }
 
+  @Test
+  public void doClearAcquiresLockForClearWhenHasAnyClientsInterestedIsTrue() {
+    // arrange
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+    when(partitionedRegion.hasAnyClientsInterested()).thenReturn(true);
+    when(partitionedRegion.hasListener()).thenReturn(false);
+    when(regionEvent.clone()).thenReturn(regionEvent);
+
+    partitionedRegionClear = spy(partitionedRegionClear);
+    doNothing().when(partitionedRegionClear).obtainLockForClear(regionEvent);
+
+    // act
+    partitionedRegionClear.doClear(regionEvent, false);
+
+    // assert
+    verify(partitionedRegionClear).obtainLockForClear(regionEvent);
+  }
+
+  @Test
+  public void doClearAcquiresLockForClearWhenHasListenerIsTrue() {
+    // arrange
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+    when(partitionedRegion.hasAnyClientsInterested()).thenReturn(false);
+    when(partitionedRegion.hasListener()).thenReturn(true);
+    when(regionEvent.clone()).thenReturn(regionEvent);
+
+    partitionedRegionClear = spy(partitionedRegionClear);
+    doNothing().when(partitionedRegionClear).obtainLockForClear(regionEvent);
+
+    // act
+    partitionedRegionClear.doClear(regionEvent, false);
+
+    // assert
+    verify(partitionedRegionClear).obtainLockForClear(regionEvent);
+  }
+
+  @Test
+  public void doClearAcquiresLockForClearWhenHasAnyClientsInterestedAndHasListenerAreFalse() {
+    // arrange
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+    when(partitionedRegion.hasAnyClientsInterested()).thenReturn(false);
+    when(partitionedRegion.hasListener()).thenReturn(false);
+    when(regionEvent.clone()).thenReturn(regionEvent);
+
+    partitionedRegionClear = spy(partitionedRegionClear);
+    doNothing().when(partitionedRegionClear).obtainLockForClear(regionEvent);
+
+    // act
+    partitionedRegionClear.doClear(regionEvent, false);
+
+    // assert
+    verify(partitionedRegionClear).obtainLockForClear(regionEvent);
+  }
+
   private Set<BucketRegion> setupBucketRegions(
       PartitionedRegionDataStore dataStore,
       BucketAdvisor bucketAdvisor) {

[geode] 10/20: Fixup AnalyzeCoreSerializablesJUnitTest for PartitionedRegionPartialClearException

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 125da0710687ed742ffa227b8cab563ea6f59007
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Fri Apr 16 11:40:37 2021 -0700

    Fixup AnalyzeCoreSerializablesJUnitTest for PartitionedRegionPartialClearException
---
 .../org/apache/geode/internal/sanctioned-geode-core-serializables.txt   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
index 6f3a615..2f74eae 100644
--- a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
+++ b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
@@ -79,7 +79,7 @@ org/apache/geode/cache/NoSubscriptionServersAvailableException,true,848408601915
 org/apache/geode/cache/Operation,true,-7521751729852504238,ordinal:byte
 org/apache/geode/cache/OperationAbortedException,true,-8293166225026556949
 org/apache/geode/cache/PartitionedRegionDistributionException,true,-3004093739855972548
-org/apache/geode/cache/PartitionedRegionPartialClearException,false
+org/apache/geode/cache/PartitionedRegionPartialClearException,true,-3420558263697703892
 org/apache/geode/cache/PartitionedRegionStorageException,true,5905463619475329732
 org/apache/geode/cache/RegionAccessException,true,3142958723089038406
 org/apache/geode/cache/RegionDestroyedException,true,319804842308010754,regionFullPath:java/lang/String

[geode] 03/20: GEODE-9132: Delete ClearPRMessage

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 7d522e694d04e6d417da1f1c003ea48a9d4a9c58
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Fri Apr 9 15:06:40 2021 -0700

    GEODE-9132: Delete ClearPRMessage
---
 .../org/apache/geode/internal/DSFIDFactory.java    |   1 -
 .../geode/internal/cache/PartitionedRegion.java    |  10 -
 .../internal/cache/partitioned/ClearPRMessage.java | 320 ---------------------
 .../internal/cache/PartitionedRegionTest.java      |  15 -
 .../cache/partitioned/ClearPRMessageTest.java      | 260 -----------------
 5 files changed, 606 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java b/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java
index a89400f..07c396f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java
@@ -290,7 +290,6 @@ import org.apache.geode.internal.cache.partitioned.BucketCountLoadProbe;
 import org.apache.geode.internal.cache.partitioned.BucketProfileUpdateMessage;
 import org.apache.geode.internal.cache.partitioned.BucketSizeMessage;
 import org.apache.geode.internal.cache.partitioned.BucketSizeMessage.BucketSizeReplyMessage;
-import org.apache.geode.internal.cache.partitioned.ClearPRMessage;
 import org.apache.geode.internal.cache.partitioned.ContainsKeyValueMessage;
 import org.apache.geode.internal.cache.partitioned.ContainsKeyValueMessage.ContainsKeyValueReplyMessage;
 import org.apache.geode.internal.cache.partitioned.CreateBucketMessage;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
index 278266b..61be3b2 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
@@ -181,7 +181,6 @@ import org.apache.geode.internal.cache.execute.PartitionedRegionFunctionResultWa
 import org.apache.geode.internal.cache.execute.RegionFunctionContextImpl;
 import org.apache.geode.internal.cache.execute.ServerToClientFunctionResultSender;
 import org.apache.geode.internal.cache.ha.ThreadIdentifier;
-import org.apache.geode.internal.cache.partitioned.ClearPRMessage;
 import org.apache.geode.internal.cache.partitioned.ContainsKeyValueMessage;
 import org.apache.geode.internal.cache.partitioned.ContainsKeyValueMessage.ContainsKeyValueResponse;
 import org.apache.geode.internal.cache.partitioned.DestroyMessage;
@@ -2193,15 +2192,6 @@ public class PartitionedRegion extends LocalRegion
     throw new UnsupportedOperationException();
   }
 
-  List<ClearPRMessage> createClearPRMessages(EventID eventID) {
-    ArrayList<ClearPRMessage> clearMsgList = new ArrayList<>();
-    for (int bucketId = 0; bucketId < getTotalNumberOfBuckets(); bucketId++) {
-      ClearPRMessage clearPRMessage = new ClearPRMessage(bucketId, eventID);
-      clearMsgList.add(clearPRMessage);
-    }
-    return clearMsgList;
-  }
-
   @Override
   void basicLocalClear(RegionEventImpl event) {
     throw new UnsupportedOperationException();
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java
deleted file mode 100644
index 2603b78..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.internal.cache.partitioned;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.Set;
-
-import org.apache.logging.log4j.Logger;
-
-import org.apache.geode.DataSerializer;
-import org.apache.geode.annotations.VisibleForTesting;
-import org.apache.geode.cache.CacheException;
-import org.apache.geode.cache.Operation;
-import org.apache.geode.cache.persistence.PartitionOfflineException;
-import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.ClusterDistributionManager;
-import org.apache.geode.distributed.internal.DirectReplyProcessor;
-import org.apache.geode.distributed.internal.DistributionManager;
-import org.apache.geode.distributed.internal.InternalDistributedSystem;
-import org.apache.geode.distributed.internal.ReplyException;
-import org.apache.geode.distributed.internal.ReplyMessage;
-import org.apache.geode.distributed.internal.ReplyProcessor21;
-import org.apache.geode.distributed.internal.ReplySender;
-import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
-import org.apache.geode.internal.Assert;
-import org.apache.geode.internal.InternalDataSerializer;
-import org.apache.geode.internal.NanoTimer;
-import org.apache.geode.internal.cache.BucketRegion;
-import org.apache.geode.internal.cache.EventID;
-import org.apache.geode.internal.cache.ForceReattemptException;
-import org.apache.geode.internal.cache.PartitionedRegion;
-import org.apache.geode.internal.cache.RegionEventImpl;
-import org.apache.geode.internal.logging.log4j.LogMarker;
-import org.apache.geode.internal.serialization.DeserializationContext;
-import org.apache.geode.internal.serialization.SerializationContext;
-import org.apache.geode.logging.internal.log4j.api.LogService;
-
-public class ClearPRMessage extends PartitionMessageWithDirectReply {
-  private static final Logger logger = LogService.getLogger();
-
-  private Integer bucketId;
-
-  private EventID eventID;
-
-  public static final String BUCKET_NON_PRIMARY_MESSAGE =
-      "The bucket region on target member is no longer primary";
-  public static final String EXCEPTION_THROWN_DURING_CLEAR_OPERATION =
-      "An exception was thrown during the local clear operation: ";
-
-  /**
-   * state from operateOnRegion that must be preserved for transmission from the waiting pool
-   */
-  transient boolean result = false;
-
-  /**
-   * Empty constructor to satisfy {@link DataSerializer}requirements
-   */
-  public ClearPRMessage() {}
-
-  public ClearPRMessage(int bucketId, EventID eventID) {
-    this.bucketId = bucketId;
-    this.eventID = eventID;
-  }
-
-  public void initMessage(PartitionedRegion region, Set<InternalDistributedMember> recipients,
-      DirectReplyProcessor replyProcessor) {
-    this.resetRecipients();
-    if (recipients != null) {
-      setRecipients(recipients);
-    }
-    this.regionId = region.getPRId();
-    this.processor = replyProcessor;
-    this.processorId = replyProcessor == null ? 0 : replyProcessor.getProcessorId();
-    if (replyProcessor != null) {
-      replyProcessor.enableSevereAlertProcessing();
-    }
-  }
-
-  public ClearResponse send(DistributedMember recipient, PartitionedRegion region)
-      throws ForceReattemptException {
-    Set<InternalDistributedMember> recipients =
-        Collections.singleton((InternalDistributedMember) recipient);
-    ClearResponse clearResponse = new ClearResponse(region.getSystem(), recipients);
-    initMessage(region, recipients, clearResponse);
-    if (logger.isDebugEnabled()) {
-      logger.debug("ClearPRMessage.send: recipient is {}, msg is {}", recipient, this);
-    }
-
-    Set<InternalDistributedMember> failures = region.getDistributionManager().putOutgoing(this);
-    if (failures != null && failures.size() > 0) {
-      throw new ForceReattemptException("Failed sending <" + this + "> due to " + failures);
-    }
-    return clearResponse;
-  }
-
-  @Override
-  public int getDSFID() {
-    return PR_CLEAR_MESSAGE;
-  }
-
-  @Override
-  public void toData(DataOutput out, SerializationContext context) throws IOException {
-    super.toData(out, context);
-    if (bucketId == null) {
-      InternalDataSerializer.writeSignedVL(-1, out);
-    } else {
-      InternalDataSerializer.writeSignedVL(bucketId, out);
-    }
-    DataSerializer.writeObject(this.eventID, out);
-  }
-
-  @Override
-  public void fromData(DataInput in, DeserializationContext context)
-      throws IOException, ClassNotFoundException {
-    super.fromData(in, context);
-    this.bucketId = (int) InternalDataSerializer.readSignedVL(in);
-    this.eventID = (EventID) DataSerializer.readObject(in);
-  }
-
-  @Override
-  public EventID getEventID() {
-    return null;
-  }
-
-  /**
-   * This method is called upon receipt and make the desired changes to the PartitionedRegion Note:
-   * It is very important that this message does NOT cause any deadlocks as the sender will wait
-   * indefinitely for the acknowledgement
-   */
-  @Override
-  @VisibleForTesting
-  protected boolean operateOnPartitionedRegion(ClusterDistributionManager distributionManager,
-      PartitionedRegion region, long startTime) {
-    try {
-      this.result = doLocalClear(region);
-    } catch (ForceReattemptException ex) {
-      sendReply(getSender(), getProcessorId(), distributionManager, new ReplyException(ex), region,
-          startTime);
-      return false;
-    }
-    return this.result;
-  }
-
-  public Integer getBucketId() {
-    return this.bucketId;
-  }
-
-  public boolean doLocalClear(PartitionedRegion region)
-      throws ForceReattemptException {
-    // Retrieve local bucket region which matches target bucketId
-    BucketRegion bucketRegion =
-        region.getDataStore().getInitializedBucketForId(null, this.bucketId);
-
-    boolean lockedForPrimary = bucketRegion.doLockForPrimary(false);
-    // Check if we obtained primary lock, throw exception if not
-    if (!lockedForPrimary) {
-      throw new ForceReattemptException(BUCKET_NON_PRIMARY_MESSAGE);
-    }
-    try {
-      RegionEventImpl regionEvent = new RegionEventImpl(bucketRegion, Operation.REGION_CLEAR, null,
-          false, region.getMyId(), eventID);
-      bucketRegion.cmnClearRegion(regionEvent, false, true);
-    } catch (PartitionOfflineException poe) {
-      logger.info(
-          "All members holding data for bucket {} are offline, no more retries will be attempted",
-          this.bucketId,
-          poe);
-      throw poe;
-    } catch (Exception ex) {
-      throw new ForceReattemptException(
-          EXCEPTION_THROWN_DURING_CLEAR_OPERATION + ex.getClass().getName(), ex);
-    } finally {
-      bucketRegion.doUnlockForPrimary();
-    }
-
-    return true;
-  }
-
-  @Override
-  public boolean canStartRemoteTransaction() {
-    return false;
-  }
-
-  @Override
-  protected void sendReply(InternalDistributedMember member, int processorId,
-      DistributionManager distributionManager, ReplyException ex,
-      PartitionedRegion partitionedRegion, long startTime) {
-    if (partitionedRegion != null) {
-      if (startTime > 0) {
-        partitionedRegion.getPrStats().endPartitionMessagesProcessing(startTime);
-      }
-    }
-    ClearReplyMessage.send(member, processorId, getReplySender(distributionManager), this.result,
-        ex);
-  }
-
-  @Override
-  protected void appendFields(StringBuilder buff) {
-    super.appendFields(buff);
-    buff.append("; bucketId=").append(this.bucketId);
-  }
-
-  public static class ClearReplyMessage extends ReplyMessage {
-    @Override
-    public boolean getInlineProcess() {
-      return true;
-    }
-
-    /**
-     * Empty constructor to conform to DataSerializable interface
-     */
-    @SuppressWarnings("unused")
-    public ClearReplyMessage() {}
-
-    private ClearReplyMessage(int processorId, boolean result, ReplyException ex) {
-      super();
-      setProcessorId(processorId);
-      if (ex != null) {
-        setException(ex);
-      } else {
-        setReturnValue(result);
-      }
-    }
-
-    /**
-     * Send an ack
-     */
-    public static void send(InternalDistributedMember recipient, int processorId,
-        ReplySender replySender,
-        boolean result, ReplyException ex) {
-      Assert.assertNotNull(recipient, "ClearReplyMessage recipient was NULL.");
-      ClearReplyMessage message = new ClearReplyMessage(processorId, result, ex);
-      message.setRecipient(recipient);
-      replySender.putOutgoing(message);
-    }
-
-    /**
-     * Processes this message. This method is invoked by the receiver of the message.
-     *
-     * @param distributionManager the distribution manager that is processing the message.
-     */
-    @Override
-    public void process(final DistributionManager distributionManager,
-        final ReplyProcessor21 replyProcessor) {
-      final long startTime = getTimestamp();
-      if (replyProcessor == null) {
-        if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) {
-          logger.trace(LogMarker.DM_VERBOSE, "{}: processor not found", this);
-        }
-        return;
-      }
-      if (replyProcessor instanceof ClearResponse) {
-        ((ClearResponse) replyProcessor).setResponse(this);
-      }
-      replyProcessor.process(this);
-
-      if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) {
-        logger.trace(LogMarker.DM_VERBOSE, "{} processed {}", replyProcessor, this);
-      }
-      distributionManager.getStats().incReplyMessageTime(NanoTimer.getTime() - startTime);
-    }
-
-    @Override
-    public int getDSFID() {
-      return PR_CLEAR_REPLY_MESSAGE;
-    }
-
-    @Override
-    public String toString() {
-      StringBuilder stringBuilder = new StringBuilder(super.toString());
-      stringBuilder.append(" returnValue=");
-      stringBuilder.append(getReturnValue());
-      return stringBuilder.toString();
-    }
-  }
-
-  /**
-   * A processor to capture the value returned by {@link ClearPRMessage}
-   */
-  public static class ClearResponse extends PartitionResponse {
-    private volatile boolean returnValue;
-
-    public ClearResponse(InternalDistributedSystem distributedSystem,
-        Set<InternalDistributedMember> recipients) {
-      super(distributedSystem, recipients, false);
-    }
-
-    public void setResponse(ClearReplyMessage response) {
-      if (response.getException() == null) {
-        this.returnValue = (boolean) response.getReturnValue();
-      }
-    }
-
-    /**
-     * @return the result of the remote clear operation
-     * @throws ForceReattemptException if the peer is no longer available
-     * @throws CacheException if the peer generates an error
-     */
-    public boolean waitForResult() throws CacheException, ForceReattemptException {
-      waitForCacheException();
-      return this.returnValue;
-    }
-  }
-}
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java
index fb01334..02c7a9d 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java
@@ -42,7 +42,6 @@ import static org.mockito.quality.Strictness.STRICT_STUBS;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -84,7 +83,6 @@ import org.apache.geode.distributed.internal.DistributionManager;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.cache.control.InternalResourceManager;
-import org.apache.geode.internal.cache.partitioned.ClearPRMessage;
 import org.apache.geode.internal.cache.partitioned.colocation.ColocationLoggerFactory;
 import org.apache.geode.test.junit.runners.GeodeParamsRunner;
 
@@ -229,19 +227,6 @@ public class PartitionedRegionTest {
   }
 
   @Test
-  public void createClearPRMessagesShouldCreateMessagePerBucket() {
-    PartitionedRegion spyPartitionedRegion = spy(partitionedRegion);
-    RegionEventImpl regionEvent =
-        new RegionEventImpl(spyPartitionedRegion, Operation.REGION_CLEAR, null, false,
-            spyPartitionedRegion.getMyId(), true);
-    when(spyPartitionedRegion.getTotalNumberOfBuckets()).thenReturn(3);
-    EventID eventID = new EventID(spyPartitionedRegion.getCache().getDistributedSystem());
-    List<ClearPRMessage> msgs = spyPartitionedRegion.createClearPRMessages(eventID);
-    assertThat(msgs.size()).isEqualTo(3);
-  }
-
-
-  @Test
   public void getBucketNodeForReadOrWriteReturnsPrimaryNodeForRegisterInterest() {
     // ARRANGE
     EntryEventImpl clientEvent = mock(EntryEventImpl.class);
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ClearPRMessageTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ClearPRMessageTest.java
deleted file mode 100644
index acdd4fc..0000000
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ClearPRMessageTest.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.cache.partitioned;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.anyLong;
-import static org.mockito.ArgumentMatchers.notNull;
-import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import org.apache.geode.distributed.internal.ClusterDistributionManager;
-import org.apache.geode.distributed.internal.DMStats;
-import org.apache.geode.distributed.internal.DistributionManager;
-import org.apache.geode.distributed.internal.ReplyException;
-import org.apache.geode.distributed.internal.ReplySender;
-import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
-import org.apache.geode.internal.cache.BucketRegion;
-import org.apache.geode.internal.cache.ForceReattemptException;
-import org.apache.geode.internal.cache.PartitionedRegion;
-import org.apache.geode.internal.cache.PartitionedRegionDataStore;
-import org.apache.geode.internal.cache.PartitionedRegionStats;
-import org.apache.geode.internal.cache.RegionEventImpl;
-
-public class ClearPRMessageTest {
-
-  ClearPRMessage message;
-  PartitionedRegion region;
-  PartitionedRegionDataStore dataStore;
-  BucketRegion bucketRegion;
-
-  @Before
-  public void setup() throws ForceReattemptException {
-    message = spy(new ClearPRMessage());
-    InternalDistributedMember member = mock(InternalDistributedMember.class);
-    region = mock(PartitionedRegion.class, RETURNS_DEEP_STUBS);
-    dataStore = mock(PartitionedRegionDataStore.class);
-    when(region.getDataStore()).thenReturn(dataStore);
-    when(region.getFullPath()).thenReturn("/test");
-    bucketRegion = mock(BucketRegion.class);
-    when(dataStore.getInitializedBucketForId(any(), any())).thenReturn(bucketRegion);
-    RegionEventImpl bucketRegionEventImpl = mock(RegionEventImpl.class);
-  }
-
-  @Test
-  public void doLocalClearThrowsExceptionWhenBucketIsNotPrimaryAtFirstCheck() {
-    when(bucketRegion.isPrimary()).thenReturn(false);
-
-    assertThatThrownBy(() -> message.doLocalClear(region))
-        .isInstanceOf(ForceReattemptException.class)
-        .hasMessageContaining(ClearPRMessage.BUCKET_NON_PRIMARY_MESSAGE);
-  }
-
-  @Test
-  public void doLocalClearThrowsExceptionWhenLockCannotBeObtained() {
-    when(bucketRegion.doLockForPrimary(false)).thenReturn(false);
-
-    assertThatThrownBy(() -> message.doLocalClear(region))
-        .isInstanceOf(ForceReattemptException.class)
-        .hasMessageContaining(ClearPRMessage.BUCKET_NON_PRIMARY_MESSAGE);
-  }
-
-  @Test
-  public void doLocalClearThrowsForceReattemptExceptionWhenAnExceptionIsThrownDuringClearOperation() {
-    NullPointerException exception = new NullPointerException("Error encountered");
-    doThrow(exception).when(bucketRegion).cmnClearRegion(any(), anyBoolean(), anyBoolean());
-
-    when(bucketRegion.doLockForPrimary(false)).thenReturn(true);
-
-    assertThatThrownBy(() -> message.doLocalClear(region))
-        .isInstanceOf(ForceReattemptException.class)
-        .hasMessageContaining(ClearPRMessage.EXCEPTION_THROWN_DURING_CLEAR_OPERATION);
-
-    // Confirm that cmnClearRegion was called
-    verify(bucketRegion, times(1)).cmnClearRegion(any(), anyBoolean(), anyBoolean());
-  }
-
-  @Test
-  public void doLocalClearInvokesCmnClearRegionWhenBucketIsPrimaryAndLockIsObtained()
-      throws ForceReattemptException {
-
-    // Be primary on the first check, then be not primary on the second check
-    when(bucketRegion.doLockForPrimary(false)).thenReturn(true);
-    assertThat(message.doLocalClear(region)).isTrue();
-
-    // Confirm that cmnClearRegion was called
-    verify(bucketRegion, times(1)).cmnClearRegion(any(), anyBoolean(), anyBoolean());
-  }
-
-  @Test
-  public void initMessageSetsReplyProcessorCorrectlyWithDefinedReplyProcessor() {
-    InternalDistributedMember sender = mock(InternalDistributedMember.class);
-
-    Set<InternalDistributedMember> recipients = new HashSet<>();
-    recipients.add(sender);
-
-    ClearPRMessage.ClearResponse mockProcessor = mock(ClearPRMessage.ClearResponse.class);
-    int mockProcessorId = 5;
-    when(mockProcessor.getProcessorId()).thenReturn(mockProcessorId);
-
-    message.initMessage(region, recipients, mockProcessor);
-
-    verify(mockProcessor, times(1)).enableSevereAlertProcessing();
-    assertThat(message.getProcessorId()).isEqualTo(mockProcessorId);
-  }
-
-  @Test
-  public void initMessageSetsProcessorIdToZeroWithNullProcessor() {
-    message.initMessage(region, null, null);
-
-    assertThat(message.getProcessorId()).isEqualTo(0);
-  }
-
-  @Test
-  public void sendThrowsExceptionIfPutOutgoingMethodReturnsNonNullSetOfFailures() {
-    InternalDistributedMember recipient = mock(InternalDistributedMember.class);
-
-    DistributionManager distributionManager = mock(DistributionManager.class);
-    when(region.getDistributionManager()).thenReturn(distributionManager);
-
-    doNothing().when(message).initMessage(any(), any(), any());
-    Set<InternalDistributedMember> failures = new HashSet<>();
-    failures.add(recipient);
-
-    when(distributionManager.putOutgoing(message)).thenReturn(failures);
-
-    assertThatThrownBy(() -> message.send(recipient, region))
-        .isInstanceOf(ForceReattemptException.class)
-        .hasMessageContaining("Failed sending <" + message + ">");
-  }
-
-  @SuppressWarnings("ResultOfMethodCallIgnored")
-  @Test
-  public void operateOnPartitionedRegionCallsSendReplyWithNoExceptionWhenDoLocalClearSucceeds()
-      throws ForceReattemptException {
-    ClusterDistributionManager distributionManager = mock(ClusterDistributionManager.class);
-    InternalDistributedMember sender = mock(InternalDistributedMember.class);
-    int processorId = 1000;
-    int startTime = 0;
-
-    doReturn(0).when(message).getBucketId();
-    doReturn(true).when(message).doLocalClear(region);
-    doReturn(sender).when(message).getSender();
-    doReturn(processorId).when(message).getProcessorId();
-
-    // We don't want to deal with mocking the behavior of sendReply() in this test, so we mock it to
-    // do nothing and verify later that it was called with proper input
-    doNothing().when(message).sendReply(any(), anyInt(), any(), any(), any(), anyLong());
-
-    message.operateOnPartitionedRegion(distributionManager, region, startTime);
-    assertThat(message.result).isTrue();
-
-    verify(message, times(0)).sendReply(sender, processorId, distributionManager, null, region,
-        startTime);
-  }
-
-  @SuppressWarnings("ResultOfMethodCallIgnored")
-  @Test
-  public void operateOnPartitionedRegionCallsSendReplyWithExceptionWhenDoLocalClearFailsWithException()
-      throws ForceReattemptException {
-    ClusterDistributionManager distributionManager = mock(ClusterDistributionManager.class);
-    InternalDistributedMember sender = mock(InternalDistributedMember.class);
-    int processorId = 1000;
-    int startTime = 0;
-    ForceReattemptException exception =
-        new ForceReattemptException(ClearPRMessage.BUCKET_NON_PRIMARY_MESSAGE);
-
-    doReturn(0).when(message).getBucketId();
-    doThrow(exception).when(message).doLocalClear(region);
-    doReturn(sender).when(message).getSender();
-    doReturn(processorId).when(message).getProcessorId();
-
-    // We don't want to deal with mocking the behavior of sendReply() in this test, so we mock it to
-    // do nothing and verify later that it was called with proper input
-    doNothing().when(message).sendReply(any(), anyInt(), any(), any(), any(), anyLong());
-
-    message.operateOnPartitionedRegion(distributionManager, region, startTime);
-
-    verify(message, times(1)).sendReply(any(), anyInt(), any(), notNull(), any(), anyLong());
-  }
-
-  @Test
-  public void sendReplyEndsMessageProcessingIfWeHaveARegionAndHaveStartedProcessing() {
-    DistributionManager distributionManager = mock(DistributionManager.class);
-    InternalDistributedMember recipient = mock(InternalDistributedMember.class);
-    PartitionedRegionStats partitionedRegionStats = mock(PartitionedRegionStats.class);
-    when(region.getPrStats()).thenReturn(partitionedRegionStats);
-
-    int processorId = 1000;
-    int startTime = 10000;
-    ReplyException exception = new ReplyException(ClearPRMessage.BUCKET_NON_PRIMARY_MESSAGE);
-
-    ReplySender replySender = mock(ReplySender.class);
-    doReturn(replySender).when(message).getReplySender(distributionManager);
-
-    message.sendReply(recipient, processorId, distributionManager, exception, region, startTime);
-
-    verify(partitionedRegionStats, times(1)).endPartitionMessagesProcessing(startTime);
-  }
-
-  @Test
-  public void sendReplyDoesNotEndMessageProcessingIfStartTimeIsZero() {
-    DistributionManager distributionManager = mock(DistributionManager.class);
-    InternalDistributedMember recipient = mock(InternalDistributedMember.class);
-    PartitionedRegionStats partitionedRegionStats = mock(PartitionedRegionStats.class);
-    when(region.getPrStats()).thenReturn(partitionedRegionStats);
-
-    int processorId = 1000;
-    int startTime = 0;
-    ReplyException exception = new ReplyException(ClearPRMessage.BUCKET_NON_PRIMARY_MESSAGE);
-
-    ReplySender replySender = mock(ReplySender.class);
-    doReturn(replySender).when(message).getReplySender(distributionManager);
-
-    message.sendReply(recipient, processorId, distributionManager, exception, region, startTime);
-
-    verify(partitionedRegionStats, times(0)).endPartitionMessagesProcessing(startTime);
-  }
-
-  @Test
-  public void clearReplyMessageProcessCallsSetResponseIfReplyProcessorIsInstanceOfClearResponse() {
-    DistributionManager distributionManager = mock(DistributionManager.class);
-    DMStats mockStats = mock(DMStats.class);
-    when(distributionManager.getStats()).thenReturn(mockStats);
-    ClearPRMessage.ClearReplyMessage clearReplyMessage = new ClearPRMessage.ClearReplyMessage();
-    ClearPRMessage.ClearResponse mockProcessor = mock(ClearPRMessage.ClearResponse.class);
-
-    clearReplyMessage.process(distributionManager, mockProcessor);
-
-    verify(mockProcessor, times(1)).setResponse(clearReplyMessage);
-  }
-}

[geode] 04/20: GEODE-9132: Fixup PartitionResponse constructors

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 0fed6779dcf928bc3f65a5edd023d3ef17914087
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Fri Apr 9 15:22:46 2021 -0700

    GEODE-9132: Fixup PartitionResponse constructors
    
    * Chain constructors to only one constructor that calls super
    * Expose all arguments for dependency injection
    * Provide type to recipients
---
 .../cache/partitioned/PartitionMessage.java        | 32 ++++++++++++++--------
 1 file changed, 21 insertions(+), 11 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessage.java
index 49e5f51..6e3eed5 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessage.java
@@ -14,6 +14,8 @@
  */
 package org.apache.geode.internal.cache.partitioned;
 
+import static java.util.Collections.singleton;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -22,6 +24,7 @@ import java.util.Set;
 
 import org.apache.logging.log4j.Logger;
 
+import org.apache.geode.CancelCriterion;
 import org.apache.geode.CancelException;
 import org.apache.geode.InternalGemFireError;
 import org.apache.geode.SystemFailure;
@@ -754,24 +757,31 @@ public abstract class PartitionMessage extends DistributionMessage
      */
     boolean responseRequired;
 
-    public PartitionResponse(InternalDistributedSystem dm, Set initMembers) {
-      this(dm, initMembers, true);
+    protected PartitionResponse(InternalDistributedSystem dm,
+        Set<InternalDistributedMember> recipients) {
+      this(dm, recipients, true);
     }
 
-    public PartitionResponse(InternalDistributedSystem dm, Set initMembers, boolean register) {
-      super(dm, initMembers);
-      if (register) {
-        register();
-      }
+    protected PartitionResponse(InternalDistributedSystem system,
+        Set<InternalDistributedMember> recipients, boolean register) {
+      this(system.getDistributionManager(), system, recipients, system.getCancelCriterion(),
+          register);
+    }
+
+    protected PartitionResponse(InternalDistributedSystem system,
+        InternalDistributedMember member) {
+      this(system.getDistributionManager(), system, singleton(member), system.getCancelCriterion());
     }
 
-    public PartitionResponse(InternalDistributedSystem dm, InternalDistributedMember member) {
-      this(dm, member, true);
+    protected PartitionResponse(DistributionManager dm, InternalDistributedSystem system,
+        Set<InternalDistributedMember> recipients, CancelCriterion cancelCriterion) {
+      this(dm, system, recipients, cancelCriterion, true);
     }
 
-    public PartitionResponse(InternalDistributedSystem dm, InternalDistributedMember member,
+    private PartitionResponse(DistributionManager dm, InternalDistributedSystem system,
+        Set<InternalDistributedMember> recipients, CancelCriterion cancelCriterion,
         boolean register) {
-      super(dm, member);
+      super(dm, system, recipients, cancelCriterion);
       if (register) {
         register();
       }

[geode] 13/20: GEODE-9132: PartitionedRegionClearWithConcurrentOperationsDUnitTest cleanup 3

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit ce2a9eebfaa133978ef54d28d539498174eebc8b
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Apr 19 16:42:22 2021 -0700

    GEODE-9132: PartitionedRegionClearWithConcurrentOperationsDUnitTest cleanup 3
---
 ...gionClearWithConcurrentOperationsDUnitTest.java | 99 ++++++++++++----------
 1 file changed, 52 insertions(+), 47 deletions(-)

diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
index b2aacc0..7ef187f 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
@@ -53,6 +53,7 @@ import org.apache.geode.distributed.internal.DistributionMessage;
 import org.apache.geode.distributed.internal.DistributionMessageObserver;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.membership.api.MembershipManagerHelper;
+import org.apache.geode.internal.cache.PartitionedRegionClearMessage.OperationType;
 import org.apache.geode.internal.cache.versions.RegionVersionHolder;
 import org.apache.geode.internal.cache.versions.RegionVersionVector;
 import org.apache.geode.internal.cache.versions.VersionSource;
@@ -83,10 +84,10 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   private VM accessor;
 
   @Before
-  public void setUp() throws Exception {
-    server1 = getVM(TestVM.SERVER1.vmNumber);
-    server2 = getVM(TestVM.SERVER2.vmNumber);
-    accessor = getVM(TestVM.ACCESSOR.vmNumber);
+  public void setUp() {
+    server1 = getVM(TestVM.SERVER1.getVmId());
+    server2 = getVM(TestVM.SERVER2.getVmId());
+    accessor = getVM(TestVM.ACCESSOR.getVmId());
   }
 
   /**
@@ -102,7 +103,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @TestCaseName("[{index}] {method}(Coordinator:{0}, RegionType:{1})")
   public void clearWithConcurrentPutGetRemoveShouldWorkCorrectly(TestVM coordinatorVM,
       RegionShortcut regionShortcut) throws InterruptedException {
-    parametrizedSetup(regionShortcut);
+    createRegions(regionShortcut);
 
     // Let all VMs continuously execute puts and gets for 60 seconds.
     final int workMillis = 60000;
@@ -113,7 +114,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
         accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
 
     // Clear the region every second for 60 seconds.
-    getVM(coordinatorVM.vmNumber).invoke(() -> executeClears(workMillis, 1000));
+    getVM(coordinatorVM.getVmId()).invoke(() -> executeClears(workMillis, 1000));
 
     // Let asyncInvocations finish.
     for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
@@ -138,7 +139,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @TestCaseName("[{index}] {method}(Coordinator:{0}, RegionType:{1})")
   public void clearWithConcurrentPutAllRemoveAllShouldWorkCorrectly(TestVM coordinatorVM,
       RegionShortcut regionShortcut) throws InterruptedException {
-    parametrizedSetup(regionShortcut);
+    createRegions(regionShortcut);
 
     // Let all VMs continuously execute putAll and removeAll for 15 seconds.
     final int workMillis = 15000;
@@ -151,7 +152,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
         accessor.invokeAsync(() -> executeRemoveAlls(4000, 6000, workMillis)));
 
     // Clear the region every half second for 15 seconds.
-    getVM(coordinatorVM.vmNumber).invoke(() -> executeClears(workMillis, 500));
+    getVM(coordinatorVM.getVmId()).invoke(() -> executeClears(workMillis, 500));
 
     // Let asyncInvocations finish.
     for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
@@ -176,7 +177,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @Parameters({"PARTITION", "PARTITION_REDUNDANT"})
   @TestCaseName("[{index}] {method}(RegionType:{0})")
   public void clearShouldFailWhenCoordinatorMemberIsBounced(RegionShortcut regionShortcut) {
-    parametrizedSetup(regionShortcut);
+    createRegions(regionShortcut);
     final int entries = 1000;
     populateRegion(accessor, entries, asList(accessor, server1, server2));
 
@@ -192,7 +193,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     // Wait for member to get back online and assign all buckets.
     server1.invoke(() -> {
       cacheRule.createCache();
-      initDataStore(regionShortcut);
+      createDataStore(regionShortcut);
       await().untilAsserted(
           () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
       PartitionRegionHelper.assignBucketsToPartitions(cacheRule.getCache().getRegion(REGION_NAME));
@@ -219,7 +220,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @TestCaseName("[{index}] {method}(Coordinator:{0})")
   public void clearOnRedundantPartitionRegionWithConcurrentPutGetRemoveShouldWorkCorrectlyWhenNonCoordinatorMembersAreBounced(
       TestVM coordinatorVM) throws InterruptedException {
-    parametrizedSetup(RegionShortcut.PARTITION_REDUNDANT);
+    createRegions(RegionShortcut.PARTITION_REDUNDANT);
     final int entries = 7500;
     populateRegion(accessor, entries, asList(accessor, server1, server2));
     server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
@@ -234,12 +235,12 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
 
     // Retry the clear operation on the region until success (server2 will go down, but other
     // members will eventually become primary for those buckets previously hosted by server2).
-    executeClearWithRetry(getVM(coordinatorVM.vmNumber));
+    executeClearWithRetry(getVM(coordinatorVM.getVmId()));
 
     // Wait for member to get back online.
     server2.invoke(() -> {
       cacheRule.createCache();
-      initDataStore(RegionShortcut.PARTITION_REDUNDANT);
+      createDataStore(RegionShortcut.PARTITION_REDUNDANT);
       await().untilAsserted(
           () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
     });
@@ -271,7 +272,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @TestCaseName("[{index}] {method}(Coordinator:{0})")
   public void clearOnNonRedundantPartitionRegionWithConcurrentPutGetRemoveShouldFailWhenNonCoordinatorMembersAreBounced(
       TestVM coordinatorVM) throws InterruptedException {
-    parametrizedSetup(RegionShortcut.PARTITION);
+    createRegions(RegionShortcut.PARTITION);
     final int entries = 7500;
     populateRegion(accessor, entries, asList(accessor, server1, server2));
     server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
@@ -285,7 +286,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
         accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
 
     // Clear the region.
-    getVM(coordinatorVM.vmNumber).invoke(() -> {
+    getVM(coordinatorVM.getVmId()).invoke(() -> {
       assertThatThrownBy(() -> cacheRule.getCache().getRegion(REGION_NAME).clear())
           .isInstanceOf(PartitionedRegionPartialClearException.class);
     });
@@ -310,7 +311,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @TestCaseName("[{index}] {method}(Coordinator:{0})")
   public void clearOnRedundantPartitionRegionWithConcurrentPutAllRemoveAllShouldWorkCorrectlyWhenNonCoordinatorMembersAreBounced(
       TestVM coordinatorVM) throws InterruptedException {
-    parametrizedSetup(RegionShortcut.PARTITION_REDUNDANT);
+    createRegions(RegionShortcut.PARTITION_REDUNDANT);
     server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
 
     // Let all VMs continuously execute putAll/removeAll for 30 seconds.
@@ -321,12 +322,12 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
 
     // Retry the clear operation on the region until success (server2 will go down, but other
     // members will eventually become primary for those buckets previously hosted by server2).
-    executeClearWithRetry(getVM(coordinatorVM.vmNumber));
+    executeClearWithRetry(getVM(coordinatorVM.getVmId()));
 
     // Wait for member to get back online.
     server2.invoke(() -> {
       cacheRule.createCache();
-      initDataStore(RegionShortcut.PARTITION_REDUNDANT);
+      createDataStore(RegionShortcut.PARTITION_REDUNDANT);
       await().untilAsserted(
           () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
     });
@@ -356,7 +357,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @TestCaseName("[{index}] {method}(Coordinator:{0})")
   public void clearOnNonRedundantPartitionRegionWithConcurrentPutAllRemoveAllShouldFailWhenNonCoordinatorMembersAreBounced(
       TestVM coordinatorVM) throws InterruptedException {
-    parametrizedSetup(RegionShortcut.PARTITION);
+    createRegions(RegionShortcut.PARTITION);
     server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
 
     final int workMillis = 30000;
@@ -365,7 +366,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
         accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)));
 
     // Clear the region.
-    getVM(coordinatorVM.vmNumber).invoke(() -> {
+    getVM(coordinatorVM.getVmId()).invoke(() -> {
       assertThatThrownBy(() -> cacheRule.getCache().getRegion(REGION_NAME).clear())
           .isInstanceOf(PartitionedRegionPartialClearException.class);
     });
@@ -376,7 +377,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     }
   }
 
-  private void initAccessor(RegionShortcut regionShortcut) {
+  private void createAccessor(RegionShortcut regionShortcut) {
     PartitionAttributes<String, String> attrs = new PartitionAttributesFactory<String, String>()
         .setTotalNumBuckets(BUCKETS)
         .setLocalMaxMemory(0)
@@ -388,7 +389,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
 
   }
 
-  private void initDataStore(RegionShortcut regionShortcut) {
+  private void createDataStore(RegionShortcut regionShortcut) {
     PartitionAttributes<String, String> attrs = new PartitionAttributesFactory<String, String>()
         .setTotalNumBuckets(BUCKETS)
         .create();
@@ -398,10 +399,10 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
         .create(REGION_NAME);
   }
 
-  private void parametrizedSetup(RegionShortcut regionShortcut) {
-    server1.invoke(() -> initDataStore(regionShortcut));
-    server2.invoke(() -> initDataStore(regionShortcut));
-    accessor.invoke(() -> initAccessor(regionShortcut));
+  private void createRegions(RegionShortcut regionShortcut) {
+    server1.invoke(() -> createDataStore(regionShortcut));
+    server2.invoke(() -> createDataStore(regionShortcut));
+    accessor.invoke(() -> createAccessor(regionShortcut));
   }
 
   private void waitForSilence() {
@@ -637,10 +638,14 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   private enum TestVM {
     ACCESSOR(0), SERVER1(1), SERVER2(2);
 
-    final int vmNumber;
+    private final int vmId;
 
-    TestVM(int vmNumber) {
-      this.vmNumber = vmNumber;
+    TestVM(int vmId) {
+      this.vmId = vmId;
+    }
+
+    int getVmId() {
+      return vmId;
     }
   }
 
@@ -656,24 +661,6 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     }
 
     /**
-     * Shutdowns the VM whenever the message is an instance of
-     * {@link PartitionedRegionClearMessage}.
-     */
-    private void shutdownMember(DistributionMessage message) {
-      if (message instanceof PartitionedRegionClearMessage) {
-        if (((PartitionedRegionClearMessage) message)
-            .getOperationType() == PartitionedRegionClearMessage.OperationType.OP_PR_CLEAR) {
-          DistributionMessageObserver.setInstance(null);
-          InternalDistributedSystem.getConnectedInstance().stopReconnectingNoDisconnect();
-          MembershipManagerHelper
-              .crashDistributedSystem(InternalDistributedSystem.getConnectedInstance());
-          await().untilAsserted(
-              () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNull());
-        }
-      }
-    }
-
-    /**
      * Invoked only on clear coordinator VM.
      *
      * @param dm the distribution manager that received the message
@@ -702,5 +689,23 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
         super.beforeProcessMessage(dm, message);
       }
     }
+
+    /**
+     * Shutdowns the VM whenever the message is an instance of
+     * {@link PartitionedRegionClearMessage}.
+     */
+    private void shutdownMember(DistributionMessage message) {
+      if (message instanceof PartitionedRegionClearMessage) {
+        PartitionedRegionClearMessage clearMessage = (PartitionedRegionClearMessage) message;
+        if (clearMessage.getOperationType() == OperationType.OP_PR_CLEAR) {
+          DistributionMessageObserver.setInstance(null);
+          InternalDistributedSystem.getConnectedInstance().stopReconnectingNoDisconnect();
+          MembershipManagerHelper
+              .crashDistributedSystem(InternalDistributedSystem.getConnectedInstance());
+          await().untilAsserted(
+              () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNull());
+        }
+      }
+    }
   }
 }

[geode] 20/20: rebase to develop

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit a66dde8ff7831ed72981fd592192562a79661eeb
Author: Jinmei Liao <ji...@pivotal.io>
AuthorDate: Mon Mar 7 13:25:27 2022 -0800

    rebase to develop
---
 .../org/apache/geode/internal/cache/partitioned/FetchKeysMessage.java  | 3 ++-
 .../java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java    | 2 +-
 .../java/org/apache/geode/internal/cache/PartitionedRegionTest.java    | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchKeysMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchKeysMessage.java
index 597486d..ee0eef8 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchKeysMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchKeysMessage.java
@@ -517,7 +517,8 @@ public class FetchKeysMessage extends PartitionMessage {
      */
     private volatile boolean lastChunkReceived;
 
-    public FetchKeysResponse(InternalDistributedSystem ds, Set<?> recipients) {
+    public FetchKeysResponse(InternalDistributedSystem ds,
+        Set<InternalDistributedMember> recipients) {
       super(ds, recipients);
       returnValue = new HashSet<>();
     }
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java
index 5b9737f..98d41dc 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java
@@ -18,8 +18,8 @@ import static java.util.Collections.emptySet;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.CALLS_REAL_METHODS;
 import static org.mockito.Mockito.anyLong;
 import static org.mockito.Mockito.doNothing;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java
index 02298c7..9217887 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java
@@ -28,8 +28,8 @@ import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.isNull;
-import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doCallRealMethod;
+import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;

[geode] 17/20: GEODE-9195: Remove PR clear local locking (#6410)

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit eb6f7c64c1d0c40368843a737696944e57e82c65
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Fri Apr 30 13:51:33 2021 -0700

    GEODE-9195: Remove PR clear local locking (#6410)
    
    Unit test changes in BucketRegion and DistributedRegion.
    
    Unit test most of PartitionedRegionClearMessage.
---
 .../codeAnalysis/sanctionedDataSerializables.txt   |   2 +-
 .../apache/geode/internal/cache/BucketRegion.java  |  24 +-
 .../geode/internal/cache/DistributedRegion.java    |  29 ++-
 .../internal/cache/PartitionedRegionClear.java     |  15 +-
 .../cache/PartitionedRegionClearMessage.java       | 109 ++++++--
 .../geode/internal/cache/RegionEventFactory.java   |  30 +++
 .../internal/cache/BucketRegionJUnitTest.java      |  59 ++++-
 .../internal/cache/DistributedRegionTest.java      |  91 +++++--
 .../cache/PartitionedRegionClearMessageTest.java   | 285 +++++++++++++++++++++
 9 files changed, 559 insertions(+), 85 deletions(-)

diff --git a/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt b/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
index 6dac4a0..152ecf5 100644
--- a/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
+++ b/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
@@ -1066,7 +1066,7 @@ fromData,207
 toData,178
 
 org/apache/geode/internal/cache/PartitionedRegionClearMessage,2
-fromData,40
+fromData,49
 toData,36
 
 org/apache/geode/internal/cache/PartitionedRegionClearMessage$PartitionedRegionClearReplyMessage,2
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
index 472ac86..4e6ee18 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
@@ -588,11 +588,9 @@ public class BucketRegion extends DistributedRegion implements Bucket {
     // get rvvLock
     Set<InternalDistributedMember> participants =
         getCacheDistributionAdvisor().adviseInvalidateRegion();
-    boolean isLockedAlready = this.partitionedRegion.getPartitionedRegionClear()
-        .isLockedForListenerAndClientNotification();
 
     try {
-      obtainWriteLocksForClear(regionEvent, participants, isLockedAlready);
+      obtainWriteLocksForClear(regionEvent, participants);
       // no need to dominate my own rvv.
       // Clear is on going here, there won't be GII for this member
       clearRegionLocally(regionEvent, cacheWrite, null);
@@ -600,10 +598,28 @@ public class BucketRegion extends DistributedRegion implements Bucket {
 
       // TODO: call reindexUserDataRegion if there're lucene indexes
     } finally {
-      releaseWriteLocksForClear(regionEvent, participants, isLockedAlready);
+      releaseWriteLocksForClear(regionEvent, participants);
     }
   }
 
+  @Override
+  protected void obtainWriteLocksForClear(RegionEventImpl regionEvent,
+      Set<InternalDistributedMember> participants) {
+    lockAndFlushClearToOthers(regionEvent, participants);
+  }
+
+  @Override
+  protected void releaseWriteLocksForClear(RegionEventImpl regionEvent,
+      Set<InternalDistributedMember> participants) {
+    distributedClearOperationReleaseLocks(regionEvent, participants);
+  }
+
+  @VisibleForTesting
+  void distributedClearOperationReleaseLocks(RegionEventImpl regionEvent,
+      Set<InternalDistributedMember> participants) {
+    DistributedClearOperation.releaseLocks(regionEvent, participants);
+  }
+
   long generateTailKey() {
     long key = eventSeqNum.addAndGet(partitionedRegion.getTotalNumberOfBuckets());
     if (key < 0 || key % getPartitionedRegion().getTotalNumberOfBuckets() != getId()) {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
index 883c75b..4035480 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
@@ -2025,13 +2025,13 @@ public class DistributedRegion extends LocalRegion implements InternalDistribute
               getCacheDistributionAdvisor().adviseInvalidateRegion();
           // pause all generation of versions and flush from the other members to this one
           try {
-            obtainWriteLocksForClear(regionEvent, participants, false);
+            obtainWriteLocksForClear(regionEvent, participants);
             clearRegionLocally(regionEvent, cacheWrite, null);
             if (!regionEvent.isOriginRemote() && regionEvent.getOperation().isDistributed()) {
               distributeClearOperation(regionEvent, null, participants);
             }
           } finally {
-            releaseWriteLocksForClear(regionEvent, participants, false);
+            releaseWriteLocksForClear(regionEvent, participants);
           }
         } finally {
           distributedUnlockForClear();
@@ -2080,30 +2080,31 @@ public class DistributedRegion extends LocalRegion implements InternalDistribute
     }
   }
 
-
   /**
    * obtain locks preventing generation of new versions in other members
    */
   protected void obtainWriteLocksForClear(RegionEventImpl regionEvent,
-      Set<InternalDistributedMember> participants, boolean localLockedAlready) {
-    if (!localLockedAlready) {
-      lockLocallyForClear(getDistributionManager(), getMyId(), regionEvent);
-    }
-    lockAndFlushClearToOthers(regionEvent, participants);
+      Set<InternalDistributedMember> recipients) {
+    lockLocallyForClear(getDistributionManager(), getMyId(), regionEvent);
+    lockAndFlushClearToOthers(regionEvent, recipients);
   }
 
   /**
    * releases the locks obtained in obtainWriteLocksForClear
    */
   protected void releaseWriteLocksForClear(RegionEventImpl regionEvent,
-      Set<InternalDistributedMember> participants,
-      boolean localLockedAlready) {
-    if (!localLockedAlready) {
-      releaseLockLocallyForClear(regionEvent);
-    }
-    DistributedClearOperation.releaseLocks(regionEvent, participants);
+      Set<InternalDistributedMember> recipients) {
+    releaseLockLocallyForClear(regionEvent);
+    distributedClearOperationReleaseLocks(regionEvent, recipients);
   }
 
+  @VisibleForTesting
+  void distributedClearOperationReleaseLocks(RegionEventImpl regionEvent,
+      Set<InternalDistributedMember> recipients) {
+    DistributedClearOperation.releaseLocks(regionEvent, recipients);
+  }
+
+  @VisibleForTesting
   void lockAndFlushClearToOthers(RegionEventImpl regionEvent,
       Set<InternalDistributedMember> participants) {
     DistributedClearOperation.lockAndFlushToOthers(regionEvent, participants);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
index 5f4e589..8403306 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
@@ -36,6 +36,7 @@ import org.apache.geode.distributed.internal.DistributionManager;
 import org.apache.geode.distributed.internal.MembershipListener;
 import org.apache.geode.distributed.internal.ReplyException;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.cache.PartitionedRegionClearMessage.OperationType;
 import org.apache.geode.internal.cache.PartitionedRegionClearMessage.PartitionedRegionClearResponse;
 import org.apache.geode.internal.serialization.KnownVersion;
 import org.apache.geode.logging.internal.log4j.api.LogService;
@@ -141,8 +142,7 @@ public class PartitionedRegionClear {
    */
   void obtainLockForClear(RegionEventImpl event) {
     obtainClearLockLocal(partitionedRegion.getDistributionManager().getId());
-    sendPartitionedRegionClearMessage(event,
-        PartitionedRegionClearMessage.OperationType.OP_LOCK_FOR_PR_CLEAR);
+    sendPartitionedRegionClearMessage(event, OperationType.OP_LOCK_FOR_PR_CLEAR);
   }
 
   /**
@@ -150,8 +150,7 @@ public class PartitionedRegionClear {
    */
   void releaseLockForClear(RegionEventImpl event) {
     releaseClearLockLocal();
-    sendPartitionedRegionClearMessage(event,
-        PartitionedRegionClearMessage.OperationType.OP_UNLOCK_FOR_PR_CLEAR);
+    sendPartitionedRegionClearMessage(event, OperationType.OP_UNLOCK_FOR_PR_CLEAR);
   }
 
   /**
@@ -162,7 +161,7 @@ public class PartitionedRegionClear {
     Set<Integer> localPrimaryBuckets = clearRegionLocal(regionEvent);
     // this includes all remote primary buckets and their secondaries
     Set<Integer> remotePrimaryBuckets = sendPartitionedRegionClearMessage(regionEvent,
-        PartitionedRegionClearMessage.OperationType.OP_PR_CLEAR);
+        OperationType.OP_PR_CLEAR);
 
     Set<Integer> allBucketsCleared = new HashSet<>();
     allBucketsCleared.addAll(localPrimaryBuckets);
@@ -332,7 +331,7 @@ public class PartitionedRegionClear {
   }
 
   protected Set<Integer> sendPartitionedRegionClearMessage(RegionEventImpl event,
-      PartitionedRegionClearMessage.OperationType op) {
+      OperationType op) {
     RegionEventImpl eventForLocalClear = (RegionEventImpl) event.clone();
     eventForLocalClear.setOperation(Operation.REGION_LOCAL_CLEAR);
 
@@ -349,7 +348,7 @@ public class PartitionedRegionClear {
    * @return buckets that are cleared. empty set if any exception happened
    */
   protected Set<Integer> attemptToSendPartitionedRegionClearMessage(RegionEventImpl event,
-      PartitionedRegionClearMessage.OperationType op)
+      OperationType op)
       throws ForceReattemptException {
     Set<Integer> clearedBuckets = new HashSet<>();
 
@@ -394,7 +393,7 @@ public class PartitionedRegionClear {
       clearMessage.send();
 
       clearResponse.waitForRepliesUninterruptibly();
-      clearedBuckets = clearResponse.bucketsCleared;
+      clearedBuckets = clearResponse.getBucketsCleared();
 
     } catch (ReplyException e) {
       Throwable cause = e.getCause();
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java
index cd33f78..c4c1ca5 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java
@@ -14,15 +14,19 @@
  */
 package org.apache.geode.internal.cache;
 
+import static java.util.Collections.unmodifiableSet;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
+import java.util.Collection;
 import java.util.Objects;
 import java.util.Set;
 
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.DataSerializer;
+import org.apache.geode.annotations.VisibleForTesting;
 import org.apache.geode.cache.CacheException;
 import org.apache.geode.cache.Operation;
 import org.apache.geode.distributed.internal.ClusterDistributionManager;
@@ -52,22 +56,47 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
   private Object callbackArgument;
   private OperationType operationType;
   private EventID eventId;
-  private PartitionedRegion partitionedRegion;
   private Set<Integer> bucketsCleared;
+  private DistributionManager distributionManager;
+  private RegionEventFactory regionEventFactory;
 
   public PartitionedRegionClearMessage() {
     // nothing
   }
 
-  PartitionedRegionClearMessage(Set<InternalDistributedMember> recipients,
-      PartitionedRegion partitionedRegion, ReplyProcessor21 replyProcessor21,
-      PartitionedRegionClearMessage.OperationType operationType,
+  PartitionedRegionClearMessage(Collection<InternalDistributedMember> recipients,
+      PartitionedRegion partitionedRegion,
+      ReplyProcessor21 replyProcessor21,
+      OperationType operationType,
       final RegionEventImpl regionEvent) {
-    super(recipients, partitionedRegion.getPRId(), replyProcessor21);
-    this.partitionedRegion = partitionedRegion;
+    this(recipients,
+        partitionedRegion.getDistributionManager(),
+        partitionedRegion.getPRId(),
+        replyProcessor21,
+        operationType,
+        regionEvent.getRawCallbackArgument(),
+        regionEvent.getEventId(),
+        partitionedRegion.getCache().getTxManager().isDistributed(),
+        RegionEventImpl::new);
+  }
+
+  @VisibleForTesting
+  PartitionedRegionClearMessage(Collection<InternalDistributedMember> recipients,
+      DistributionManager distributionManager,
+      int partitionedRegionId,
+      ReplyProcessor21 replyProcessor21,
+      OperationType operationType,
+      Object callbackArgument,
+      EventID eventId,
+      boolean isTransactionDistributed,
+      RegionEventFactory regionEventFactory) {
+    super(recipients, partitionedRegionId, replyProcessor21);
+    setTransactionDistributed(isTransactionDistributed);
+    this.distributionManager = distributionManager;
     this.operationType = operationType;
-    callbackArgument = regionEvent.getRawCallbackArgument();
-    eventId = regionEvent.getEventId();
+    this.callbackArgument = callbackArgument;
+    this.eventId = eventId;
+    this.regionEventFactory = regionEventFactory;
   }
 
   @Override
@@ -82,8 +111,7 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
   public void send() {
     Objects.requireNonNull(getRecipients(), "ClearMessage NULL recipients set");
 
-    setTransactionDistributed(partitionedRegion.getCache().getTxManager().isDistributed());
-    partitionedRegion.getDistributionManager().putOutgoing(this);
+    distributionManager.putOutgoing(this);
   }
 
   @Override
@@ -108,15 +136,17 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
       return true;
     }
 
+    PartitionedRegionClear partitionedRegionClear = partitionedRegion.getPartitionedRegionClear();
+
     if (operationType == OperationType.OP_LOCK_FOR_PR_CLEAR) {
-      partitionedRegion.getPartitionedRegionClear().obtainClearLockLocal(getSender());
+      partitionedRegionClear.obtainClearLockLocal(getSender());
     } else if (operationType == OperationType.OP_UNLOCK_FOR_PR_CLEAR) {
-      partitionedRegion.getPartitionedRegionClear().releaseClearLockLocal();
+      partitionedRegionClear.releaseClearLockLocal();
     } else {
-      RegionEventImpl event =
-          new RegionEventImpl(partitionedRegion, Operation.REGION_CLEAR, callbackArgument, true,
+      RegionEventImpl event = (RegionEventImpl) regionEventFactory
+          .create(partitionedRegion, Operation.REGION_CLEAR, callbackArgument, true,
               partitionedRegion.getMyId(), getEventID());
-      bucketsCleared = partitionedRegion.getPartitionedRegionClear().clearRegionLocal(event);
+      bucketsCleared = partitionedRegionClear.clearRegionLocal(event);
     }
     return true;
   }
@@ -125,9 +155,9 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
   protected void appendFields(StringBuilder stringBuilder) {
     super.appendFields(stringBuilder);
     stringBuilder
-        .append(" cbArg=")
+        .append(" callbackArgument=")
         .append(callbackArgument)
-        .append(" op=")
+        .append(" operationType=")
         .append(operationType);
   }
 
@@ -141,8 +171,10 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
       throws IOException, ClassNotFoundException {
     super.fromData(in, context);
     callbackArgument = DataSerializer.readObject(in);
-    operationType = PartitionedRegionClearMessage.OperationType.values()[in.readByte()];
+    operationType = OperationType.values()[in.readByte()];
     eventId = DataSerializer.readObject(in);
+
+    regionEventFactory = RegionEventImpl::new;
   }
 
   @Override
@@ -160,21 +192,36 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
     if (partitionedRegion != null && startTime > 0) {
       partitionedRegion.getPrStats().endPartitionMessagesProcessing(startTime);
     }
-    PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage
+    PartitionedRegionClearReplyMessage
         .send(recipient, processorId, getReplySender(distributionManager), operationType,
             bucketsCleared, replyException);
   }
 
+  @VisibleForTesting
+  DistributionManager getDistributionManagerForTesting() {
+    return distributionManager;
+  }
+
+  @VisibleForTesting
+  Object getCallbackArgumentForTesting() {
+    return callbackArgument;
+  }
+
+  @VisibleForTesting
+  RegionEventFactory getRegionEventFactoryForTesting() {
+    return regionEventFactory;
+  }
+
   /**
    * The response on which to wait for all the replies. This response ignores any exceptions
    * received from the "far side"
    */
   public static class PartitionedRegionClearResponse extends ReplyProcessor21 {
 
-    CopyOnWriteHashSet<Integer> bucketsCleared = new CopyOnWriteHashSet<>();
+    private final Set<Integer> bucketsCleared = new CopyOnWriteHashSet<>();
 
     public PartitionedRegionClearResponse(InternalDistributedSystem system,
-        Set<InternalDistributedMember> recipients) {
+        Collection<InternalDistributedMember> recipients) {
       super(system, recipients);
     }
 
@@ -188,12 +235,15 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
       }
       process(message, true);
     }
+
+    Set<Integer> getBucketsCleared() {
+      return unmodifiableSet(bucketsCleared);
+    }
   }
 
   public static class PartitionedRegionClearReplyMessage extends ReplyMessage {
 
     private Set<Integer> bucketsCleared;
-
     private OperationType operationType;
 
     @Override
@@ -201,14 +251,17 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
       return true;
     }
 
-    public static void send(InternalDistributedMember recipient, int processorId,
-        ReplySender replySender, OperationType operationType, Set<Integer> bucketsCleared,
+    private static void send(InternalDistributedMember recipient,
+        int processorId,
+        ReplySender replySender,
+        OperationType operationType,
+        Set<Integer> bucketsCleared,
         ReplyException replyException) {
       Objects.requireNonNull(recipient, "partitionedRegionClearReplyMessage NULL reply message");
 
-      PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage replyMessage =
-          new PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage(processorId,
-              operationType, bucketsCleared, replyException);
+      PartitionedRegionClearReplyMessage replyMessage =
+          new PartitionedRegionClearReplyMessage(processorId, operationType, bucketsCleared,
+              replyException);
 
       replyMessage.setRecipient(recipient);
       replySender.putOutgoing(replyMessage);
@@ -260,7 +313,7 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
     public void fromData(DataInput in, DeserializationContext context)
         throws IOException, ClassNotFoundException {
       super.fromData(in, context);
-      operationType = PartitionedRegionClearMessage.OperationType.values()[in.readByte()];
+      operationType = OperationType.values()[in.readByte()];
       bucketsCleared = DataSerializer.readObject(in);
     }
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionEventFactory.java b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionEventFactory.java
new file mode 100644
index 0000000..c759a44
--- /dev/null
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionEventFactory.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache;
+
+import org.apache.geode.cache.Operation;
+import org.apache.geode.cache.RegionEvent;
+import org.apache.geode.distributed.DistributedMember;
+
+@FunctionalInterface
+public interface RegionEventFactory {
+
+  RegionEvent create(PartitionedRegion partitionedRegion,
+      Operation operation,
+      Object callbackArgument,
+      boolean originRemote,
+      DistributedMember distributedMember,
+      EventID eventId);
+}
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java
index 591dc95..5b9737f 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java
@@ -14,11 +14,13 @@
  */
 package org.apache.geode.internal.cache;
 
+import static java.util.Collections.emptySet;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.Mockito.CALLS_REAL_METHODS;
 import static org.mockito.Mockito.anyLong;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
@@ -29,6 +31,7 @@ import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import java.util.Set;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -36,6 +39,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
 import org.junit.Test;
 
 import org.apache.geode.cache.RegionAttributes;
+import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.cache.versions.RegionVersionVector;
 import org.apache.geode.internal.statistics.StatisticsClock;
 
@@ -183,17 +187,6 @@ public class BucketRegionJUnitTest extends DistributedRegionJUnitTest {
   }
 
   @Test
-  public void obtainWriteLocksForClearInBRShouldDistribute() {
-    RegionEventImpl event = createClearRegionEvent();
-    BucketRegion region = (BucketRegion) event.getRegion();
-    doNothing().when(region).lockLocallyForClear(any(), any(), any());
-    doNothing().when(region).lockAndFlushClearToOthers(any(), any());
-    region.obtainWriteLocksForClear(event, null, false);
-    verify(region).lockLocallyForClear(any(), any(), eq(event));
-    verify(region).lockAndFlushClearToOthers(eq(event), eq(null));
-  }
-
-  @Test
   public void updateSizeToZeroOnClearBucketRegion() {
     RegionEventImpl event = createClearRegionEvent();
     BucketRegion region = (BucketRegion) event.getRegion();
@@ -211,4 +204,48 @@ public class BucketRegionJUnitTest extends DistributedRegionJUnitTest {
     long sizeAfterClear = region.getTotalBytes();
     assertEquals(0, sizeAfterClear);
   }
+
+  @Test
+  public void obtainWriteLocksForClearInBRShouldLockAndFlushToOthers() {
+    RegionEventImpl event = createClearRegionEvent();
+    BucketRegion region = (BucketRegion) event.getRegion();
+    doNothing().when(region).lockAndFlushClearToOthers(any(), any());
+    region.obtainWriteLocksForClear(event, null);
+    verify(region).lockAndFlushClearToOthers(eq(event), eq(null));
+  }
+
+  @Test
+  public void obtainWriteLocksForClear_invokes_lockAndFlushClearToOthers() {
+    Set<InternalDistributedMember> recipients = emptySet();
+    BucketRegion bucketRegion = bucketRegionForClearLocking();
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    bucketRegion.obtainWriteLocksForClear(regionEvent, recipients);
+
+    verify(bucketRegion).lockAndFlushClearToOthers(regionEvent, recipients);
+  }
+
+  @Test
+  public void releaseWriteLocksForClear_invokes_distributedClearOperationReleaseLocks() {
+    Set<InternalDistributedMember> recipients = emptySet();
+    BucketRegion bucketRegion = bucketRegionForClearLocking();
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    bucketRegion.releaseWriteLocksForClear(regionEvent, recipients);
+
+    verify(bucketRegion).distributedClearOperationReleaseLocks(regionEvent, recipients);
+  }
+
+  private BucketRegion bucketRegionForClearLocking() {
+    // use partial-mock with null fields to verify method invocations
+    BucketRegion bucketRegion = mock(BucketRegion.class, CALLS_REAL_METHODS);
+
+    // doNothing when invoking locking methods for clear
+    doNothing().when(bucketRegion).lockAndFlushClearToOthers(any(), any());
+
+    // doNothing when invoking unlocking methods for clear
+    doNothing().when(bucketRegion).distributedClearOperationReleaseLocks(any(), any());
+
+    return bucketRegion;
+  }
 }
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionTest.java
index b08c346..185c67d 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionTest.java
@@ -14,14 +14,19 @@
  */
 package org.apache.geode.internal.cache;
 
+import static java.util.Collections.emptySet;
 import static org.apache.geode.cache.asyncqueue.internal.AsyncEventQueueImpl.getSenderIdFromAsyncEventQueueId;
+import static org.apache.geode.util.internal.UncheckedUtils.uncheckedCast;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.CALLS_REAL_METHODS;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.doCallRealMethod;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.inOrder;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
@@ -29,6 +34,7 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.util.Collections;
+import java.util.Set;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -43,36 +49,22 @@ import org.apache.geode.internal.cache.versions.VersionSource;
 import org.apache.geode.internal.cache.wan.AsyncEventQueueConfigurationException;
 import org.apache.geode.internal.cache.wan.GatewaySenderConfigurationException;
 
-
 public class DistributedRegionTest {
+
   private RegionVersionVector<VersionSource<Object>> vector;
   private RegionVersionHolder<VersionSource<Object>> holder;
   private VersionSource<Object> lostMemberVersionID;
   private InternalDistributedMember member;
 
   @Before
-  @SuppressWarnings("unchecked")
   public void setup() {
-    vector = mock(RegionVersionVector.class);
-    holder = mock(RegionVersionHolder.class);
-    lostMemberVersionID = mock(VersionSource.class);
+    vector = uncheckedCast(mock(RegionVersionVector.class));
+    holder = uncheckedCast(mock(RegionVersionHolder.class));
+    lostMemberVersionID = uncheckedCast(mock(VersionSource.class));
     member = mock(InternalDistributedMember.class);
   }
 
   @Test
-  public void shouldBeMockable() throws Exception {
-    DistributedRegion mockDistributedRegion = mock(DistributedRegion.class);
-    EntryEventImpl mockEntryEventImpl = mock(EntryEventImpl.class);
-    Object returnValue = new Object();
-
-    when(mockDistributedRegion.validatedDestroy(any(), eq(mockEntryEventImpl)))
-        .thenReturn(returnValue);
-
-    assertThat(mockDistributedRegion.validatedDestroy(new Object(), mockEntryEventImpl))
-        .isSameAs(returnValue);
-  }
-
-  @Test
   public void cleanUpAfterFailedInitialImageHoldsLockForClear() {
     DistributedRegion distributedRegion = mock(DistributedRegion.class, RETURNS_DEEP_STUBS);
     RegionMap regionMap = mock(RegionMap.class);
@@ -99,7 +91,7 @@ public class DistributedRegionTest {
 
     distributedRegion.cleanUpAfterFailedGII(true);
 
-    verify(diskRegion).resetRecoveredEntries(eq(distributedRegion));
+    verify(diskRegion).resetRecoveredEntries(distributedRegion);
     verify(distributedRegion, never()).closeEntries();
   }
 
@@ -260,4 +252,65 @@ public class DistributedRegionTest {
         .hasMessage("Parallel Gateway Sender " + senderId
             + " can not be used with replicated region " + regionPath);
   }
+
+  @Test
+  public void obtainWriteLocksForClear_invokes_lockLocallyForClear() {
+    DistributedRegion distributedRegion = distributedRegionForClearLocking();
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    distributedRegion.obtainWriteLocksForClear(regionEvent, emptySet());
+
+    verify(distributedRegion).lockLocallyForClear(any(), any(), eq(regionEvent));
+  }
+
+  @Test
+  public void obtainWriteLocksForClear_invokes_lockAndFlushClearToOthers() {
+    Set<InternalDistributedMember> recipients = emptySet();
+    DistributedRegion distributedRegion = distributedRegionForClearLocking();
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    distributedRegion.obtainWriteLocksForClear(regionEvent, recipients);
+
+    verify(distributedRegion).lockAndFlushClearToOthers(regionEvent, recipients);
+  }
+
+  @Test
+  public void releaseWriteLocksForClear_invokes_releaseLockLocallyForClear() {
+    DistributedRegion distributedRegion = distributedRegionForClearLocking();
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    distributedRegion.releaseWriteLocksForClear(regionEvent, emptySet());
+
+    verify(distributedRegion).releaseLockLocallyForClear(regionEvent);
+  }
+
+  @Test
+  public void releaseWriteLocksForClear_invokes_distributedClearOperationReleaseLocks() {
+    Set<InternalDistributedMember> recipients = emptySet();
+    DistributedRegion distributedRegion = distributedRegionForClearLocking();
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    distributedRegion.releaseWriteLocksForClear(regionEvent, recipients);
+
+    verify(distributedRegion).distributedClearOperationReleaseLocks(regionEvent, recipients);
+  }
+
+  private DistributedRegion distributedRegionForClearLocking() {
+    // use partial-mock with null fields to verify method invocations
+    DistributedRegion distributedRegion = mock(DistributedRegion.class, CALLS_REAL_METHODS);
+
+    // stub out getDistributionManager and getMyId
+    doReturn(null).when(distributedRegion).getDistributionManager();
+    doReturn(null).when(distributedRegion).getMyId();
+
+    // doNothing when invoking locking methods for clear
+    doNothing().when(distributedRegion).lockAndFlushClearToOthers(any(), any());
+    doNothing().when(distributedRegion).lockLocallyForClear(any(), any(), any());
+
+    // doNothing when invoking unlocking methods for clear
+    doNothing().when(distributedRegion).distributedClearOperationReleaseLocks(any(), any());
+    doNothing().when(distributedRegion).releaseLockLocallyForClear(any());
+
+    return distributedRegion;
+  }
 }
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearMessageTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearMessageTest.java
new file mode 100644
index 0000000..4e67fc1
--- /dev/null
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearMessageTest.java
@@ -0,0 +1,285 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache;
+
+import static java.util.Collections.emptySet;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.catchThrowable;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.util.Collection;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import org.apache.geode.cache.Operation;
+import org.apache.geode.cache.RegionEvent;
+import org.apache.geode.distributed.DistributedMember;
+import org.apache.geode.distributed.internal.ClusterDistributionManager;
+import org.apache.geode.distributed.internal.DistributionAdvisor;
+import org.apache.geode.distributed.internal.DistributionManager;
+import org.apache.geode.distributed.internal.ReplyProcessor21;
+import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.cache.PartitionedRegionClearMessage.OperationType;
+
+public class PartitionedRegionClearMessageTest {
+
+  private Collection<InternalDistributedMember> recipients;
+  private DistributionManager distributionManager;
+  private PartitionedRegion partitionedRegion;
+  private ReplyProcessor21 replyProcessor21;
+  private Object callbackArgument;
+  private EventID eventId;
+  private RegionEventFactory regionEventFactory;
+
+  @Before
+  public void setUp() {
+    recipients = emptySet();
+    distributionManager = mock(DistributionManager.class);
+    partitionedRegion = mock(PartitionedRegion.class);
+    replyProcessor21 = mock(ReplyProcessor21.class);
+    callbackArgument = new Object();
+    eventId = mock(EventID.class);
+    regionEventFactory = mock(RegionEventFactory.class);
+  }
+
+  @Test
+  public void construction_throwsNullPointerExceptionIfRecipientsIsNull() {
+    Throwable thrown = catchThrowable(() -> {
+      new PartitionedRegionClearMessage(null, distributionManager, 1,
+          replyProcessor21, OperationType.OP_PR_CLEAR, callbackArgument, eventId, false,
+          regionEventFactory);
+    });
+
+    assertThat(thrown).isInstanceOf(NullPointerException.class);
+  }
+
+  @Test
+  public void construction_findsAllDependencies() {
+    boolean isTransactionDistributed = true;
+    int regionId = 10;
+    InternalCache cache = mock(InternalCache.class);
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+    TXManagerImpl txManager = mock(TXManagerImpl.class);
+    when(cache.getTxManager()).thenReturn(txManager);
+    when(partitionedRegion.getCache()).thenReturn(cache);
+    when(partitionedRegion.getDistributionManager()).thenReturn(distributionManager);
+    when(partitionedRegion.getPRId()).thenReturn(regionId);
+    when(regionEvent.getEventId()).thenReturn(eventId);
+    when(regionEvent.getRawCallbackArgument()).thenReturn(callbackArgument);
+    when(txManager.isDistributed()).thenReturn(isTransactionDistributed);
+
+    PartitionedRegionClearMessage message = new PartitionedRegionClearMessage(recipients,
+        partitionedRegion,
+        replyProcessor21,
+        OperationType.OP_PR_CLEAR,
+        regionEvent);
+
+    assertThat(message.getDistributionManagerForTesting()).isSameAs(distributionManager);
+    assertThat(message.getCallbackArgumentForTesting()).isSameAs(callbackArgument);
+    assertThat(message.getRegionId()).isEqualTo(regionId);
+    assertThat(message.getEventID()).isEqualTo(eventId);
+    assertThat(message.isTransactionDistributed()).isEqualTo(isTransactionDistributed);
+
+    RegionEventFactory regionEventFactory = message.getRegionEventFactoryForTesting();
+    RegionEvent<?, ?> created =
+        regionEventFactory.create(partitionedRegion, Operation.DESTROY, callbackArgument, false,
+            mock(DistributedMember.class), mock(EventID.class));
+    assertThat(created).isInstanceOf(RegionEventImpl.class);
+  }
+
+  @Test
+  public void construction_setsTransactionDistributed() {
+    boolean isTransactionDistributed = true;
+    PartitionedRegionClearMessage message =
+        new PartitionedRegionClearMessage(recipients, distributionManager, 1,
+            replyProcessor21, OperationType.OP_PR_CLEAR, callbackArgument, eventId,
+            isTransactionDistributed, regionEventFactory);
+
+    boolean value = message.isTransactionDistributed();
+
+    assertThat(value).isEqualTo(isTransactionDistributed);
+  }
+
+  @Test
+  public void getEventID_returnsTheEventId() {
+    PartitionedRegionClearMessage message =
+        new PartitionedRegionClearMessage(recipients, distributionManager, 1,
+            replyProcessor21, OperationType.OP_PR_CLEAR, callbackArgument, eventId, false,
+            regionEventFactory);
+
+    EventID value = message.getEventID();
+
+    assertThat(value).isSameAs(eventId);
+  }
+
+  @Test
+  public void getOperationType_returnsTheOperationType() {
+    PartitionedRegionClearMessage message =
+        new PartitionedRegionClearMessage(recipients, distributionManager, 1,
+            replyProcessor21, OperationType.OP_PR_CLEAR, callbackArgument, eventId, false,
+            regionEventFactory);
+
+    OperationType value = message.getOperationType();
+
+    assertThat(value).isSameAs(OperationType.OP_PR_CLEAR);
+  }
+
+  @Test
+  public void send_putsOutgoing() {
+    PartitionedRegionClearMessage message =
+        new PartitionedRegionClearMessage(recipients, distributionManager, 1,
+            replyProcessor21, OperationType.OP_PR_CLEAR, callbackArgument, eventId, false,
+            regionEventFactory);
+
+    message.send();
+
+    verify(distributionManager).putOutgoing(message);
+  }
+
+  @Test
+  public void processCheckForPR_returnsForceReattemptException_whenRegionIsNotInitialized() {
+    DistributionAdvisor distributionAdvisor = mock(DistributionAdvisor.class);
+    when(distributionAdvisor.isInitialized()).thenReturn(false);
+    when(partitionedRegion.getDistributionAdvisor()).thenReturn(distributionAdvisor);
+    PartitionedRegionClearMessage message =
+        new PartitionedRegionClearMessage(recipients, distributionManager, 1,
+            replyProcessor21, OperationType.OP_PR_CLEAR, callbackArgument, eventId, false,
+            regionEventFactory);
+
+    Throwable throwable = message.processCheckForPR(partitionedRegion, distributionManager);
+
+    assertThat(throwable)
+        .isInstanceOf(ForceReattemptException.class)
+        .hasMessageContaining("could not find partitioned region with Id");
+  }
+
+  @Test
+  public void processCheckForPR_returnsNull_whenRegionIsNull() {
+    PartitionedRegionClearMessage message =
+        new PartitionedRegionClearMessage(recipients, distributionManager, 1,
+            replyProcessor21, OperationType.OP_PR_CLEAR, callbackArgument, eventId, false,
+            regionEventFactory);
+
+    Throwable throwable = message.processCheckForPR(null, distributionManager);
+
+    assertThat(throwable).isNull();
+  }
+
+  @Test
+  public void processCheckForPR_returnsNull_whenRegionIsInitialized() {
+    DistributionAdvisor distributionAdvisor = mock(DistributionAdvisor.class);
+    when(distributionAdvisor.isInitialized()).thenReturn(true);
+    when(partitionedRegion.getDistributionAdvisor()).thenReturn(distributionAdvisor);
+    PartitionedRegionClearMessage message =
+        new PartitionedRegionClearMessage(recipients, distributionManager, 1,
+            replyProcessor21, OperationType.OP_PR_CLEAR, callbackArgument, eventId, false,
+            regionEventFactory);
+
+    Throwable throwable = message.processCheckForPR(null, distributionManager);
+
+    assertThat(throwable).isNull();
+  }
+
+  @Test
+  public void operateOnPartitionedRegion_returnsTrue_whenRegionIsNull() {
+    ClusterDistributionManager clusterDistributionManager = mock(ClusterDistributionManager.class);
+    PartitionedRegionClear partitionedRegionClear = mock(PartitionedRegionClear.class);
+    when(partitionedRegion.getPartitionedRegionClear()).thenReturn(partitionedRegionClear);
+    when(partitionedRegionClear.clearRegionLocal(any())).thenReturn(emptySet());
+    PartitionedRegionClearMessage message =
+        new PartitionedRegionClearMessage(recipients, distributionManager, 1,
+            replyProcessor21, OperationType.OP_PR_CLEAR, callbackArgument, eventId, false,
+            regionEventFactory);
+
+    boolean result =
+        message.operateOnPartitionedRegion(clusterDistributionManager, partitionedRegion, 30);
+
+    assertThat(result).isTrue();
+  }
+
+  @Test
+  public void operateOnPartitionedRegion_returnsTrue_whenRegionIsDestroyed() {
+    ClusterDistributionManager clusterDistributionManager = mock(ClusterDistributionManager.class);
+    when(partitionedRegion.isDestroyed()).thenReturn(true);
+    PartitionedRegionClearMessage message =
+        new PartitionedRegionClearMessage(recipients, distributionManager, 1,
+            replyProcessor21, OperationType.OP_PR_CLEAR, callbackArgument, eventId, false,
+            regionEventFactory);
+
+    boolean result =
+        message.operateOnPartitionedRegion(clusterDistributionManager, partitionedRegion, 30);
+
+    assertThat(result).isTrue();
+  }
+
+  @Test
+  public void operateOnPartitionedRegion_obtainsClearLockLocal_whenOperationTypeIs_OP_LOCK_FOR_PR_CLEAR() {
+    ClusterDistributionManager clusterDistributionManager = mock(ClusterDistributionManager.class);
+    PartitionedRegionClear partitionedRegionClear = mock(PartitionedRegionClear.class);
+    when(partitionedRegion.getPartitionedRegionClear()).thenReturn(partitionedRegionClear);
+    PartitionedRegionClearMessage message = new PartitionedRegionClearMessage(recipients,
+        clusterDistributionManager, 1, replyProcessor21,
+        OperationType.OP_LOCK_FOR_PR_CLEAR, callbackArgument, eventId, false,
+        regionEventFactory);
+
+    boolean result =
+        message.operateOnPartitionedRegion(clusterDistributionManager, partitionedRegion, 30);
+
+    assertThat(result).isTrue();
+    verify(partitionedRegionClear).obtainClearLockLocal(any());
+  }
+
+  @Test
+  public void operateOnPartitionedRegion_releasesClearLockLocal_whenOperationTypeIs_OP_UNLOCK_FOR_PR_CLEAR() {
+    ClusterDistributionManager clusterDistributionManager = mock(ClusterDistributionManager.class);
+    PartitionedRegionClear partitionedRegionClear = mock(PartitionedRegionClear.class);
+    when(partitionedRegion.getPartitionedRegionClear()).thenReturn(partitionedRegionClear);
+    PartitionedRegionClearMessage message = new PartitionedRegionClearMessage(recipients,
+        clusterDistributionManager, 1, replyProcessor21,
+        OperationType.OP_UNLOCK_FOR_PR_CLEAR, callbackArgument, eventId, false,
+        regionEventFactory);
+
+    boolean result =
+        message.operateOnPartitionedRegion(clusterDistributionManager, partitionedRegion, 30);
+
+    assertThat(result).isTrue();
+    verify(partitionedRegionClear).releaseClearLockLocal();
+  }
+
+  @Test
+  public void operateOnPartitionedRegion_clearsRegionLocal_whenOperationTypeIs_OP_PR_CLEAR() {
+    ClusterDistributionManager clusterDistributionManager = mock(ClusterDistributionManager.class);
+    PartitionedRegionClear partitionedRegionClear = mock(PartitionedRegionClear.class);
+    when(partitionedRegion.getPartitionedRegionClear())
+        .thenReturn(partitionedRegionClear);
+    when(regionEventFactory.create(any(), any(), any(), anyBoolean(), any(), any()))
+        .thenReturn(mock(RegionEventImpl.class));
+    PartitionedRegionClearMessage message = new PartitionedRegionClearMessage(recipients,
+        clusterDistributionManager, 1, replyProcessor21,
+        OperationType.OP_PR_CLEAR, callbackArgument, eventId, false,
+        regionEventFactory);
+
+    boolean result =
+        message.operateOnPartitionedRegion(clusterDistributionManager, partitionedRegion, 30);
+
+    assertThat(result).isTrue();
+    verify(partitionedRegionClear).clearRegionLocal(any(RegionEventImpl.class));
+  }
+}

[geode] 12/20: GEODE-9132: PartitionedRegionClearWithConcurrentOperationsDUnitTest cleanup 2

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit e3ef06166bea60459ec2ae33beca2e547af4224c
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Apr 19 16:16:17 2021 -0700

    GEODE-9132: PartitionedRegionClearWithConcurrentOperationsDUnitTest cleanup 2
---
 ...gionClearWithConcurrentOperationsDUnitTest.java | 782 ++++++++++-----------
 1 file changed, 378 insertions(+), 404 deletions(-)

diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
index c9a1e5b..b2aacc0 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
@@ -72,8 +72,6 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
 
   private static final int BUCKETS = 13;
   private static final String REGION_NAME = "PartitionedRegion";
-  private static final String TEST_CASE_NAME =
-      "[{index}] {method}(Coordinator:{0}, RegionType:{1})";
 
   @Rule
   public DistributedRule distributedRule = new DistributedRule(3);
@@ -84,32 +82,6 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   private VM server2;
   private VM accessor;
 
-  @SuppressWarnings("unused")
-  static TestVM[] coordinators() {
-    return new TestVM[] {
-        TestVM.SERVER1, TestVM.ACCESSOR
-    };
-  }
-
-  @SuppressWarnings("unused")
-  static Object[] coordinatorsAndRegionTypes() {
-    List<Object[]> parameters = new ArrayList<>();
-    RegionShortcut[] regionShortcuts = regionTypes();
-
-    Arrays.stream(regionShortcuts).forEach(regionShortcut -> {
-      parameters.add(new Object[] {TestVM.SERVER1, regionShortcut});
-      parameters.add(new Object[] {TestVM.ACCESSOR, regionShortcut});
-    });
-
-    return parameters.toArray();
-  }
-
-  private static RegionShortcut[] regionTypes() {
-    return new RegionShortcut[] {
-        RegionShortcut.PARTITION, RegionShortcut.PARTITION_REDUNDANT
-    };
-  }
-
   @Before
   public void setUp() throws Exception {
     server1 = getVM(TestVM.SERVER1.vmNumber);
@@ -117,127 +89,414 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     accessor = getVM(TestVM.ACCESSOR.vmNumber);
   }
 
-  private void initAccessor(RegionShortcut regionShortcut) {
-    PartitionAttributes<String, String> attrs = new PartitionAttributesFactory<String, String>()
-        .setTotalNumBuckets(BUCKETS)
-        .setLocalMaxMemory(0)
-        .create();
+  /**
+   * The test does the following (clear coordinator and regionType are parametrized):
+   * - Launches one thread per VM to continuously execute removes, puts and gets for a given time.
+   * - Clears the Partition Region continuously every X milliseconds for a given time.
+   * - Asserts that, after the clears have finished, the Region Buckets are consistent across
+   * members.
+   */
+  @Test
+  @Parameters({"SERVER1,PARTITION", "ACCESSOR,PARTITION",
+      "SERVER1,PARTITION_REDUNDANT", "ACCESSOR,PARTITION_REDUNDANT"})
+  @TestCaseName("[{index}] {method}(Coordinator:{0}, RegionType:{1})")
+  public void clearWithConcurrentPutGetRemoveShouldWorkCorrectly(TestVM coordinatorVM,
+      RegionShortcut regionShortcut) throws InterruptedException {
+    parametrizedSetup(regionShortcut);
 
-    cacheRule.getCache().createRegionFactory(regionShortcut)
-        .setPartitionAttributes(attrs)
-        .create(REGION_NAME);
+    // Let all VMs continuously execute puts and gets for 60 seconds.
+    final int workMillis = 60000;
+    final int entries = 15000;
+    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
+        server1.invokeAsync(() -> executePuts(entries, workMillis)),
+        server2.invokeAsync(() -> executeGets(entries, workMillis)),
+        accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
 
-  }
+    // Clear the region every second for 60 seconds.
+    getVM(coordinatorVM.vmNumber).invoke(() -> executeClears(workMillis, 1000));
 
-  private void initDataStore(RegionShortcut regionShortcut) {
-    PartitionAttributes<String, String> attrs = new PartitionAttributesFactory<String, String>()
-        .setTotalNumBuckets(BUCKETS)
-        .create();
+    // Let asyncInvocations finish.
+    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
+      asyncInvocation.await();
+    }
 
-    cacheRule.getCache().createRegionFactory(regionShortcut)
-        .setPartitionAttributes(attrs)
-        .create(REGION_NAME);
+    // Assert Region Buckets are consistent.
+    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
+    accessor.invoke(this::assertRegionBucketsConsistency);
   }
 
-  private void parametrizedSetup(RegionShortcut regionShortcut) {
-    server1.invoke(() -> initDataStore(regionShortcut));
-    server2.invoke(() -> initDataStore(regionShortcut));
-    accessor.invoke(() -> initAccessor(regionShortcut));
-  }
+  /**
+   * The test does the following (clear coordinator and regionType are parametrized):
+   * - Launches two threads per VM to continuously execute putAll and removeAll for a given time.
+   * - Clears the Partition Region continuously every X milliseconds for a given time.
+   * - Asserts that, after the clears have finished, the Region Buckets are consistent across
+   * members.
+   */
+  @Test
+  @Parameters({"SERVER1,PARTITION", "ACCESSOR,PARTITION",
+      "SERVER1,PARTITION_REDUNDANT", "ACCESSOR,PARTITION_REDUNDANT"})
+  @TestCaseName("[{index}] {method}(Coordinator:{0}, RegionType:{1})")
+  public void clearWithConcurrentPutAllRemoveAllShouldWorkCorrectly(TestVM coordinatorVM,
+      RegionShortcut regionShortcut) throws InterruptedException {
+    parametrizedSetup(regionShortcut);
 
-  private void waitForSilence() {
-    DMStats dmStats = cacheRule.getSystem().getDistributionManager().getStats();
-    PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
-    PartitionedRegionStats partitionedRegionStats = region.getPrStats();
+    // Let all VMs continuously execute putAll and removeAll for 15 seconds.
+    final int workMillis = 15000;
+    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
+        server1.invokeAsync(() -> executePutAlls(0, 2000, workMillis)),
+        server1.invokeAsync(() -> executeRemoveAlls(0, 2000, workMillis)),
+        server2.invokeAsync(() -> executePutAlls(2000, 4000, workMillis)),
+        server2.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)),
+        accessor.invokeAsync(() -> executePutAlls(4000, 6000, workMillis)),
+        accessor.invokeAsync(() -> executeRemoveAlls(4000, 6000, workMillis)));
 
-    await().untilAsserted(() -> {
-      assertThat(dmStats.getReplyWaitsInProgress()).isEqualTo(0);
-      assertThat(partitionedRegionStats.getVolunteeringInProgress()).isEqualTo(0);
-      assertThat(partitionedRegionStats.getBucketCreatesInProgress()).isEqualTo(0);
-      assertThat(partitionedRegionStats.getPrimaryTransfersInProgress()).isEqualTo(0);
-      assertThat(partitionedRegionStats.getRebalanceBucketCreatesInProgress()).isEqualTo(0);
-      assertThat(partitionedRegionStats.getRebalancePrimaryTransfersInProgress()).isEqualTo(0);
-    });
+    // Clear the region every half second for 15 seconds.
+    getVM(coordinatorVM.vmNumber).invoke(() -> executeClears(workMillis, 500));
+
+    // Let asyncInvocations finish.
+    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
+      asyncInvocation.await();
+    }
+
+    // Assert Region Buckets are consistent.
+    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
+    accessor.invoke(this::assertRegionBucketsConsistency);
   }
 
   /**
-   * Populates the region and verifies the data on the selected VMs.
+   * The test does the following (regionType is parametrized):
+   * - Populates the Partition Region.
+   * - Verifies that the entries are synchronized on all members.
+   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop the
+   * coordinator VM while the clear is in progress.
+   * - Clears the Partition Region (at this point the coordinator is restarted).
+   * - Asserts that, after the member joins again, the Region Buckets are consistent.
    */
-  private void populateRegion(VM feeder, int entryCount, Iterable<VM> vms) {
-    feeder.invoke(() -> {
+  @Test
+  @Parameters({"PARTITION", "PARTITION_REDUNDANT"})
+  @TestCaseName("[{index}] {method}(RegionType:{0})")
+  public void clearShouldFailWhenCoordinatorMemberIsBounced(RegionShortcut regionShortcut) {
+    parametrizedSetup(regionShortcut);
+    final int entries = 1000;
+    populateRegion(accessor, entries, asList(accessor, server1, server2));
+
+    // Set the CoordinatorMemberKiller and try to clear the region
+    server1.invoke(() -> {
+      DistributionMessageObserver.setInstance(new MemberKiller(true));
       Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
-      IntStream.range(0, entryCount).forEach(i -> region.put(String.valueOf(i), "Value_" + i));
+      assertThatThrownBy(region::clear)
+          .isInstanceOf(DistributedSystemDisconnectedException.class)
+          .hasCauseInstanceOf(ForcedDisconnectException.class);
     });
 
-    vms.forEach(vm -> vm.invoke(() -> {
-      waitForSilence();
-      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+    // Wait for member to get back online and assign all buckets.
+    server1.invoke(() -> {
+      cacheRule.createCache();
+      initDataStore(regionShortcut);
+      await().untilAsserted(
+          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
+      PartitionRegionHelper.assignBucketsToPartitions(cacheRule.getCache().getRegion(REGION_NAME));
+    });
 
-      IntStream.range(0, entryCount)
-          .forEach(i -> assertThat(region.get(String.valueOf(i))).isEqualTo("Value_" + i));
-    }));
+    // Assert Region Buckets are consistent.
+    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
+    accessor.invoke(this::assertRegionBucketsConsistency);
   }
 
   /**
-   * Asserts that the RegionVersionVectors for both buckets are consistent.
-   *
-   * @param bucketId Id of the bucket to compare.
-   * @param bucketDump1 First bucketDump.
-   * @param bucketDump2 Second bucketDump.
+   * The test does the following (clear coordinator is chosen through parameters):
+   * - Populates the Partition Region.
+   * - Verifies that the entries are synchronized on all members.
+   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop a
+   * non-coordinator VM while the clear is in progress (the member has primary buckets, though, so
+   * participates on the clear operation).
+   * - Launches two threads per VM to continuously execute gets, puts and removes for a given time.
+   * - Clears the Partition Region (at this point the non-coordinator is restarted).
+   * - Asserts that, after the clear has finished, the Region Buckets are consistent across members.
    */
-  private void assertRegionVersionVectorsConsistency(int bucketId, BucketDump bucketDump1,
-      BucketDump bucketDump2) {
-    RegionVersionVector<?> rvv1 = bucketDump1.getRvv();
-    RegionVersionVector<?> rvv2 = bucketDump2.getRvv();
+  @Test
+  @Parameters({"SERVER1", "ACCESSOR"})
+  @TestCaseName("[{index}] {method}(Coordinator:{0})")
+  public void clearOnRedundantPartitionRegionWithConcurrentPutGetRemoveShouldWorkCorrectlyWhenNonCoordinatorMembersAreBounced(
+      TestVM coordinatorVM) throws InterruptedException {
+    parametrizedSetup(RegionShortcut.PARTITION_REDUNDANT);
+    final int entries = 7500;
+    populateRegion(accessor, entries, asList(accessor, server1, server2));
+    server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
 
-    if (rvv1 == null) {
-      assertThat(rvv2)
-          .as("Bucket " + bucketId + " has an RVV on member " + bucketDump2.getMember()
-              + ", but does not on member " + bucketDump1.getMember())
-          .isNull();
-    }
+    // Let all VMs (except the one to kill) continuously execute gets, put and removes for 30"
+    final int workMillis = 30000;
+    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
+        server1.invokeAsync(() -> executeGets(entries, workMillis)),
+        server1.invokeAsync(() -> executePuts(entries, workMillis)),
+        accessor.invokeAsync(() -> executeGets(entries, workMillis)),
+        accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
 
-    if (rvv2 == null) {
-      assertThat(rvv1)
-          .as("Bucket " + bucketId + " has an RVV on member " + bucketDump1.getMember()
-              + ", but does not on member " + bucketDump2.getMember())
-          .isNull();
-    }
+    // Retry the clear operation on the region until success (server2 will go down, but other
+    // members will eventually become primary for those buckets previously hosted by server2).
+    executeClearWithRetry(getVM(coordinatorVM.vmNumber));
 
-    assertThat(rvv1).isNotNull();
-    assertThat(rvv2).isNotNull();
-    Map<VersionSource<?>, RegionVersionHolder<?>> rvv2Members =
-        new HashMap<>(rvv1.getMemberToVersion());
-    Map<VersionSource<?>, RegionVersionHolder<?>> rvv1Members =
-        new HashMap<>(rvv1.getMemberToVersion());
-    for (Map.Entry<VersionSource<?>, RegionVersionHolder<?>> entry : rvv1Members.entrySet()) {
-      VersionSource<?> memberId = entry.getKey();
-      RegionVersionHolder<?> versionHolder1 = entry.getValue();
-      RegionVersionHolder<?> versionHolder2 = rvv2Members.remove(memberId);
-      assertThat(versionHolder1)
-          .as("RegionVersionVector for bucket " + bucketId + " on member " + bucketDump1.getMember()
-              + " is not consistent with member " + bucketDump2.getMember())
-          .isEqualTo(versionHolder2);
+    // Wait for member to get back online.
+    server2.invoke(() -> {
+      cacheRule.createCache();
+      initDataStore(RegionShortcut.PARTITION_REDUNDANT);
+      await().untilAsserted(
+          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
+    });
+
+    // Let asyncInvocations finish.
+    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
+      asyncInvocation.await();
     }
+
+    // Assert Region Buckets are consistent.
+    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
+    accessor.invoke(this::assertRegionBucketsConsistency);
   }
 
   /**
-   * Asserts that the region data is consistent across buckets.
+   * The test does the following (clear coordinator is chosen through parameters):
+   * - Populates the Partition Region.
+   * - Verifies that the entries are synchronized on all members.
+   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop a
+   * non-coordinator VM while the clear is in progress (the member has primary buckets, though, so
+   * participates on the clear operation).
+   * - Launches two threads per VM to continuously execute gets, puts and removes for a given time.
+   * - Clears the Partition Region (at this point the non-coordinator is restarted).
+   * - Asserts that the clear operation failed with PartitionedRegionPartialClearException (primary
+   * buckets on the the restarted members are not available).
    */
-  private void assertRegionBucketsConsistency() throws ForceReattemptException {
-    PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
-    // Redundant copies + 1 primary.
-    int expectedCopies = region.getRedundantCopies() + 1;
+  @Test
+  @Parameters({"SERVER1", "ACCESSOR"})
+  @TestCaseName("[{index}] {method}(Coordinator:{0})")
+  public void clearOnNonRedundantPartitionRegionWithConcurrentPutGetRemoveShouldFailWhenNonCoordinatorMembersAreBounced(
+      TestVM coordinatorVM) throws InterruptedException {
+    parametrizedSetup(RegionShortcut.PARTITION);
+    final int entries = 7500;
+    populateRegion(accessor, entries, asList(accessor, server1, server2));
+    server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
 
-    for (int bId = 0; bId < BUCKETS; bId++) {
-      final int bucketId = bId;
-      List<BucketDump> bucketDumps = region.getAllBucketEntries(bucketId);
-      assertThat(bucketDumps.size())
-          .as("Bucket " + bucketId + " should have " + expectedCopies + " copies, but has "
-              + bucketDumps.size())
-          .isEqualTo(expectedCopies);
+    // Let all VMs (except the one to kill) continuously execute gets, put and removes for 30"
+    final int workMillis = 30000;
+    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
+        server1.invokeAsync(() -> executeGets(entries, workMillis)),
+        server1.invokeAsync(() -> executePuts(entries, workMillis)),
+        accessor.invokeAsync(() -> executeGets(entries, workMillis)),
+        accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
 
-      // Check that all copies of the bucket have the same data.
+    // Clear the region.
+    getVM(coordinatorVM.vmNumber).invoke(() -> {
+      assertThatThrownBy(() -> cacheRule.getCache().getRegion(REGION_NAME).clear())
+          .isInstanceOf(PartitionedRegionPartialClearException.class);
+    });
+
+    // Let asyncInvocations finish.
+    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
+      asyncInvocation.await();
+    }
+  }
+
+  /**
+   * The test does the following (clear coordinator is chosen through parameters):
+   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop a
+   * non-coordinator VM while the clear is in progress (the member has primary buckets, though, so
+   * participates on the clear operation).
+   * - Launches one thread per VM to continuously execute putAll/removeAll for a given time.
+   * - Clears the Partition Region (at this point the non-coordinator is restarted).
+   * - Asserts that, after the clear has finished, the Region Buckets are consistent across members.
+   */
+  @Test
+  @Parameters({"SERVER1", "ACCESSOR"})
+  @TestCaseName("[{index}] {method}(Coordinator:{0})")
+  public void clearOnRedundantPartitionRegionWithConcurrentPutAllRemoveAllShouldWorkCorrectlyWhenNonCoordinatorMembersAreBounced(
+      TestVM coordinatorVM) throws InterruptedException {
+    parametrizedSetup(RegionShortcut.PARTITION_REDUNDANT);
+    server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
+
+    // Let all VMs continuously execute putAll/removeAll for 30 seconds.
+    final int workMillis = 30000;
+    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
+        server1.invokeAsync(() -> executePutAlls(0, 6000, workMillis)),
+        accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)));
+
+    // Retry the clear operation on the region until success (server2 will go down, but other
+    // members will eventually become primary for those buckets previously hosted by server2).
+    executeClearWithRetry(getVM(coordinatorVM.vmNumber));
+
+    // Wait for member to get back online.
+    server2.invoke(() -> {
+      cacheRule.createCache();
+      initDataStore(RegionShortcut.PARTITION_REDUNDANT);
+      await().untilAsserted(
+          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
+    });
+
+    // Let asyncInvocations finish.
+    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
+      asyncInvocation.await();
+    }
+
+    // Assert Region Buckets are consistent.
+    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
+    accessor.invoke(this::assertRegionBucketsConsistency);
+  }
+
+  /**
+   * The test does the following (clear coordinator is chosen through parameters):
+   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop a
+   * non-coordinator VM while the clear is in progress (the member has primary buckets, though, so
+   * participates on the clear operation).
+   * - Launches one thread per VM to continuously execute putAll/removeAll for a given time.
+   * - Clears the Partition Region (at this point the non-coordinator is restarted).
+   * - Asserts that the clear operation failed with PartitionedRegionPartialClearException (primary
+   * buckets on the the restarted members are not available).
+   */
+  @Test
+  @Parameters({"SERVER1", "ACCESSOR"})
+  @TestCaseName("[{index}] {method}(Coordinator:{0})")
+  public void clearOnNonRedundantPartitionRegionWithConcurrentPutAllRemoveAllShouldFailWhenNonCoordinatorMembersAreBounced(
+      TestVM coordinatorVM) throws InterruptedException {
+    parametrizedSetup(RegionShortcut.PARTITION);
+    server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
+
+    final int workMillis = 30000;
+    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
+        server1.invokeAsync(() -> executePutAlls(0, 6000, workMillis)),
+        accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)));
+
+    // Clear the region.
+    getVM(coordinatorVM.vmNumber).invoke(() -> {
+      assertThatThrownBy(() -> cacheRule.getCache().getRegion(REGION_NAME).clear())
+          .isInstanceOf(PartitionedRegionPartialClearException.class);
+    });
+
+    // Let asyncInvocations finish.
+    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
+      asyncInvocation.await();
+    }
+  }
+
+  private void initAccessor(RegionShortcut regionShortcut) {
+    PartitionAttributes<String, String> attrs = new PartitionAttributesFactory<String, String>()
+        .setTotalNumBuckets(BUCKETS)
+        .setLocalMaxMemory(0)
+        .create();
+
+    cacheRule.getCache().createRegionFactory(regionShortcut)
+        .setPartitionAttributes(attrs)
+        .create(REGION_NAME);
+
+  }
+
+  private void initDataStore(RegionShortcut regionShortcut) {
+    PartitionAttributes<String, String> attrs = new PartitionAttributesFactory<String, String>()
+        .setTotalNumBuckets(BUCKETS)
+        .create();
+
+    cacheRule.getCache().createRegionFactory(regionShortcut)
+        .setPartitionAttributes(attrs)
+        .create(REGION_NAME);
+  }
+
+  private void parametrizedSetup(RegionShortcut regionShortcut) {
+    server1.invoke(() -> initDataStore(regionShortcut));
+    server2.invoke(() -> initDataStore(regionShortcut));
+    accessor.invoke(() -> initAccessor(regionShortcut));
+  }
+
+  private void waitForSilence() {
+    DMStats dmStats = cacheRule.getSystem().getDistributionManager().getStats();
+    PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
+    PartitionedRegionStats partitionedRegionStats = region.getPrStats();
+
+    await().untilAsserted(() -> {
+      assertThat(dmStats.getReplyWaitsInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getVolunteeringInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getBucketCreatesInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getPrimaryTransfersInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getRebalanceBucketCreatesInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getRebalancePrimaryTransfersInProgress()).isEqualTo(0);
+    });
+  }
+
+  /**
+   * Populates the region and verifies the data on the selected VMs.
+   */
+  private void populateRegion(VM feeder, int entryCount, Iterable<VM> vms) {
+    feeder.invoke(() -> {
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      IntStream.range(0, entryCount).forEach(i -> region.put(String.valueOf(i), "Value_" + i));
+    });
+
+    vms.forEach(vm -> vm.invoke(() -> {
+      waitForSilence();
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+
+      IntStream.range(0, entryCount)
+          .forEach(i -> assertThat(region.get(String.valueOf(i))).isEqualTo("Value_" + i));
+    }));
+  }
+
+  /**
+   * Asserts that the RegionVersionVectors for both buckets are consistent.
+   *
+   * @param bucketId Id of the bucket to compare.
+   * @param bucketDump1 First bucketDump.
+   * @param bucketDump2 Second bucketDump.
+   */
+  private void assertRegionVersionVectorsConsistency(int bucketId, BucketDump bucketDump1,
+      BucketDump bucketDump2) {
+    RegionVersionVector<?> rvv1 = bucketDump1.getRvv();
+    RegionVersionVector<?> rvv2 = bucketDump2.getRvv();
+
+    if (rvv1 == null) {
+      assertThat(rvv2)
+          .as("Bucket " + bucketId + " has an RVV on member " + bucketDump2.getMember()
+              + ", but does not on member " + bucketDump1.getMember())
+          .isNull();
+    }
+
+    if (rvv2 == null) {
+      assertThat(rvv1)
+          .as("Bucket " + bucketId + " has an RVV on member " + bucketDump1.getMember()
+              + ", but does not on member " + bucketDump2.getMember())
+          .isNull();
+    }
+
+    assertThat(rvv1).isNotNull();
+    assertThat(rvv2).isNotNull();
+    Map<VersionSource<?>, RegionVersionHolder<?>> rvv2Members =
+        new HashMap<>(rvv1.getMemberToVersion());
+    Map<VersionSource<?>, RegionVersionHolder<?>> rvv1Members =
+        new HashMap<>(rvv1.getMemberToVersion());
+    for (Map.Entry<VersionSource<?>, RegionVersionHolder<?>> entry : rvv1Members.entrySet()) {
+      VersionSource<?> memberId = entry.getKey();
+      RegionVersionHolder<?> versionHolder1 = entry.getValue();
+      RegionVersionHolder<?> versionHolder2 = rvv2Members.remove(memberId);
+      assertThat(versionHolder1)
+          .as("RegionVersionVector for bucket " + bucketId + " on member " + bucketDump1.getMember()
+              + " is not consistent with member " + bucketDump2.getMember())
+          .isEqualTo(versionHolder2);
+    }
+  }
+
+  /**
+   * Asserts that the region data is consistent across buckets.
+   */
+  private void assertRegionBucketsConsistency() throws ForceReattemptException {
+    PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
+    // Redundant copies + 1 primary.
+    int expectedCopies = region.getRedundantCopies() + 1;
+
+    for (int bId = 0; bId < BUCKETS; bId++) {
+      final int bucketId = bId;
+      List<BucketDump> bucketDumps = region.getAllBucketEntries(bucketId);
+      assertThat(bucketDumps.size())
+          .as("Bucket " + bucketId + " should have " + expectedCopies + " copies, but has "
+              + bucketDumps.size())
+          .isEqualTo(expectedCopies);
+
+      // Check that all copies of the bucket have the same data.
       if (bucketDumps.size() > 1) {
         BucketDump firstDump = bucketDumps.get(0);
 
@@ -375,291 +634,6 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     }
   }
 
-  /**
-   * The test does the following (clear coordinator and regionType are parametrized):
-   * - Launches one thread per VM to continuously execute removes, puts and gets for a given time.
-   * - Clears the Partition Region continuously every X milliseconds for a given time.
-   * - Asserts that, after the clears have finished, the Region Buckets are consistent across
-   * members.
-   */
-  @Test
-  @TestCaseName(TEST_CASE_NAME)
-  @Parameters(method = "coordinatorsAndRegionTypes")
-  public void clearWithConcurrentPutGetRemoveShouldWorkCorrectly(TestVM coordinatorVM,
-      RegionShortcut regionShortcut) throws InterruptedException {
-    parametrizedSetup(regionShortcut);
-
-    // Let all VMs continuously execute puts and gets for 60 seconds.
-    final int workMillis = 60000;
-    final int entries = 15000;
-    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
-        server1.invokeAsync(() -> executePuts(entries, workMillis)),
-        server2.invokeAsync(() -> executeGets(entries, workMillis)),
-        accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
-
-    // Clear the region every second for 60 seconds.
-    getVM(coordinatorVM.vmNumber).invoke(() -> executeClears(workMillis, 1000));
-
-    // Let asyncInvocations finish.
-    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
-      asyncInvocation.await();
-    }
-
-    // Assert Region Buckets are consistent.
-    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
-    accessor.invoke(this::assertRegionBucketsConsistency);
-  }
-
-  /**
-   * The test does the following (clear coordinator and regionType are parametrized):
-   * - Launches two threads per VM to continuously execute putAll and removeAll for a given time.
-   * - Clears the Partition Region continuously every X milliseconds for a given time.
-   * - Asserts that, after the clears have finished, the Region Buckets are consistent across
-   * members.
-   */
-  @Test
-  @TestCaseName(TEST_CASE_NAME)
-  @Parameters(method = "coordinatorsAndRegionTypes")
-  public void clearWithConcurrentPutAllRemoveAllShouldWorkCorrectly(TestVM coordinatorVM,
-      RegionShortcut regionShortcut) throws InterruptedException {
-    parametrizedSetup(regionShortcut);
-
-    // Let all VMs continuously execute putAll and removeAll for 15 seconds.
-    final int workMillis = 15000;
-    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
-        server1.invokeAsync(() -> executePutAlls(0, 2000, workMillis)),
-        server1.invokeAsync(() -> executeRemoveAlls(0, 2000, workMillis)),
-        server2.invokeAsync(() -> executePutAlls(2000, 4000, workMillis)),
-        server2.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)),
-        accessor.invokeAsync(() -> executePutAlls(4000, 6000, workMillis)),
-        accessor.invokeAsync(() -> executeRemoveAlls(4000, 6000, workMillis)));
-
-    // Clear the region every half second for 15 seconds.
-    getVM(coordinatorVM.vmNumber).invoke(() -> executeClears(workMillis, 500));
-
-    // Let asyncInvocations finish.
-    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
-      asyncInvocation.await();
-    }
-
-    // Assert Region Buckets are consistent.
-    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
-    accessor.invoke(this::assertRegionBucketsConsistency);
-  }
-
-  /**
-   * The test does the following (regionType is parametrized):
-   * - Populates the Partition Region.
-   * - Verifies that the entries are synchronized on all members.
-   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop the
-   * coordinator VM while the clear is in progress.
-   * - Clears the Partition Region (at this point the coordinator is restarted).
-   * - Asserts that, after the member joins again, the Region Buckets are consistent.
-   */
-  @Test
-  @TestCaseName("[{index}] {method}(RegionType:{0})")
-  @Parameters(method = "regionTypes")
-  public void clearShouldFailWhenCoordinatorMemberIsBounced(RegionShortcut regionShortcut) {
-    parametrizedSetup(regionShortcut);
-    final int entries = 1000;
-    populateRegion(accessor, entries, asList(accessor, server1, server2));
-
-    // Set the CoordinatorMemberKiller and try to clear the region
-    server1.invoke(() -> {
-      DistributionMessageObserver.setInstance(new MemberKiller(true));
-      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
-      assertThatThrownBy(region::clear)
-          .isInstanceOf(DistributedSystemDisconnectedException.class)
-          .hasCauseInstanceOf(ForcedDisconnectException.class);
-    });
-
-    // Wait for member to get back online and assign all buckets.
-    server1.invoke(() -> {
-      cacheRule.createCache();
-      initDataStore(regionShortcut);
-      await().untilAsserted(
-          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
-      PartitionRegionHelper.assignBucketsToPartitions(cacheRule.getCache().getRegion(REGION_NAME));
-    });
-
-    // Assert Region Buckets are consistent.
-    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
-    accessor.invoke(this::assertRegionBucketsConsistency);
-  }
-
-  /**
-   * The test does the following (clear coordinator is chosen through parameters):
-   * - Populates the Partition Region.
-   * - Verifies that the entries are synchronized on all members.
-   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop a
-   * non-coordinator VM while the clear is in progress (the member has primary buckets, though, so
-   * participates on the clear operation).
-   * - Launches two threads per VM to continuously execute gets, puts and removes for a given time.
-   * - Clears the Partition Region (at this point the non-coordinator is restarted).
-   * - Asserts that, after the clear has finished, the Region Buckets are consistent across members.
-   */
-  @Test
-  @Parameters(method = "coordinators")
-  @TestCaseName("[{index}] {method}(Coordinator:{0})")
-  public void clearOnRedundantPartitionRegionWithConcurrentPutGetRemoveShouldWorkCorrectlyWhenNonCoordinatorMembersAreBounced(
-      TestVM coordinatorVM) throws InterruptedException {
-    parametrizedSetup(RegionShortcut.PARTITION_REDUNDANT);
-    final int entries = 7500;
-    populateRegion(accessor, entries, asList(accessor, server1, server2));
-    server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
-
-    // Let all VMs (except the one to kill) continuously execute gets, put and removes for 30"
-    final int workMillis = 30000;
-    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
-        server1.invokeAsync(() -> executeGets(entries, workMillis)),
-        server1.invokeAsync(() -> executePuts(entries, workMillis)),
-        accessor.invokeAsync(() -> executeGets(entries, workMillis)),
-        accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
-
-    // Retry the clear operation on the region until success (server2 will go down, but other
-    // members will eventually become primary for those buckets previously hosted by server2).
-    executeClearWithRetry(getVM(coordinatorVM.vmNumber));
-
-    // Wait for member to get back online.
-    server2.invoke(() -> {
-      cacheRule.createCache();
-      initDataStore(RegionShortcut.PARTITION_REDUNDANT);
-      await().untilAsserted(
-          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
-    });
-
-    // Let asyncInvocations finish.
-    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
-      asyncInvocation.await();
-    }
-
-    // Assert Region Buckets are consistent.
-    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
-    accessor.invoke(this::assertRegionBucketsConsistency);
-  }
-
-  /**
-   * The test does the following (clear coordinator is chosen through parameters):
-   * - Populates the Partition Region.
-   * - Verifies that the entries are synchronized on all members.
-   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop a
-   * non-coordinator VM while the clear is in progress (the member has primary buckets, though, so
-   * participates on the clear operation).
-   * - Launches two threads per VM to continuously execute gets, puts and removes for a given time.
-   * - Clears the Partition Region (at this point the non-coordinator is restarted).
-   * - Asserts that the clear operation failed with PartitionedRegionPartialClearException (primary
-   * buckets on the the restarted members are not available).
-   */
-  @Test
-  @Parameters(method = "coordinators")
-  @TestCaseName("[{index}] {method}(Coordinator:{0})")
-  public void clearOnNonRedundantPartitionRegionWithConcurrentPutGetRemoveShouldFailWhenNonCoordinatorMembersAreBounced(
-      TestVM coordinatorVM) throws InterruptedException {
-    parametrizedSetup(RegionShortcut.PARTITION);
-    final int entries = 7500;
-    populateRegion(accessor, entries, asList(accessor, server1, server2));
-    server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
-
-    // Let all VMs (except the one to kill) continuously execute gets, put and removes for 30"
-    final int workMillis = 30000;
-    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
-        server1.invokeAsync(() -> executeGets(entries, workMillis)),
-        server1.invokeAsync(() -> executePuts(entries, workMillis)),
-        accessor.invokeAsync(() -> executeGets(entries, workMillis)),
-        accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
-
-    // Clear the region.
-    getVM(coordinatorVM.vmNumber).invoke(() -> {
-      assertThatThrownBy(() -> cacheRule.getCache().getRegion(REGION_NAME).clear())
-          .isInstanceOf(PartitionedRegionPartialClearException.class);
-    });
-
-    // Let asyncInvocations finish.
-    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
-      asyncInvocation.await();
-    }
-  }
-
-  /**
-   * The test does the following (clear coordinator is chosen through parameters):
-   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop a
-   * non-coordinator VM while the clear is in progress (the member has primary buckets, though, so
-   * participates on the clear operation).
-   * - Launches one thread per VM to continuously execute putAll/removeAll for a given time.
-   * - Clears the Partition Region (at this point the non-coordinator is restarted).
-   * - Asserts that, after the clear has finished, the Region Buckets are consistent across members.
-   */
-  @Test
-  @Parameters(method = "coordinators")
-  @TestCaseName("[{index}] {method}(Coordinator:{0})")
-  public void clearOnRedundantPartitionRegionWithConcurrentPutAllRemoveAllShouldWorkCorrectlyWhenNonCoordinatorMembersAreBounced(
-      TestVM coordinatorVM) throws InterruptedException {
-    parametrizedSetup(RegionShortcut.PARTITION_REDUNDANT);
-    server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
-
-    // Let all VMs continuously execute putAll/removeAll for 30 seconds.
-    final int workMillis = 30000;
-    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
-        server1.invokeAsync(() -> executePutAlls(0, 6000, workMillis)),
-        accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)));
-
-    // Retry the clear operation on the region until success (server2 will go down, but other
-    // members will eventually become primary for those buckets previously hosted by server2).
-    executeClearWithRetry(getVM(coordinatorVM.vmNumber));
-
-    // Wait for member to get back online.
-    server2.invoke(() -> {
-      cacheRule.createCache();
-      initDataStore(RegionShortcut.PARTITION_REDUNDANT);
-      await().untilAsserted(
-          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
-    });
-
-    // Let asyncInvocations finish.
-    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
-      asyncInvocation.await();
-    }
-
-    // Assert Region Buckets are consistent.
-    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
-    accessor.invoke(this::assertRegionBucketsConsistency);
-  }
-
-  /**
-   * The test does the following (clear coordinator is chosen through parameters):
-   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop a
-   * non-coordinator VM while the clear is in progress (the member has primary buckets, though, so
-   * participates on the clear operation).
-   * - Launches one thread per VM to continuously execute putAll/removeAll for a given time.
-   * - Clears the Partition Region (at this point the non-coordinator is restarted).
-   * - Asserts that the clear operation failed with PartitionedRegionPartialClearException (primary
-   * buckets on the the restarted members are not available).
-   */
-  @Test
-  @Parameters(method = "coordinators")
-  @TestCaseName("[{index}] {method}(Coordinator:{0})")
-  public void clearOnNonRedundantPartitionRegionWithConcurrentPutAllRemoveAllShouldFailWhenNonCoordinatorMembersAreBounced(
-      TestVM coordinatorVM) throws InterruptedException {
-    parametrizedSetup(RegionShortcut.PARTITION);
-    server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
-
-    final int workMillis = 30000;
-    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
-        server1.invokeAsync(() -> executePutAlls(0, 6000, workMillis)),
-        accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)));
-
-    // Clear the region.
-    getVM(coordinatorVM.vmNumber).invoke(() -> {
-      assertThatThrownBy(() -> cacheRule.getCache().getRegion(REGION_NAME).clear())
-          .isInstanceOf(PartitionedRegionPartialClearException.class);
-    });
-
-    // Let asyncInvocations finish.
-    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
-      asyncInvocation.await();
-    }
-  }
-
   private enum TestVM {
     ACCESSOR(0), SERVER1(1), SERVER2(2);
 

[geode] 07/20: GEODE-9132: Undelete unnecessary uses of final

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit ef0b7ec0e4146499da56b29453fe89011d632578
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Thu Apr 15 17:08:52 2021 -0700

    GEODE-9132: Undelete unnecessary uses of final
---
 .../apache/geode/internal/cache/PartitionedRegionClearMessage.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java
index 36cdcb6..cd33f78 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java
@@ -61,7 +61,8 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
 
   PartitionedRegionClearMessage(Set<InternalDistributedMember> recipients,
       PartitionedRegion partitionedRegion, ReplyProcessor21 replyProcessor21,
-      PartitionedRegionClearMessage.OperationType operationType, RegionEventImpl regionEvent) {
+      PartitionedRegionClearMessage.OperationType operationType,
+      final RegionEventImpl regionEvent) {
     super(recipients, partitionedRegion.getPRId(), replyProcessor21);
     this.partitionedRegion = partitionedRegion;
     this.operationType = operationType;
@@ -234,8 +235,8 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
      * @param distributionManager the distribution manager that is processing the message.
      */
     @Override
-    public void process(DistributionManager distributionManager,
-        ReplyProcessor21 replyProcessor21) {
+    public void process(final DistributionManager distributionManager,
+        final ReplyProcessor21 replyProcessor21) {
       long startTime = getTimestamp();
 
       if (replyProcessor21 == null) {

[geode] 15/20: GEODE-9132: Use factory method to avoid escaped reference

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit a13961422e1d562406870ec190e25849ffa4ca3c
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Thu Apr 22 11:42:09 2021 -0700

    GEODE-9132: Use factory method to avoid escaped reference
---
 .../geode/internal/cache/PartitionedRegion.java    |  2 +-
 .../internal/cache/PartitionedRegionClear.java     | 28 +++++++++++++++++-----
 .../internal/cache/PartitionedRegionClearTest.java |  4 ++--
 3 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
index 61be3b2..91adc45 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
@@ -319,7 +319,7 @@ public class PartitionedRegion extends LocalRegion
     }
   };
 
-  private final PartitionedRegionClear partitionedRegionClear = new PartitionedRegionClear(this);
+  private final PartitionedRegionClear partitionedRegionClear = PartitionedRegionClear.create(this);
 
   /**
    * Global Region for storing PR config ( PRName->PRConfig). This region would be used to resolve
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
index b8597c1..5f4e589 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
@@ -64,7 +64,27 @@ public class PartitionedRegionClear {
   private final AssignBucketsToPartitions assignBucketsToPartitions;
   private final UpdateAttributesProcessorFactory updateAttributesProcessorFactory;
 
-  public PartitionedRegionClear(PartitionedRegion partitionedRegion) {
+  public static PartitionedRegionClear create(PartitionedRegion partitionedRegion) {
+    PartitionedRegionClear partitionedRegionClear = new PartitionedRegionClear(partitionedRegion);
+    partitionedRegionClear.initialize();
+    return partitionedRegionClear;
+  }
+
+  @VisibleForTesting
+  static PartitionedRegionClear create(PartitionedRegion partitionedRegion,
+      DistributedLockService distributedLockService,
+      ColocationLeaderRegionProvider colocationLeaderRegionProvider,
+      AssignBucketsToPartitions assignBucketsToPartitions,
+      UpdateAttributesProcessorFactory updateAttributesProcessorFactory) {
+    PartitionedRegionClear partitionedRegionClear =
+        new PartitionedRegionClear(partitionedRegion, distributedLockService,
+            colocationLeaderRegionProvider, assignBucketsToPartitions,
+            updateAttributesProcessorFactory);
+    partitionedRegionClear.initialize();
+    return partitionedRegionClear;
+  }
+
+  private PartitionedRegionClear(PartitionedRegion partitionedRegion) {
     this(partitionedRegion,
         partitionedRegion.getPartitionedRegionLockService(),
         ColocationHelper::getLeaderRegion,
@@ -72,8 +92,7 @@ public class PartitionedRegionClear {
         pr -> new UpdateAttributesProcessor(pr, true));
   }
 
-  @VisibleForTesting
-  PartitionedRegionClear(PartitionedRegion partitionedRegion,
+  private PartitionedRegionClear(PartitionedRegion partitionedRegion,
       DistributedLockService distributedLockService,
       ColocationLeaderRegionProvider colocationLeaderRegionProvider,
       AssignBucketsToPartitions assignBucketsToPartitions,
@@ -83,9 +102,6 @@ public class PartitionedRegionClear {
     this.colocationLeaderRegionProvider = colocationLeaderRegionProvider;
     this.assignBucketsToPartitions = assignBucketsToPartitions;
     this.updateAttributesProcessorFactory = updateAttributesProcessorFactory;
-
-    // TODO: initialize needs to move out of constructor to prevent escape of reference to 'this'
-    initialize();
   }
 
   private void initialize() {
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java
index 376fc8e..eafb991 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java
@@ -115,8 +115,8 @@ public class PartitionedRegionClearTest {
 
     doNothing().when(distributedLockService).unlock(anyString());
 
-    partitionedRegionClear = new PartitionedRegionClear(partitionedRegion, distributedLockService,
-        colocationLeaderRegionProvider, assignBucketsToPartitions,
+    partitionedRegionClear = PartitionedRegionClear.create(partitionedRegion,
+        distributedLockService, colocationLeaderRegionProvider, assignBucketsToPartitions,
         updateAttributesProcessorFactory);
   }
 

[geode] 08/20: GEODE-9132: Cleanup PartitionedRegionPartialClearException

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 1196265a5fc7e107a9cf10c07e93ed3afa701aec
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Thu Apr 15 17:10:24 2021 -0700

    GEODE-9132: Cleanup PartitionedRegionPartialClearException
    
    * Generate serialVersionUID
    * Use full words for parameter names
---
 .../cache/PartitionedRegionPartialClearException.java      | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/cache/PartitionedRegionPartialClearException.java b/geode-core/src/main/java/org/apache/geode/cache/PartitionedRegionPartialClearException.java
index 1ddb301..b84e775 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/PartitionedRegionPartialClearException.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/PartitionedRegionPartialClearException.java
@@ -21,14 +21,18 @@ package org.apache.geode.cache;
  */
 public class PartitionedRegionPartialClearException extends CacheRuntimeException {
 
-  public PartitionedRegionPartialClearException() {}
+  private static final long serialVersionUID = -3420558263697703892L;
 
-  public PartitionedRegionPartialClearException(String msg) {
-    super(msg);
+  public PartitionedRegionPartialClearException() {
+    // nothing
   }
 
-  public PartitionedRegionPartialClearException(String msg, Throwable cause) {
-    super(msg, cause);
+  public PartitionedRegionPartialClearException(String message) {
+    super(message);
+  }
+
+  public PartitionedRegionPartialClearException(String message, Throwable cause) {
+    super(message, cause);
   }
 
   public PartitionedRegionPartialClearException(Throwable cause) {

[geode] 06/20: GEODE-9132: Remove unused DSFID constants

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 2ed55695419a24affc6e3a9686a0b7f702ef8cec
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Thu Apr 15 17:07:43 2021 -0700

    GEODE-9132: Remove unused DSFID constants
---
 .../apache/geode/internal/serialization/DataSerializableFixedID.java   | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/geode-serialization/src/main/java/org/apache/geode/internal/serialization/DataSerializableFixedID.java b/geode-serialization/src/main/java/org/apache/geode/internal/serialization/DataSerializableFixedID.java
index df5e3ba..80a00b4 100644
--- a/geode-serialization/src/main/java/org/apache/geode/internal/serialization/DataSerializableFixedID.java
+++ b/geode-serialization/src/main/java/org/apache/geode/internal/serialization/DataSerializableFixedID.java
@@ -59,9 +59,6 @@ public interface DataSerializableFixedID extends SerializationVersions, BasicSer
   short CLEAR_PARTITIONED_REGION_REPLY_MESSAGE = -166;
   short CLEAR_PARTITIONED_REGION_MESSAGE = -165;
 
-  short PR_CLEAR_REPLY_MESSAGE = -164;
-  short PR_CLEAR_MESSAGE = -163;
-
   short DISTRIBUTED_PING_MESSAGE = -162;
 
   short REGION_REDUNDANCY_STATUS = -161;

[geode] 02/20: GEODE-7674: Clear on PR with lucene index should throw exception (#6317)

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 5726d03fd78ced79a67b1526d18cc5033f1dbee4
Author: Xiaojian Zhou <ge...@users.noreply.github.com>
AuthorDate: Tue Apr 13 14:21:34 2021 -0700

    GEODE-7674: Clear on PR with lucene index should throw exception (#6317)
---
 .../internal/AsyncEventQueueFactoryImpl.java       |  6 ++++++
 .../asyncqueue/internal/AsyncEventQueueImpl.java   |  5 +++++
 .../org/apache/geode/cache/wan/GatewaySender.java  |  2 ++
 .../internal/cache/PartitionedRegionClear.java     | 11 +++++++++++
 .../internal/cache/wan/AbstractGatewaySender.java  | 12 +++++++++++
 .../cache/wan/GatewaySenderAttributes.java         |  7 +++++++
 .../internal/cache/wan/InternalGatewaySender.java  |  2 ++
 .../internal/cache/PartitionedRegionClearTest.java | 10 ++++++++--
 .../cache/lucene/LuceneIndexCreationDUnitTest.java | 23 ++++++++++++++++++++++
 .../cache/lucene/internal/LuceneIndexImpl.java     |  1 +
 10 files changed, 77 insertions(+), 2 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java
index 700cc4b..089c058 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java
@@ -283,6 +283,12 @@ public class AsyncEventQueueFactoryImpl implements AsyncEventQueueFactory {
     return this;
   }
 
+  // keep this method internal
+  public AsyncEventQueueFactory setPartitionedRegionClearUnsupported(boolean status) {
+    gatewaySenderAttributes.partitionedRegionClearUnsupported = status;
+    return this;
+  }
+
   @Override
   public AsyncEventQueueFactory pauseEventDispatching() {
     pauseEventsDispatching = true;
diff --git a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueImpl.java b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueImpl.java
index 2e5cfeb..e9e4f43 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueImpl.java
@@ -199,6 +199,11 @@ public class AsyncEventQueueImpl implements InternalAsyncEventQueue {
     return sender.isForwardExpirationDestroy();
   }
 
+  // keep this method internal
+  public boolean isPartitionedRegionClearUnsupported() {
+    return sender.isPartitionedRegionClearUnsupported();
+  }
+
   public boolean waitUntilFlushed(long timeout, TimeUnit unit) throws InterruptedException {
     return sender.waitUntilFlushed(timeout, unit);
   }
diff --git a/geode-core/src/main/java/org/apache/geode/cache/wan/GatewaySender.java b/geode-core/src/main/java/org/apache/geode/cache/wan/GatewaySender.java
index 32dcec7..72ef716 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/wan/GatewaySender.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/wan/GatewaySender.java
@@ -102,6 +102,8 @@ public interface GatewaySender {
 
   boolean DEFAULT_FORWARD_EXPIRATION_DESTROY = false;
 
+  boolean DEFAULT_PARTITIONED_REGION_CLEAR_UNSUPPORTED = false;
+
   @Immutable
   OrderPolicy DEFAULT_ORDER_POLICY = OrderPolicy.KEY;
   /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
index 539f682..569f78c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
@@ -27,6 +27,8 @@ import org.apache.geode.cache.CacheWriterException;
 import org.apache.geode.cache.Operation;
 import org.apache.geode.cache.OperationAbortedException;
 import org.apache.geode.cache.PartitionedRegionPartialClearException;
+import org.apache.geode.cache.asyncqueue.AsyncEventQueue;
+import org.apache.geode.cache.asyncqueue.internal.AsyncEventQueueImpl;
 import org.apache.geode.cache.partition.PartitionRegionHelper;
 import org.apache.geode.distributed.internal.DistributionManager;
 import org.apache.geode.distributed.internal.MembershipListener;
@@ -396,6 +398,15 @@ public class PartitionedRegionClear {
       // Force all primary buckets to be created before clear.
       assignAllPrimaryBuckets();
 
+      for (AsyncEventQueue asyncEventQueue : partitionedRegion.getCache()
+          .getAsyncEventQueues(false)) {
+        if (((AsyncEventQueueImpl) asyncEventQueue).isPartitionedRegionClearUnsupported()) {
+          throw new UnsupportedOperationException(
+              "Clear is not supported on region " + partitionedRegion.getFullPath()
+                  + " because it has a lucene index");
+        }
+      }
+
       // do cacheWrite
       if (cacheWrite) {
         invokeCacheWriter(regionEvent);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
index e5fa44a..1a4930e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
@@ -143,6 +143,12 @@ public abstract class AbstractGatewaySender implements InternalGatewaySender, Di
 
   protected boolean forwardExpirationDestroy;
 
+  /**
+   * An attribute to specify if Partitioned region clear operation is unsupported.
+   * Default is false.
+   */
+  protected boolean partitionedRegionClearUnsupported;
+
   protected GatewayEventSubstitutionFilter substitutionFilter;
 
   protected LocatorDiscoveryCallback locatorDiscoveryCallback;
@@ -291,6 +297,7 @@ public abstract class AbstractGatewaySender implements InternalGatewaySender, Di
     }
     isBucketSorted = attrs.isBucketSorted();
     forwardExpirationDestroy = attrs.isForwardExpirationDestroy();
+    partitionedRegionClearUnsupported = attrs.isPartitionedRegionClearUnsupported();
   }
 
   public GatewaySenderAdvisor getSenderAdvisor() {
@@ -388,6 +395,11 @@ public abstract class AbstractGatewaySender implements InternalGatewaySender, Di
   }
 
   @Override
+  public boolean isPartitionedRegionClearUnsupported() {
+    return this.partitionedRegionClearUnsupported;
+  }
+
+  @Override
   public boolean isManualStart() {
     return manualStart;
   }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderAttributes.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderAttributes.java
index 74f9c42..0baa896 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderAttributes.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderAttributes.java
@@ -89,6 +89,9 @@ public class GatewaySenderAttributes {
 
   private boolean forwardExpirationDestroy = GatewaySender.DEFAULT_FORWARD_EXPIRATION_DESTROY;
 
+  public boolean partitionedRegionClearUnsupported =
+      GatewaySender.DEFAULT_PARTITIONED_REGION_CLEAR_UNSUPPORTED;
+
   private boolean enforceThreadsConnectSameReceiver =
       GatewaySender.DEFAULT_ENFORCE_THREADS_CONNECT_SAME_RECEIVER;
 
@@ -320,6 +323,10 @@ public class GatewaySenderAttributes {
     return forwardExpirationDestroy;
   }
 
+  public boolean isPartitionedRegionClearUnsupported() {
+    return this.partitionedRegionClearUnsupported;
+  }
+
   public boolean getEnforceThreadsConnectSameReceiver() {
     return enforceThreadsConnectSameReceiver;
   }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/InternalGatewaySender.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/InternalGatewaySender.java
index 13e36e7..d71297c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/InternalGatewaySender.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/InternalGatewaySender.java
@@ -40,6 +40,8 @@ public interface InternalGatewaySender extends GatewaySender {
 
   boolean isForwardExpirationDestroy();
 
+  boolean isPartitionedRegionClearUnsupported();
+
   boolean getIsMetaQueue();
 
   InternalCache getCache();
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java
index 3b66e67..721d236 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java
@@ -42,6 +42,7 @@ import org.mockito.ArgumentCaptor;
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.PartitionedRegionPartialClearException;
 import org.apache.geode.cache.Region;
+import org.apache.geode.cache.asyncqueue.AsyncEventQueue;
 import org.apache.geode.distributed.DistributedLockService;
 import org.apache.geode.distributed.internal.DMStats;
 import org.apache.geode.distributed.internal.DistributionManager;
@@ -56,15 +57,18 @@ import org.apache.geode.internal.serialization.KnownVersion;
 
 public class PartitionedRegionClearTest {
 
+  private GemFireCacheImpl cache;
+  private HashSet<AsyncEventQueue> allAEQs = new HashSet<>();
+  private PartitionedRegionClear partitionedRegionClear;
   private DistributionManager distributionManager;
   private PartitionedRegion partitionedRegion;
   private RegionAdvisor regionAdvisor;
   private InternalDistributedMember internalDistributedMember;
 
-  private PartitionedRegionClear partitionedRegionClear;
-
   @Before
   public void setUp() {
+
+    cache = mock(GemFireCacheImpl.class);
     distributionManager = mock(DistributionManager.class);
     internalDistributedMember = mock(InternalDistributedMember.class);
     partitionedRegion = mock(PartitionedRegion.class);
@@ -73,6 +77,8 @@ public class PartitionedRegionClearTest {
     when(distributionManager.getDistributionManagerId()).thenReturn(internalDistributedMember);
     when(distributionManager.getId()).thenReturn(internalDistributedMember);
     when(internalDistributedMember.getVersion()).thenReturn(KnownVersion.CURRENT);
+    when(partitionedRegion.getCache()).thenReturn(cache);
+    when(cache.getAsyncEventQueues(false)).thenReturn(allAEQs);
     when(partitionedRegion.getDistributionManager()).thenReturn(distributionManager);
     when(partitionedRegion.getName()).thenReturn("prRegion");
     when(partitionedRegion.getRegionAdvisor()).thenReturn(regionAdvisor);
diff --git a/geode-lucene/src/distributedTest/java/org/apache/geode/cache/lucene/LuceneIndexCreationDUnitTest.java b/geode-lucene/src/distributedTest/java/org/apache/geode/cache/lucene/LuceneIndexCreationDUnitTest.java
index 45baa11..4666128 100644
--- a/geode-lucene/src/distributedTest/java/org/apache/geode/cache/lucene/LuceneIndexCreationDUnitTest.java
+++ b/geode-lucene/src/distributedTest/java/org/apache/geode/cache/lucene/LuceneIndexCreationDUnitTest.java
@@ -28,7 +28,9 @@ import static org.apache.geode.cache.lucene.test.LuceneTestUtilities.INDEX_NAME;
 import static org.apache.geode.cache.lucene.test.LuceneTestUtilities.REGION_NAME;
 import static org.apache.geode.test.util.ResourceUtils.createTempFileFromResource;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThrows;
 import static org.junit.Assert.fail;
 
 import java.io.FileInputStream;
@@ -107,6 +109,27 @@ public class LuceneIndexCreationDUnitTest extends LuceneDUnitTest {
   }
 
   @Test
+  public void verifyThrowExceptionWhenClearOnRegionWithLuceneIndex() {
+    SerializableRunnableIF createIndex = getFieldsIndexWithOneField();
+    dataStore1.invoke(() -> {
+      initDataStore(createIndex, RegionTestableType.PARTITION_REDUNDANT);
+      Region<Object, Object> region = cache.getRegion(REGION_NAME);
+      assertNotNull(region);
+      assertThrows(UnsupportedOperationException.class, () -> region.clear());
+    });
+  }
+
+  @Test
+  public void verifyNotThrowExceptionWhenClearOnRegionWithoutLuceneIndex() {
+    dataStore1.invoke(() -> {
+      initDataStore(RegionTestableType.PARTITION_REDUNDANT);
+      Region<Object, Object> region = cache.getRegion(REGION_NAME);
+      assertNotNull(region);
+      region.clear();
+    });
+  }
+
+  @Test
   public void verifyThatEmptyListIsOutputWhenThereAreNoIndexesInTheSystem() {
     dataStore1.invoke(() -> verifyIndexList(0));
     dataStore2.invoke(() -> verifyIndexList(0));
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
index 3a23282..be2bd58 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
@@ -197,6 +197,7 @@ public abstract class LuceneIndexImpl implements InternalLuceneIndex {
     factory.setDiskStoreName(attributes.getDiskStoreName());
     factory.setDiskSynchronous(true);
     factory.setForwardExpirationDestroy(true);
+    factory.setPartitionedRegionClearUnsupported(true);
     return factory;
   }
 

[geode] 16/20: GEODE-9132: Fix locking in PRClearCreateIndexDUnitTest

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 7427273bd3f8e6f65cfd1494f0d28baa379f0b48
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Thu Apr 22 11:43:10 2021 -0700

    GEODE-9132: Fix locking in PRClearCreateIndexDUnitTest
---
 .../geode/cache/query/partitioned/PRClearCreateIndexDUnitTest.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearCreateIndexDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearCreateIndexDUnitTest.java
index 423932d..f4f2105 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearCreateIndexDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearCreateIndexDUnitTest.java
@@ -103,7 +103,7 @@ public class PRClearCreateIndexDUnitTest implements Serializable {
 
     // assert that secondary member received these messages
     primary.invoke(() -> verifyEvents(false, false, false, false));
-    secondary.invoke(() -> verifyEvents(false, true, true, true));
+    secondary.invoke(() -> verifyEvents(true, true, true, true));
   }
 
   @Test
@@ -117,7 +117,7 @@ public class PRClearCreateIndexDUnitTest implements Serializable {
     clear.get();
 
     // assert that secondary member received these messages
-    primary.invoke(() -> verifyEvents(false, true, false, false));
+    primary.invoke(() -> verifyEvents(true, true, false, false));
     secondary.invoke(() -> verifyEvents(false, false, true, true));
   }
 

[geode] 18/20: GEODE-9194: Missing file is causing trouble (#6574)

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 85ecd69644e15353867368475445882aa2b9657c
Author: mhansonp <ha...@vmware.com>
AuthorDate: Tue Jun 8 09:41:32 2021 -0700

    GEODE-9194: Missing file is causing trouble (#6574)
---
 .../META-INF/services/org.springframework.shell.core.CommandMarker       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/geode-gfsh/src/main/resources/META-INF/services/org.springframework.shell.core.CommandMarker b/geode-gfsh/src/main/resources/META-INF/services/org.springframework.shell.core.CommandMarker
index 00ae9b2..71b09d2 100644
--- a/geode-gfsh/src/main/resources/META-INF/services/org.springframework.shell.core.CommandMarker
+++ b/geode-gfsh/src/main/resources/META-INF/services/org.springframework.shell.core.CommandMarker
@@ -6,6 +6,7 @@ org.apache.geode.management.internal.cli.commands.AlterRegionCommand
 org.apache.geode.management.internal.cli.commands.AlterRuntimeConfigCommand
 org.apache.geode.management.internal.cli.commands.BackupDiskStoreCommand
 org.apache.geode.management.internal.cli.commands.ChangeLogLevelCommand
+org.apache.geode.management.internal.cli.commands.ClearCommand
 org.apache.geode.management.internal.cli.commands.ClearDefinedIndexesCommand
 org.apache.geode.management.internal.cli.commands.CloseDurableClientCommand
 org.apache.geode.management.internal.cli.commands.CloseDurableCQsCommand

[geode] 01/20: GEODE-7683: introduce BR.cmnClearRegion

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 81eb1beb22cfcdc62224be6a9090fd404fcea3ee
Author: zhouxh <gz...@pivotal.io>
AuthorDate: Mon Jan 27 17:02:48 2020 -0800

    GEODE-7683: introduce BR.cmnClearRegion
    
    Co-authored-by: Xiaojian Zhou <gz...@pivotal.io>
    
    GEODE-7684: Create messaging class for PR Clear (#4689)
    
    * Added new message class and test
    
    Co-authored-by: Benjamin Ross <br...@pivotal.io>
    Co-authored-by: Donal Evans <do...@pivotal.io>
    
    GEODE-7682: add PR.clear  API (#4755)
    
    * GEODE-7683: introduce BR.cmnClearRegion
    
    Co-authored-by: Xiaojian Zhou <gz...@pivotal.io>
    
    PR.clear's event id should be created and used in BR (#4805)
    
    * GEODE-7857: PR.clear's event id should be created and used in BR
    
    GEODE-7912: cacheWriter should be triggered when PR.clear (#4882)
    
            Co-authored-by: Anil <ag...@pivotal.io>
            Co-authored-by: Xiaojian Zhou <gz...@pivotal.io>
    
    GEODE-7983: Clear region writer callbacks should not be invoked for bucket regions (#4954)
    
    GEODE-7676: Add PR clear with expiration tests (#4970)
    
    Added distributed tests to verify the clear operation on Partitioned
    Regions works as expected when expiration is configured.
    
    - Added unit and distributed tests.
    - Fixed LocalRegion class to clear the entryExpiryTasks Map whenever
      the cancelAllEntryExpiryTasks method is invoked.
    
    GEODE-7667: Add a 'clear' gfsh command for PR and RR clear (#4818)
    
    * Added clear command and modified remove functionality to clear PR
    
    Authored-by: Benjamin Ross <br...@pivotal.io>
    
    GEODE-7676: Conversion of duration to seconds.
    
    GEODE-7894: Moving expiry tasks to AbstractRegion.
    
    GEODE-7667: Fixing test to include PR clear help text.
    
    GEODE-7678 (2nd PR) - Support for cache-listener and client-notification for Partitioned Region Clear operation  (#5124)
    
    * GEODE-7678: Add support for cache listener and client notification for PR clear
    
    The changes are made to PR clear messaging and locking mechanism to preserve
    cache-listener and client-events ordering during concurrent cache operation
    while clear in progress.
    
    GEODE-7669 Test coverage for Partitioned Region clear with Overflow enabled (#5189)
    
    Authored-by: Jianxia Chen <jc...@apache.org>
    
    GEODE-8173: Add unit test (coverage) for PartitionedRegionClear class. (#5208)
    
    * GEODE-8173: Add unit test (coverage) for PartitionedRegionClear class.
    Co-authored-by: anilkumar gingade <an...@anilg.local>
    
    GEODE-8334: PR.clear should sync with putAll or removeAll on rvvLock (#5365)
    
        Co-authored-by: Xiaojian Zhou <zh...@vmware.com>
        Co-authored-by: Anil Gingade <ag...@vmware.com>
    
    GEODE-8361: Use Set instead of List to track cleared buckets (#5379)
    
    - Refactor PartitionRegionClear to use Set instead of List
    - Some other changes to remove warnings/alerts from PartitionedRegionClear and PartitionedRegionClearMessage
    
    Authored-by: Donal Evans <do...@vmware.com>
    
    GEODE-7670: PR Clear with Concurrent Ops DUnitTests (#4848)
    
    Added distributed tests to verify that the clear operation on
    Partitioned Regions works as expected when there are other
    concurrent operations happening on the cache (put, putAll, get,
    remove, removeAll, members added and members removed).
    
    GEODE-7680: PR.clear must be successful when interacting with rebalance (#5095)
    
    - Added DUnit tests to confirm that clear does not interfere with
    rebalance or vice versa
    - Test when member departs during clear/rebalance
    - Test when member joins during clear/rebalance
    - Fixed typo in PartitionedRegionClearWithExpirationDUnitTest
    - Fixed typo in PartitionedRegion
    - Call assignBucketsToPartitions() on leader colocated region during clear
    instead of target region
    
    Authored-by: Donal Evans <do...@pivotal.io>
    
    GEODE-7846: Adding Stats for Partitioned Region Clear (#5391)
    
    Added stats to CachePerfStats for PR Clear
    - Changed clears to 'regionClears' and 'bucketClears' to differentiate between the number of times the region was cleared and the number of times a bucket was cleared in a PartitionedRegion
    - Added Local and Total duration stats to record how long clear has been running for a specific region, as well as how long it was spent clearing any specific member
    
    GEODE-7672: add dunit test to verify OQL index after PR clear. (#5436)
    
    * require rvv lock when create index
    
    fix rebase compiling error
    
    GEODE-7845 blocking PR region clear if one or more server versions are too old (#5577)
    
    - if a server is running an old version when a PR clear is invoked
    by the client, the client will receive a ServerOperationException
    with a cause of ServerVersionMismatchException.
    
    GEODE-7845: Adding a cleaner simpler test. (#5622)
    
    - Changed the test for ServerVersionMismatchException to be more readable.
    
    GEODE-7845: Now behaving with clients of various versions. (#5645)
    
    - added functionality that would allow the tests to be run using various versions of the clients against and and new versions of the server.
    
    GEODE-7858: PR.clear notify client should let the queue holder member to notify (#5677)
    
    GEODE-7679 Partitioned Region clear is successful while region is being altered (#5516)
    
    GEODE-7675: Partitioned Region clear should be successful when clients are present with subscription enabled (#5727)
    
    GEODE-8771: invalidate should acquire the lock before initIndex (#5823)
    
    GEODE-8878: PR clear should also send a lock message to the secondary members. (#5950)
    
    GEODE-9132: Minor cleanup of PartitionedRegionClearTest
---
 .../integrationTest/resources/assembly_content.txt |   1 +
 .../cache/PRCacheListenerDistributedTest.java      | 585 +++++++++++++-
 .../cache/RegionClearStatsDistributedTest.java     |   2 +-
 .../ReplicateCacheListenerDistributedTest.java     | 111 ++-
 .../partitioned/PRClearCreateIndexDUnitTest.java   | 265 ++++++
 .../partitioned/PRClearQueryIndexDUnitTest.java    | 376 +++++++++
 ...ionedRegionAfterClearNotificationDUnitTest.java | 372 +++++++++
 .../cache/PartitionedRegionClearDUnitTest.java     | 465 +++++++++++
 ...itionedRegionClearWithAlterRegionDUnitTest.java | 803 ++++++++++++++++++
 ...gionClearWithConcurrentOperationsDUnitTest.java | 747 +++++++++++++++++
 ...titionedRegionClearWithExpirationDUnitTest.java | 501 ++++++++++++
 ...rtitionedRegionClearWithRebalanceDUnitTest.java | 578 +++++++++++++
 .../PartitionedRegionOverflowClearDUnitTest.java   | 380 +++++++++
 .../PartitionedRegionPersistentClearDUnitTest.java |  38 +-
 ...titionedRegionClearWithExpirationDUnitTest.java | 530 ++++++++++++
 .../query/partitioned/PRClearIntegrationTest.java  |  73 ++
 .../cache/PartitionedRegionIntegrationTest.java    |  45 ++
 ...itionedRegionSingleNodeOperationsJUnitTest.java |  66 --
 .../codeAnalysis/sanctionedDataSerializables.txt   |  16 +
 .../PartitionedRegionPartialClearException.java    |  45 +-
 .../main/java/org/apache/geode/cache/Region.java   |   6 +-
 .../cache/query/internal/DefaultQueryService.java  |   5 +-
 .../cache/query/internal/index/IndexManager.java   |   4 +-
 .../org/apache/geode/internal/DSFIDFactory.java    |   6 +
 .../geode/internal/cache/AbstractRegion.java       |   1 +
 .../geode/internal/cache/AbstractRegionMap.java    |  27 +-
 .../apache/geode/internal/cache/BucketAdvisor.java |   2 +-
 .../apache/geode/internal/cache/BucketRegion.java  |  42 +-
 .../geode/internal/cache/CachePerfStats.java       |  59 +-
 .../geode/internal/cache/ColocationHelper.java     |  10 +-
 .../internal/cache/DistributedClearOperation.java  |   8 +
 .../geode/internal/cache/DistributedRegion.java    |  57 +-
 .../geode/internal/cache/InternalRegion.java       |   3 +
 .../apache/geode/internal/cache/LocalRegion.java   |  25 +-
 .../geode/internal/cache/PartitionedRegion.java    | 118 ++-
 .../internal/cache/PartitionedRegionClear.java     | 506 ++++++++++++
 .../cache/PartitionedRegionClearMessage.java       | 289 +++++++
 .../internal/cache/PartitionedRegionDataStore.java |   8 +
 .../geode/internal/cache/RegionEventImpl.java      |   5 +
 .../geode/internal/cache/RegionPerfStats.java      |  12 +-
 .../apache/geode/internal/cache/RegionStats.java   |   4 +-
 .../internal/cache/partitioned/ClearPRMessage.java | 320 ++++++++
 .../cache/partitioned/PutAllPRMessage.java         |   9 +
 .../internal/cache/partitioned/RegionAdvisor.java  |  11 +
 .../cache/partitioned/RemoveAllPRMessage.java      |   9 +
 .../cache/versions/RegionVersionVector.java        |   4 +-
 .../geode/management/internal/i18n/CliStrings.java |  14 +-
 .../sanctioned-geode-core-serializables.txt        |   2 +
 .../internal/cache/BucketRegionJUnitTest.java      |  85 +-
 .../geode/internal/cache/CachePerfStatsTest.java   |  53 +-
 .../internal/cache/DistributedRegionJUnitTest.java |  18 +
 .../geode/internal/cache/LocalRegionTest.java      |  22 +
 .../internal/cache/PartitionedRegionClearTest.java | 897 +++++++++++++++++++++
 .../internal/cache/PartitionedRegionTest.java      |  26 +
 .../cache/partitioned/ClearPRMessageTest.java      | 260 ++++++
 .../cache/partitioned/PutAllPRMessageTest.java     |  29 +
 .../cache/partitioned/RemoveAllPRMessageTest.java  |  29 +
 .../RollingUpgrade2DUnitTestBase.java              |   4 +-
 ...ePartitionRegionClearServerVersionMismatch.java | 212 +++++
 .../internal/cache/PartitionRegionClearHATest.java | 236 ++++++
 .../PartitionRegionClearMessageQueueDUnitTest.java | 165 ++++
 .../geode/test/dunit/rules/ClusterStartupRule.java |  21 +-
 .../geode/test/junit/rules/MemberStarterRule.java  |   9 +
 .../cli/commands/ClearCommandDUnitTest.java        | 120 +++
 .../cli/commands/RemoveCommandDUnitTest.java       |  13 +-
 .../GfshParserAutoCompletionIntegrationTest.java   |   2 +-
 .../{RemoveCommand.java => ClearCommand.java}      |  51 +-
 .../cli/commands/CommandAvailabilityIndicator.java |   1 +
 .../internal/cli/commands/RemoveCommand.java       |   9 +-
 .../internal/cli/domain/DataCommandResult.java     |  12 +
 .../cli/functions/DataCommandFunction.java         |  23 +-
 .../internal/cli/commands/ClearCommandTest.java    | 115 +++
 .../org/apache/geode/cache/query/data/City.java    |   7 +-
 .../test/concurrent/FileBasedCountDownLatch.java   |   2 +-
 .../serialization/DataSerializableFixedID.java     |   5 +
 75 files changed, 9680 insertions(+), 311 deletions(-)

diff --git a/geode-assembly/src/integrationTest/resources/assembly_content.txt b/geode-assembly/src/integrationTest/resources/assembly_content.txt
index 94a493f..f6c0b5f 100644
--- a/geode-assembly/src/integrationTest/resources/assembly_content.txt
+++ b/geode-assembly/src/integrationTest/resources/assembly_content.txt
@@ -221,6 +221,7 @@ javadoc/org/apache/geode/cache/PartitionAttributes.html
 javadoc/org/apache/geode/cache/PartitionAttributesFactory.html
 javadoc/org/apache/geode/cache/PartitionResolver.html
 javadoc/org/apache/geode/cache/PartitionedRegionDistributionException.html
+javadoc/org/apache/geode/cache/PartitionedRegionPartialClearException.html
 javadoc/org/apache/geode/cache/PartitionedRegionStorageException.html
 javadoc/org/apache/geode/cache/Region.Entry.html
 javadoc/org/apache/geode/cache/Region.html
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache/PRCacheListenerDistributedTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache/PRCacheListenerDistributedTest.java
index 559def7..ac02b65 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/cache/PRCacheListenerDistributedTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache/PRCacheListenerDistributedTest.java
@@ -14,14 +14,35 @@
  */
 package org.apache.geode.cache;
 
+import static org.apache.geode.test.dunit.VM.getVM;
+import static org.apache.geode.test.dunit.VM.getVMCount;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.fail;
+import static org.hamcrest.Matchers.anyOf;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.not;
+import static org.hamcrest.Matchers.nullValue;
+
+import java.io.Serializable;
 import java.util.Arrays;
+import java.util.Collection;
 
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameter;
 import org.junit.runners.Parameterized.Parameters;
 import org.junit.runners.Parameterized.UseParametersRunnerFactory;
 
+import org.apache.geode.cache.util.CacheListenerAdapter;
+import org.apache.geode.logging.internal.log4j.api.LogService;
+import org.apache.geode.test.dunit.rules.CacheRule;
+import org.apache.geode.test.dunit.rules.DistributedCounters;
+import org.apache.geode.test.dunit.rules.DistributedErrorCollector;
+import org.apache.geode.test.dunit.rules.DistributedRule;
+import org.apache.geode.test.junit.rules.serializable.SerializableTestName;
 import org.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactory;
 
 /**
@@ -36,47 +57,591 @@ import org.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactor
 @RunWith(Parameterized.class)
 @UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
 @SuppressWarnings("serial")
-public class PRCacheListenerDistributedTest extends ReplicateCacheListenerDistributedTest {
+public class PRCacheListenerDistributedTest implements Serializable {
+
+  protected static final String CLEAR = "CLEAR";
+  protected static final String REGION_DESTROY = "REGION_DESTROY";
+  private static final String CREATES = "CREATES";
+  private static final String UPDATES = "UPDATES";
+  private static final String INVALIDATES = "INVALIDATES";
+  private static final String DESTROYS = "DESTROYS";
+  private static final int ENTRY_VALUE = 0;
+  private static final int UPDATED_ENTRY_VALUE = 1;
+  private static final String KEY = "key-1";
+  @Rule
+  public DistributedRule distributedRule = new DistributedRule();
+  @Rule
+  public CacheRule cacheRule = CacheRule.builder().createCacheInAll().build();
+  @Rule
+  public SerializableTestName testName = new SerializableTestName();
+  @Rule
+  public DistributedCounters sharedCountersRule = new DistributedCounters();
+  @Rule
+  public DistributedErrorCollector errorCollector = new DistributedErrorCollector();
+  protected String regionName;
 
-  @Parameters(name = "{index}: redundancy={0}")
-  public static Iterable<Integer> data() {
-    return Arrays.asList(0, 3);
+  @Parameters
+  public static Collection<Object[]> data() {
+    return Arrays.asList(new Object[][] {
+        {1, Boolean.FALSE},
+        {3, Boolean.TRUE},
+    });
   }
 
   @Parameter
   public int redundancy;
 
-  @Override
+  @Parameter(1)
+  public Boolean withData;
+
   protected Region<String, Integer> createRegion(final String name,
       final CacheListener<String, Integer> listener) {
+    return createPartitionedRegion(name, listener, false);
+  }
+
+  protected Region<String, Integer> createAccessorRegion(final String name,
+      final CacheListener<String, Integer> listener) {
+    return createPartitionedRegion(name, listener, true);
+  }
+
+  private Region<String, Integer> createPartitionedRegion(String name,
+      CacheListener<String, Integer> listener, boolean accessor) {
+    LogService.getLogger()
+        .info("Params [Redundancy: " + redundancy + " withData:" + withData + "]");
     PartitionAttributesFactory<String, Integer> paf = new PartitionAttributesFactory<>();
     paf.setRedundantCopies(redundancy);
 
+    if (accessor) {
+      paf.setLocalMaxMemory(0);
+    }
     RegionFactory<String, Integer> regionFactory = cacheRule.getCache().createRegionFactory();
-    regionFactory.addCacheListener(listener);
+    if (listener != null) {
+      regionFactory.addCacheListener(listener);
+    }
     regionFactory.setDataPolicy(DataPolicy.PARTITION);
     regionFactory.setPartitionAttributes(paf.create());
 
     return regionFactory.create(name);
   }
 
-  @Override
+  private void withData(Region region) {
+    if (withData) {
+      // Fewer buckets.
+      // Covers case where node doesn't have any buckets depending on redundancy.
+      region.put("key1", "value1");
+      region.put("key2", "value2");
+    }
+  }
+
   protected int expectedCreates() {
     return 1;
   }
 
-  @Override
   protected int expectedUpdates() {
     return 1;
   }
 
-  @Override
   protected int expectedInvalidates() {
     return 1;
   }
 
-  @Override
   protected int expectedDestroys() {
     return 1;
   }
+
+  @Test
+  public void afterRegionDestroyIsInvokedInEveryMember() {
+    CacheListener<String, Integer> listener = new RegionDestroyCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, listener);
+
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        withData(createRegion(regionName, listener));
+      });
+    }
+
+    region.destroyRegion();
+
+    assertThat(sharedCountersRule.getTotal(REGION_DESTROY))
+        .isGreaterThanOrEqualTo(expectedRegionDestroys());
+  }
+
+  @Test
+  public void afterRegionDestroyIsInvokedOnNodeWithListener() {
+    CacheListener<String, Integer> listener = new RegionDestroyCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, listener);
+
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        withData(createRegion(regionName, null));
+      });
+    }
+
+    region.destroyRegion();
+
+    assertThat(sharedCountersRule.getTotal(REGION_DESTROY)).isEqualTo(1);
+  }
+
+  @Test
+  public void afterRegionDestroyIsInvokedOnRemoteNodeWithListener() {
+    CacheListener<String, Integer> listener = new RegionDestroyCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, null);
+
+    getVM(0).invoke(() -> {
+      createRegion(regionName, listener);
+    });
+
+    for (int i = 1; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        withData(createRegion(regionName, null));
+      });
+    }
+
+    region.destroyRegion();
+
+    assertThat(sharedCountersRule.getTotal(REGION_DESTROY)).isEqualTo(1);
+  }
+
+  @Test
+  public void afterRegionDestroyIsInvokedOnAccessorAndDataMembers() {
+    CacheListener<String, Integer> listener = new RegionDestroyCountingCacheListener();
+    Region<String, Integer> region = createAccessorRegion(regionName, listener);
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        withData(createRegion(regionName, listener));
+      });
+    }
+
+    region.destroyRegion();
+
+    assertThat(sharedCountersRule.getTotal(REGION_DESTROY))
+        .isGreaterThanOrEqualTo(expectedRegionDestroys());
+  }
+
+  @Test
+  public void afterRegionDestroyIsInvokedOnAccessor() {
+    CacheListener<String, Integer> listener = new RegionDestroyCountingCacheListener();
+    Region<String, Integer> region = createAccessorRegion(regionName, listener);
+
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        withData(createRegion(regionName, null));
+      });
+    }
+
+    region.destroyRegion();
+
+    assertThat(sharedCountersRule.getTotal(REGION_DESTROY)).isEqualTo(1);
+  }
+
+  @Test
+  public void afterRegionDestroyIsInvokedOnNonAccessor() {
+    CacheListener<String, Integer> listener = new RegionDestroyCountingCacheListener();
+    Region<String, Integer> region = createAccessorRegion(regionName, null);
+    getVM(0).invoke(() -> {
+      createRegion(regionName, listener);
+    });
+    for (int i = 1; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        withData(createRegion(regionName, null));
+      });
+    }
+
+    region.destroyRegion();
+
+    assertThat(sharedCountersRule.getTotal(REGION_DESTROY)).isEqualTo(1);
+  }
+
+  @Test
+  public void afterRegionClearIsInvokedInEveryMember() {
+    CacheListener<String, Integer> listener = new ClearCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, listener);
+
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        withData(createRegion(regionName, listener));
+      });
+    }
+
+    region.clear();
+
+    assertThat(sharedCountersRule.getTotal(CLEAR)).isEqualTo(expectedClears());
+  }
+
+  @Test
+  public void afterClearIsInvokedOnNodeWithListener() {
+    CacheListener<String, Integer> listener = new ClearCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, listener);
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        withData(createRegion(regionName, null));
+      });
+    }
+
+    region.clear();
+
+    assertThat(sharedCountersRule.getTotal(CLEAR)).isEqualTo(1);
+  }
+
+  @Test
+  public void afterRegionClearIsInvokedOnRemoteNodeWithListener() {
+    CacheListener<String, Integer> listener = new ClearCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, null);
+    getVM(0).invoke(() -> {
+      createRegion(regionName, listener);
+    });
+    for (int i = 1; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        withData(createRegion(regionName, null));
+      });
+    }
+
+    region.clear();
+
+    assertThat(sharedCountersRule.getTotal(CLEAR)).isEqualTo(1);
+  }
+
+  @Test
+  public void afterRegionClearIsInvokedOnAccessorAndDataMembers() {
+    CacheListener<String, Integer> listener = new ClearCountingCacheListener();
+    Region<String, Integer> region = createAccessorRegion(regionName, listener);
+
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        withData(createRegion(regionName, listener));
+      });
+    }
+
+    region.clear();
+
+    assertThat(sharedCountersRule.getTotal(CLEAR)).isEqualTo(expectedClears());
+  }
+
+  @Test
+  public void afterRegionClearIsInvokedOnAccessor() {
+    CacheListener<String, Integer> listener = new ClearCountingCacheListener();
+    Region<String, Integer> region = createAccessorRegion(regionName, listener);
+
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        withData(createRegion(regionName, null));
+      });
+    }
+
+    region.clear();
+
+    assertThat(sharedCountersRule.getTotal(CLEAR)).isEqualTo(1);
+  }
+
+  @Test
+  public void afterRegionClearIsInvokedOnNonAccessor() {
+    CacheListener<String, Integer> listener = new ClearCountingCacheListener();
+    Region<String, Integer> region = createAccessorRegion(regionName, null);
+
+    getVM(0).invoke(() -> {
+      createRegion(regionName, listener);
+    });
+    for (int i = 1; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        withData(createRegion(regionName, null));
+      });
+    }
+
+    region.clear();
+
+    assertThat(sharedCountersRule.getTotal(CLEAR)).isEqualTo(1);
+  }
+
+  @Before
+  public void setUp() {
+    regionName = getClass().getSimpleName();
+
+    sharedCountersRule.initialize(CREATES);
+    sharedCountersRule.initialize(DESTROYS);
+    sharedCountersRule.initialize(INVALIDATES);
+    sharedCountersRule.initialize(UPDATES);
+    sharedCountersRule.initialize(CLEAR);
+    sharedCountersRule.initialize(REGION_DESTROY);
+  }
+
+  @Test
+  public void afterCreateIsInvokedInEveryMember() {
+    CacheListener<String, Integer> listener = new CreateCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, listener);
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        createRegion(regionName, listener);
+      });
+    }
+
+    region.put(KEY, ENTRY_VALUE, cacheRule.getSystem().getDistributedMember());
+
+    assertThat(sharedCountersRule.getTotal(CREATES)).isEqualTo(expectedCreates());
+  }
+
+  @Test
+  public void afterUpdateIsInvokedInEveryMember() {
+    CacheListener<String, Integer> listener = new UpdateCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, listener);
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        createRegion(regionName, listener);
+      });
+    }
+
+    region.put(KEY, ENTRY_VALUE, cacheRule.getSystem().getDistributedMember());
+    region.put(KEY, UPDATED_ENTRY_VALUE, cacheRule.getSystem().getDistributedMember());
+
+    assertThat(sharedCountersRule.getTotal(UPDATES)).isEqualTo(expectedUpdates());
+  }
+
+  @Test
+  public void afterInvalidateIsInvokedInEveryMember() {
+    CacheListener<String, Integer> listener = new InvalidateCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, listener);
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        createRegion(regionName, listener);
+      });
+    }
+
+    region.put(KEY, 0, cacheRule.getSystem().getDistributedMember());
+    region.invalidate(KEY);
+
+    assertThat(sharedCountersRule.getTotal(INVALIDATES)).isEqualTo(expectedInvalidates());
+    assertThat(region.get(KEY)).isNull();
+  }
+
+  @Test
+  public void afterDestroyIsInvokedInEveryMember() {
+    CacheListener<String, Integer> listener = new DestroyCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, listener);
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        createRegion(regionName, listener);
+      });
+    }
+
+    region.put(KEY, 0, cacheRule.getSystem().getDistributedMember());
+    region.destroy(KEY);
+
+    assertThat(sharedCountersRule.getTotal(DESTROYS)).isEqualTo(expectedDestroys());
+  }
+
+  @Test
+  public void afterClearIsInvokedInEveryMember() {
+    CacheListener<String, Integer> listener = new ClearCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, listener);
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        createRegion(regionName, listener);
+      });
+    }
+
+    region.clear();
+
+    assertThat(sharedCountersRule.getTotal(CLEAR)).isEqualTo(expectedClears());
+  }
+
+  protected int expectedClears() {
+    return getVMCount() + 1;
+  }
+
+  protected int expectedRegionDestroys() {
+    return getVMCount() + 1;
+  }
+
+  /**
+   * Overridden within tests to increment shared counters.
+   */
+  private abstract static class BaseCacheListener extends CacheListenerAdapter<String, Integer>
+      implements Serializable {
+
+    @Override
+    public void afterCreate(final EntryEvent<String, Integer> event) {
+      fail("Unexpected listener callback: afterCreate");
+    }
+
+    @Override
+    public void afterInvalidate(final EntryEvent<String, Integer> event) {
+      fail("Unexpected listener callback: afterInvalidate");
+    }
+
+    @Override
+    public void afterDestroy(final EntryEvent<String, Integer> event) {
+      fail("Unexpected listener callback: afterDestroy");
+    }
+
+    @Override
+    public void afterUpdate(final EntryEvent<String, Integer> event) {
+      fail("Unexpected listener callback: afterUpdate");
+    }
+
+    @Override
+    public void afterRegionInvalidate(final RegionEvent<String, Integer> event) {
+      fail("Unexpected listener callback: afterRegionInvalidate");
+    }
+  }
+
+  private class CreateCountingCacheListener extends BaseCacheListener {
+
+    @Override
+    public void afterCreate(final EntryEvent<String, Integer> event) {
+      sharedCountersRule.increment(CREATES);
+
+      errorCollector.checkThat(event.getDistributedMember(), equalTo(event.getCallbackArgument()));
+      errorCollector.checkThat(event.getOperation(), equalTo(Operation.CREATE));
+      errorCollector.checkThat(event.getOldValue(), nullValue());
+      errorCollector.checkThat(event.getNewValue(), equalTo(ENTRY_VALUE));
+
+      if (event.getSerializedOldValue() != null) {
+        errorCollector.checkThat(event.getSerializedOldValue().getDeserializedValue(),
+            equalTo(event.getOldValue()));
+      }
+      if (event.getSerializedNewValue() != null) {
+        errorCollector.checkThat(event.getSerializedNewValue().getDeserializedValue(),
+            equalTo(event.getNewValue()));
+      }
+    }
+  }
+
+  private class UpdateCountingCacheListener extends BaseCacheListener {
+
+    @Override
+    public void afterCreate(final EntryEvent<String, Integer> event) {
+      // nothing
+    }
+
+    @Override
+    public void afterUpdate(final EntryEvent<String, Integer> event) {
+      sharedCountersRule.increment(UPDATES);
+
+      errorCollector.checkThat(event.getDistributedMember(), equalTo(event.getCallbackArgument()));
+      errorCollector.checkThat(event.getOperation(), equalTo(Operation.UPDATE));
+      errorCollector.checkThat(event.getOldValue(), anyOf(equalTo(ENTRY_VALUE), nullValue()));
+      errorCollector.checkThat(event.getNewValue(), equalTo(UPDATED_ENTRY_VALUE));
+
+      if (event.getSerializedOldValue() != null) {
+        errorCollector.checkThat(event.getSerializedOldValue().getDeserializedValue(),
+            equalTo(event.getOldValue()));
+      }
+      if (event.getSerializedNewValue() != null) {
+        errorCollector.checkThat(event.getSerializedNewValue().getDeserializedValue(),
+            equalTo(event.getNewValue()));
+      }
+    }
+  }
+
+  private class InvalidateCountingCacheListener extends BaseCacheListener {
+
+    @Override
+    public void afterCreate(final EntryEvent<String, Integer> event) {
+      // ignore
+    }
+
+    @Override
+    public void afterInvalidate(final EntryEvent<String, Integer> event) {
+      sharedCountersRule.increment(INVALIDATES);
+
+      if (event.isOriginRemote()) {
+        errorCollector.checkThat(event.getDistributedMember(),
+            not(cacheRule.getSystem().getDistributedMember()));
+      } else {
+        errorCollector.checkThat(event.getDistributedMember(),
+            equalTo(cacheRule.getSystem().getDistributedMember()));
+      }
+      errorCollector.checkThat(event.getOperation(), equalTo(Operation.INVALIDATE));
+      errorCollector.checkThat(event.getOldValue(), anyOf(equalTo(ENTRY_VALUE), nullValue()));
+      errorCollector.checkThat(event.getNewValue(), nullValue());
+    }
+  }
+
+  private class DestroyCountingCacheListener extends BaseCacheListener {
+
+    @Override
+    public void afterCreate(final EntryEvent<String, Integer> event) {
+      sharedCountersRule.increment(CREATES);
+    }
+
+    @Override
+    public void afterUpdate(final EntryEvent<String, Integer> event) {
+      sharedCountersRule.increment(UPDATES);
+    }
+
+    @Override
+    public void afterDestroy(final EntryEvent<String, Integer> event) {
+      sharedCountersRule.increment(DESTROYS);
+
+      if (event.isOriginRemote()) {
+        errorCollector.checkThat(event.getDistributedMember(),
+            not(cacheRule.getSystem().getDistributedMember()));
+      } else {
+        errorCollector.checkThat(event.getDistributedMember(),
+            equalTo(cacheRule.getSystem().getDistributedMember()));
+      }
+      errorCollector.checkThat(event.getOperation(), equalTo(Operation.DESTROY));
+      errorCollector.checkThat(event.getOldValue(), anyOf(equalTo(ENTRY_VALUE), nullValue()));
+      errorCollector.checkThat(event.getNewValue(), nullValue());
+    }
+  }
+
+  protected class ClearCountingCacheListener extends BaseCacheListener {
+
+    @Override
+    public void afterCreate(final EntryEvent<String, Integer> event) {
+      sharedCountersRule.increment(CREATES);
+    }
+
+    @Override
+    public void afterUpdate(final EntryEvent<String, Integer> event) {
+      sharedCountersRule.increment(UPDATES);
+    }
+
+    @Override
+    public void afterRegionClear(RegionEvent<String, Integer> event) {
+
+      sharedCountersRule.increment(CLEAR);
+      if (!event.getRegion().getAttributes().getDataPolicy().withPartitioning()) {
+        if (event.isOriginRemote()) {
+          errorCollector.checkThat(event.getDistributedMember(),
+              not(cacheRule.getSystem().getDistributedMember()));
+        } else {
+          errorCollector.checkThat(event.getDistributedMember(),
+              equalTo(cacheRule.getSystem().getDistributedMember()));
+        }
+      }
+      errorCollector.checkThat(event.getOperation(), equalTo(Operation.REGION_CLEAR));
+      errorCollector.checkThat(event.getRegion().getName(), equalTo(regionName));
+    }
+  }
+
+  protected class RegionDestroyCountingCacheListener extends BaseCacheListener {
+
+    @Override
+    public void afterCreate(final EntryEvent<String, Integer> event) {
+      sharedCountersRule.increment(CREATES);
+    }
+
+    @Override
+    public void afterUpdate(final EntryEvent<String, Integer> event) {
+      sharedCountersRule.increment(UPDATES);
+    }
+
+    @Override
+    public void afterRegionDestroy(final RegionEvent<String, Integer> event) {
+      sharedCountersRule.increment(REGION_DESTROY);
+
+      if (!event.getRegion().getAttributes().getDataPolicy().withPartitioning()) {
+        if (event.isOriginRemote()) {
+          errorCollector.checkThat(event.getDistributedMember(),
+              not(cacheRule.getSystem().getDistributedMember()));
+        } else {
+          errorCollector.checkThat(event.getDistributedMember(),
+              equalTo(cacheRule.getSystem().getDistributedMember()));
+        }
+      }
+      errorCollector.checkThat(event.getOperation(), equalTo(Operation.REGION_DESTROY));
+      errorCollector.checkThat(event.getRegion().getName(), equalTo(regionName));
+    }
+  }
 }
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache/RegionClearStatsDistributedTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache/RegionClearStatsDistributedTest.java
index 086a93f..e0214b7 100755
--- a/geode-core/src/distributedTest/java/org/apache/geode/cache/RegionClearStatsDistributedTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache/RegionClearStatsDistributedTest.java
@@ -169,7 +169,7 @@ public class RegionClearStatsDistributedTest implements Serializable {
   }
 
   private void validateClearCountStat() {
-    assertThat(cacheRule.getCache().getCachePerfStats().getClearCount())
+    assertThat(cacheRule.getCache().getCachePerfStats().getRegionClearCount())
         .isEqualTo(EXPECTED_CLEAR_COUNT_STAT_VALUE);
   }
 }
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache/ReplicateCacheListenerDistributedTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache/ReplicateCacheListenerDistributedTest.java
index 3eedcef..dd229de 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/cache/ReplicateCacheListenerDistributedTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache/ReplicateCacheListenerDistributedTest.java
@@ -51,13 +51,15 @@ public class ReplicateCacheListenerDistributedTest implements Serializable {
   private static final String UPDATES = "UPDATES";
   private static final String INVALIDATES = "INVALIDATES";
   private static final String DESTROYS = "DESTROYS";
+  private static final String CLEAR = "CLEAR";
+  private static final String REGION_DESTROY = "REGION_DESTROY";
 
   private static final int ENTRY_VALUE = 0;
   private static final int UPDATED_ENTRY_VALUE = 1;
 
   private static final String KEY = "key-1";
 
-  private String regionName;
+  protected String regionName;
 
   @Rule
   public DistributedRule distributedRule = new DistributedRule();
@@ -82,6 +84,8 @@ public class ReplicateCacheListenerDistributedTest implements Serializable {
     distributedCounters.initialize(DESTROYS);
     distributedCounters.initialize(INVALIDATES);
     distributedCounters.initialize(UPDATES);
+    distributedCounters.initialize(CLEAR);
+    distributedCounters.initialize(REGION_DESTROY);
   }
 
   @Test
@@ -148,6 +152,36 @@ public class ReplicateCacheListenerDistributedTest implements Serializable {
     assertThat(distributedCounters.getTotal(DESTROYS)).isEqualTo(expectedDestroys());
   }
 
+  @Test
+  public void afterClearIsInvokedInEveryMember() {
+    CacheListener<String, Integer> listener = new ClearCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, listener);
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        createRegion(regionName, listener);
+      });
+    }
+
+    region.clear();
+
+    assertThat(distributedCounters.getTotal(CLEAR)).isEqualTo(expectedClears());
+  }
+
+  @Test
+  public void afterRegionDestroyIsInvokedInEveryMember() {
+    CacheListener<String, Integer> listener = new RegionDestroyCountingCacheListener();
+    Region<String, Integer> region = createRegion(regionName, listener);
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
+        createRegion(regionName, listener);
+      });
+    }
+
+    region.destroyRegion();
+
+    assertThat(distributedCounters.getTotal(REGION_DESTROY)).isEqualTo(expectedRegionDestroys());
+  }
+
   protected Region<String, Integer> createRegion(final String name,
       final CacheListener<String, Integer> listener) {
     RegionFactory<String, Integer> regionFactory = cacheRule.getCache().createRegionFactory();
@@ -174,6 +208,14 @@ public class ReplicateCacheListenerDistributedTest implements Serializable {
     return getVMCount() + 1;
   }
 
+  protected int expectedClears() {
+    return getVMCount() + 1;
+  }
+
+  protected int expectedRegionDestroys() {
+    return getVMCount() + 1;
+  }
+
   /**
    * Overridden within tests to increment shared counters.
    */
@@ -283,7 +325,12 @@ public class ReplicateCacheListenerDistributedTest implements Serializable {
 
     @Override
     public void afterCreate(final EntryEvent<String, Integer> event) {
-      // ignore
+      distributedCounters.increment(CREATES);
+    }
+
+    @Override
+    public void afterUpdate(final EntryEvent<String, Integer> event) {
+      distributedCounters.increment(UPDATES);
     }
 
     @Override
@@ -302,4 +349,64 @@ public class ReplicateCacheListenerDistributedTest implements Serializable {
       errorCollector.checkThat(event.getNewValue(), nullValue());
     }
   }
+
+  protected class ClearCountingCacheListener extends BaseCacheListener {
+
+    @Override
+    public void afterCreate(final EntryEvent<String, Integer> event) {
+      distributedCounters.increment(CREATES);
+    }
+
+    @Override
+    public void afterUpdate(final EntryEvent<String, Integer> event) {
+      distributedCounters.increment(UPDATES);
+    }
+
+    @Override
+    public void afterRegionClear(RegionEvent<String, Integer> event) {
+
+      distributedCounters.increment(CLEAR);
+      if (!event.getRegion().getAttributes().getDataPolicy().withPartitioning()) {
+        if (event.isOriginRemote()) {
+          errorCollector.checkThat(event.getDistributedMember(),
+              not(cacheRule.getSystem().getDistributedMember()));
+        } else {
+          errorCollector.checkThat(event.getDistributedMember(),
+              equalTo(cacheRule.getSystem().getDistributedMember()));
+        }
+      }
+      errorCollector.checkThat(event.getOperation(), equalTo(Operation.REGION_CLEAR));
+      errorCollector.checkThat(event.getRegion().getName(), equalTo(regionName));
+    }
+  }
+
+  protected class RegionDestroyCountingCacheListener extends BaseCacheListener {
+
+    @Override
+    public void afterCreate(final EntryEvent<String, Integer> event) {
+      distributedCounters.increment(CREATES);
+    }
+
+    @Override
+    public void afterUpdate(final EntryEvent<String, Integer> event) {
+      distributedCounters.increment(UPDATES);
+    }
+
+    @Override
+    public void afterRegionDestroy(final RegionEvent<String, Integer> event) {
+      distributedCounters.increment(REGION_DESTROY);
+
+      if (!event.getRegion().getAttributes().getDataPolicy().withPartitioning()) {
+        if (event.isOriginRemote()) {
+          errorCollector.checkThat(event.getDistributedMember(),
+              not(cacheRule.getSystem().getDistributedMember()));
+        } else {
+          errorCollector.checkThat(event.getDistributedMember(),
+              equalTo(cacheRule.getSystem().getDistributedMember()));
+        }
+      }
+      errorCollector.checkThat(event.getOperation(), equalTo(Operation.REGION_DESTROY));
+      errorCollector.checkThat(event.getRegion().getName(), equalTo(regionName));
+    }
+  }
 }
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearCreateIndexDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearCreateIndexDUnitTest.java
new file mode 100644
index 0000000..1c94c2d
--- /dev/null
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearCreateIndexDUnitTest.java
@@ -0,0 +1,265 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package org.apache.geode.cache.query.partitioned;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.Serializable;
+import java.util.stream.IntStream;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.client.ClientCache;
+import org.apache.geode.cache.client.ClientRegionShortcut;
+import org.apache.geode.cache.query.QueryService;
+import org.apache.geode.distributed.internal.ClusterDistributionManager;
+import org.apache.geode.distributed.internal.DistributionMessage;
+import org.apache.geode.distributed.internal.DistributionMessageObserver;
+import org.apache.geode.internal.cache.DistributedClearOperation;
+import org.apache.geode.internal.cache.DistributedClearOperation.ClearRegionMessage;
+import org.apache.geode.internal.cache.PartitionedRegionClearMessage;
+import org.apache.geode.test.dunit.AsyncInvocation;
+import org.apache.geode.test.dunit.rules.ClientVM;
+import org.apache.geode.test.dunit.rules.ClusterStartupRule;
+import org.apache.geode.test.dunit.rules.MemberVM;
+
+public class PRClearCreateIndexDUnitTest implements Serializable {
+  @Rule
+  public ClusterStartupRule cluster = new ClusterStartupRule(4, true);
+
+  private MemberVM primary, secondary;
+  private ClientVM client;
+
+  @Before
+  public void before() throws Exception {
+    int locatorPort = ClusterStartupRule.getDUnitLocatorPort();
+    primary = cluster.startServerVM(0, locatorPort);
+    secondary = cluster.startServerVM(1, locatorPort);
+
+    // create region on server1 first, making sure server1 has the primary bucket
+    primary.invoke(() -> {
+      DistributionMessageObserver.setInstance(new MessageObserver());
+      Region<Object, Object> region =
+          ClusterStartupRule.memberStarter.createPartitionRegion("regionA",
+              f -> f.setTotalNumBuckets(1).setRedundantCopies(1));
+      IntStream.range(0, 100).forEach(i -> region.put(i, "value" + i));
+    });
+
+    // server2 has the secondary bucket
+    secondary.invoke(() -> {
+      DistributionMessageObserver.setInstance(new MessageObserver());
+      ClusterStartupRule.memberStarter.createPartitionRegion("regionA",
+          f -> f.setTotalNumBuckets(1).setRedundantCopies(1));
+    });
+  }
+
+  @After
+  public void after() throws Exception {
+    primary.invoke(() -> {
+      DistributionMessageObserver.setInstance(null);
+    });
+    secondary.invoke(() -> {
+      DistributionMessageObserver.setInstance(null);
+    });
+  }
+
+  // All tests create index on secondary members. These tests are making sure we are requesting
+  // locks for clear on secondary members as well. If we create index on the primary, the clear
+  // and createIndex will run sequentially so there would be no error. But if we create index on
+  // the secondary member and if the secondary member will not
+  // request a lock for clear operation, it will result in an EntryDestroyedException when create
+  // index is happening.
+
+  // Note: OP_LOCK_FOR_CLEAR, OP_CLEAR, OP_UNLOCK_FOR_CLEAR are messages for secondary members
+  // OP_LOCK_FOR_PR_CLEAR, OP_UNLOCK_FOR_PR_CLEAR, OP_PR_CLEAR can be for anybody
+
+  @Test
+  // all local buckets are primary, so only OP_LOCK_FOR_CLEAR and OP_CLEAR messages are sent to the
+  // secondary member
+  // in the end an OP_PR_CLEAR is sent to the secondary for no effect
+  public void clearFromPrimaryMember() throws Exception {
+    AsyncInvocation createIndex = secondary.invokeAsync(PRClearCreateIndexDUnitTest::createIndex);
+    AsyncInvocation clear = primary.invokeAsync(PRClearCreateIndexDUnitTest::clear);
+
+    createIndex.get();
+    clear.get();
+
+    // assert that secondary member received these messages
+    primary.invoke(() -> verifyEvents(false, false, false, false));
+    secondary.invoke(() -> verifyEvents(false, true, true, true));
+  }
+
+  @Test
+  // all local buckets are secondary, so an OP_PR_CLEAR is sent to the primary member, from there
+  // a OP_LOCK_FOR_CLEAR and OP_CLEAR messages are sent back to the secondary
+  public void clearFromSecondaryMember() throws Exception {
+    AsyncInvocation createIndex = secondary.invokeAsync(PRClearCreateIndexDUnitTest::createIndex);
+    AsyncInvocation clear = secondary.invokeAsync(PRClearCreateIndexDUnitTest::clear);
+
+    createIndex.get();
+    clear.get();
+
+    // assert that secondary member received these messages
+    primary.invoke(() -> verifyEvents(false, true, false, false));
+    secondary.invoke(() -> verifyEvents(false, false, true, true));
+  }
+
+  /**
+   * For interested client connecting to secondary member
+   * 1. locks all local primary region
+   * 2. send OP_LOCK_FOR_PR_CLEAR to lock all other members
+   * 3. send OP_PR_CLEAR to primary to clear
+   * 4. primary will send a OP_CLEAR message back to the secondary to clear
+   */
+  @Test
+  public void clearFromInterestedClientConnectingToSecondaryMember() throws Exception {
+    int port = secondary.getPort();
+    client = cluster.startClientVM(2, c -> c.withServerConnection(port).withPoolSubscription(true));
+    AsyncInvocation createIndex = secondary.invokeAsync(PRClearCreateIndexDUnitTest::createIndex);
+
+    AsyncInvocation clear = client.invokeAsync(() -> {
+      Thread.sleep(200);
+      ClientCache clientCache = ClusterStartupRule.getClientCache();
+      Region<Object, Object> regionA =
+          clientCache.createClientRegionFactory(ClientRegionShortcut.PROXY).create("regionA");
+      regionA.registerInterestForAllKeys();
+      regionA.clear();
+    });
+
+    createIndex.get();
+    clear.get();
+    primary.invoke(() -> verifyEvents(true, true, false, false));
+    secondary.invoke(() -> verifyEvents(false, false, true, true));
+  }
+
+  @Test
+  /**
+   * For interested client connecting to primary member, behaves like starting from primary member
+   * except it locks first
+   * 1. locks local primary regions
+   * 2. send OP_LOCK_FOR_PR_CLEAR to lock all other members' primary buckets
+   * 3. send a OP_LOCK_FOR_CLEAR message to lock all secondary buckets
+   * 4. send OP_CLEAR to clear all secondary buckets
+   */
+  public void clearFromInterestedClientConnectingToPrimaryMember() throws Exception {
+    int port = primary.getPort();
+    client = cluster.startClientVM(2, c -> c.withServerConnection(port).withPoolSubscription(true));
+    AsyncInvocation createIndex = secondary.invokeAsync(PRClearCreateIndexDUnitTest::createIndex);
+
+    AsyncInvocation clear = client.invokeAsync(() -> {
+      Thread.sleep(200);
+      ClientCache clientCache = ClusterStartupRule.getClientCache();
+      Region<Object, Object> regionA =
+          clientCache.createClientRegionFactory(ClientRegionShortcut.PROXY).create("regionA");
+      regionA.registerInterestForAllKeys();
+      regionA.clear();
+    });
+
+    createIndex.get();
+    clear.get();
+    primary.invoke(() -> verifyEvents(false, false, false, false));
+    secondary.invoke(() -> verifyEvents(true, true, true, true));
+  }
+
+  private static void clear() throws InterruptedException {
+    // start the clear a bit later that the createIndex operation, to reveal the race condition
+    // comment it out since the test does not need the race condition to happen anymore
+    // Thread.sleep(200);
+    Region region = ClusterStartupRule.getCache().getRegion("/regionA");
+    region.clear();
+  }
+
+  private static void createIndex() {
+    QueryService queryService = ClusterStartupRule.getCache().getQueryService();
+    // run create index multiple times to make sure the clear operation fall inside a
+    // createIndex Operation
+    IntStream.range(0, 10).forEach(i -> {
+      try {
+        queryService.createIndex("index" + i, "name" + i, "/regionA");
+      } catch (Exception e) {
+        throw new RuntimeException(e.getMessage(), e);
+      }
+    });
+  }
+
+  private static void verifyEvents(boolean lockOthers, boolean clearOthers, boolean lockSecondary,
+      boolean clearSecondary) {
+    MessageObserver observer = (MessageObserver) DistributionMessageObserver.getInstance();
+    assertThat(observer.isLock_others())
+        .describedAs("OP_LOCK_FOR_PR_CLEAR received: %s", observer.isLock_others())
+        .isEqualTo(lockOthers);
+    assertThat(observer.isClear_others())
+        .describedAs("OP_PR_CLEAR received: %s", observer.isClear_others()).isEqualTo(clearOthers);
+    assertThat(observer.isLock_secondary())
+        .describedAs("OP_LOCK_FOR_CLEAR received: %s", observer.isLock_secondary())
+        .isEqualTo(lockSecondary);
+    assertThat(observer.isClear_secondary())
+        .describedAs("OP_CLEAR received: %s", observer.isClear_secondary())
+        .isEqualTo(clearSecondary);
+  }
+
+  private static class MessageObserver extends DistributionMessageObserver {
+    private volatile boolean lock_secondary = false;
+    private volatile boolean clear_secondary = false;
+    private volatile boolean clear_others = false;
+    private volatile boolean lock_others = false;
+
+    @Override
+    public void beforeProcessMessage(ClusterDistributionManager dm, DistributionMessage message) {
+      if (message instanceof ClearRegionMessage) {
+        ClearRegionMessage clearMessage = (ClearRegionMessage) message;
+        if (clearMessage
+            .getOperationType() == DistributedClearOperation.OperationType.OP_LOCK_FOR_CLEAR) {
+          lock_secondary = true;
+        }
+        if (clearMessage.getOperationType() == DistributedClearOperation.OperationType.OP_CLEAR) {
+          clear_secondary = true;
+        }
+      }
+      if (message instanceof PartitionedRegionClearMessage) {
+        PartitionedRegionClearMessage clearMessage = (PartitionedRegionClearMessage) message;
+        if (clearMessage
+            .getOp() == PartitionedRegionClearMessage.OperationType.OP_LOCK_FOR_PR_CLEAR) {
+          lock_others = true;
+        }
+        if (clearMessage.getOp() == PartitionedRegionClearMessage.OperationType.OP_PR_CLEAR) {
+          clear_others = true;
+        }
+      }
+    }
+
+    public boolean isLock_secondary() {
+      return lock_secondary;
+    }
+
+    public boolean isClear_secondary() {
+      return clear_secondary;
+    }
+
+    public boolean isClear_others() {
+      return clear_others;
+    }
+
+    public boolean isLock_others() {
+      return lock_others;
+    }
+  }
+
+}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearQueryIndexDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearQueryIndexDUnitTest.java
new file mode 100644
index 0000000..feed3fc
--- /dev/null
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearQueryIndexDUnitTest.java
@@ -0,0 +1,376 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package org.apache.geode.cache.query.partitioned;
+
+import static org.apache.geode.distributed.ConfigurationProperties.SERIALIZABLE_OBJECT_FILTER;
+import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
+import static org.apache.geode.test.junit.rules.VMProvider.invokeInEveryMember;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.IntStream;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.geode.cache.Cache;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.cache.client.ClientCache;
+import org.apache.geode.cache.client.ServerOperationException;
+import org.apache.geode.cache.query.Index;
+import org.apache.geode.cache.query.IndexStatistics;
+import org.apache.geode.cache.query.Query;
+import org.apache.geode.cache.query.QueryService;
+import org.apache.geode.cache.query.SelectResults;
+import org.apache.geode.cache.query.data.City;
+import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.test.dunit.AsyncInvocation;
+import org.apache.geode.test.dunit.DUnitBlackboard;
+import org.apache.geode.test.dunit.rules.ClusterStartupRule;
+import org.apache.geode.test.dunit.rules.MemberVM;
+import org.apache.geode.test.junit.rules.ClientCacheRule;
+import org.apache.geode.test.junit.rules.ExecutorServiceRule;
+
+public class PRClearQueryIndexDUnitTest {
+  public static final String MUMBAI_QUERY = "select * from /cities c where c.name = 'MUMBAI'";
+  public static final String ID_10_QUERY = "select * from /cities c where c.id = 10";
+  @ClassRule
+  public static ClusterStartupRule cluster = new ClusterStartupRule(4, true);
+
+  private static MemberVM server1;
+  private static MemberVM server2;
+
+  private static DUnitBlackboard blackboard;
+
+  @Rule
+  public ClientCacheRule clientCacheRule = new ClientCacheRule();
+
+  @Rule
+  public ExecutorServiceRule executor = ExecutorServiceRule.builder().build();
+
+  private ClientCache clientCache;
+  private Region cities;
+
+  // class test setup. set up the servers, regions and indexes on the servers
+  @BeforeClass
+  public static void beforeClass() {
+    int locatorPort = ClusterStartupRule.getDUnitLocatorPort();
+    server1 = cluster.startServerVM(1, s -> s.withConnectionToLocator(locatorPort)
+        .withProperty(SERIALIZABLE_OBJECT_FILTER, "org.apache.geode.cache.query.data.*")
+        .withRegion(RegionShortcut.PARTITION, "cities"));
+    server2 = cluster.startServerVM(2, s -> s.withConnectionToLocator(locatorPort)
+        .withProperty(SERIALIZABLE_OBJECT_FILTER, "org.apache.geode.cache.query.data.*")
+        .withRegion(RegionShortcut.PARTITION, "cities"));
+
+    server1.invoke(() -> {
+      Cache cache = ClusterStartupRule.getCache();
+      Region region = cache.getRegion("cities");
+      // create indexes
+      QueryService queryService = cache.getQueryService();
+      queryService.createKeyIndex("cityId", "c.id", "/cities c");
+      queryService.createIndex("cityName", "c.name", "/cities c");
+      assertThat(cache.getQueryService().getIndexes(region))
+          .extracting(Index::getName).containsExactlyInAnyOrder("cityId", "cityName");
+    });
+
+    server2.invoke(() -> {
+      Cache cache = ClusterStartupRule.getCache();
+      Region region = cache.getRegion("cities");
+      assertThat(cache.getQueryService().getIndexes(region))
+          .extracting(Index::getName).containsExactlyInAnyOrder("cityId", "cityName");
+    });
+  }
+
+  // before every test method, create the client cache and region
+  @Before
+  public void before() throws Exception {
+    int locatorPort = ClusterStartupRule.getDUnitLocatorPort();
+    clientCache = clientCacheRule.withLocatorConnection(locatorPort).createCache();
+    cities = clientCacheRule.createProxyRegion("cities");
+  }
+
+  @Test
+  public void clearOnEmptyRegion() throws Exception {
+    cities.clear();
+    invokeInEveryMember(() -> {
+      verifyIndexesAfterClear("cities", "cityId", "cityName");
+    }, server1, server2);
+
+    IntStream.range(0, 10).forEach(i -> cities.put(i, new City(i)));
+    cities.clear();
+    invokeInEveryMember(() -> {
+      verifyIndexesAfterClear("cities", "cityId", "cityName");
+    }, server1, server2);
+  }
+
+  @Test
+  public void createIndexWhileClear() throws Exception {
+    IntStream.range(0, 1000).forEach(i -> cities.put(i, new City(i)));
+
+    // create index while clear
+    AsyncInvocation createIndex = server1.invokeAsync("create index", () -> {
+      Cache cache = ClusterStartupRule.getCache();
+      QueryService queryService = cache.getQueryService();
+      Index cityZip = queryService.createIndex("cityZip", "c.zip", "/cities c");
+      assertThat(cityZip).isNotNull();
+    });
+
+    // do clear for 3 times at the same time to increease the concurrency of clear and createIndex
+    for (int i = 0; i < 3; i++) {
+      cities.clear();
+    }
+    createIndex.await();
+
+    invokeInEveryMember(() -> {
+      verifyIndexesAfterClear("cities", "cityId", "cityName");
+    }, server1, server2);
+
+    QueryService queryService = clientCache.getQueryService();
+    Query query =
+        queryService.newQuery("select * from /cities c where c.zip < " + (City.ZIP_START + 10));
+    assertThat(((SelectResults) query.execute()).size()).isEqualTo(0);
+
+    IntStream.range(0, 10).forEach(i -> cities.put(i, new City(i)));
+    assertThat(((SelectResults) query.execute()).size()).isEqualTo(10);
+  }
+
+  @Test
+  public void createIndexWhileClearOnReplicateRegion() throws Exception {
+    invokeInEveryMember(() -> {
+      Cache cache = ClusterStartupRule.getCache();
+      cache.createRegionFactory(RegionShortcut.PARTITION)
+          .create("replicateCities");
+    }, server1, server2);
+
+    Region replicateCities = clientCacheRule.createProxyRegion("replicateCities");
+    IntStream.range(0, 1000).forEach(i -> replicateCities.put(i, new City(i)));
+
+    // create index while clear
+    AsyncInvocation createIndex = server1.invokeAsync("create index on replicate regions", () -> {
+      Cache cache = ClusterStartupRule.getCache();
+      QueryService queryService = cache.getQueryService();
+      Index cityZip = queryService.createIndex("cityZip_replicate", "c.zip", "/replicateCities c");
+      assertThat(cityZip).isNotNull();
+    });
+
+    // do clear at the same time for 3 timese
+    for (int i = 0; i < 3; i++) {
+      replicateCities.clear();
+    }
+    createIndex.await();
+
+    invokeInEveryMember(() -> {
+      verifyIndexesAfterClear("replicateCities", "cityZip_replicate");
+    }, server1, server2);
+
+    QueryService queryService = clientCache.getQueryService();
+    Query query =
+        queryService
+            .newQuery("select * from /replicateCities c where c.zip < " + (City.ZIP_START + 10));
+    assertThat(((SelectResults) query.execute()).size()).isEqualTo(0);
+
+    IntStream.range(0, 10).forEach(i -> replicateCities.put(i, new City(i)));
+    assertThat(((SelectResults) query.execute()).size()).isEqualTo(10);
+  }
+
+  @Test
+  public void removeIndexWhileClear() throws Exception {
+    // create cityZip index
+    server1.invoke("create index", () -> {
+      Cache cache = ClusterStartupRule.getCache();
+      QueryService queryService = cache.getQueryService();
+      Index cityZip = queryService.createIndex("cityZip", "c.zip", "/cities c");
+      assertThat(cityZip).isNotNull();
+    });
+
+    // remove index while clear
+    // removeIndex has to be invoked on each server. It's not distributed
+    AsyncInvocation removeIndex1 = server1.invokeAsync("remove index",
+        PRClearQueryIndexDUnitTest::removeCityZipIndex);
+    AsyncInvocation removeIndex2 = server2.invokeAsync("remove index",
+        PRClearQueryIndexDUnitTest::removeCityZipIndex);
+
+    cities.clear();
+    removeIndex1.await();
+    removeIndex2.await();
+
+    // make sure removeIndex and clear operations are successful
+    invokeInEveryMember(() -> {
+      InternalCache internalCache = ClusterStartupRule.getCache();
+      QueryService qs = internalCache.getQueryService();
+      Region region = internalCache.getRegion("cities");
+      assertThat(region.size()).isEqualTo(0);
+      // verify only 2 indexes created in the beginning of the tests exist
+      assertThat(qs.getIndexes(region)).extracting(Index::getName)
+          .containsExactlyInAnyOrder("cityId", "cityName");
+    }, server1, server2);
+  }
+
+  private static void removeCityZipIndex() {
+    Cache cache = ClusterStartupRule.getCache();
+    QueryService qs = cache.getQueryService();
+    Region<Object, Object> region = cache.getRegion("cities");
+    Index cityZip = qs.getIndex(region, "cityZip");
+    if (cityZip != null) {
+      qs.removeIndex(cityZip);
+    }
+  }
+
+  @Test
+  public void verifyQuerySucceedsAfterClear() throws Exception {
+    // put in some data
+    IntStream.range(0, 100).forEach(i -> cities.put(i, new City(i)));
+
+    QueryService queryService = clientCache.getQueryService();
+    Query query = queryService.newQuery(MUMBAI_QUERY);
+    Query query2 = queryService.newQuery(ID_10_QUERY);
+    assertThat(((SelectResults) query.execute()).size()).isEqualTo(50);
+    assertThat(((SelectResults) query2.execute()).size()).isEqualTo(1);
+
+    cities.clear();
+    invokeInEveryMember(() -> {
+      verifyIndexesAfterClear("cities", "cityId", "cityName");
+    }, server1, server2);
+
+    assertThat(((SelectResults) query.execute()).size()).isEqualTo(0);
+    assertThat(((SelectResults) query2.execute()).size()).isEqualTo(0);
+  }
+
+  private static void verifyIndexesAfterClear(String regionName, String... indexes) {
+    InternalCache internalCache = ClusterStartupRule.getCache();
+    QueryService qs = internalCache.getQueryService();
+    Region region = internalCache.getRegion(regionName);
+    assertThat(region.size()).isEqualTo(0);
+    for (String indexName : indexes) {
+      Index index = qs.getIndex(region, indexName);
+      IndexStatistics statistics = index.getStatistics();
+      assertThat(statistics.getNumberOfKeys()).isEqualTo(0);
+      assertThat(statistics.getNumberOfValues()).isEqualTo(0);
+    }
+  }
+
+  @Test
+  public void concurrentClearAndQuery() {
+    QueryService queryService = clientCache.getQueryService();
+    Query query = queryService.newQuery(MUMBAI_QUERY);
+    Query query2 = queryService.newQuery(ID_10_QUERY);
+
+    IntStream.range(0, 100).forEach(i -> cities.put(i, new City(i)));
+
+    server1.invokeAsync(() -> {
+      Cache cache = ClusterStartupRule.getCache();
+      Region region = cache.getRegion("cities");
+      region.clear();
+    });
+
+    await().untilAsserted(() -> {
+      assertThat(((SelectResults) query.execute()).size()).isEqualTo(0);
+      assertThat(((SelectResults) query2.execute()).size()).isEqualTo(0);
+    });
+  }
+
+  @Test
+  public void concurrentClearAndPut() throws Exception {
+    AsyncInvocation puts = server1.invokeAsync(() -> {
+      Cache cache = ClusterStartupRule.getCache();
+      Region region = cache.getRegion("cities");
+      for (int i = 0; i < 1000; i++) {
+        // wait for gate to open
+        getBlackboard().waitForGate("proceedToPut", 60, TimeUnit.SECONDS);
+        region.put(i, new City(i));
+      }
+    });
+
+    AsyncInvocation clears = server2.invokeAsync(() -> {
+      Cache cache = ClusterStartupRule.getCache();
+      Region region = cache.getRegion("cities");
+      // do clear 10 times
+      for (int i = 0; i < 10; i++) {
+        try {
+          // don't allow put to proceed. It's like "close the gate"
+          getBlackboard().clearGate("proceedToPut");
+          region.clear();
+          verifyIndexesAfterClear("cities", "cityId", "cityName");
+        } finally {
+          // allow put to proceed. It's like "open the gate"
+          getBlackboard().signalGate("proceedToPut");
+        }
+      }
+    });
+
+    puts.await();
+    clears.await();
+  }
+
+  @Test
+  public void serverLeavingAndJoiningWhilePutAndClear() throws Exception {
+    int locatorPort = ClusterStartupRule.getDUnitLocatorPort();
+    Future<Void> startStopServer = executor.submit(() -> {
+      for (int i = 0; i < 3; i++) {
+        MemberVM server3 = cluster.startServerVM(3, s -> s.withConnectionToLocator(locatorPort)
+            .withProperty(SERIALIZABLE_OBJECT_FILTER, "org.apache.geode.cache.query.data.*")
+            .withRegion(RegionShortcut.PARTITION, "cities"));
+        server3.stop(false);
+      }
+    });
+
+    Future<Void> putAndClear = executor.submit(() -> {
+      for (int i = 0; i < 30; i++) {
+        IntStream.range(0, 100).forEach(j -> cities.put(j, new City(j)));
+        try {
+          cities.clear();
+
+          // only verify if clear is successful
+          QueryService queryService = clientCache.getQueryService();
+          Query query = queryService.newQuery(MUMBAI_QUERY);
+          Query query2 = queryService.newQuery(ID_10_QUERY);
+          assertThat(((SelectResults) query.execute()).size()).isEqualTo(0);
+          assertThat(((SelectResults) query2.execute()).size()).isEqualTo(0);
+        } catch (ServerOperationException e) {
+          assertThat(e.getCause().getMessage())
+              .contains("Unable to clear all the buckets from the partitioned region cities")
+              .contains("either data (buckets) moved or member departed");
+        }
+      }
+    });
+    startStopServer.get(60, TimeUnit.SECONDS);
+    putAndClear.get(60, TimeUnit.SECONDS);
+  }
+
+  private static DUnitBlackboard getBlackboard() {
+    if (blackboard == null) {
+      blackboard = new DUnitBlackboard();
+    }
+    return blackboard;
+  }
+
+  @After
+  public void tearDown() {
+    invokeInEveryMember(() -> {
+      if (blackboard != null) {
+        blackboard.clearGate("proceedToPut");
+      }
+      // remove the cityZip index
+      removeCityZipIndex();
+    }, server1, server2);
+  }
+}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionAfterClearNotificationDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionAfterClearNotificationDUnitTest.java
new file mode 100644
index 0000000..237b6a8
--- /dev/null
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionAfterClearNotificationDUnitTest.java
@@ -0,0 +1,372 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache;
+
+import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.apache.geode.test.dunit.rules.ClusterStartupRule.getCache;
+import static org.apache.geode.test.dunit.rules.ClusterStartupRule.getClientCache;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.IntStream;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.geode.cache.InterestResultPolicy;
+import org.apache.geode.cache.PartitionAttributesFactory;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionEvent;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.cache.client.ClientRegionShortcut;
+import org.apache.geode.cache.server.CacheServer;
+import org.apache.geode.cache.util.CacheListenerAdapter;
+import org.apache.geode.distributed.internal.ClusterDistributionManager;
+import org.apache.geode.distributed.internal.DistributionMessage;
+import org.apache.geode.distributed.internal.DistributionMessageObserver;
+import org.apache.geode.test.awaitility.GeodeAwaitility;
+import org.apache.geode.test.dunit.AsyncInvocation;
+import org.apache.geode.test.dunit.DUnitBlackboard;
+import org.apache.geode.test.dunit.SerializableCallableIF;
+import org.apache.geode.test.dunit.rules.ClientVM;
+import org.apache.geode.test.dunit.rules.ClusterStartupRule;
+import org.apache.geode.test.dunit.rules.MemberVM;
+
+public class PartitionedRegionAfterClearNotificationDUnitTest implements Serializable {
+  protected static final String REGION_NAME = "testPR";
+  protected static final int NUM_ENTRIES = 100;
+
+  protected int locatorPort;
+  protected MemberVM locator;
+  protected MemberVM dataStore1;
+  protected MemberVM dataStore2;
+  protected MemberVM dataStore3;
+  protected MemberVM accessor;
+
+  protected ClientVM client1;
+  protected ClientVM client2;
+
+  private static volatile DUnitBlackboard blackboard;
+
+  @Rule
+  public ClusterStartupRule cluster = new ClusterStartupRule(7);
+
+  @Before
+  public void setUp() throws Exception {
+    locator = cluster.startLocatorVM(0);
+    locatorPort = locator.getPort();
+    dataStore1 = cluster.startServerVM(1, getProperties(), locatorPort);
+    dataStore2 = cluster.startServerVM(2, getProperties(), locatorPort);
+    dataStore3 = cluster.startServerVM(3, getProperties(), locatorPort);
+    accessor = cluster.startServerVM(4, getProperties(), locatorPort);
+
+    client1 = cluster.startClientVM(5,
+        c -> c.withPoolSubscription(true).withLocatorConnection((locatorPort)));
+    client2 = cluster.startClientVM(6,
+        c -> c.withPoolSubscription(true).withLocatorConnection((locatorPort)));
+
+    dataStore1.invoke(this::initDataStore);
+    dataStore2.invoke(this::initDataStore);
+    dataStore3.invoke(this::initDataStore);
+    accessor.invoke(this::initAccessor);
+
+    getBlackboard().initBlackboard();
+  }
+
+  protected RegionShortcut getRegionShortCut() {
+    return RegionShortcut.PARTITION_REDUNDANT;
+  }
+
+  protected Properties getProperties() {
+    Properties properties = new Properties();
+    return properties;
+  }
+
+  private Region getRegion(boolean isClient) {
+    if (isClient) {
+      return getClientCache().getRegion(REGION_NAME);
+    } else {
+      return getCache().getRegion(REGION_NAME);
+    }
+  }
+
+  private void verifyRegionSize(boolean isClient, int expectedNum) {
+    GeodeAwaitility.await()
+        .untilAsserted(() -> assertThat(getRegion(isClient).size()).isEqualTo(expectedNum));
+  }
+
+  private void initClientCache() {
+    Region region = getClientCache().createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
+        .create(REGION_NAME);
+    region.registerInterestForAllKeys(InterestResultPolicy.KEYS);
+  }
+
+  private void stopServers() {
+    List<CacheServer> cacheServers = getCache().getCacheServers();
+    for (CacheServer server : cacheServers) {
+      server.stop();
+    }
+  }
+
+  private void initDataStore() {
+    getCache().createRegionFactory(getRegionShortCut())
+        .setPartitionAttributes(new PartitionAttributesFactory().setTotalNumBuckets(10).create())
+        .addCacheListener(new CountingCacheListener())
+        .create(REGION_NAME);
+  }
+
+  private void initAccessor() {
+    RegionShortcut shortcut = getRegionShortCut();
+    getCache().createRegionFactory(shortcut)
+        .setPartitionAttributes(
+            new PartitionAttributesFactory().setTotalNumBuckets(10).setLocalMaxMemory(0).create())
+        .addCacheListener(new CountingCacheListener())
+        .create(REGION_NAME);
+  }
+
+  private void feed(boolean isClient) {
+    Region region = getRegion(isClient);
+    IntStream.range(0, NUM_ENTRIES).forEach(i -> region.put(i, "value" + i));
+  }
+
+  private void verifyServerRegionSize(int expectedNum) {
+    accessor.invoke(() -> verifyRegionSize(false, expectedNum));
+    dataStore1.invoke(() -> verifyRegionSize(false, expectedNum));
+    dataStore2.invoke(() -> verifyRegionSize(false, expectedNum));
+    dataStore3.invoke(() -> verifyRegionSize(false, expectedNum));
+  }
+
+  private void verifyClientRegionSize(int expectedNum) {
+    client1.invoke(() -> verifyRegionSize(true, expectedNum));
+    client2.invoke(() -> verifyRegionSize(true, expectedNum));
+  }
+
+  private void verifyCacheListenerTriggerCount(MemberVM serverVM) {
+    SerializableCallableIF<Integer> getListenerTriggerCount = () -> {
+      CountingCacheListener countingCacheListener =
+          (CountingCacheListener) getRegion(false).getAttributes()
+              .getCacheListeners()[0];
+      return countingCacheListener.getClears();
+    };
+
+    int count = accessor.invoke(getListenerTriggerCount)
+        + dataStore1.invoke(getListenerTriggerCount)
+        + dataStore2.invoke(getListenerTriggerCount)
+        + dataStore3.invoke(getListenerTriggerCount);
+    assertThat(count).isEqualTo(4);
+
+    if (serverVM != null) {
+      assertThat(serverVM.invoke(getListenerTriggerCount)).isEqualTo(1);
+    }
+  }
+
+  @Test
+  public void invokeClearOnDataStoreAndVerifyListenerCount() {
+    accessor.invoke(() -> feed(false));
+    verifyServerRegionSize(NUM_ENTRIES);
+
+    dataStore1.invoke(() -> getRegion(false).clear());
+
+    verifyServerRegionSize(0);
+    verifyCacheListenerTriggerCount(dataStore1);
+  }
+
+  @Test
+  public void invokeClearOnAccessorAndVerifyListenerCount() {
+    accessor.invoke(() -> feed(false));
+    verifyServerRegionSize(NUM_ENTRIES);
+    accessor.invoke(() -> getRegion(false).clear());
+    verifyServerRegionSize(0);
+    verifyCacheListenerTriggerCount(accessor);
+  }
+
+  @Test
+  public void invokeClearFromClientAndVerifyListenerCount() {
+    client1.invoke(this::initClientCache);
+    client2.invoke(this::initClientCache);
+
+    client1.invoke(() -> feed(true));
+    verifyClientRegionSize(NUM_ENTRIES);
+    verifyServerRegionSize(NUM_ENTRIES);
+
+    client1.invoke(() -> getRegion(true).clear());
+
+    verifyServerRegionSize(0);
+    verifyClientRegionSize(0);
+    verifyCacheListenerTriggerCount(null);
+  }
+
+  @Test
+  public void invokeClearFromClientWithAccessorAsServer() {
+    dataStore1.invoke(this::stopServers);
+    dataStore2.invoke(this::stopServers);
+    dataStore3.invoke(this::stopServers);
+
+    client1.invoke(this::initClientCache);
+    client2.invoke(this::initClientCache);
+
+    client1.invoke(() -> feed(true));
+    verifyClientRegionSize(NUM_ENTRIES);
+    verifyServerRegionSize(NUM_ENTRIES);
+
+    client1.invoke(() -> getRegion(true).clear());
+
+    verifyServerRegionSize(0);
+    verifyClientRegionSize(0);
+    verifyCacheListenerTriggerCount(null);
+  }
+
+  @Test
+  public void invokeClearFromDataStoreWithClientInterest() {
+    client1.invoke(this::initClientCache);
+    client2.invoke(this::initClientCache);
+
+    accessor.invoke(() -> feed(false));
+    verifyServerRegionSize(NUM_ENTRIES);
+
+    dataStore1.invoke(() -> getRegion(false).clear());
+
+    verifyServerRegionSize(0);
+    verifyCacheListenerTriggerCount(dataStore1);
+  }
+
+  @Test(expected = AssertionError.class)
+  public void verifyTheLocksAreClearedWhenMemberDepartsAfterTakingClearLockOnRemoteMembers()
+      throws Exception {
+    client1.invoke(this::initClientCache);
+    client2.invoke(this::initClientCache);
+
+    accessor.invoke(() -> feed(false));
+    verifyServerRegionSize(NUM_ENTRIES);
+    dataStore2.invoke(() -> DistributionMessageObserver.setInstance(
+        testHookToKillMemberCallingClearBeforeMessageProcessed()));
+
+    AsyncInvocation ds1ClearAsync = dataStore1.invokeAsync(() -> getRegion(false).clear());
+
+    getBlackboard().waitForGate("CLOSE_CACHE", 30, SECONDS);
+
+    dataStore1.invoke(() -> getCache().close());
+    getBlackboard().signalGate("CACHE_CLOSED");
+
+    // This should not be blocked.
+    dataStore2.invoke(() -> feed(false));
+    dataStore3.invoke(() -> feed(false));
+
+    dataStore2.invoke(() -> verifyRegionSize(false, NUM_ENTRIES));
+    dataStore3.invoke(() -> verifyRegionSize(false, NUM_ENTRIES));
+
+    ds1ClearAsync.await();
+  }
+
+  @Test
+  public void verifyTheLocksAreClearedWhenMemberDepartsAfterTakingClearLockOnRemoteMembersAfterMessageProcessed()
+      throws Exception {
+    client1.invoke(this::initClientCache);
+    client2.invoke(this::initClientCache);
+
+    accessor.invoke(() -> feed(false));
+    verifyServerRegionSize(NUM_ENTRIES);
+
+    dataStore2.invoke(() -> DistributionMessageObserver.setInstance(
+        testHookToKillMemberCallingClearAfterMessageProcessed()));
+
+    AsyncInvocation ds1ClearAsync = dataStore1.invokeAsync(() -> getRegion(false).clear());
+
+    getBlackboard().waitForGate("CLOSE_CACHE", 30, SECONDS);
+
+    dataStore1.invoke(() -> getCache().close());
+    getBlackboard().signalGate("CACHE_CLOSED");
+
+    // This should not be blocked.
+    dataStore2.invoke(() -> feed(false));
+    dataStore3.invoke(() -> feed(false));
+
+    dataStore2.invoke(() -> verifyRegionSize(false, NUM_ENTRIES));
+    dataStore3.invoke(() -> verifyRegionSize(false, NUM_ENTRIES));
+
+    ds1ClearAsync.await();
+  }
+
+
+  private static class CountingCacheListener extends CacheListenerAdapter {
+    private final AtomicInteger clears = new AtomicInteger();
+
+    @Override
+    public void afterRegionClear(RegionEvent event) {
+      clears.incrementAndGet();
+    }
+
+    int getClears() {
+      return clears.get();
+
+    }
+  }
+
+  private DistributionMessageObserver testHookToKillMemberCallingClearBeforeMessageProcessed() {
+    return new DistributionMessageObserver() {
+
+      @Override
+      public void beforeProcessMessage(ClusterDistributionManager dm, DistributionMessage message) {
+        if (message instanceof PartitionedRegionClearMessage) {
+          if (((PartitionedRegionClearMessage) message)
+              .getOp() == PartitionedRegionClearMessage.OperationType.OP_LOCK_FOR_PR_CLEAR) {
+            DistributionMessageObserver.setInstance(null);
+            getBlackboard().signalGate("CLOSE_CACHE");
+            try {
+              getBlackboard().waitForGate("CACHE_CLOSED", 30, SECONDS);
+              GeodeAwaitility.await().untilAsserted(
+                  () -> assertThat(dm.isCurrentMember(message.getSender())).isFalse());
+            } catch (TimeoutException | InterruptedException e) {
+              throw new RuntimeException("Failed waiting for signal.");
+            }
+          }
+        }
+      }
+    };
+  }
+
+  private DistributionMessageObserver testHookToKillMemberCallingClearAfterMessageProcessed() {
+    return new DistributionMessageObserver() {
+      @Override
+      public void afterProcessMessage(ClusterDistributionManager dm, DistributionMessage message) {
+        if (message instanceof PartitionedRegionClearMessage) {
+          if (((PartitionedRegionClearMessage) message)
+              .getOp() == PartitionedRegionClearMessage.OperationType.OP_LOCK_FOR_PR_CLEAR) {
+            DistributionMessageObserver.setInstance(null);
+            getBlackboard().signalGate("CLOSE_CACHE");
+            try {
+              getBlackboard().waitForGate("CACHE_CLOSED", 30, SECONDS);
+            } catch (TimeoutException | InterruptedException e) {
+              throw new RuntimeException("Failed waiting for signal.");
+            }
+          }
+        }
+      }
+    };
+  }
+
+  private static DUnitBlackboard getBlackboard() {
+    if (blackboard == null) {
+      blackboard = new DUnitBlackboard();
+    }
+    return blackboard;
+  }
+
+}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java
new file mode 100644
index 0000000..b871926
--- /dev/null
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java
@@ -0,0 +1,465 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache;
+
+import static org.apache.geode.internal.Assert.fail;
+import static org.apache.geode.test.dunit.rules.ClusterStartupRule.getCache;
+import static org.apache.geode.test.dunit.rules.ClusterStartupRule.getClientCache;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.IntStream;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.geode.cache.CacheWriterException;
+import org.apache.geode.cache.InterestResultPolicy;
+import org.apache.geode.cache.PartitionAttributesFactory;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionEvent;
+import org.apache.geode.cache.RegionFactory;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.cache.client.ClientRegionShortcut;
+import org.apache.geode.cache.util.CacheWriterAdapter;
+import org.apache.geode.test.dunit.SerializableCallableIF;
+import org.apache.geode.test.dunit.rules.ClientVM;
+import org.apache.geode.test.dunit.rules.ClusterStartupRule;
+import org.apache.geode.test.dunit.rules.MemberVM;
+
+public class PartitionedRegionClearDUnitTest implements Serializable {
+  protected static final String REGION_NAME = "testPR";
+  protected static final int TOTAL_BUCKET_NUM = 10;
+  protected static final int NUM_ENTRIES = 1000;
+
+  protected int locatorPort;
+  protected MemberVM locator;
+  protected MemberVM dataStore1, dataStore2, dataStore3, accessor;
+  protected ClientVM client1, client2;
+
+  private static final Logger logger = LogManager.getLogger();
+
+  @Rule
+  public ClusterStartupRule cluster = new ClusterStartupRule(7);
+
+  @Before
+  public void setUp() throws Exception {
+    locator = cluster.startLocatorVM(0);
+    locatorPort = locator.getPort();
+    dataStore1 = cluster.startServerVM(1, getProperties(), locatorPort);
+    dataStore2 = cluster.startServerVM(2, getProperties(), locatorPort);
+    dataStore3 = cluster.startServerVM(3, getProperties(), locatorPort);
+    accessor = cluster.startServerVM(4, getProperties(), locatorPort);
+    client1 = cluster.startClientVM(5,
+        c -> c.withPoolSubscription(true).withLocatorConnection((locatorPort)));
+    client2 = cluster.startClientVM(6,
+        c -> c.withPoolSubscription(true).withLocatorConnection((locatorPort)));
+  }
+
+  protected RegionShortcut getRegionShortCut() {
+    return RegionShortcut.PARTITION_REDUNDANT;
+  }
+
+  protected Properties getProperties() {
+    Properties properties = new Properties();
+    return properties;
+  }
+
+  private Region getRegion(boolean isClient) {
+    if (isClient) {
+      return getClientCache().getRegion(REGION_NAME);
+    } else {
+      return getCache().getRegion(REGION_NAME);
+    }
+  }
+
+  private void verifyRegionSize(boolean isClient, int expectedNum) {
+    assertThat(getRegion(isClient).size()).isEqualTo(expectedNum);
+  }
+
+  private void initClientCache() {
+    Region region = getClientCache().createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
+        .create(REGION_NAME);
+    region.registerInterestForAllKeys(InterestResultPolicy.KEYS);
+  }
+
+  private void initDataStore(boolean withWriter) {
+    RegionFactory factory = getCache().createRegionFactory(getRegionShortCut())
+        .setPartitionAttributes(
+            new PartitionAttributesFactory().setTotalNumBuckets(TOTAL_BUCKET_NUM).create());
+    if (withWriter) {
+      factory.setCacheWriter(new CountingCacheWriter());
+    }
+    factory.create(REGION_NAME);
+    clearsByRegion = new HashMap<>();
+    destroysByRegion = new HashMap<>();
+  }
+
+  private void initAccessor(boolean withWriter) {
+    RegionShortcut shortcut = getRegionShortCut();
+    if (shortcut.isPersistent()) {
+      if (shortcut == RegionShortcut.PARTITION_PERSISTENT) {
+        shortcut = RegionShortcut.PARTITION;
+      } else if (shortcut == RegionShortcut.PARTITION_PERSISTENT_OVERFLOW) {
+        shortcut = RegionShortcut.PARTITION_OVERFLOW;
+      } else if (shortcut == RegionShortcut.PARTITION_REDUNDANT_PERSISTENT) {
+        shortcut = RegionShortcut.PARTITION_REDUNDANT;
+      } else if (shortcut == RegionShortcut.PARTITION_REDUNDANT_PERSISTENT_OVERFLOW) {
+        shortcut = RegionShortcut.PARTITION_REDUNDANT_OVERFLOW;
+      } else {
+        fail("Wrong region type:" + shortcut);
+      }
+    }
+    RegionFactory factory = getCache().createRegionFactory(shortcut)
+        .setPartitionAttributes(
+            new PartitionAttributesFactory().setTotalNumBuckets(10).setLocalMaxMemory(0).create())
+        .setPartitionAttributes(new PartitionAttributesFactory().setTotalNumBuckets(10).create());
+    if (withWriter) {
+      factory.setCacheWriter(new CountingCacheWriter());
+    }
+    factory.create(REGION_NAME);
+    clearsByRegion = new HashMap<>();
+    destroysByRegion = new HashMap<>();
+  }
+
+  private void feed(boolean isClient) {
+    Region region = getRegion(isClient);
+    IntStream.range(0, NUM_ENTRIES).forEach(i -> region.put(i, "value" + i));
+  }
+
+  private void verifyServerRegionSize(int expectedNum) {
+    accessor.invoke(() -> verifyRegionSize(false, expectedNum));
+    dataStore1.invoke(() -> verifyRegionSize(false, expectedNum));
+    dataStore2.invoke(() -> verifyRegionSize(false, expectedNum));
+    dataStore3.invoke(() -> verifyRegionSize(false, expectedNum));
+  }
+
+  private void verifyDatastoreStats(MemberVM datastore, boolean isCoordinator) {
+    datastore.invoke(() -> {
+      PartitionedRegion region = (PartitionedRegion) getRegion(false);
+      long clearCount = 0L;
+      int bucketCount = region.getDataStore().getAllLocalBucketRegions().size();
+
+      for (BucketRegion bucket : region.getDataStore().getAllLocalBucketRegions()) {
+        if (clearCount == 0) {
+          clearCount = bucket.getCachePerfStats().getBucketClearCount();
+        }
+        assertThat(bucket.getCachePerfStats().getBucketClearCount()).isEqualTo(bucketCount);
+      }
+
+      CachePerfStats stats = region.getRegionCachePerfStats();
+
+      assertThat(stats.getRegionClearCount()).isEqualTo(1);
+      assertThat(stats.getPartitionedRegionClearLocalDuration())
+          .isGreaterThan(0);
+      if (isCoordinator) {
+        assertThat(stats.getPartitionedRegionClearTotalDuration())
+            .isGreaterThan(0);
+      } else {
+        assertThat(stats.getPartitionedRegionClearTotalDuration())
+            .isEqualTo(0);
+      }
+    });
+  }
+
+  private void verifyClientRegionSize(int expectedNum) {
+    client1.invoke(() -> verifyRegionSize(true, expectedNum));
+    // TODO: notify register clients
+    // client2.invoke(()->verifyRegionSize(true, expectedNum));
+  }
+
+  SerializableCallableIF<Integer> getWriterClears = () -> {
+    int clears =
+        clearsByRegion.get(REGION_NAME) == null ? 0 : clearsByRegion.get(REGION_NAME).get();
+    return clears;
+  };
+
+  SerializableCallableIF<Integer> getWriterDestroys = () -> {
+    int destroys =
+        destroysByRegion.get(REGION_NAME) == null ? 0 : destroysByRegion.get(REGION_NAME).get();
+    return destroys;
+  };
+
+  SerializableCallableIF<Integer> getBucketRegionWriterClears = () -> {
+    int clears = 0;
+    for (int i = 0; i < TOTAL_BUCKET_NUM; i++) {
+      String bucketRegionName = "_B__" + REGION_NAME + "_" + i;
+      clears += clearsByRegion.get(bucketRegionName) == null ? 0
+          : clearsByRegion.get(bucketRegionName).get();
+    }
+    return clears;
+  };
+
+  SerializableCallableIF<Integer> getBucketRegionWriterDestroys = () -> {
+    int destroys = 0;
+    for (int i = 0; i < TOTAL_BUCKET_NUM; i++) {
+      String bucketRegionName = "_B__" + REGION_NAME + "_" + i;
+      destroys += destroysByRegion.get(bucketRegionName) == null ? 0
+          : destroysByRegion.get(bucketRegionName).get();
+    }
+    return destroys;
+  };
+
+  void configureServers(boolean dataStoreWithWriter, boolean accessorWithWriter) {
+    dataStore1.invoke(() -> initDataStore(dataStoreWithWriter));
+    dataStore2.invoke(() -> initDataStore(dataStoreWithWriter));
+    dataStore3.invoke(() -> initDataStore(dataStoreWithWriter));
+    accessor.invoke(() -> initAccessor(accessorWithWriter));
+    // make sure only datastore3 has cacheWriter
+    dataStore1.invoke(() -> {
+      Region region = getRegion(false);
+      region.getAttributesMutator().setCacheWriter(null);
+    });
+    dataStore2.invoke(() -> {
+      Region region = getRegion(false);
+      region.getAttributesMutator().setCacheWriter(null);
+    });
+  }
+
+  @Test
+  public void normalClearFromDataStoreWithWriterOnDataStore() {
+    configureServers(true, true);
+    client1.invoke(this::initClientCache);
+    client2.invoke(this::initClientCache);
+
+    accessor.invoke(() -> feed(false));
+    verifyServerRegionSize(NUM_ENTRIES);
+    dataStore3.invoke(() -> getRegion(false).clear());
+    verifyServerRegionSize(0);
+
+    // do the region destroy to compare that the same callbacks will be triggered
+    dataStore3.invoke(() -> {
+      Region region = getRegion(false);
+      region.destroyRegion();
+    });
+
+    assertThat(dataStore1.invoke(getWriterDestroys)).isEqualTo(dataStore1.invoke(getWriterClears))
+        .isEqualTo(0);
+    assertThat(dataStore2.invoke(getWriterDestroys)).isEqualTo(dataStore2.invoke(getWriterClears))
+        .isEqualTo(0);
+    assertThat(dataStore3.invoke(getWriterDestroys)).isEqualTo(dataStore3.invoke(getWriterClears))
+        .isEqualTo(1);
+    assertThat(accessor.invoke(getWriterDestroys)).isEqualTo(accessor.invoke(getWriterClears))
+        .isEqualTo(0);
+
+    assertThat(dataStore3.invoke(getBucketRegionWriterDestroys))
+        .isEqualTo(dataStore3.invoke(getBucketRegionWriterClears))
+        .isEqualTo(0);
+  }
+
+  @Test
+  public void normalClearFromDataStoreWithoutWriterOnDataStore() {
+    configureServers(false, true);
+    client1.invoke(this::initClientCache);
+    client2.invoke(this::initClientCache);
+
+    accessor.invoke(() -> feed(false));
+    verifyServerRegionSize(NUM_ENTRIES);
+    dataStore1.invoke(() -> getRegion(false).clear());
+    verifyServerRegionSize(0);
+
+    // do the region destroy to compare that the same callbacks will be triggered
+    dataStore1.invoke(() -> {
+      Region region = getRegion(false);
+      region.destroyRegion();
+    });
+
+    assertThat(dataStore1.invoke(getWriterDestroys)).isEqualTo(dataStore1.invoke(getWriterClears))
+        .isEqualTo(0);
+    assertThat(dataStore2.invoke(getWriterDestroys)).isEqualTo(dataStore2.invoke(getWriterClears))
+        .isEqualTo(0);
+    assertThat(dataStore3.invoke(getWriterDestroys)).isEqualTo(dataStore3.invoke(getWriterClears))
+        .isEqualTo(0);
+    assertThat(accessor.invoke(getWriterDestroys)).isEqualTo(accessor.invoke(getWriterClears))
+        .isEqualTo(1);
+
+    assertThat(accessor.invoke(getBucketRegionWriterDestroys))
+        .isEqualTo(accessor.invoke(getBucketRegionWriterClears))
+        .isEqualTo(0);
+  }
+
+  @Test
+  public void normalClearFromAccessorWithWriterOnDataStore() {
+    configureServers(true, true);
+    client1.invoke(this::initClientCache);
+    client2.invoke(this::initClientCache);
+
+    accessor.invoke(() -> feed(false));
+    verifyServerRegionSize(NUM_ENTRIES);
+    accessor.invoke(() -> getRegion(false).clear());
+    verifyServerRegionSize(0);
+
+    // do the region destroy to compare that the same callbacks will be triggered
+    accessor.invoke(() -> {
+      Region region = getRegion(false);
+      region.destroyRegion();
+    });
+
+    assertThat(dataStore1.invoke(getWriterDestroys)).isEqualTo(dataStore1.invoke(getWriterClears))
+        .isEqualTo(0);
+    assertThat(dataStore2.invoke(getWriterDestroys)).isEqualTo(dataStore2.invoke(getWriterClears))
+        .isEqualTo(0);
+    assertThat(dataStore3.invoke(getWriterDestroys)).isEqualTo(dataStore3.invoke(getWriterClears))
+        .isEqualTo(0);
+    assertThat(accessor.invoke(getWriterDestroys)).isEqualTo(accessor.invoke(getWriterClears))
+        .isEqualTo(1);
+
+    assertThat(accessor.invoke(getBucketRegionWriterDestroys))
+        .isEqualTo(accessor.invoke(getBucketRegionWriterClears))
+        .isEqualTo(0);
+  }
+
+  @Test
+  public void normalClearFromAccessorWithoutWriterButWithWriterOnDataStore() {
+    configureServers(true, false);
+    client1.invoke(this::initClientCache);
+    client2.invoke(this::initClientCache);
+
+    accessor.invoke(() -> feed(false));
+    verifyServerRegionSize(NUM_ENTRIES);
+    accessor.invoke(() -> getRegion(false).clear());
+    verifyServerRegionSize(0);
+
+    // do the region destroy to compare that the same callbacks will be triggered
+    accessor.invoke(() -> {
+      Region region = getRegion(false);
+      region.destroyRegion();
+    });
+
+    assertThat(dataStore1.invoke(getWriterDestroys)).isEqualTo(dataStore1.invoke(getWriterClears))
+        .isEqualTo(0);
+    assertThat(dataStore2.invoke(getWriterDestroys)).isEqualTo(dataStore2.invoke(getWriterClears))
+        .isEqualTo(0);
+    assertThat(dataStore3.invoke(getWriterDestroys)).isEqualTo(dataStore3.invoke(getWriterClears))
+        .isEqualTo(1);
+    assertThat(accessor.invoke(getWriterDestroys)).isEqualTo(accessor.invoke(getWriterClears))
+        .isEqualTo(0);
+
+    assertThat(dataStore3.invoke(getBucketRegionWriterDestroys))
+        .isEqualTo(dataStore3.invoke(getBucketRegionWriterClears))
+        .isEqualTo(0);
+  }
+
+  @Test
+  public void normalClearFromDataStoreUpdatesStats() {
+    configureServers(false, true);
+    client1.invoke(this::initClientCache);
+    client2.invoke(this::initClientCache);
+
+    // Verify no clears have been recorded in stats
+    dataStore1.invoke(() -> {
+      PartitionedRegion region = (PartitionedRegion) getRegion(false);
+
+      for (BucketRegion bucket : region.getDataStore().getAllLocalBucketRegions()) {
+        long clearCount = bucket.getCachePerfStats().getRegionClearCount();
+        assertThat(clearCount).isEqualTo(0);
+      }
+    });
+
+    accessor.invoke(() -> feed(false));
+    verifyServerRegionSize(NUM_ENTRIES);
+    dataStore1.invoke(() -> getRegion(false).clear());
+    verifyServerRegionSize(0);
+
+    // Verify the stats were properly updated for the bucket regions
+    verifyDatastoreStats(dataStore1, true);
+    verifyDatastoreStats(dataStore2, false);
+    verifyDatastoreStats(dataStore3, false);
+
+
+    // The accessor shouldn't increment the region clear count
+    accessor.invoke(() -> {
+      PartitionedRegion region = (PartitionedRegion) getRegion(false);
+
+      assertThat(region.getRegionCachePerfStats()).isNull();
+      assertThat(region.getCachePerfStats().getRegionClearCount()).isEqualTo(0);
+      assertThat(region.getCachePerfStats().getPartitionedRegionClearLocalDuration()).isEqualTo(0);
+      assertThat(region.getCachePerfStats().getPartitionedRegionClearTotalDuration()).isEqualTo(0);
+    });
+  }
+
+  @Test
+  public void normalClearFromClient() {
+    configureServers(true, false);
+    client1.invoke(this::initClientCache);
+    client2.invoke(this::initClientCache);
+
+    client1.invoke(() -> feed(true));
+    verifyClientRegionSize(NUM_ENTRIES);
+    verifyServerRegionSize(NUM_ENTRIES);
+
+    client1.invoke(() -> getRegion(true).clear());
+    verifyServerRegionSize(0);
+    verifyClientRegionSize(0);
+
+    // do the region destroy to compare that the same callbacks will be triggered
+    client1.invoke(() -> {
+      Region region = getRegion(true);
+      region.destroyRegion();
+    });
+
+    assertThat(dataStore1.invoke(getWriterDestroys)).isEqualTo(dataStore1.invoke(getWriterClears))
+        .isEqualTo(0);
+    assertThat(dataStore2.invoke(getWriterDestroys)).isEqualTo(dataStore2.invoke(getWriterClears))
+        .isEqualTo(0);
+    assertThat(dataStore3.invoke(getWriterDestroys)).isEqualTo(dataStore3.invoke(getWriterClears))
+        .isEqualTo(1);
+    assertThat(accessor.invoke(getWriterDestroys)).isEqualTo(accessor.invoke(getWriterClears))
+        .isEqualTo(0);
+
+    assertThat(dataStore3.invoke(getBucketRegionWriterDestroys))
+        .isEqualTo(dataStore3.invoke(getBucketRegionWriterClears))
+        .isEqualTo(0);
+  }
+
+  public static HashMap<String, AtomicInteger> clearsByRegion = new HashMap<>();
+  public static HashMap<String, AtomicInteger> destroysByRegion = new HashMap<>();
+
+  private static class CountingCacheWriter extends CacheWriterAdapter {
+    @Override
+    public void beforeRegionClear(RegionEvent event) throws CacheWriterException {
+      Region region = event.getRegion();
+      AtomicInteger clears = clearsByRegion.get(region.getName());
+      if (clears == null) {
+        clears = new AtomicInteger(1);
+        clearsByRegion.put(region.getName(), clears);
+      } else {
+        clears.incrementAndGet();
+      }
+      logger
+          .info("Region " + region.getName() + " will be cleared, clear count is:" + clears.get());
+    }
+
+    @Override
+    public void beforeRegionDestroy(RegionEvent event) throws CacheWriterException {
+      Region region = event.getRegion();
+      AtomicInteger destroys = destroysByRegion.get(region.getName());
+      if (destroys == null) {
+        destroys = new AtomicInteger(1);
+        destroysByRegion.put(region.getName(), destroys);
+      } else {
+        destroys.incrementAndGet();
+      }
+      logger.info(
+          "Region " + region.getName() + " will be destroyed, destroy count is:" + destroys.get());
+    }
+  }
+}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithAlterRegionDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithAlterRegionDUnitTest.java
new file mode 100644
index 0000000..fb74eb3
--- /dev/null
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithAlterRegionDUnitTest.java
@@ -0,0 +1,803 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache;
+
+import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import java.io.Serializable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeoutException;
+import java.util.stream.IntStream;
+
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.geode.cache.AttributesMutator;
+import org.apache.geode.cache.CacheListener;
+import org.apache.geode.cache.CacheLoader;
+import org.apache.geode.cache.CacheLoaderException;
+import org.apache.geode.cache.CacheWriter;
+import org.apache.geode.cache.CacheWriterException;
+import org.apache.geode.cache.EntryEvent;
+import org.apache.geode.cache.ExpirationAction;
+import org.apache.geode.cache.ExpirationAttributes;
+import org.apache.geode.cache.LoaderHelper;
+import org.apache.geode.cache.PartitionedRegionPartialClearException;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionEvent;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.distributed.internal.ClusterDistributionManager;
+import org.apache.geode.distributed.internal.DistributionMessage;
+import org.apache.geode.distributed.internal.DistributionMessageObserver;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.membership.api.MembershipManagerHelper;
+import org.apache.geode.test.dunit.AsyncInvocation;
+import org.apache.geode.test.dunit.DUnitBlackboard;
+import org.apache.geode.test.dunit.VM;
+import org.apache.geode.test.dunit.rules.CacheRule;
+import org.apache.geode.test.dunit.rules.DistributedRule;
+import org.apache.geode.test.junit.rules.ExecutorServiceRule;
+
+public class PartitionedRegionClearWithAlterRegionDUnitTest implements Serializable {
+
+  @Rule
+  public DistributedRule distributedRule = new DistributedRule();
+
+  @Rule
+  public CacheRule cacheRule = new CacheRule();
+
+  @Rule
+  public ExecutorServiceRule executorServiceRule = new ExecutorServiceRule();
+
+  private VM server1;
+
+  private VM server2;
+
+  private VM server3;
+
+  private static volatile DUnitBlackboard blackboard;
+
+  private static final String REGION_NAME = "testRegion";
+
+  private static final int NUM_ENTRIES = 1000000;
+
+  private static final String GATE_NAME = "ALLOW_ALTER_REGION";
+
+  private void initialize() {
+    server1 = VM.getVM(0);
+    server2 = VM.getVM(1);
+
+    server1.invoke(() -> {
+      cacheRule.createCache();
+      cacheRule.getCache().createRegionFactory(RegionShortcut.PARTITION).setStatisticsEnabled(true)
+          .create(REGION_NAME);
+    });
+
+    server2.invoke(() -> {
+      cacheRule.createCache();
+      cacheRule.getCache().createRegionFactory(RegionShortcut.PARTITION).setStatisticsEnabled(true)
+          .create(REGION_NAME);
+    });
+
+    server1.invoke(() -> {
+      populateRegion();
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      assertThat(region.size()).isEqualTo(NUM_ENTRIES);
+    });
+
+    server2.invoke(() -> {
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      assertThat(region.size()).isEqualTo(NUM_ENTRIES);
+    });
+  }
+
+  @Test
+  public void testClearRegionWhileAddingCacheLoaderBeforeProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverBeforeProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      alterRegionSetCacheLoader();
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testClearRegionWhileAddingCacheLoaderAfterProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverAfterProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      alterRegionSetCacheLoader();
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testClearRegionWhileAddingCacheWriterBeforeProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverBeforeProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      alterRegionSetCacheWriter();
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testClearRegionWhileAddingCacheWriterAfterProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverAfterProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      alterRegionSetCacheWriter();
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testClearRegionWhileAddingCacheListenerBeforeProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverBeforeProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      alterRegionSetCacheListener();
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testClearRegionWhileAddingCacheListenerAfterProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverAfterProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      alterRegionSetCacheListener();
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testClearRegionWhileChangingEvictionBeforeProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverBeforeProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      AttributesMutator attributesMutator = region.getAttributesMutator();
+      getBlackboard().waitForGate(GATE_NAME);
+      attributesMutator.getEvictionAttributesMutator().setMaximum(1);
+      assertThat(region.getAttributes().getEvictionAttributes().getMaximum()).isEqualTo(1);
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testClearRegionWhileChangingEvictionAfterProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverAfterProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      AttributesMutator attributesMutator = region.getAttributesMutator();
+      getBlackboard().waitForGate(GATE_NAME);
+      attributesMutator.getEvictionAttributesMutator().setMaximum(1);
+      assertThat(region.getAttributes().getEvictionAttributes().getMaximum()).isEqualTo(1);
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testClearRegionWhileChangingRegionTTLExpirationBeforeProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverBeforeProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      AttributesMutator attributesMutator = region.getAttributesMutator();
+      ExpirationAttributes expirationAttributes = new ExpirationAttributes();
+      getBlackboard().waitForGate(GATE_NAME);
+      attributesMutator.setRegionTimeToLive(expirationAttributes);
+      assertThat(region.getAttributes().getRegionTimeToLive()).isEqualTo(expirationAttributes);
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testClearRegionWhileChangingRegionTTLExpirationAfterProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverAfterProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      AttributesMutator attributesMutator = region.getAttributesMutator();
+      ExpirationAttributes expirationAttributes = new ExpirationAttributes();
+      getBlackboard().waitForGate(GATE_NAME);
+      attributesMutator.setRegionTimeToLive(expirationAttributes);
+      assertThat(region.getAttributes().getRegionTimeToLive()).isEqualTo(expirationAttributes);
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testClearRegionWhileChangingEntryTTLExpirationBeforeProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverBeforeProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      AttributesMutator attributesMutator = region.getAttributesMutator();
+      ExpirationAttributes expirationAttributes = new ExpirationAttributes();
+      getBlackboard().waitForGate(GATE_NAME);
+      attributesMutator.setEntryTimeToLive(expirationAttributes);
+      assertThat(region.getAttributes().getEntryTimeToLive()).isEqualTo(expirationAttributes);
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+
+  @Test
+  public void testClearRegionWhileChangingEntryTTLExpirationAfterProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverAfterProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      AttributesMutator attributesMutator = region.getAttributesMutator();
+      ExpirationAttributes expirationAttributes = new ExpirationAttributes();
+      getBlackboard().waitForGate(GATE_NAME);
+      attributesMutator.setEntryTimeToLive(expirationAttributes);
+      assertThat(region.getAttributes().getEntryTimeToLive()).isEqualTo(expirationAttributes);
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testClearRegionWhileChangingRegionIdleExpirationBeforeProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverBeforeProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      AttributesMutator attributesMutator = region.getAttributesMutator();
+      ExpirationAttributes expirationAttributes = new ExpirationAttributes();
+      getBlackboard().waitForGate(GATE_NAME);
+      attributesMutator.setRegionIdleTimeout(expirationAttributes);
+      assertThat(region.getAttributes().getRegionIdleTimeout()).isEqualTo(expirationAttributes);
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testClearRegionWhileChangingRegionIdleExpirationAfterProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverAfterProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      AttributesMutator attributesMutator = region.getAttributesMutator();
+      ExpirationAttributes expirationAttributes = new ExpirationAttributes();
+      getBlackboard().waitForGate(GATE_NAME);
+      attributesMutator.setRegionIdleTimeout(expirationAttributes);
+      assertThat(region.getAttributes().getRegionIdleTimeout()).isEqualTo(expirationAttributes);
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  @Ignore // See GEODE-8680
+  public void testClearRegionWhileChangingEntryIdleExpirationBeforeProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverBeforeProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      AttributesMutator attributesMutator = region.getAttributesMutator();
+      ExpirationAttributes expirationAttributes =
+          new ExpirationAttributes(1, ExpirationAction.DESTROY);
+      getBlackboard().waitForGate(GATE_NAME);
+      attributesMutator.setEntryIdleTimeout(expirationAttributes);
+      assertThat(region.getAttributes().getEntryIdleTimeout()).isEqualTo(expirationAttributes);
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  @Ignore // See GEODE-8680
+  public void testClearRegionWhileChangingEntryIdleExpirationAfterProcessMessage()
+      throws InterruptedException {
+    initialize();
+
+    server1.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverAfterProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      AttributesMutator attributesMutator = region.getAttributesMutator();
+      ExpirationAttributes expirationAttributes =
+          new ExpirationAttributes(1, ExpirationAction.DESTROY);
+      getBlackboard().waitForGate(GATE_NAME);
+      attributesMutator.setEntryIdleTimeout(expirationAttributes);
+      assertThat(region.getAttributes().getEntryIdleTimeout()).isEqualTo(expirationAttributes);
+    });
+
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testMemberLeaveBeforeProcessMessage() throws InterruptedException {
+    initialize();
+
+    server3 = VM.getVM(2);
+
+    server3.invoke(() -> {
+      cacheRule.createCache();
+      cacheRule.getCache().createRegionFactory(RegionShortcut.PARTITION).setStatisticsEnabled(true)
+          .create(REGION_NAME);
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      assertThat(region.size()).isEqualTo(NUM_ENTRIES);
+    });
+
+    server2.invoke(() -> {
+      DistributionMessageObserver
+          .setInstance(
+              new MemberKiller(false));
+    });
+
+    server3.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverBeforeProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      assertThatThrownBy(() -> cacheRule.getCache().getRegion(REGION_NAME).clear())
+          .isInstanceOf(PartitionedRegionPartialClearException.class);
+    });
+
+    AsyncInvocation asyncInvocation2 = server3.invokeAsync(() -> {
+      alterRegionSetCacheWriter();
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testMemberLeaveAfterProcessMessage() throws InterruptedException {
+    initialize();
+
+    server3 = VM.getVM(2);
+
+    server3.invoke(() -> {
+      cacheRule.createCache();
+      cacheRule.getCache().createRegionFactory(RegionShortcut.PARTITION).setStatisticsEnabled(true)
+          .create(REGION_NAME);
+      Region region = cacheRule.getCache().getRegion(REGION_NAME);
+      assertThat(region.size()).isEqualTo(NUM_ENTRIES);
+    });
+
+    server2.invoke(() -> {
+      DistributionMessageObserver
+          .setInstance(
+              new MemberKiller(false));
+    });
+
+    server3.invoke(() -> DistributionMessageObserver.setInstance(
+        getDistributionMessageObserverAfterProcessMessage()));
+
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      assertThatThrownBy(() -> cacheRule.getCache().getRegion(REGION_NAME).clear())
+          .isInstanceOf(PartitionedRegionPartialClearException.class);
+    });
+
+    AsyncInvocation asyncInvocation2 = server3.invokeAsync(() -> {
+      alterRegionSetCacheWriter();
+    });
+
+    asyncInvocation1.await();
+    asyncInvocation2.await();
+  }
+
+  @Test
+  public void testSingleServer() throws InterruptedException, ExecutionException {
+    cacheRule.createCache();
+    cacheRule.getCache().createRegionFactory(RegionShortcut.PARTITION).setStatisticsEnabled(true)
+        .create(REGION_NAME);
+    populateRegion();
+    Region region = cacheRule.getCache().getRegion(REGION_NAME);
+    assertThat(region.size()).isEqualTo(NUM_ENTRIES);
+
+    Future future1 = executorServiceRule.runAsync(() -> {
+      cacheRule.getCache().getRegion(REGION_NAME).clear();
+      assertThat(cacheRule.getCache().getRegion(REGION_NAME).size()).isEqualTo(0);
+    });
+
+    Future future2 = executorServiceRule.runAsync(() -> {
+      AttributesMutator attributesMutator = region.getAttributesMutator();
+      TestCacheLoader testCacheLoader = new TestCacheLoader();
+      attributesMutator.setCacheLoader(testCacheLoader);
+      assertThat(region.getAttributes().getCacheLoader()).isEqualTo(testCacheLoader);
+    });
+
+    future1.get();
+    future2.get();
+  }
+
+  private void populateRegion() {
+    Region region = cacheRule.getCache().getRegion(REGION_NAME);
+    IntStream.range(0, NUM_ENTRIES).forEach(i -> region.put(i, i));
+  }
+
+  private void alterRegionSetCacheLoader() throws TimeoutException, InterruptedException {
+    Region region = cacheRule.getCache().getRegion(REGION_NAME);
+    AttributesMutator attributesMutator = region.getAttributesMutator();
+    TestCacheLoader testCacheLoader = new TestCacheLoader();
+    getBlackboard().waitForGate(GATE_NAME);
+    attributesMutator.setCacheLoader(testCacheLoader);
+    assertThat(region.getAttributes().getCacheLoader()).isEqualTo(testCacheLoader);
+  }
+
+  private void alterRegionSetCacheWriter() throws TimeoutException, InterruptedException {
+    Region region = cacheRule.getCache().getRegion(REGION_NAME);
+    AttributesMutator attributesMutator = region.getAttributesMutator();
+    TestCacheWriter testCacheWriter = new TestCacheWriter();
+    getBlackboard().waitForGate(GATE_NAME);
+    attributesMutator.setCacheWriter(testCacheWriter);
+    assertThat(region.getAttributes().getCacheWriter()).isEqualTo(testCacheWriter);
+  }
+
+  private void alterRegionSetCacheListener() throws TimeoutException, InterruptedException {
+    Region region = cacheRule.getCache().getRegion(REGION_NAME);
+    AttributesMutator attributesMutator = region.getAttributesMutator();
+    TestCacheListener testCacheListener = new TestCacheListener();
+    getBlackboard().waitForGate(GATE_NAME);
+    attributesMutator.addCacheListener(testCacheListener);
+    assertThat(region.getAttributes().getCacheListeners()).contains(testCacheListener);
+  }
+
+  private class TestCacheLoader implements CacheLoader {
+
+    @Override
+    public Object load(LoaderHelper helper) throws CacheLoaderException {
+      return new Integer(NUM_ENTRIES);
+    }
+  }
+
+  private class TestCacheWriter implements CacheWriter {
+
+    @Override
+    public void beforeUpdate(EntryEvent event) throws CacheWriterException {
+
+    }
+
+    @Override
+    public void beforeCreate(EntryEvent event) throws CacheWriterException {
+
+    }
+
+    @Override
+    public void beforeDestroy(EntryEvent event) throws CacheWriterException {
+
+    }
+
+    @Override
+    public void beforeRegionDestroy(RegionEvent event) throws CacheWriterException {
+
+    }
+
+    @Override
+    public void beforeRegionClear(RegionEvent event) throws CacheWriterException {
+      System.out.println("beforeRegionClear");
+    }
+  }
+
+  private class TestCacheListener implements CacheListener {
+
+    @Override
+    public void afterCreate(EntryEvent event) {
+
+    }
+
+    @Override
+    public void afterUpdate(EntryEvent event) {
+
+    }
+
+    @Override
+    public void afterInvalidate(EntryEvent event) {
+
+    }
+
+    @Override
+    public void afterDestroy(EntryEvent event) {
+
+    }
+
+    @Override
+    public void afterRegionInvalidate(RegionEvent event) {
+
+    }
+
+    @Override
+    public void afterRegionDestroy(RegionEvent event) {
+
+    }
+
+    @Override
+    public void afterRegionClear(RegionEvent event) {
+      System.out.println("afterRegionClear");
+    }
+
+    @Override
+    public void afterRegionCreate(RegionEvent event) {
+
+    }
+
+    @Override
+    public void afterRegionLive(RegionEvent event) {
+
+    }
+  }
+
+  private static DUnitBlackboard getBlackboard() {
+    if (blackboard == null) {
+      blackboard = new DUnitBlackboard();
+    }
+    return blackboard;
+  }
+
+  private DistributionMessageObserver getDistributionMessageObserverBeforeProcessMessage() {
+    return new DistributionMessageObserver() {
+      @Override
+      public void beforeProcessMessage(ClusterDistributionManager dm, DistributionMessage message) {
+        super.beforeProcessMessage(dm, message);
+        if (message instanceof PartitionedRegionClearMessage) {
+          DistributionMessageObserver.setInstance(null);
+          getBlackboard().signalGate(GATE_NAME);
+        }
+      }
+    };
+  }
+
+  private DistributionMessageObserver getDistributionMessageObserverAfterProcessMessage() {
+    return new DistributionMessageObserver() {
+      @Override
+      public void afterProcessMessage(ClusterDistributionManager dm, DistributionMessage message) {
+        super.afterProcessMessage(dm, message);
+        if (message instanceof PartitionedRegionClearMessage) {
+          DistributionMessageObserver.setInstance(null);
+          getBlackboard().signalGate(GATE_NAME);
+        }
+      }
+    };
+  }
+
+  /**
+   * Shutdowns a coordinator member while the clear operation is in progress.
+   */
+  public static class MemberKiller extends DistributionMessageObserver {
+    private final boolean coordinator;
+
+    public MemberKiller(boolean coordinator) {
+      this.coordinator = coordinator;
+    }
+
+    /**
+     * Shutdowns the VM whenever the message is an instance of
+     * {@link PartitionedRegionClearMessage}.
+     */
+    private void shutdownMember(DistributionMessage message) {
+      if (message instanceof PartitionedRegionClearMessage) {
+        if (((PartitionedRegionClearMessage) message)
+            .getOp() == PartitionedRegionClearMessage.OperationType.OP_PR_CLEAR) {
+          DistributionMessageObserver.setInstance(null);
+          InternalDistributedSystem.getConnectedInstance().stopReconnectingNoDisconnect();
+          MembershipManagerHelper
+              .crashDistributedSystem(InternalDistributedSystem.getConnectedInstance());
+          await().untilAsserted(
+              () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNull());
+        }
+      }
+    }
+
+    /**
+     * Invoked only on clear coordinator VM.
+     *
+     * @param dm the distribution manager that received the message
+     * @param message The message itself
+     */
+    @Override
+    public void beforeSendMessage(ClusterDistributionManager dm, DistributionMessage message) {
+      if (coordinator) {
+        shutdownMember(message);
+      } else {
+        super.beforeSendMessage(dm, message);
+      }
+    }
+
+    /**
+     * Invoked only on non clear coordinator VM.
+     *
+     * @param dm the distribution manager that received the message
+     * @param message The message itself
+     */
+    @Override
+    public void beforeProcessMessage(ClusterDistributionManager dm, DistributionMessage message) {
+      if (!coordinator) {
+        shutdownMember(message);
+      } else {
+        super.beforeProcessMessage(dm, message);
+      }
+    }
+  }
+}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
new file mode 100644
index 0000000..fdb91c7
--- /dev/null
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
@@ -0,0 +1,747 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache;
+
+import static org.apache.geode.internal.util.ArrayUtils.asList;
+import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
+import static org.apache.geode.test.dunit.VM.getVM;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import java.io.Serializable;
+import java.time.Instant;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.stream.IntStream;
+
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+import junitparams.naming.TestCaseName;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.apache.geode.ForcedDisconnectException;
+import org.apache.geode.cache.Cache;
+import org.apache.geode.cache.PartitionAttributes;
+import org.apache.geode.cache.PartitionAttributesFactory;
+import org.apache.geode.cache.PartitionedRegionPartialClearException;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.cache.partition.PartitionRegionHelper;
+import org.apache.geode.distributed.DistributedSystemDisconnectedException;
+import org.apache.geode.distributed.internal.ClusterDistributionManager;
+import org.apache.geode.distributed.internal.DMStats;
+import org.apache.geode.distributed.internal.DistributionMessage;
+import org.apache.geode.distributed.internal.DistributionMessageObserver;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.membership.api.MembershipManagerHelper;
+import org.apache.geode.internal.cache.versions.RegionVersionHolder;
+import org.apache.geode.internal.cache.versions.RegionVersionVector;
+import org.apache.geode.internal.cache.versions.VersionSource;
+import org.apache.geode.test.awaitility.GeodeAwaitility;
+import org.apache.geode.test.dunit.AsyncInvocation;
+import org.apache.geode.test.dunit.VM;
+import org.apache.geode.test.dunit.rules.CacheRule;
+import org.apache.geode.test.dunit.rules.DistributedRule;
+
+/**
+ * Tests to verify that {@link PartitionedRegion#clear()} operation can be executed multiple times
+ * on the same region while other cache operations are being executed concurrently and members are
+ * added or removed.
+ */
+@RunWith(JUnitParamsRunner.class)
+public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements Serializable {
+  private static final Integer BUCKETS = 13;
+  private static final String REGION_NAME = "PartitionedRegion";
+  private static final String TEST_CASE_NAME =
+      "[{index}] {method}(Coordinator:{0}, RegionType:{1})";
+
+  @Rule
+  public DistributedRule distributedRule = new DistributedRule(3);
+
+  @Rule
+  public CacheRule cacheRule = CacheRule.builder().createCacheInAll().build();
+
+  private VM server1;
+  private VM server2;
+  private VM accessor;
+
+  private enum TestVM {
+    ACCESSOR(0), SERVER1(1), SERVER2(2);
+
+    final int vmNumber;
+
+    TestVM(int vmNumber) {
+      this.vmNumber = vmNumber;
+    }
+  }
+
+  static RegionShortcut[] regionTypes() {
+    return new RegionShortcut[] {
+        RegionShortcut.PARTITION, RegionShortcut.PARTITION_REDUNDANT
+    };
+  }
+
+  @SuppressWarnings("unused")
+  static TestVM[] coordinators() {
+    return new TestVM[] {
+        TestVM.SERVER1, TestVM.ACCESSOR
+    };
+  }
+
+  @SuppressWarnings("unused")
+  static Object[] coordinatorsAndRegionTypes() {
+    ArrayList<Object[]> parameters = new ArrayList<>();
+    RegionShortcut[] regionShortcuts = regionTypes();
+
+    Arrays.stream(regionShortcuts).forEach(regionShortcut -> {
+      parameters.add(new Object[] {TestVM.SERVER1, regionShortcut});
+      parameters.add(new Object[] {TestVM.ACCESSOR, regionShortcut});
+    });
+
+    return parameters.toArray();
+  }
+
+  @Before
+  public void setUp() throws Exception {
+    server1 = getVM(TestVM.SERVER1.vmNumber);
+    server2 = getVM(TestVM.SERVER2.vmNumber);
+    accessor = getVM(TestVM.ACCESSOR.vmNumber);
+  }
+
+  private void initAccessor(RegionShortcut regionShortcut) {
+    PartitionAttributes<String, String> attrs = new PartitionAttributesFactory<String, String>()
+        .setTotalNumBuckets(BUCKETS)
+        .setLocalMaxMemory(0)
+        .create();
+
+    cacheRule.getCache().createRegionFactory(regionShortcut)
+        .setPartitionAttributes(attrs)
+        .create(REGION_NAME);
+
+  }
+
+  private void initDataStore(RegionShortcut regionShortcut) {
+    PartitionAttributes<String, String> attrs = new PartitionAttributesFactory<String, String>()
+        .setTotalNumBuckets(BUCKETS)
+        .create();
+
+    cacheRule.getCache().createRegionFactory(regionShortcut)
+        .setPartitionAttributes(attrs)
+        .create(REGION_NAME);
+  }
+
+  private void parametrizedSetup(RegionShortcut regionShortcut) {
+    server1.invoke(() -> initDataStore(regionShortcut));
+    server2.invoke(() -> initDataStore(regionShortcut));
+    accessor.invoke(() -> initAccessor(regionShortcut));
+  }
+
+  private void waitForSilence() {
+    DMStats dmStats = cacheRule.getSystem().getDistributionManager().getStats();
+    PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
+    PartitionedRegionStats partitionedRegionStats = region.getPrStats();
+
+    await().untilAsserted(() -> {
+      assertThat(dmStats.getReplyWaitsInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getVolunteeringInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getBucketCreatesInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getPrimaryTransfersInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getRebalanceBucketCreatesInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getRebalancePrimaryTransfersInProgress()).isEqualTo(0);
+    });
+  }
+
+  /**
+   * Populates the region and verifies the data on the selected VMs.
+   */
+  private void populateRegion(VM feeder, int entryCount, List<VM> vms) {
+    feeder.invoke(() -> {
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      IntStream.range(0, entryCount).forEach(i -> region.put(String.valueOf(i), "Value_" + i));
+    });
+
+    vms.forEach(vm -> vm.invoke(() -> {
+      waitForSilence();
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+
+      IntStream.range(0, entryCount)
+          .forEach(i -> assertThat(region.get(String.valueOf(i))).isEqualTo("Value_" + i));
+    }));
+  }
+
+  /**
+   * Asserts that the RegionVersionVectors for both buckets are consistent.
+   *
+   * @param bucketId Id of the bucket to compare.
+   * @param bucketDump1 First bucketDump.
+   * @param bucketDump2 Second bucketDump.
+   */
+  private void assertRegionVersionVectorsConsistency(int bucketId, BucketDump bucketDump1,
+      BucketDump bucketDump2) {
+    RegionVersionVector<?> rvv1 = bucketDump1.getRvv();
+    RegionVersionVector<?> rvv2 = bucketDump2.getRvv();
+
+    if (rvv1 == null) {
+      assertThat(rvv2)
+          .as("Bucket " + bucketId + " has an RVV on member " + bucketDump2.getMember()
+              + ", but does not on member " + bucketDump1.getMember())
+          .isNull();
+    }
+
+    if (rvv2 == null) {
+      assertThat(rvv1)
+          .as("Bucket " + bucketId + " has an RVV on member " + bucketDump1.getMember()
+              + ", but does not on member " + bucketDump2.getMember())
+          .isNull();
+    }
+
+    assertThat(rvv1).isNotNull();
+    assertThat(rvv2).isNotNull();
+    Map<VersionSource<?>, RegionVersionHolder<?>> rvv2Members =
+        new HashMap<>(rvv1.getMemberToVersion());
+    Map<VersionSource<?>, RegionVersionHolder<?>> rvv1Members =
+        new HashMap<>(rvv1.getMemberToVersion());
+    for (Map.Entry<VersionSource<?>, RegionVersionHolder<?>> entry : rvv1Members.entrySet()) {
+      VersionSource<?> memberId = entry.getKey();
+      RegionVersionHolder<?> versionHolder1 = entry.getValue();
+      RegionVersionHolder<?> versionHolder2 = rvv2Members.remove(memberId);
+      assertThat(versionHolder1)
+          .as("RegionVersionVector for bucket " + bucketId + " on member " + bucketDump1.getMember()
+              + " is not consistent with member " + bucketDump2.getMember())
+          .isEqualTo(versionHolder2);
+    }
+  }
+
+  /**
+   * Asserts that the region data is consistent across buckets.
+   */
+  private void assertRegionBucketsConsistency() throws ForceReattemptException {
+    List<BucketDump> bucketDumps;
+    PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
+    // Redundant copies + 1 primary.
+    int expectedCopies = region.getRedundantCopies() + 1;
+
+    for (int bId = 0; bId < BUCKETS; bId++) {
+      final int bucketId = bId;
+      bucketDumps = region.getAllBucketEntries(bucketId);
+      assertThat(bucketDumps.size())
+          .as("Bucket " + bucketId + " should have " + expectedCopies + " copies, but has "
+              + bucketDumps.size())
+          .isEqualTo(expectedCopies);
+
+      // Check that all copies of the bucket have the same data.
+      if (bucketDumps.size() > 1) {
+        BucketDump firstDump = bucketDumps.get(0);
+
+        for (int j = 1; j < bucketDumps.size(); j++) {
+          BucketDump otherDump = bucketDumps.get(j);
+          assertRegionVersionVectorsConsistency(bucketId, firstDump, otherDump);
+
+          await().untilAsserted(() -> assertThat(otherDump.getValues())
+              .as("Values for bucket " + bucketId + " on member " + otherDump.getMember()
+                  + " are not consistent with member " + firstDump.getMember())
+              .isEqualTo(firstDump.getValues()));
+
+          await().untilAsserted(() -> assertThat(otherDump.getVersions())
+              .as("Versions for bucket " + bucketId + " on member " + otherDump.getMember()
+                  + " are not consistent with member " + firstDump.getMember())
+              .isEqualTo(firstDump.getVersions()));
+        }
+      }
+    }
+  }
+
+  /**
+   * Continuously execute get operations on the PartitionedRegion for the given durationInMillis.
+   */
+  private void executeGets(final int numEntries, final long durationInMillis) {
+    Cache cache = cacheRule.getCache();
+    Region<String, String> region = cache.getRegion(REGION_NAME);
+    Instant finishTime = Instant.now().plusMillis(durationInMillis);
+
+    while (Instant.now().isBefore(finishTime)) {
+      // Region might have been cleared in between, that's why we check for null.
+      IntStream.range(0, numEntries).forEach(i -> {
+        Optional<String> nullableValue = Optional.ofNullable(region.get(String.valueOf(i)));
+        nullableValue.ifPresent(value -> assertThat(value).isEqualTo("Value_" + i));
+      });
+    }
+  }
+
+  /**
+   * Continuously execute put operations on the PartitionedRegion for the given durationInMillis.
+   */
+  private void executePuts(final int numEntries, final long durationInMillis) {
+    Cache cache = cacheRule.getCache();
+    Region<String, String> region = cache.getRegion(REGION_NAME);
+    Instant finishTime = Instant.now().plusMillis(durationInMillis);
+
+    while (Instant.now().isBefore(finishTime)) {
+      IntStream.range(0, numEntries).forEach(i -> region.put(String.valueOf(i), "Value_" + i));
+    }
+  }
+
+  /**
+   * Continuously execute putAll operations on the PartitionedRegion for the given
+   * durationInMillis.
+   */
+  private void executePutAlls(final int startKey, final int finalKey, final long durationInMillis) {
+    Cache cache = cacheRule.getCache();
+    Map<String, String> valuesToInsert = new HashMap<>();
+    Region<String, String> region = cache.getRegion(REGION_NAME);
+    IntStream.range(startKey, finalKey)
+        .forEach(i -> valuesToInsert.put(String.valueOf(i), "Value_" + i));
+    Instant finishTime = Instant.now().plusMillis(durationInMillis);
+
+    while (Instant.now().isBefore(finishTime)) {
+      region.putAll(valuesToInsert);
+    }
+  }
+
+  /**
+   * Continuously execute remove operations on the PartitionedRegion for the given
+   * durationInMillis.
+   */
+  private void executeRemoves(final int numEntries, final long durationInMillis) {
+    Cache cache = cacheRule.getCache();
+    Region<String, String> region = cache.getRegion(REGION_NAME);
+    Instant finishTime = Instant.now().plusMillis(durationInMillis);
+
+    while (Instant.now().isBefore(finishTime)) {
+      // Region might have been cleared in between, that's why we check for null.
+      IntStream.range(0, numEntries).forEach(i -> {
+        Optional<String> nullableValue = Optional.ofNullable(region.remove(String.valueOf(i)));
+        nullableValue.ifPresent(value -> assertThat(value).isEqualTo("Value_" + i));
+      });
+    }
+  }
+
+  /**
+   * Continuously execute removeAll operations on the PartitionedRegion for the given
+   * durationInMillis.
+   */
+  private void executeRemoveAlls(final int startKey, final int finalKey,
+      final long durationInMillis) {
+    Cache cache = cacheRule.getCache();
+    List<String> keysToRemove = new ArrayList<>();
+    Region<String, String> region = cache.getRegion(REGION_NAME);
+    IntStream.range(startKey, finalKey).forEach(i -> keysToRemove.add(String.valueOf(i)));
+    Instant finishTime = Instant.now().plusMillis(durationInMillis);
+
+    while (Instant.now().isBefore(finishTime)) {
+      region.removeAll(keysToRemove);
+    }
+  }
+
+  /**
+   * Execute the clear operation and retry until success.
+   */
+  private void executeClearWithRetry(VM coordinator) {
+    coordinator.invoke(() -> {
+      boolean retry;
+
+      do {
+        retry = false;
+
+        try {
+          cacheRule.getCache().getRegion(REGION_NAME).clear();
+        } catch (PartitionedRegionPartialClearException pce) {
+          retry = true;
+        }
+
+      } while (retry);
+    });
+  }
+
+  /**
+   * Continuously execute clear operations on the PartitionedRegion every periodInMillis for the
+   * given
+   * durationInMillis.
+   */
+  private void executeClears(final long durationInMillis, final long periodInMillis)
+      throws InterruptedException {
+    Cache cache = cacheRule.getCache();
+    AtomicLong invocationCount = new AtomicLong(0);
+    Region<String, String> region = cache.getRegion(REGION_NAME);
+    Long minimumInvocationCount = (durationInMillis / periodInMillis);
+    ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
+    ScheduledFuture<?> scheduledFuture = executor.scheduleWithFixedDelay(() -> {
+      region.clear();
+      invocationCount.incrementAndGet();
+    }, 0, periodInMillis, TimeUnit.MILLISECONDS);
+
+    await().untilAsserted(
+        () -> assertThat(invocationCount.get()).isGreaterThanOrEqualTo(minimumInvocationCount));
+    scheduledFuture.cancel(false);
+    executor.shutdown();
+    executor.awaitTermination(GeodeAwaitility.getTimeout().getSeconds(), TimeUnit.SECONDS);
+  }
+
+  /**
+   * The test does the following (clear coordinator and regionType are parametrized):
+   * - Launches one thread per VM to continuously execute removes, puts and gets for a given time.
+   * - Clears the Partition Region continuously every X milliseconds for a given time.
+   * - Asserts that, after the clears have finished, the Region Buckets are consistent across
+   * members.
+   */
+  @Test
+  @TestCaseName(TEST_CASE_NAME)
+  @Parameters(method = "coordinatorsAndRegionTypes")
+  public void clearWithConcurrentPutGetRemoveShouldWorkCorrectly(TestVM coordinatorVM,
+      RegionShortcut regionShortcut) throws InterruptedException {
+    final int entries = 15000;
+    final int workMillis = 60000;
+    parametrizedSetup(regionShortcut);
+
+    // Let all VMs continuously execute puts and gets for 60 seconds.
+    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
+        server1.invokeAsync(() -> executePuts(entries, workMillis)),
+        server2.invokeAsync(() -> executeGets(entries, workMillis)),
+        accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
+
+    // Clear the region every second for 60 seconds.
+    getVM(coordinatorVM.vmNumber).invoke(() -> executeClears(workMillis, 1000));
+
+    // Let asyncInvocations finish.
+    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
+      asyncInvocation.await();
+    }
+
+    // Assert Region Buckets are consistent.
+    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
+    accessor.invoke(this::assertRegionBucketsConsistency);
+  }
+
+  /**
+   * The test does the following (clear coordinator and regionType are parametrized):
+   * - Launches two threads per VM to continuously execute putAll and removeAll for a given time.
+   * - Clears the Partition Region continuously every X milliseconds for a given time.
+   * - Asserts that, after the clears have finished, the Region Buckets are consistent across
+   * members.
+   */
+  @Test
+  @TestCaseName(TEST_CASE_NAME)
+  @Parameters(method = "coordinatorsAndRegionTypes")
+  public void clearWithConcurrentPutAllRemoveAllShouldWorkCorrectly(TestVM coordinatorVM,
+      RegionShortcut regionShortcut) throws InterruptedException {
+    final int workMillis = 15000;
+    parametrizedSetup(regionShortcut);
+
+    // Let all VMs continuously execute putAll and removeAll for 15 seconds.
+    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
+        server1.invokeAsync(() -> executePutAlls(0, 2000, workMillis)),
+        server1.invokeAsync(() -> executeRemoveAlls(0, 2000, workMillis)),
+        server2.invokeAsync(() -> executePutAlls(2000, 4000, workMillis)),
+        server2.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)),
+        accessor.invokeAsync(() -> executePutAlls(4000, 6000, workMillis)),
+        accessor.invokeAsync(() -> executeRemoveAlls(4000, 6000, workMillis)));
+
+    // Clear the region every half second for 15 seconds.
+    getVM(coordinatorVM.vmNumber).invoke(() -> executeClears(workMillis, 500));
+
+    // Let asyncInvocations finish.
+    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
+      asyncInvocation.await();
+    }
+
+    // Assert Region Buckets are consistent.
+    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
+    accessor.invoke(this::assertRegionBucketsConsistency);
+  }
+
+  /**
+   * The test does the following (regionType is parametrized):
+   * - Populates the Partition Region.
+   * - Verifies that the entries are synchronized on all members.
+   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop the
+   * coordinator VM while the clear is in progress.
+   * - Clears the Partition Region (at this point the coordinator is restarted).
+   * - Asserts that, after the member joins again, the Region Buckets are consistent.
+   */
+  @Test
+  @TestCaseName("[{index}] {method}(RegionType:{0})")
+  @Parameters(method = "regionTypes")
+  public void clearShouldFailWhenCoordinatorMemberIsBounced(RegionShortcut regionShortcut) {
+    final int entries = 1000;
+    parametrizedSetup(regionShortcut);
+    populateRegion(accessor, entries, asList(accessor, server1, server2));
+
+    // Set the CoordinatorMemberKiller and try to clear the region
+    server1.invoke(() -> {
+      DistributionMessageObserver.setInstance(new MemberKiller(true));
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      assertThatThrownBy(region::clear)
+          .isInstanceOf(DistributedSystemDisconnectedException.class)
+          .hasCauseInstanceOf(ForcedDisconnectException.class);
+    });
+
+    // Wait for member to get back online and assign all buckets.
+    server1.invoke(() -> {
+      cacheRule.createCache();
+      initDataStore(regionShortcut);
+      await().untilAsserted(
+          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
+      PartitionRegionHelper.assignBucketsToPartitions(cacheRule.getCache().getRegion(REGION_NAME));
+    });
+
+    // Assert Region Buckets are consistent.
+    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
+    accessor.invoke(this::assertRegionBucketsConsistency);
+  }
+
+  /**
+   * The test does the following (clear coordinator is chosen through parameters):
+   * - Populates the Partition Region.
+   * - Verifies that the entries are synchronized on all members.
+   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop a
+   * non-coordinator VM while the clear is in progress (the member has primary buckets, though, so
+   * participates on the clear operation).
+   * - Launches two threads per VM to continuously execute gets, puts and removes for a given time.
+   * - Clears the Partition Region (at this point the non-coordinator is restarted).
+   * - Asserts that, after the clear has finished, the Region Buckets are consistent across members.
+   */
+  @Test
+  @Parameters(method = "coordinators")
+  @TestCaseName("[{index}] {method}(Coordinator:{0})")
+  public void clearOnRedundantPartitionRegionWithConcurrentPutGetRemoveShouldWorkCorrectlyWhenNonCoordinatorMembersAreBounced(
+      TestVM coordinatorVM) throws InterruptedException {
+    final int entries = 7500;
+    final int workMillis = 30000;
+    parametrizedSetup(RegionShortcut.PARTITION_REDUNDANT);
+    populateRegion(accessor, entries, asList(accessor, server1, server2));
+    server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
+
+    // Let all VMs (except the one to kill) continuously execute gets, put and removes for 30"
+    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
+        server1.invokeAsync(() -> executeGets(entries, workMillis)),
+        server1.invokeAsync(() -> executePuts(entries, workMillis)),
+        accessor.invokeAsync(() -> executeGets(entries, workMillis)),
+        accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
+
+    // Retry the clear operation on the region until success (server2 will go down, but other
+    // members will eventually become primary for those buckets previously hosted by server2).
+    executeClearWithRetry(getVM(coordinatorVM.vmNumber));
+
+    // Wait for member to get back online.
+    server2.invoke(() -> {
+      cacheRule.createCache();
+      initDataStore(RegionShortcut.PARTITION_REDUNDANT);
+      await().untilAsserted(
+          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
+    });
+
+    // Let asyncInvocations finish.
+    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
+      asyncInvocation.await();
+    }
+
+    // Assert Region Buckets are consistent.
+    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
+    accessor.invoke(this::assertRegionBucketsConsistency);
+  }
+
+  /**
+   * The test does the following (clear coordinator is chosen through parameters):
+   * - Populates the Partition Region.
+   * - Verifies that the entries are synchronized on all members.
+   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop a
+   * non-coordinator VM while the clear is in progress (the member has primary buckets, though, so
+   * participates on the clear operation).
+   * - Launches two threads per VM to continuously execute gets, puts and removes for a given time.
+   * - Clears the Partition Region (at this point the non-coordinator is restarted).
+   * - Asserts that the clear operation failed with PartitionedRegionPartialClearException (primary
+   * buckets on the the restarted members are not available).
+   */
+  @Test
+  @Parameters(method = "coordinators")
+  @TestCaseName("[{index}] {method}(Coordinator:{0})")
+  public void clearOnNonRedundantPartitionRegionWithConcurrentPutGetRemoveShouldFailWhenNonCoordinatorMembersAreBounced(
+      TestVM coordinatorVM) throws InterruptedException {
+    final int entries = 7500;
+    final int workMillis = 30000;
+    parametrizedSetup(RegionShortcut.PARTITION);
+    populateRegion(accessor, entries, asList(accessor, server1, server2));
+    server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
+
+    // Let all VMs (except the one to kill) continuously execute gets, put and removes for 30"
+    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
+        server1.invokeAsync(() -> executeGets(entries, workMillis)),
+        server1.invokeAsync(() -> executePuts(entries, workMillis)),
+        accessor.invokeAsync(() -> executeGets(entries, workMillis)),
+        accessor.invokeAsync(() -> executeRemoves(entries, workMillis)));
+
+    // Clear the region.
+    getVM(coordinatorVM.vmNumber).invoke(() -> {
+      assertThatThrownBy(() -> cacheRule.getCache().getRegion(REGION_NAME).clear())
+          .isInstanceOf(PartitionedRegionPartialClearException.class);
+    });
+
+    // Let asyncInvocations finish.
+    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
+      asyncInvocation.await();
+    }
+  }
+
+  /**
+   * The test does the following (clear coordinator is chosen through parameters):
+   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop a
+   * non-coordinator VM while the clear is in progress (the member has primary buckets, though, so
+   * participates on the clear operation).
+   * - Launches one thread per VM to continuously execute putAll/removeAll for a given time.
+   * - Clears the Partition Region (at this point the non-coordinator is restarted).
+   * - Asserts that, after the clear has finished, the Region Buckets are consistent across members.
+   */
+  @Test
+  @Parameters(method = "coordinators")
+  @TestCaseName("[{index}] {method}(Coordinator:{0})")
+  public void clearOnRedundantPartitionRegionWithConcurrentPutAllRemoveAllShouldWorkCorrectlyWhenNonCoordinatorMembersAreBounced(
+      TestVM coordinatorVM) throws InterruptedException {
+    final int workMillis = 30000;
+    parametrizedSetup(RegionShortcut.PARTITION_REDUNDANT);
+    server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
+
+    // Let all VMs continuously execute putAll/removeAll for 30 seconds.
+    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
+        server1.invokeAsync(() -> executePutAlls(0, 6000, workMillis)),
+        accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)));
+
+    // Retry the clear operation on the region until success (server2 will go down, but other
+    // members will eventually become primary for those buckets previously hosted by server2).
+    executeClearWithRetry(getVM(coordinatorVM.vmNumber));
+
+    // Wait for member to get back online.
+    server2.invoke(() -> {
+      cacheRule.createCache();
+      initDataStore(RegionShortcut.PARTITION_REDUNDANT);
+      await().untilAsserted(
+          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
+    });
+
+    // Let asyncInvocations finish.
+    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
+      asyncInvocation.await();
+    }
+
+    // Assert Region Buckets are consistent.
+    asList(accessor, server1, server2).forEach(vm -> vm.invoke(this::waitForSilence));
+    accessor.invoke(this::assertRegionBucketsConsistency);
+  }
+
+  /**
+   * The test does the following (clear coordinator is chosen through parameters):
+   * - Sets the {@link MemberKiller} as a {@link DistributionMessageObserver} to stop a
+   * non-coordinator VM while the clear is in progress (the member has primary buckets, though, so
+   * participates on the clear operation).
+   * - Launches one thread per VM to continuously execute putAll/removeAll for a given time.
+   * - Clears the Partition Region (at this point the non-coordinator is restarted).
+   * - Asserts that the clear operation failed with PartitionedRegionPartialClearException (primary
+   * buckets on the the restarted members are not available).
+   */
+  @Test
+  @Parameters(method = "coordinators")
+  @TestCaseName("[{index}] {method}(Coordinator:{0})")
+  public void clearOnNonRedundantPartitionRegionWithConcurrentPutAllRemoveAllShouldFailWhenNonCoordinatorMembersAreBounced(
+      TestVM coordinatorVM) throws InterruptedException {
+    final int workMillis = 30000;
+    parametrizedSetup(RegionShortcut.PARTITION);
+    server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
+
+    List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
+        server1.invokeAsync(() -> executePutAlls(0, 6000, workMillis)),
+        accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)));
+
+    // Clear the region.
+    getVM(coordinatorVM.vmNumber).invoke(() -> {
+      assertThatThrownBy(() -> cacheRule.getCache().getRegion(REGION_NAME).clear())
+          .isInstanceOf(PartitionedRegionPartialClearException.class);
+    });
+
+    // Let asyncInvocations finish.
+    for (AsyncInvocation<Void> asyncInvocation : asyncInvocationList) {
+      asyncInvocation.await();
+    }
+  }
+
+  /**
+   * Shutdowns a coordinator member while the clear operation is in progress.
+   */
+  public static class MemberKiller extends DistributionMessageObserver {
+    private final boolean coordinator;
+
+    public MemberKiller(boolean coordinator) {
+      this.coordinator = coordinator;
+    }
+
+    /**
+     * Shutdowns the VM whenever the message is an instance of
+     * {@link PartitionedRegionClearMessage}.
+     */
+    private void shutdownMember(DistributionMessage message) {
+      if (message instanceof PartitionedRegionClearMessage) {
+        if (((PartitionedRegionClearMessage) message)
+            .getOp() == PartitionedRegionClearMessage.OperationType.OP_PR_CLEAR) {
+          DistributionMessageObserver.setInstance(null);
+          InternalDistributedSystem.getConnectedInstance().stopReconnectingNoDisconnect();
+          MembershipManagerHelper
+              .crashDistributedSystem(InternalDistributedSystem.getConnectedInstance());
+          await().untilAsserted(
+              () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNull());
+        }
+      }
+    }
+
+    /**
+     * Invoked only on clear coordinator VM.
+     *
+     * @param dm the distribution manager that received the message
+     * @param message The message itself
+     */
+    @Override
+    public void beforeSendMessage(ClusterDistributionManager dm, DistributionMessage message) {
+      if (coordinator) {
+        shutdownMember(message);
+      } else {
+        super.beforeSendMessage(dm, message);
+      }
+    }
+
+    /**
+     * Invoked only on non clear coordinator VM.
+     *
+     * @param dm the distribution manager that received the message
+     * @param message The message itself
+     */
+    @Override
+    public void beforeProcessMessage(ClusterDistributionManager dm, DistributionMessage message) {
+      if (!coordinator) {
+        shutdownMember(message);
+      } else {
+        super.beforeProcessMessage(dm, message);
+      }
+    }
+  }
+}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithExpirationDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithExpirationDUnitTest.java
new file mode 100644
index 0000000..dfc9470
--- /dev/null
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithExpirationDUnitTest.java
@@ -0,0 +1,501 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache;
+
+import static org.apache.geode.cache.ExpirationAction.DESTROY;
+import static org.apache.geode.cache.RegionShortcut.PARTITION;
+import static org.apache.geode.cache.RegionShortcut.PARTITION_OVERFLOW;
+import static org.apache.geode.cache.RegionShortcut.PARTITION_REDUNDANT;
+import static org.apache.geode.cache.RegionShortcut.PARTITION_REDUNDANT_OVERFLOW;
+import static org.apache.geode.internal.util.ArrayUtils.asList;
+import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
+import static org.apache.geode.test.dunit.VM.getVM;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.IntStream;
+
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+import junitparams.naming.TestCaseName;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.apache.geode.ForcedDisconnectException;
+import org.apache.geode.cache.Cache;
+import org.apache.geode.cache.CacheWriter;
+import org.apache.geode.cache.CacheWriterException;
+import org.apache.geode.cache.ExpirationAttributes;
+import org.apache.geode.cache.PartitionAttributes;
+import org.apache.geode.cache.PartitionAttributesFactory;
+import org.apache.geode.cache.PartitionedRegionPartialClearException;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionEvent;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.cache.partition.PartitionRegionHelper;
+import org.apache.geode.cache.util.CacheWriterAdapter;
+import org.apache.geode.distributed.DistributedSystemDisconnectedException;
+import org.apache.geode.distributed.internal.DMStats;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.membership.api.MembershipManagerHelper;
+import org.apache.geode.test.awaitility.GeodeAwaitility;
+import org.apache.geode.test.dunit.VM;
+import org.apache.geode.test.dunit.rules.CacheRule;
+import org.apache.geode.test.dunit.rules.DistributedDiskDirRule;
+import org.apache.geode.test.dunit.rules.DistributedRule;
+
+/**
+ * Tests to verify that {@link PartitionedRegion#clear()} cancels all remaining expiration tasks
+ * on the {@link PartitionedRegion} once the operation is executed.
+ */
+@RunWith(JUnitParamsRunner.class)
+public class PartitionedRegionClearWithExpirationDUnitTest implements Serializable {
+  private static final Integer BUCKETS = 13;
+  private static final Integer EXPIRATION_TIME = 5 * 60;
+  private static final Integer SMALL_EXPIRATION_TIME = 10;
+  private static final String REGION_NAME = "PartitionedRegion";
+
+  @Rule
+  public DistributedRule distributedRule = new DistributedRule(3);
+
+  @Rule
+  public CacheRule cacheRule = CacheRule.builder().createCacheInAll().build();
+
+  @Rule
+  public DistributedDiskDirRule distributedDiskDirRule = new DistributedDiskDirRule();
+
+  private VM accessor, server1, server2;
+
+  private enum TestVM {
+    ACCESSOR(0), SERVER1(1), SERVER2(2);
+
+    final int vmNumber;
+
+    TestVM(int vmNumber) {
+      this.vmNumber = vmNumber;
+    }
+  }
+
+  @SuppressWarnings("unused")
+  static RegionShortcut[] regionTypes() {
+    return new RegionShortcut[] {
+        PARTITION,
+        PARTITION_OVERFLOW,
+        PARTITION_REDUNDANT,
+        PARTITION_REDUNDANT_OVERFLOW,
+    };
+  }
+
+  @SuppressWarnings("unused")
+  static Object[] vmsAndRegionTypes() {
+    ArrayList<Object[]> parameters = new ArrayList<>();
+    RegionShortcut[] regionShortcuts = regionTypes();
+
+    Arrays.stream(regionShortcuts).forEach(regionShortcut -> {
+      parameters.add(new Object[] {TestVM.SERVER1, regionShortcut});
+      parameters.add(new Object[] {TestVM.ACCESSOR, regionShortcut});
+    });
+
+    return parameters.toArray();
+  }
+
+  @Before
+  public void setUp() throws Exception {
+    server1 = getVM(TestVM.SERVER1.vmNumber);
+    server2 = getVM(TestVM.SERVER2.vmNumber);
+    accessor = getVM(TestVM.ACCESSOR.vmNumber);
+  }
+
+  private void initAccessor(RegionShortcut regionShortcut,
+      ExpirationAttributes expirationAttributes) {
+    PartitionAttributes<String, String> attributes =
+        new PartitionAttributesFactory<String, String>()
+            .setTotalNumBuckets(BUCKETS)
+            .setLocalMaxMemory(0)
+            .create();
+
+    cacheRule.getCache()
+        .<String, String>createRegionFactory(regionShortcut)
+        .setPartitionAttributes(attributes)
+        .setEntryTimeToLive(expirationAttributes)
+        .setEntryIdleTimeout(expirationAttributes)
+        .create(REGION_NAME);
+  }
+
+  private void initDataStore(RegionShortcut regionShortcut,
+      ExpirationAttributes expirationAttributes) {
+    PartitionAttributes<String, String> attributes =
+        new PartitionAttributesFactory<String, String>()
+            .setTotalNumBuckets(BUCKETS)
+            .create();
+
+    cacheRule.getCache()
+        .<String, String>createRegionFactory(regionShortcut)
+        .setPartitionAttributes(attributes)
+        .setEntryTimeToLive(expirationAttributes)
+        .setEntryIdleTimeout(expirationAttributes)
+        .create(REGION_NAME);
+
+    ExpiryTask.expiryTaskListener = new ExpirationListener();
+  }
+
+  private void parametrizedSetup(RegionShortcut regionShortcut,
+      ExpirationAttributes expirationAttributes) {
+    server1.invoke(() -> initDataStore(regionShortcut, expirationAttributes));
+    server2.invoke(() -> initDataStore(regionShortcut, expirationAttributes));
+    accessor.invoke(() -> initAccessor(regionShortcut, expirationAttributes));
+  }
+
+  private void waitForSilence() {
+    DMStats dmStats = cacheRule.getSystem().getDistributionManager().getStats();
+    PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
+    PartitionedRegionStats partitionedRegionStats = region.getPrStats();
+
+    await().untilAsserted(() -> {
+      assertThat(dmStats.getReplyWaitsInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getVolunteeringInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getBucketCreatesInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getPrimaryTransfersInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getRebalanceBucketCreatesInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getRebalancePrimaryTransfersInProgress()).isEqualTo(0);
+    });
+  }
+
+  /**
+   * Populates the region and verifies the data on the selected VMs.
+   */
+  private void populateRegion(VM feeder, int entryCount, List<VM> vms) {
+    feeder.invoke(() -> {
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      IntStream.range(0, entryCount).forEach(i -> region.put(String.valueOf(i), "Value_" + i));
+    });
+
+    vms.forEach(vm -> vm.invoke(() -> {
+      waitForSilence();
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+
+      IntStream.range(0, entryCount)
+          .forEach(i -> assertThat(region.get(String.valueOf(i))).isEqualTo("Value_" + i));
+    }));
+  }
+
+  /**
+   * Asserts that the region is empty on requested VMs.
+   */
+  private void assertRegionIsEmpty(List<VM> vms) {
+    vms.forEach(vm -> vm.invoke(() -> {
+      waitForSilence();
+      PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
+
+      assertThat(region.getLocalSize()).isEqualTo(0);
+    }));
+  }
+
+  /**
+   * Asserts that the region data is consistent across buckets.
+   */
+  private void assertRegionBucketsConsistency() throws ForceReattemptException {
+    waitForSilence();
+    List<BucketDump> bucketDumps;
+    PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
+    // Redundant copies + 1 primary.
+    int expectedCopies = region.getRedundantCopies() + 1;
+
+    for (int bucketId = 0; bucketId < BUCKETS; bucketId++) {
+      bucketDumps = region.getAllBucketEntries(bucketId);
+      assertThat(bucketDumps.size()).as("Bucket " + bucketId + " should have " + expectedCopies
+          + " copies, but has " + bucketDumps.size()).isEqualTo(expectedCopies);
+
+      // Check that all copies of the bucket have the same data.
+      if (bucketDumps.size() > 1) {
+        BucketDump firstDump = bucketDumps.get(0);
+
+        for (int j = 1; j < bucketDumps.size(); j++) {
+          BucketDump otherDump = bucketDumps.get(j);
+          assertThat(otherDump.getValues())
+              .as("Values for bucket " + bucketId + " on member " + otherDump.getMember()
+                  + " are not consistent with member " + firstDump.getMember())
+              .isEqualTo(firstDump.getValues());
+          assertThat(otherDump.getVersions())
+              .as("Versions for bucket " + bucketId + " on member " + otherDump.getMember()
+                  + " are not consistent with member " + firstDump.getMember())
+              .isEqualTo(firstDump.getVersions());
+        }
+      }
+    }
+  }
+
+  /**
+   * Register the MemberKiller CacheWriter on the given vms.
+   */
+  private void registerVMKillerAsCacheWriter(List<VM> vmsToBounce) {
+    vmsToBounce.forEach(vm -> vm.invoke(() -> {
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      region.getAttributesMutator().setCacheWriter(new MemberKiller());
+    }));
+  }
+
+  private void doClear() {
+    Cache cache = cacheRule.getCache();
+    boolean retry;
+    do {
+      retry = false;
+      try {
+        cache.getRegion(REGION_NAME).clear();
+      } catch (PartitionedRegionPartialClearException | CacheWriterException ex) {
+        retry = true;
+      }
+    } while (retry);
+  }
+
+  /**
+   * The test does the following (clear coordinator and region type are parametrized):
+   * - Populates the Partition Region (entries have expiration).
+   * - Verifies that the entries are synchronized on all members.
+   * - Clears the Partition Region once.
+   * - Asserts that, after the clear is finished:
+   * . No expiration tasks were executed.
+   * . All expiration tasks were cancelled.
+   * . Map of expiry tasks per bucket is empty.
+   * . The Partition Region is empty on all members.
+   */
+  @Test
+  @Parameters(method = "vmsAndRegionTypes")
+  @TestCaseName("[{index}] {method}(Coordinator:{0}, RegionType:{1})")
+  public void clearShouldRemoveRegisteredExpirationTasks(TestVM coordinatorVM,
+      RegionShortcut regionShortcut) {
+    final int entries = 500;
+    int expirationTime = (int) GeodeAwaitility.getTimeout().getSeconds();
+    parametrizedSetup(regionShortcut, new ExpirationAttributes(expirationTime, DESTROY));
+    populateRegion(accessor, entries, asList(accessor, server1, server2));
+
+    // Clear the region.
+    getVM(coordinatorVM.vmNumber).invoke(() -> doClear());
+
+    // Assert all expiration tasks were cancelled and none were executed.
+    asList(server1, server2).forEach(vm -> vm.invoke(() -> {
+      ExpirationListener listener = (ExpirationListener) EntryExpiryTask.expiryTaskListener;
+      assertThat(listener.tasksRan.get()).isEqualTo(0);
+      assertThat(listener.tasksCanceled.get()).isEqualTo(listener.tasksScheduled.get());
+
+      PartitionedRegionDataStore dataStore =
+          ((PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME)).getDataStore();
+      Set<BucketRegion> bucketRegions = dataStore.getAllLocalBucketRegions();
+      bucketRegions
+          .forEach(bucketRegion -> assertThat(bucketRegion.entryExpiryTasks.isEmpty()).isTrue());
+    }));
+
+    // Assert Region Buckets are consistent and region is empty,
+    accessor.invoke(this::assertRegionBucketsConsistency);
+    assertRegionIsEmpty(asList(accessor, server1, server2));
+  }
+
+  /**
+   * The test does the following (region type is parametrized):
+   * - Populates the Partition Region (entries have expiration).
+   * - Verifies that the entries are synchronized on all members.
+   * - Sets the {@link MemberKiller} as a {@link CacheWriter} to stop the coordinator VM while the
+   * clear is in progress.
+   * - Clears the Partition Region (at this point the coordinator is restarted).
+   * - Asserts that, after the clear is finished and the expiration time is reached:
+   * . No expiration tasks were cancelled.
+   * . All entries were removed due to the expiration.
+   * . The Partition Region Buckets are consistent on all members.
+   */
+  @Test
+  @Parameters(method = "regionTypes")
+  @TestCaseName("[{index}] {method}(RegionType:{0})")
+  public void clearShouldFailWhenCoordinatorMemberIsBouncedAndExpirationTasksShouldSurvive(
+      RegionShortcut regionShortcut) {
+    final int entries = 1000;
+    ExpirationAttributes expirationAttributes =
+        new ExpirationAttributes(SMALL_EXPIRATION_TIME, DESTROY);
+    parametrizedSetup(regionShortcut, expirationAttributes);
+    populateRegion(accessor, entries, asList(accessor, server1, server2));
+    registerVMKillerAsCacheWriter(Collections.singletonList(server1));
+
+    // Clear the region (it should fail).
+    server1.invoke(() -> {
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      assertThatThrownBy(region::clear)
+          .isInstanceOf(DistributedSystemDisconnectedException.class)
+          .hasCauseInstanceOf(ForcedDisconnectException.class);
+    });
+
+    // Wait for member to get back online and assign all buckets.
+    server1.invoke(() -> {
+      cacheRule.createCache();
+      initDataStore(regionShortcut, expirationAttributes);
+      await().untilAsserted(
+          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
+      PartitionRegionHelper.assignBucketsToPartitions(cacheRule.getCache().getRegion(REGION_NAME));
+    });
+
+    // Wait until all expiration tasks are executed.
+    asList(server1, server2).forEach(vm -> vm.invoke(() -> {
+      PartitionedRegionDataStore dataStore =
+          ((PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME)).getDataStore();
+      Set<BucketRegion> bucketRegions = dataStore.getAllLocalBucketRegions();
+      bucketRegions.forEach(bucketRegion -> await()
+          .untilAsserted(() -> assertThat(bucketRegion.entryExpiryTasks.isEmpty()).isTrue()));
+    }));
+
+    // At this point the entries should be either invalidated or destroyed (expiration tasks ran).
+    asList(accessor, server1, server2).forEach(vm -> vm.invoke(() -> {
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      IntStream.range(0, entries).forEach(i -> {
+        String key = String.valueOf(i);
+        assertThat(region.get(key)).isNull();
+      });
+    }));
+
+    // Assert Region Buckets are consistent.
+    accessor.invoke(this::assertRegionBucketsConsistency);
+  }
+
+  /**
+   * The test does the following (clear coordinator and region type are parametrized):
+   * - Populates the Partition Region (entries have expiration).
+   * - Verifies that the entries are synchronized on all members.
+   * - Sets the {@link MemberKiller} as a {@link CacheWriter} to stop a non-coordinator VM while the
+   * clear is in progress (the member has primary buckets, though, so participates on
+   * the clear operation).
+   * - Clears the Partition Region (at this point the non-coordinator is restarted).
+   * - Asserts that, after the clear is finished:
+   * . No expiration tasks were executed on the non-restarted members.
+   * . All expiration tasks were cancelled on the non-restarted members.
+   * . Map of expiry tasks per bucket is empty on the non-restarted members.
+   * . All expiration tasks were executed and all expired on the restarted members.
+   * . The Partition Region is empty and buckets are consistent across all members.
+   */
+  @Test
+  @Parameters(method = "vmsAndRegionTypes")
+  @TestCaseName("[{index}] {method}(Coordinator:{0}, RegionType:{1})")
+  public void clearShouldSucceedAndRemoveRegisteredExpirationTasksWhenNonCoordinatorMemberIsBounced(
+      TestVM coordinatorVM, RegionShortcut regionShortcut) {
+    final int entries = 500;
+
+    RegionShortcut rs = regionShortcut;
+    ExpirationAttributes expirationAttributes = new ExpirationAttributes(EXPIRATION_TIME, DESTROY);
+    parametrizedSetup(regionShortcut, expirationAttributes);
+    registerVMKillerAsCacheWriter(Collections.singletonList(server2));
+    populateRegion(accessor, entries, asList(accessor, server1, server2));
+
+    // Clear the region.
+    getVM(coordinatorVM.vmNumber).invoke(() -> doClear());
+
+    // Wait for member to get back online and assign buckets.
+    server2.invoke(() -> {
+      cacheRule.createCache();
+      initDataStore(rs, expirationAttributes);
+      await().untilAsserted(
+          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
+      PartitionRegionHelper.assignBucketsToPartitions(cacheRule.getCache().getRegion(REGION_NAME));
+    });
+
+    // Assert all expiration tasks were cancelled and none were executed (surviving members).
+    server1.invoke(() -> {
+      PartitionedRegionDataStore dataStore =
+          ((PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME)).getDataStore();
+      Set<BucketRegion> bucketRegions = dataStore.getAllLocalBucketRegions();
+      bucketRegions
+          .forEach(bucketRegion -> assertThat(bucketRegion.entryExpiryTasks.isEmpty()).isTrue());
+
+      ExpirationListener listener = (ExpirationListener) EntryExpiryTask.expiryTaskListener;
+      assertThat(listener.tasksRan.get()).isEqualTo(0);
+      assertThat(listener.tasksCanceled.get()).isEqualTo(listener.tasksScheduled.get());
+    });
+
+    // Assert all expiration tasks were expired as the region is empty (restarted member).
+    server2.invoke(() -> {
+      PartitionedRegionDataStore dataStore =
+          ((PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME)).getDataStore();
+      Set<BucketRegion> bucketRegions = dataStore.getAllLocalBucketRegions();
+
+      // During restart, the member loads the region from disk and automatically registers
+      // expiration tasks for each entry. After GII, however, the region is empty due to the
+      // clear operation and the tasks will just expire as there are no entries.
+      bucketRegions.forEach(bucketRegion -> await()
+          .untilAsserted(() -> assertThat(bucketRegion.entryExpiryTasks.isEmpty()).isTrue()));
+
+      ExpirationListener listener = (ExpirationListener) EntryExpiryTask.expiryTaskListener;
+      assertThat(listener.tasksExpired.get()).isEqualTo(listener.tasksRan.get());
+    });
+
+    // Assert Region Buckets are consistent and region is empty,
+    accessor.invoke(this::assertRegionBucketsConsistency);
+    assertRegionIsEmpty(asList(accessor, server1, server2));
+  }
+
+  /**
+   * Tracks expiration tasks lifecycle.
+   */
+  public static class ExpirationListener implements ExpiryTask.ExpiryTaskListener {
+    final AtomicInteger tasksRan = new AtomicInteger(0);
+    final AtomicInteger tasksExpired = new AtomicInteger(0);
+    final AtomicInteger tasksCanceled = new AtomicInteger(0);
+    final AtomicInteger tasksScheduled = new AtomicInteger(0);
+
+    @Override
+    public void afterSchedule(ExpiryTask et) {
+      tasksScheduled.incrementAndGet();
+    }
+
+    @Override
+    public void afterTaskRan(ExpiryTask et) {
+      tasksRan.incrementAndGet();
+    }
+
+    @Override
+    public void afterReschedule(ExpiryTask et) {}
+
+    @Override
+    public void afterExpire(ExpiryTask et) {
+      tasksExpired.incrementAndGet();
+    }
+
+    @Override
+    public void afterCancel(ExpiryTask et) {
+      tasksCanceled.incrementAndGet();
+    }
+  }
+
+  /**
+   * Shutdowns a member while the clear operation is in progress.
+   * The writer is only installed on the member the test wants to shutdown, doesn't matter whether
+   * it's the clear coordinator or another member holding primary buckets.
+   */
+  public static class MemberKiller extends CacheWriterAdapter<String, String> {
+
+    @Override
+    public synchronized void beforeRegionClear(RegionEvent<String, String> event)
+        throws CacheWriterException {
+      InternalDistributedSystem.getConnectedInstance().stopReconnectingNoDisconnect();
+      MembershipManagerHelper.crashDistributedSystem(
+          InternalDistributedSystem.getConnectedInstance());
+      await().untilAsserted(
+          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNull());
+    }
+  }
+}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithRebalanceDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithRebalanceDUnitTest.java
new file mode 100644
index 0000000..f53fab7
--- /dev/null
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithRebalanceDUnitTest.java
@@ -0,0 +1,578 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache;
+
+import static org.apache.geode.cache.PartitionAttributesFactory.GLOBAL_MAX_BUCKETS_DEFAULT;
+import static org.apache.geode.cache.RegionShortcut.PARTITION;
+import static org.apache.geode.cache.RegionShortcut.PARTITION_REDUNDANT;
+import static org.apache.geode.cache.RegionShortcut.PARTITION_REDUNDANT_PERSISTENT;
+import static org.apache.geode.internal.util.ArrayUtils.asList;
+import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
+import static org.apache.geode.test.dunit.VM.getVM;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.stream.IntStream;
+
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+import junitparams.naming.TestCaseName;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.apache.geode.cache.CacheWriterException;
+import org.apache.geode.cache.PartitionAttributesFactory;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionEvent;
+import org.apache.geode.cache.RegionFactory;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.cache.control.RebalanceFactory;
+import org.apache.geode.cache.control.RebalanceOperation;
+import org.apache.geode.cache.control.RebalanceResults;
+import org.apache.geode.cache.util.CacheWriterAdapter;
+import org.apache.geode.distributed.internal.DMStats;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.membership.api.MembershipManagerHelper;
+import org.apache.geode.test.awaitility.GeodeAwaitility;
+import org.apache.geode.test.dunit.AsyncInvocation;
+import org.apache.geode.test.dunit.DUnitBlackboard;
+import org.apache.geode.test.dunit.VM;
+import org.apache.geode.test.dunit.rules.CacheRule;
+import org.apache.geode.test.dunit.rules.DistributedDiskDirRule;
+import org.apache.geode.test.dunit.rules.DistributedRule;
+
+@RunWith(JUnitParamsRunner.class)
+public class PartitionedRegionClearWithRebalanceDUnitTest implements Serializable {
+  private static final long serialVersionUID = -7183993832801073933L;
+
+  private static final Integer BUCKETS = GLOBAL_MAX_BUCKETS_DEFAULT;
+  private static final String REGION_NAME = "testRegion";
+  private static final String COLOCATED_REGION = "childColocatedRegion";
+  private static final int ENTRIES = 10000;
+  private static final String DISK_STORE_SUFFIX = "DiskStore";
+  private static final String REBALANCE_HAS_BEGUN = "rebalance-begun";
+  private static final String CLEAR_HAS_BEGUN = "clear-begun";
+
+  @Rule
+  public DistributedRule distributedRule = new DistributedRule(4);
+
+  @Rule
+  public CacheRule cacheRule = CacheRule.builder().createCacheInAll().build();
+
+  @Rule
+  public DistributedDiskDirRule distributedDiskDirRule = new DistributedDiskDirRule();
+
+  private static transient DUnitBlackboard blackboard;
+
+  private VM accessor;
+  private VM server1;
+  private VM server2;
+  private VM server3;
+
+  private enum TestVM {
+    ACCESSOR(0), SERVER1(1), SERVER2(2), SERVER3(3);
+
+    final int vmNumber;
+
+    TestVM(int vmNumber) {
+      this.vmNumber = vmNumber;
+    }
+  }
+
+  @SuppressWarnings("unused")
+  static Object[] coordinatorVMsAndRegionTypes() {
+    return new Object[] {
+        // {ClearCoordinatorVM, regionShortcut}
+        new Object[] {TestVM.SERVER1, PARTITION_REDUNDANT},
+        new Object[] {TestVM.ACCESSOR, PARTITION_REDUNDANT},
+        new Object[] {TestVM.SERVER1, PARTITION_REDUNDANT_PERSISTENT},
+        new Object[] {TestVM.ACCESSOR, PARTITION_REDUNDANT_PERSISTENT}
+    };
+  }
+
+  @SuppressWarnings("unused")
+  static Object[] coordinatorVMsAndRegionTypesNoAccessor() {
+    return new Object[] {
+        // {ClearCoordinatorVM, regionShortcut}
+        new Object[] {TestVM.SERVER1, PARTITION_REDUNDANT},
+        new Object[] {TestVM.SERVER2, PARTITION_REDUNDANT},
+        new Object[] {TestVM.SERVER1, PARTITION_REDUNDANT_PERSISTENT},
+        new Object[] {TestVM.SERVER2, PARTITION_REDUNDANT_PERSISTENT}
+    };
+  }
+
+  @Before
+  public void setUp() throws Exception {
+    getBlackboard().initBlackboard();
+    server1 = getVM(TestVM.SERVER1.vmNumber);
+    server2 = getVM(TestVM.SERVER2.vmNumber);
+    server3 = getVM(TestVM.SERVER3.vmNumber);
+    accessor = getVM(TestVM.ACCESSOR.vmNumber);
+  }
+
+  private static DUnitBlackboard getBlackboard() {
+    if (blackboard == null) {
+      blackboard = new DUnitBlackboard();
+    }
+    return blackboard;
+  }
+
+  private RegionShortcut getRegionAccessorShortcut(RegionShortcut dataStoreRegionShortcut) {
+    if (dataStoreRegionShortcut.isPersistent()) {
+      switch (dataStoreRegionShortcut) {
+        case PARTITION_PERSISTENT:
+          return PARTITION;
+        case PARTITION_REDUNDANT_PERSISTENT:
+          return PARTITION_REDUNDANT;
+        default:
+          throw new IllegalArgumentException(
+              "Invalid RegionShortcut specified: " + dataStoreRegionShortcut);
+      }
+    }
+
+    return dataStoreRegionShortcut;
+  }
+
+  private void initAccessor(RegionShortcut regionShortcut, Collection<String> regionNames) {
+    RegionShortcut accessorShortcut = getRegionAccessorShortcut(regionShortcut);
+    // StartupRecoveryDelay is set to infinite to prevent automatic rebalancing when creating the
+    // region on other members
+    regionNames.forEach(regionName -> {
+      PartitionAttributesFactory<String, String> attributesFactory =
+          new PartitionAttributesFactory<String, String>()
+              .setTotalNumBuckets(BUCKETS)
+              .setStartupRecoveryDelay(-1)
+              .setLocalMaxMemory(0);
+
+      if (regionName.equals(COLOCATED_REGION)) {
+        attributesFactory.setColocatedWith(REGION_NAME);
+      }
+
+      cacheRule.getCache()
+          .<String, String>createRegionFactory(accessorShortcut)
+          .setPartitionAttributes(attributesFactory.create())
+          .create(regionName);
+    });
+  }
+
+  private void initDataStore(RegionShortcut regionShortcut, Collection<String> regionNames) {
+    // StartupRecoveryDelay is set to infinite to prevent automatic rebalancing when creating the
+    // region on other members
+    regionNames.forEach(regionName -> {
+      PartitionAttributesFactory<String, String> attributesFactory =
+          new PartitionAttributesFactory<String, String>()
+              .setTotalNumBuckets(BUCKETS)
+              .setStartupRecoveryDelay(-1);
+
+      if (regionName.equals(COLOCATED_REGION)) {
+        attributesFactory.setColocatedWith(REGION_NAME);
+      }
+
+      RegionFactory<String, String> factory = cacheRule.getCache()
+          .<String, String>createRegionFactory(regionShortcut)
+          .setPartitionAttributes(attributesFactory.create())
+          .setCacheWriter(new BlackboardSignaller());
+
+      // Set up the disk store if the region is persistent
+      if (regionShortcut.isPersistent()) {
+        factory.setDiskStoreName(cacheRule.getCache()
+            .createDiskStoreFactory()
+            .create(regionName + DISK_STORE_SUFFIX)
+            .getName());
+      }
+
+      factory.create(regionName);
+    });
+  }
+
+  private void parametrizedSetup(RegionShortcut regionShortcut, Collection<String> regionNames,
+      boolean useAccessor) {
+    // Create and populate the region on server1 first, to create an unbalanced distribution of data
+    server1.invoke(() -> {
+      initDataStore(regionShortcut, regionNames);
+      regionNames.forEach(regionName -> {
+        Region<String, String> region = cacheRule.getCache().getRegion(regionName);
+        IntStream.range(0, ENTRIES).forEach(i -> region.put("key" + i, "value" + i));
+      });
+    });
+    server2.invoke(() -> initDataStore(regionShortcut, regionNames));
+    if (useAccessor) {
+      accessor.invoke(() -> initAccessor(regionShortcut, regionNames));
+    } else {
+      server3.invoke(() -> initDataStore(regionShortcut, regionNames));
+    }
+  }
+
+  private void setBlackboardSignallerCacheWriter(String regionName) {
+    cacheRule.getCache().<String, String>getRegion(regionName).getAttributesMutator()
+        .setCacheWriter(new BlackboardSignaller());
+  }
+
+  private AsyncInvocation<?> startClearAsync(TestVM clearCoordinatorVM, String regionName,
+      boolean waitForRebalance) {
+    return getVM(clearCoordinatorVM.vmNumber).invokeAsync(() -> {
+      Region<String, String> region = cacheRule.getCache().getRegion(regionName);
+      if (waitForRebalance) {
+        // Wait for the signal from the blackboard before triggering the clear to start
+        getBlackboard().waitForGate(REBALANCE_HAS_BEGUN, GeodeAwaitility.getTimeout().toMillis(),
+            TimeUnit.MILLISECONDS);
+      }
+      region.clear();
+    });
+  }
+
+  // Trigger a rebalance and wait until it has started restoring redundancy before signalling the
+  // blackboard
+  private AsyncInvocation<?> startRebalanceAsyncAndSignalBlackboard(boolean waitForClear) {
+    return server1.invokeAsync(() -> {
+      RebalanceFactory rebalance =
+          cacheRule.getCache().getResourceManager().createRebalanceFactory();
+      if (waitForClear) {
+        // Wait for the signal from the blackboard before triggering the rebalance to start
+        getBlackboard().waitForGate(CLEAR_HAS_BEGUN, GeodeAwaitility.getTimeout().toMillis(),
+            TimeUnit.MILLISECONDS);
+      }
+      RebalanceOperation op = rebalance.start();
+      await().untilAsserted(() -> assertThat(cacheRule.getCache().getInternalResourceManager()
+          .getStats().getRebalanceBucketCreatesCompleted()).isGreaterThan(0));
+      getBlackboard().signalGate(REBALANCE_HAS_BEGUN);
+      op.getResults();
+    });
+  }
+
+  private void executeClearAndRebalanceAsyncInvocations(TestVM clearCoordinatorVM,
+      String regionToClear, boolean rebalanceFirst) throws InterruptedException {
+    getVM(clearCoordinatorVM.vmNumber)
+        .invoke(() -> setBlackboardSignallerCacheWriter(regionToClear));
+
+    AsyncInvocation<?> clearInvocation = startClearAsync(clearCoordinatorVM, regionToClear,
+        rebalanceFirst);
+
+    AsyncInvocation<?> rebalanceInvocation =
+        startRebalanceAsyncAndSignalBlackboard(!rebalanceFirst);
+
+    clearInvocation.await();
+    rebalanceInvocation.await();
+  }
+
+  private void prepareMemberToShutdownOnClear() throws TimeoutException, InterruptedException {
+    getBlackboard().waitForGate(CLEAR_HAS_BEGUN, GeodeAwaitility.getTimeout().toMillis(),
+        TimeUnit.MILLISECONDS);
+    InternalDistributedSystem.getConnectedInstance().stopReconnectingNoDisconnect();
+    MembershipManagerHelper.crashDistributedSystem(
+        InternalDistributedSystem.getConnectedInstance());
+    await().untilAsserted(
+        () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNull());
+  }
+
+  private void waitForSilenceOnRegion(String regionName) {
+    DMStats dmStats = cacheRule.getSystem().getDistributionManager().getStats();
+    PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(regionName);
+    PartitionedRegionStats partitionedRegionStats = region.getPrStats();
+    await().untilAsserted(() -> {
+      assertThat(dmStats.getReplyWaitsInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getVolunteeringInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getBucketCreatesInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getPrimaryTransfersInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getRebalanceBucketCreatesInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getRebalancePrimaryTransfersInProgress()).isEqualTo(0);
+    });
+  }
+
+  private void assertRegionIsEmpty(List<VM> vms, String regionName) {
+    vms.forEach(vm -> vm.invoke(() -> {
+      waitForSilenceOnRegion(regionName);
+      PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(regionName);
+
+      assertThat(region.getLocalSize()).as("Region local size should be 0 for region " + regionName)
+          .isEqualTo(0);
+    }));
+  }
+
+  private void assertRegionIsNotEmpty(List<VM> vms, String regionName) {
+    vms.forEach(vm -> vm.invoke(() -> {
+      waitForSilenceOnRegion(regionName);
+      PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(regionName);
+
+      assertThat(region.size()).as("Region size should be " + ENTRIES + " for region " + regionName)
+          .isEqualTo(ENTRIES);
+    }));
+  }
+
+  private void assertRebalanceDoesNoWork() {
+    server1.invoke(() -> {
+      RebalanceResults results =
+          cacheRule.getCache().getResourceManager().createRebalanceFactory().start().getResults();
+
+      assertThat(results.getTotalBucketTransfersCompleted())
+          .as("Expected bucket transfers to be zero").isEqualTo(0);
+      assertThat(results.getTotalBucketCreatesCompleted()).as("Expected bucket creates to be zero")
+          .isEqualTo(0);
+      assertThat(results.getTotalPrimaryTransfersCompleted())
+          .as("Expected primary transfers to be zero").isEqualTo(0);
+    });
+  }
+
+  @Test
+  @Parameters(method = "coordinatorVMsAndRegionTypes")
+  @TestCaseName("[{index}] {method}(ClearCoordinator:{0}, RegionType:{1})")
+  public void clearRegionStartedAfterRebalanceClearsRegion(TestVM clearCoordinatorVM,
+      RegionShortcut regionType) throws InterruptedException {
+    parametrizedSetup(regionType, Collections.singleton(REGION_NAME), true);
+
+    executeClearAndRebalanceAsyncInvocations(clearCoordinatorVM, REGION_NAME, true);
+
+    // Assert that the region is empty
+    assertRegionIsEmpty(asList(accessor, server1, server2), REGION_NAME);
+
+    // Assert that the region was successfully rebalanced (a second rebalance should do no work)
+    assertRebalanceDoesNoWork();
+  }
+
+  @Test
+  @Parameters(method = "coordinatorVMsAndRegionTypes")
+  @TestCaseName("[{index}] {method}(ClearCoordinator:{0}, RegionType:{1})")
+  public void clearRegionStartedBeforeRebalanceClearsRegion(TestVM clearCoordinatorVM,
+      RegionShortcut regionType) throws InterruptedException {
+    parametrizedSetup(regionType, Collections.singleton(REGION_NAME), true);
+
+    executeClearAndRebalanceAsyncInvocations(clearCoordinatorVM, REGION_NAME, false);
+
+    // Assert that the region is empty
+    assertRegionIsEmpty(asList(accessor, server1, server2), REGION_NAME);
+
+    // Assert that the region was successfully rebalanced (a second rebalance should do no work)
+    assertRebalanceDoesNoWork();
+  }
+
+  @Test
+  @Parameters(method = "coordinatorVMsAndRegionTypes")
+  @TestCaseName("[{index}] {method}(ClearCoordinator:{0}, RegionType:{1})")
+  public void clearParentColocatedRegionStartedAfterRebalanceOfColocatedRegionsClearsRegionAndDoesNotInterfereWithRebalance(
+      TestVM clearCoordinatorVM, RegionShortcut regionType)
+      throws InterruptedException {
+    parametrizedSetup(regionType, asList(REGION_NAME, COLOCATED_REGION), true);
+
+    executeClearAndRebalanceAsyncInvocations(clearCoordinatorVM, REGION_NAME, true);
+
+    // Assert that the parent region is empty
+    assertRegionIsEmpty(asList(accessor, server1, server2), REGION_NAME);
+
+    // Assert that the colocated region is the correct size
+    assertRegionIsNotEmpty(asList(accessor, server1, server2), COLOCATED_REGION);
+
+    // Assert that the regions were successfully rebalanced (a second rebalance should do no work)
+    assertRebalanceDoesNoWork();
+  }
+
+  @Test
+  @Parameters(method = "coordinatorVMsAndRegionTypes")
+  @TestCaseName("[{index}] {method}(ClearCoordinator:{0}, RegionType:{1})")
+  public void clearParentColocatedRegionStartedBeforeRebalanceOfColocatedRegionsClearsRegionAndDoesNotInterfereWithRebalance(
+      TestVM clearCoordinatorVM, RegionShortcut regionType)
+      throws InterruptedException {
+    parametrizedSetup(regionType, asList(REGION_NAME, COLOCATED_REGION), true);
+
+    executeClearAndRebalanceAsyncInvocations(clearCoordinatorVM, REGION_NAME, false);
+
+    // Assert that the parent region is empty
+    assertRegionIsEmpty(asList(accessor, server1, server2), REGION_NAME);
+
+    // Assert that the colocated region is the correct size
+    assertRegionIsNotEmpty(asList(accessor, server1, server2), COLOCATED_REGION);
+
+    // Assert that the regions were successfully rebalanced (a second rebalance should do no work)
+    assertRebalanceDoesNoWork();
+  }
+
+  @Test
+  @Parameters(method = "coordinatorVMsAndRegionTypes")
+  @TestCaseName("[{index}] {method}(ClearCoordinator:{0}, RegionType:{1})")
+  public void clearChildColocatedRegionStartedAfterRebalanceOfColocatedRegionsClearsRegionAndDoesNotInterfereWithRebalance(
+      TestVM clearCoordinatorVM, RegionShortcut regionType)
+      throws InterruptedException {
+    parametrizedSetup(regionType, asList(REGION_NAME, COLOCATED_REGION), true);
+
+    executeClearAndRebalanceAsyncInvocations(clearCoordinatorVM, COLOCATED_REGION, true);
+
+    // Assert that the colocated region is empty
+    assertRegionIsEmpty(asList(accessor, server1, server2), COLOCATED_REGION);
+
+    // Assert that the parent region is the correct size
+    assertRegionIsNotEmpty(asList(accessor, server1, server2), REGION_NAME);
+
+    // Assert that the regions were successfully rebalanced (a second rebalance should do no work)
+    assertRebalanceDoesNoWork();
+  }
+
+  @Test
+  @Parameters(method = "coordinatorVMsAndRegionTypes")
+  @TestCaseName("[{index}] {method}(ClearCoordinator:{0}, RegionType:{1})")
+  public void clearChildColocatedRegionStartedBeforeRebalanceOfColocatedRegionsClearsRegionAndDoesNotInterfereWithRebalance(
+      TestVM clearCoordinatorVM, RegionShortcut regionType)
+      throws InterruptedException {
+    parametrizedSetup(regionType, asList(REGION_NAME, COLOCATED_REGION), true);
+
+    executeClearAndRebalanceAsyncInvocations(clearCoordinatorVM, COLOCATED_REGION, false);
+
+    // Assert that the colocated region is empty
+    assertRegionIsEmpty(asList(accessor, server1, server2), COLOCATED_REGION);
+
+    // Assert that the parent region is the correct size
+    assertRegionIsNotEmpty(asList(accessor, server1, server2), REGION_NAME);
+
+    // Assert that the regions were successfully rebalanced (a second rebalance should do no work)
+    assertRebalanceDoesNoWork();
+  }
+
+  @Test
+  @Parameters(method = "coordinatorVMsAndRegionTypesNoAccessor")
+  @TestCaseName("[{index}] {method}(ClearCoordinator:{0}, RegionType:{1})")
+  public void clearStartedBeforeRebalanceClearsRegionWhenNonCoordinatorMemberIsKilled(
+      TestVM clearCoordinatorVM, RegionShortcut regionType)
+      throws InterruptedException {
+    parametrizedSetup(regionType, Collections.singleton(REGION_NAME), false);
+
+    getVM(clearCoordinatorVM.vmNumber).invoke(() -> setBlackboardSignallerCacheWriter(REGION_NAME));
+
+    // Make server3 shut down when it receives the signal from the blackboard that clear has started
+    AsyncInvocation<?> shutdownInvocation =
+        server3.invokeAsync(this::prepareMemberToShutdownOnClear);
+
+    executeClearAndRebalanceAsyncInvocations(clearCoordinatorVM, REGION_NAME, false);
+
+    shutdownInvocation.await();
+
+    // Assert that the region is empty
+    assertRegionIsEmpty(asList(server1, server2), REGION_NAME);
+  }
+
+  @Test
+  @Parameters(method = "coordinatorVMsAndRegionTypesNoAccessor")
+  @TestCaseName("[{index}] {method}(ClearCoordinator:{0}, RegionType:{1})")
+  public void clearStartedAfterRebalanceClearsRegionWhenNewMemberJoins(TestVM clearCoordinatorVM,
+      RegionShortcut regionType) throws InterruptedException {
+
+    // Load the data on server1 before creating the region on other servers, to create an imbalanced
+    // system
+    server1.invoke(() -> {
+      initDataStore(regionType, Collections.singleton(REGION_NAME));
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      IntStream.range(0, ENTRIES).forEach(i -> region.put("key" + i, "value" + i));
+    });
+    server2.invoke(() -> initDataStore(regionType, Collections.singleton(REGION_NAME)));
+
+    // Wait for rebalance to start, then create the region on server3
+    AsyncInvocation<?> createRegion = server3.invokeAsync(() -> {
+      cacheRule.createCache();
+
+      PartitionAttributesFactory<String, String> attributesFactory =
+          new PartitionAttributesFactory<String, String>()
+              .setTotalNumBuckets(BUCKETS)
+              .setStartupRecoveryDelay(-1);
+
+      RegionFactory<String, String> factory = cacheRule.getCache()
+          .<String, String>createRegionFactory(regionType)
+          .setPartitionAttributes(attributesFactory.create())
+          .setCacheWriter(new BlackboardSignaller());
+
+      if (regionType.isPersistent()) {
+        factory.setDiskStoreName(cacheRule.getCache()
+            .createDiskStoreFactory()
+            .create(REGION_NAME + DISK_STORE_SUFFIX)
+            .getName());
+      }
+
+      getBlackboard().waitForGate(REBALANCE_HAS_BEGUN, GeodeAwaitility.getTimeout().toMillis(),
+          TimeUnit.MILLISECONDS);
+
+      factory.create(REGION_NAME);
+    });
+
+    executeClearAndRebalanceAsyncInvocations(clearCoordinatorVM, REGION_NAME, true);
+
+    createRegion.await();
+
+    // Assert that the region is empty
+    assertRegionIsEmpty(asList(server1, server2, server3), REGION_NAME);
+  }
+
+
+  @Test
+  @Parameters(method = "coordinatorVMsAndRegionTypesNoAccessor")
+  @TestCaseName("[{index}] {method}(ClearCoordinator:{0}, RegionType:{1})")
+  public void clearStartedBeforeRebalanceClearsRegionWhenNewMemberJoins(TestVM clearCoordinatorVM,
+      RegionShortcut regionType) throws InterruptedException {
+
+    // Load the data on server1 before creating the region on other servers, to create an imbalanced
+    // system
+    server1.invoke(() -> {
+      initDataStore(regionType, Collections.singleton(REGION_NAME));
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      IntStream.range(0, ENTRIES).forEach(i -> region.put("key" + i, "value" + i));
+    });
+
+    server2.invoke(() -> initDataStore(regionType, Collections.singleton(REGION_NAME)));
+
+    // Wait for clear to start, then create the region on server3
+    AsyncInvocation<?> createRegion = server3.invokeAsync(() -> {
+      cacheRule.createCache();
+
+      PartitionAttributesFactory<String, String> attributesFactory =
+          new PartitionAttributesFactory<String, String>()
+              .setTotalNumBuckets(BUCKETS)
+              .setStartupRecoveryDelay(-1);
+
+      RegionFactory<String, String> factory = cacheRule.getCache()
+          .<String, String>createRegionFactory(regionType)
+          .setPartitionAttributes(attributesFactory.create())
+          .setCacheWriter(new BlackboardSignaller());
+
+      if (regionType.isPersistent()) {
+        factory.setDiskStoreName(cacheRule.getCache()
+            .createDiskStoreFactory()
+            .create(REGION_NAME + DISK_STORE_SUFFIX)
+            .getName());
+      }
+
+      getBlackboard().waitForGate(CLEAR_HAS_BEGUN, GeodeAwaitility.getTimeout().toMillis(),
+          TimeUnit.MILLISECONDS);
+
+      factory.create(REGION_NAME);
+    });
+
+    executeClearAndRebalanceAsyncInvocations(clearCoordinatorVM, REGION_NAME, false);
+
+    createRegion.await();
+
+    // Assert that the region is empty
+    assertRegionIsEmpty(asList(server1, server2, server3), REGION_NAME);
+  }
+
+  public static class BlackboardSignaller extends CacheWriterAdapter<String, String> {
+    @Override
+    public synchronized void beforeRegionClear(RegionEvent<String, String> event)
+        throws CacheWriterException {
+      getBlackboard().signalGate(CLEAR_HAS_BEGUN);
+    }
+  }
+}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionOverflowClearDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionOverflowClearDUnitTest.java
new file mode 100644
index 0000000..c10d1db
--- /dev/null
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionOverflowClearDUnitTest.java
@@ -0,0 +1,380 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache;
+
+import static org.apache.geode.distributed.ConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION;
+import static org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT;
+import static org.apache.geode.distributed.ConfigurationProperties.JMX_MANAGER;
+import static org.apache.geode.distributed.ConfigurationProperties.JMX_MANAGER_PORT;
+import static org.apache.geode.distributed.ConfigurationProperties.JMX_MANAGER_START;
+import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
+import static org.apache.geode.distributed.ConfigurationProperties.LOG_FILE;
+import static org.apache.geode.distributed.ConfigurationProperties.MAX_WAIT_TIME_RECONNECT;
+import static org.apache.geode.distributed.ConfigurationProperties.MEMBER_TIMEOUT;
+import static org.apache.geode.distributed.ConfigurationProperties.USE_CLUSTER_CONFIGURATION;
+import static org.apache.geode.internal.AvailablePortHelper.getRandomAvailableTCPPorts;
+import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
+import static org.apache.geode.test.dunit.VM.getVM;
+import static org.apache.geode.test.dunit.VM.getVMId;
+import static org.apache.geode.test.dunit.VM.toArray;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.File;
+import java.io.Serializable;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.stream.IntStream;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.geode.cache.DiskStoreFactory;
+import org.apache.geode.cache.EvictionAction;
+import org.apache.geode.cache.EvictionAttributes;
+import org.apache.geode.cache.PartitionAttributesFactory;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.cache.client.ClientCache;
+import org.apache.geode.cache.client.ClientCacheFactory;
+import org.apache.geode.cache.client.ClientRegionShortcut;
+import org.apache.geode.distributed.LocatorLauncher;
+import org.apache.geode.distributed.ServerLauncher;
+import org.apache.geode.distributed.internal.InternalLocator;
+import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
+import org.apache.geode.test.dunit.AsyncInvocation;
+import org.apache.geode.test.dunit.VM;
+import org.apache.geode.test.dunit.rules.DistributedRule;
+import org.apache.geode.test.junit.rules.GfshCommandRule;
+import org.apache.geode.test.junit.rules.serializable.SerializableTemporaryFolder;
+
+public class PartitionedRegionOverflowClearDUnitTest implements Serializable {
+
+  @Rule
+  public DistributedRule distributedRule = new DistributedRule(5);
+
+  @Rule
+  public SerializableTemporaryFolder temporaryFolder = new SerializableTemporaryFolder();
+
+  @Rule
+  public transient GfshCommandRule gfsh = new GfshCommandRule();
+
+  private VM locator;
+  private VM server1;
+  private VM server2;
+  private VM accessor;
+  private VM client;
+
+  private static final String LOCATOR_NAME = "locator";
+  private static final String SERVER1_NAME = "server1";
+  private static final String SERVER2_NAME = "server2";
+  private static final String SERVER3_NAME = "server3";
+
+  private File locatorDir;
+  private File server1Dir;
+  private File server2Dir;
+  private File server3Dir;
+
+  private String locatorString;
+
+  private int locatorPort;
+  private int locatorJmxPort;
+  private int locatorHttpPort;
+  private int serverPort1;
+  private int serverPort2;
+  private int serverPort3;
+
+  private static final AtomicReference<LocatorLauncher> LOCATOR_LAUNCHER = new AtomicReference<>();
+
+  private static final AtomicReference<ServerLauncher> SERVER_LAUNCHER = new AtomicReference<>();
+
+  private static final AtomicReference<ClientCache> CLIENT_CACHE = new AtomicReference<>();
+
+  private static final String OVERFLOW_REGION_NAME = "testOverflowRegion";
+
+  public static final int NUM_ENTRIES = 1000;
+
+  @Before
+  public void setup() throws Exception {
+    locator = getVM(0);
+    server1 = getVM(1);
+    server2 = getVM(2);
+    accessor = getVM(3);
+    client = getVM(4);
+
+    locatorDir = temporaryFolder.newFolder(LOCATOR_NAME);
+    server1Dir = temporaryFolder.newFolder(SERVER1_NAME);
+    server2Dir = temporaryFolder.newFolder(SERVER2_NAME);
+    server3Dir = temporaryFolder.newFolder(SERVER3_NAME);
+
+    int[] ports = getRandomAvailableTCPPorts(6);
+    locatorPort = ports[0];
+    locatorJmxPort = ports[1];
+    locatorHttpPort = ports[2];
+    serverPort1 = ports[3];
+    serverPort2 = ports[4];
+    serverPort3 = ports[5];
+
+    locator.invoke(
+        () -> startLocator(locatorDir, locatorPort, locatorJmxPort, locatorHttpPort));
+    gfsh.connectAndVerify(locatorJmxPort, GfshCommandRule.PortType.jmxManager);
+
+    locatorString = "localhost[" + locatorPort + "]";
+    server1.invoke(() -> startServer(SERVER1_NAME, server1Dir, locatorString, serverPort1));
+    server2.invoke(() -> startServer(SERVER2_NAME, server2Dir, locatorString, serverPort2));
+  }
+
+  @After
+  public void tearDown() {
+    destroyRegion();
+    destroyDiskStore(DiskStoreFactory.DEFAULT_DISK_STORE_NAME);
+
+    for (VM vm : new VM[] {client, accessor, server1, server2, locator}) {
+      vm.invoke(() -> {
+        if (CLIENT_CACHE.get() != null) {
+          CLIENT_CACHE.get().close();
+        }
+        if (LOCATOR_LAUNCHER.get() != null) {
+          LOCATOR_LAUNCHER.get().stop();
+        }
+        if (SERVER_LAUNCHER.get() != null) {
+          SERVER_LAUNCHER.get().stop();
+        }
+
+        CLIENT_CACHE.set(null);
+        LOCATOR_LAUNCHER.set(null);
+        SERVER_LAUNCHER.set(null);
+      });
+    }
+  }
+
+  @Test
+  public void testGfshClearRegionWithOverflow() throws InterruptedException {
+    createPartitionRedundantPersistentOverflowRegion();
+
+    populateRegion();
+    assertRegionSize(NUM_ENTRIES);
+
+    gfsh.executeAndAssertThat("clear region --name=" + OVERFLOW_REGION_NAME).statusIsSuccess();
+    assertRegionSize(0);
+
+    restartServers();
+
+    assertRegionSize(0);
+  }
+
+  @Test
+  public void testClientRegionClearWithOverflow() throws InterruptedException {
+    createPartitionRedundantPersistentOverflowRegion();
+
+    populateRegion();
+    assertRegionSize(NUM_ENTRIES);
+
+    client.invoke(() -> {
+      if (CLIENT_CACHE.get() == null) {
+        ClientCache clientCache =
+            new ClientCacheFactory().addPoolLocator("localhost", locatorPort).create();
+        CLIENT_CACHE.set(clientCache);
+      }
+
+      CLIENT_CACHE.get().getRegion(OVERFLOW_REGION_NAME).clear();
+    });
+    assertRegionSize(0);
+
+    restartServers();
+
+    assertRegionSize(0);
+  }
+
+  @Test
+  public void testAccessorRegionClearWithOverflow() throws InterruptedException {
+
+    for (VM vm : toArray(server1, server2)) {
+      vm.invoke(this::createRegionWithDefaultDiskStore);
+    }
+
+    accessor.invoke(() -> {
+      startServer(SERVER3_NAME, server3Dir, locatorString, serverPort3);
+      SERVER_LAUNCHER.get().getCache()
+          .createRegionFactory(RegionShortcut.PARTITION_REDUNDANT_OVERFLOW)
+          .setPartitionAttributes(
+              new PartitionAttributesFactory().setLocalMaxMemory(0).create())
+          .create(OVERFLOW_REGION_NAME);
+    });
+
+    populateRegion();
+    assertRegionSize(NUM_ENTRIES);
+
+    accessor.invoke(() -> {
+      assertThat(SERVER_LAUNCHER.get().getCache().getRegion(OVERFLOW_REGION_NAME).size())
+          .isEqualTo(NUM_ENTRIES);
+      SERVER_LAUNCHER.get().getCache().getRegion(OVERFLOW_REGION_NAME).clear();
+      assertThat(SERVER_LAUNCHER.get().getCache().getRegion(OVERFLOW_REGION_NAME).size())
+          .isEqualTo(0);
+    });
+    assertRegionSize(0);
+
+    for (VM vm : toArray(server1, server2)) {
+      vm.invoke(PartitionedRegionOverflowClearDUnitTest::stopServer);
+    }
+
+    gfsh.executeAndAssertThat("list members").statusIsSuccess();
+    assertThat(gfsh.getGfshOutput()).contains("locator");
+    AsyncInvocation asyncInvocation1 = server1.invokeAsync(() -> {
+      startServer(SERVER1_NAME, server1Dir, locatorString, serverPort1);
+      createRegionWithDefaultDiskStore();
+    });
+    AsyncInvocation asyncInvocation2 = server2.invokeAsync(() -> {
+      startServer(SERVER2_NAME, server2Dir, locatorString, serverPort2);
+      createRegionWithDefaultDiskStore();
+    });
+    asyncInvocation1.get();
+    asyncInvocation2.get();
+    assertRegionSize(0);
+  }
+
+  private void restartServers() throws InterruptedException {
+    for (VM vm : toArray(server1, server2)) {
+      vm.invoke(PartitionedRegionOverflowClearDUnitTest::stopServer);
+    }
+
+    gfsh.executeAndAssertThat("list members").statusIsSuccess();
+    assertThat(gfsh.getGfshOutput()).contains("locator");
+    AsyncInvocation asyncInvocation1 =
+        server1
+            .invokeAsync(() -> startServer(SERVER1_NAME, server1Dir, locatorString, serverPort1));
+    AsyncInvocation asyncInvocation2 =
+        server2
+            .invokeAsync(() -> startServer(SERVER2_NAME, server2Dir, locatorString, serverPort2));
+    asyncInvocation1.get();
+    asyncInvocation2.get();
+  }
+
+  private void createPartitionRedundantPersistentOverflowRegion() {
+    String command = new CommandStringBuilder("create region")
+        .addOption("name", OVERFLOW_REGION_NAME)
+        .addOption("type", "PARTITION_REDUNDANT_PERSISTENT_OVERFLOW")
+        .addOption("redundant-copies", "1")
+        .addOption("eviction-entry-count", "1")
+        .addOption("eviction-action", "overflow-to-disk")
+        .getCommandString();
+    gfsh.executeAndAssertThat(command).statusIsSuccess();
+  }
+
+  private void destroyRegion() {
+    server1.invoke(() -> {
+      assertThat(SERVER_LAUNCHER.get().getCache().getRegion(OVERFLOW_REGION_NAME)).isNotNull();
+      SERVER_LAUNCHER.get().getCache().getRegion(OVERFLOW_REGION_NAME).destroyRegion();
+
+    });
+  }
+
+  private void destroyDiskStore(String diskStoreName) {
+    String command = new CommandStringBuilder("destroy disk-store")
+        .addOption("name", diskStoreName)
+        .getCommandString();
+    gfsh.executeAndAssertThat(command).statusIsSuccess();
+  }
+
+  private void createRegionWithDefaultDiskStore() {
+    SERVER_LAUNCHER.get().getCache().createDiskStoreFactory()
+        .create(DiskStoreFactory.DEFAULT_DISK_STORE_NAME);
+    SERVER_LAUNCHER.get().getCache()
+        .createRegionFactory(RegionShortcut.PARTITION_REDUNDANT_PERSISTENT_OVERFLOW)
+        .setPartitionAttributes(
+            new PartitionAttributesFactory().setRedundantCopies(1).create())
+        .setDiskStoreName(DiskStoreFactory.DEFAULT_DISK_STORE_NAME)
+        .setEvictionAttributes(
+            EvictionAttributes.createLRUEntryAttributes(1, EvictionAction.OVERFLOW_TO_DISK))
+        .create(OVERFLOW_REGION_NAME);
+  }
+
+  private void populateRegion() {
+    client.invoke(() -> {
+      if (CLIENT_CACHE.get() == null) {
+        ClientCache clientCache =
+            new ClientCacheFactory().addPoolLocator("localhost", locatorPort).create();
+        CLIENT_CACHE.set(clientCache);
+      }
+
+      Region<Object, Object> clientRegion = CLIENT_CACHE.get()
+          .createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
+          .create(OVERFLOW_REGION_NAME);
+
+      IntStream.range(0, NUM_ENTRIES).forEach(i -> clientRegion.put("key-" + i, "value-" + i));
+    });
+  }
+
+  private void assertRegionSize(int size) {
+    server1.invoke(() -> {
+      assertThat(SERVER_LAUNCHER.get().getCache().getRegion(OVERFLOW_REGION_NAME)).isNotNull();
+      assertThat(SERVER_LAUNCHER.get().getCache().getRegion(OVERFLOW_REGION_NAME).size())
+          .isEqualTo(size);
+    });
+    server2.invoke(() -> {
+      assertThat(SERVER_LAUNCHER.get().getCache().getRegion(OVERFLOW_REGION_NAME)).isNotNull();
+      assertThat(SERVER_LAUNCHER.get().getCache().getRegion(OVERFLOW_REGION_NAME).size())
+          .isEqualTo(size);
+    });
+  }
+
+  private void startLocator(File directory, int port, int jmxPort, int httpPort) {
+    LOCATOR_LAUNCHER.set(new LocatorLauncher.Builder()
+        .setMemberName(LOCATOR_NAME)
+        .setPort(port)
+        .setWorkingDirectory(directory.getAbsolutePath())
+        .set(HTTP_SERVICE_PORT, httpPort + "")
+        .set(JMX_MANAGER, "true")
+        .set(JMX_MANAGER_PORT, String.valueOf(jmxPort))
+        .set(JMX_MANAGER_START, "true")
+        .set(LOG_FILE, new File(directory, LOCATOR_NAME + ".log").getAbsolutePath())
+        .set(MAX_WAIT_TIME_RECONNECT, "1000")
+        .set(MEMBER_TIMEOUT, "2000")
+        .set(ENABLE_CLUSTER_CONFIGURATION, "true")
+        .set(USE_CLUSTER_CONFIGURATION, "true")
+        .build());
+
+    LOCATOR_LAUNCHER.get().start();
+
+    await().untilAsserted(() -> {
+      InternalLocator locator = (InternalLocator) LOCATOR_LAUNCHER.get().getLocator();
+      assertThat(locator.isSharedConfigurationRunning())
+          .as("Locator shared configuration is running on locator" + getVMId())
+          .isTrue();
+    });
+  }
+
+  private void startServer(String name, File workingDirectory, String locator, int serverPort) {
+    SERVER_LAUNCHER.set(new ServerLauncher.Builder()
+        .setDeletePidFileOnStop(true)
+        .setMemberName(name)
+        .setWorkingDirectory(workingDirectory.getAbsolutePath())
+        .setServerPort(serverPort)
+        .set(HTTP_SERVICE_PORT, "0")
+        .set(LOCATORS, locator)
+        .set(LOG_FILE, new File(workingDirectory, name + ".log").getAbsolutePath())
+        .set(MAX_WAIT_TIME_RECONNECT, "1000")
+        .set(MEMBER_TIMEOUT, "2000")
+        .set(ENABLE_CLUSTER_CONFIGURATION, "true")
+        .set(USE_CLUSTER_CONFIGURATION, "true")
+        .build());
+
+    SERVER_LAUNCHER.get().start();
+  }
+
+  private static void stopServer() {
+    SERVER_LAUNCHER.get().stop();
+  }
+}
diff --git a/geode-junit/src/main/java/org/apache/geode/cache/query/data/City.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionPersistentClearDUnitTest.java
similarity index 51%
copy from geode-junit/src/main/java/org/apache/geode/cache/query/data/City.java
copy to geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionPersistentClearDUnitTest.java
index 1bae60e..c758446 100644
--- a/geode-junit/src/main/java/org/apache/geode/cache/query/data/City.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionPersistentClearDUnitTest.java
@@ -12,41 +12,15 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
+package org.apache.geode.internal.cache;
 
-/*
- * City.java
- *
- * Created on September 30, 2005, 6:20 PM
- */
-
-package org.apache.geode.cache.query.data;
 
-import java.io.Serializable;
 
-public class City implements Serializable {
-  public String name;
-  public int zip;
+import org.apache.geode.cache.RegionShortcut;
 
-  /** Creates a new instance of City */
-  public City(String name, int zip) {
-    this.name = name;
-    this.zip = zip;
-  }// end of constructor 1
-
-  public City(int i) {
-    String[] arr1 = {"MUMBAI", "PUNE", "GANDHINAGAR", "CHANDIGARH"};
-    /* this is for the test to have 50% of the objects belonging to one city */
-    name = arr1[i % 2];
-    zip = 425125 + i;
-  }// end of constructor 2
-
-  ////////////////////////////
-
-  public String getName() {
-    return name;
-  }
+public class PartitionedRegionPersistentClearDUnitTest extends PartitionedRegionClearDUnitTest {
 
-  public int getZip() {
-    return zip;
+  protected RegionShortcut getRegionShortCut() {
+    return RegionShortcut.PARTITION_REDUNDANT_PERSISTENT;
   }
-}// end of class
+}
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PersistentPartitionedRegionClearWithExpirationDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PersistentPartitionedRegionClearWithExpirationDUnitTest.java
new file mode 100644
index 0000000..f6f25bd
--- /dev/null
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PersistentPartitionedRegionClearWithExpirationDUnitTest.java
@@ -0,0 +1,530 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache;
+
+import static org.apache.geode.cache.ExpirationAction.DESTROY;
+import static org.apache.geode.cache.RegionShortcut.PARTITION;
+import static org.apache.geode.cache.RegionShortcut.PARTITION_OVERFLOW;
+import static org.apache.geode.cache.RegionShortcut.PARTITION_PERSISTENT;
+import static org.apache.geode.cache.RegionShortcut.PARTITION_PERSISTENT_OVERFLOW;
+import static org.apache.geode.cache.RegionShortcut.PARTITION_REDUNDANT;
+import static org.apache.geode.cache.RegionShortcut.PARTITION_REDUNDANT_OVERFLOW;
+import static org.apache.geode.cache.RegionShortcut.PARTITION_REDUNDANT_PERSISTENT;
+import static org.apache.geode.cache.RegionShortcut.PARTITION_REDUNDANT_PERSISTENT_OVERFLOW;
+import static org.apache.geode.internal.util.ArrayUtils.asList;
+import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
+import static org.apache.geode.test.dunit.VM.getVM;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.IntStream;
+
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+import junitparams.naming.TestCaseName;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.apache.geode.ForcedDisconnectException;
+import org.apache.geode.cache.Cache;
+import org.apache.geode.cache.CacheWriter;
+import org.apache.geode.cache.CacheWriterException;
+import org.apache.geode.cache.ExpirationAttributes;
+import org.apache.geode.cache.PartitionAttributes;
+import org.apache.geode.cache.PartitionAttributesFactory;
+import org.apache.geode.cache.PartitionedRegionPartialClearException;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionEvent;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.cache.partition.PartitionRegionHelper;
+import org.apache.geode.cache.util.CacheWriterAdapter;
+import org.apache.geode.distributed.DistributedSystemDisconnectedException;
+import org.apache.geode.distributed.internal.DMStats;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.membership.api.MembershipManagerHelper;
+import org.apache.geode.test.awaitility.GeodeAwaitility;
+import org.apache.geode.test.dunit.VM;
+import org.apache.geode.test.dunit.rules.CacheRule;
+import org.apache.geode.test.dunit.rules.DistributedDiskDirRule;
+import org.apache.geode.test.dunit.rules.DistributedRule;
+
+/**
+ * Tests to verify that {@link PartitionedRegion#clear()} cancels all remaining expiration tasks
+ * on the {@link PartitionedRegion} once the operation is executed.
+ */
+@RunWith(JUnitParamsRunner.class)
+public class PersistentPartitionedRegionClearWithExpirationDUnitTest implements Serializable {
+  private static final Integer BUCKETS = 13;
+  private static final Integer EXPIRATION_TIME = 5 * 60;
+  private static final Integer SMALL_EXPIRATION_TIME = 10;
+  private static final String REGION_NAME = "PartitionedRegion";
+
+  @Rule
+  public DistributedRule distributedRule = new DistributedRule(3);
+
+  @Rule
+  public CacheRule cacheRule = CacheRule.builder().createCacheInAll().build();
+
+  @Rule
+  public DistributedDiskDirRule distributedDiskDirRule = new DistributedDiskDirRule();
+
+  private VM accessor, server1, server2;
+
+  private enum TestVM {
+    ACCESSOR(0), SERVER1(1), SERVER2(2);
+
+    final int vmNumber;
+
+    TestVM(int vmNumber) {
+      this.vmNumber = vmNumber;
+    }
+  }
+
+  @SuppressWarnings("unused")
+  static RegionShortcut[] regionTypes() {
+    return new RegionShortcut[] {
+        PARTITION_PERSISTENT,
+        PARTITION_PERSISTENT_OVERFLOW,
+        PARTITION_REDUNDANT_PERSISTENT,
+        PARTITION_REDUNDANT_PERSISTENT_OVERFLOW
+    };
+  }
+
+  @SuppressWarnings("unused")
+  static Object[] vmsAndRegionTypes() {
+    ArrayList<Object[]> parameters = new ArrayList<>();
+    RegionShortcut[] regionShortcuts = regionTypes();
+
+    Arrays.stream(regionShortcuts).forEach(regionShortcut -> {
+      parameters.add(new Object[] {TestVM.SERVER1, regionShortcut});
+      parameters.add(new Object[] {TestVM.ACCESSOR, regionShortcut});
+    });
+
+    return parameters.toArray();
+  }
+
+  @Before
+  public void setUp() throws Exception {
+    server1 = getVM(TestVM.SERVER1.vmNumber);
+    server2 = getVM(TestVM.SERVER2.vmNumber);
+    accessor = getVM(TestVM.ACCESSOR.vmNumber);
+  }
+
+  private RegionShortcut getRegionAccessorShortcut(RegionShortcut dataStoreRegionShortcut) {
+    if (dataStoreRegionShortcut.isPersistent()) {
+      switch (dataStoreRegionShortcut) {
+        case PARTITION_PERSISTENT:
+          return PARTITION;
+        case PARTITION_PERSISTENT_OVERFLOW:
+          return PARTITION_OVERFLOW;
+        case PARTITION_REDUNDANT_PERSISTENT:
+          return PARTITION_REDUNDANT;
+        case PARTITION_REDUNDANT_PERSISTENT_OVERFLOW:
+          return PARTITION_REDUNDANT_OVERFLOW;
+      }
+    }
+
+    return dataStoreRegionShortcut;
+  }
+
+  private void initAccessor(RegionShortcut regionShortcut,
+      ExpirationAttributes expirationAttributes) {
+    RegionShortcut accessorShortcut = getRegionAccessorShortcut(regionShortcut);
+    PartitionAttributes<String, String> attributes =
+        new PartitionAttributesFactory<String, String>()
+            .setTotalNumBuckets(BUCKETS)
+            .setLocalMaxMemory(0)
+            .create();
+
+    cacheRule.getCache()
+        .<String, String>createRegionFactory(accessorShortcut)
+        .setPartitionAttributes(attributes)
+        .setEntryTimeToLive(expirationAttributes)
+        .setEntryIdleTimeout(expirationAttributes)
+        .create(REGION_NAME);
+  }
+
+  private void initDataStore(RegionShortcut regionShortcut,
+      ExpirationAttributes expirationAttributes) {
+    PartitionAttributes<String, String> attributes =
+        new PartitionAttributesFactory<String, String>()
+            .setTotalNumBuckets(BUCKETS)
+            .create();
+
+    cacheRule.getCache()
+        .<String, String>createRegionFactory(regionShortcut)
+        .setPartitionAttributes(attributes)
+        .setEntryTimeToLive(expirationAttributes)
+        .setEntryIdleTimeout(expirationAttributes)
+        .create(REGION_NAME);
+
+    ExpiryTask.expiryTaskListener = new ExpirationListener();
+  }
+
+  private void parametrizedSetup(RegionShortcut regionShortcut,
+      ExpirationAttributes expirationAttributes) {
+    server1.invoke(() -> initDataStore(regionShortcut, expirationAttributes));
+    server2.invoke(() -> initDataStore(regionShortcut, expirationAttributes));
+    accessor.invoke(() -> initAccessor(regionShortcut, expirationAttributes));
+  }
+
+  private void waitForSilence() {
+    DMStats dmStats = cacheRule.getSystem().getDistributionManager().getStats();
+    PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
+    PartitionedRegionStats partitionedRegionStats = region.getPrStats();
+
+    await().untilAsserted(() -> {
+      assertThat(dmStats.getReplyWaitsInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getVolunteeringInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getBucketCreatesInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getPrimaryTransfersInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getRebalanceBucketCreatesInProgress()).isEqualTo(0);
+      assertThat(partitionedRegionStats.getRebalancePrimaryTransfersInProgress()).isEqualTo(0);
+    });
+  }
+
+  /**
+   * Populates the region and verifies the data on the selected VMs.
+   */
+  private void populateRegion(VM feeder, int entryCount, List<VM> vms) {
+    feeder.invoke(() -> {
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      IntStream.range(0, entryCount).forEach(i -> region.put(String.valueOf(i), "Value_" + i));
+    });
+
+    vms.forEach(vm -> vm.invoke(() -> {
+      waitForSilence();
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+
+      IntStream.range(0, entryCount)
+          .forEach(i -> assertThat(region.get(String.valueOf(i))).isEqualTo("Value_" + i));
+    }));
+  }
+
+  /**
+   * Asserts that the region is empty on requested VMs.
+   */
+  private void assertRegionIsEmpty(List<VM> vms) {
+    vms.forEach(vm -> vm.invoke(() -> {
+      waitForSilence();
+      PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
+
+      assertThat(region.getLocalSize()).isEqualTo(0);
+    }));
+  }
+
+  /**
+   * Asserts that the region data is consistent across buckets.
+   */
+  private void assertRegionBucketsConsistency() throws ForceReattemptException {
+    waitForSilence();
+    List<BucketDump> bucketDumps;
+    PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
+    // Redundant copies + 1 primary.
+    int expectedCopies = region.getRedundantCopies() + 1;
+
+    for (int bucketId = 0; bucketId < BUCKETS; bucketId++) {
+      bucketDumps = region.getAllBucketEntries(bucketId);
+      assertThat(bucketDumps.size()).as("Bucket " + bucketId + " should have " + expectedCopies
+          + " copies, but has " + bucketDumps.size()).isEqualTo(expectedCopies);
+
+      // Check that all copies of the bucket have the same data.
+      if (bucketDumps.size() > 1) {
+        BucketDump firstDump = bucketDumps.get(0);
+
+        for (int j = 1; j < bucketDumps.size(); j++) {
+          BucketDump otherDump = bucketDumps.get(j);
+          assertThat(otherDump.getValues())
+              .as("Values for bucket " + bucketId + " on member " + otherDump.getMember()
+                  + " are not consistent with member " + firstDump.getMember())
+              .isEqualTo(firstDump.getValues());
+          assertThat(otherDump.getVersions())
+              .as("Versions for bucket " + bucketId + " on member " + otherDump.getMember()
+                  + " are not consistent with member " + firstDump.getMember())
+              .isEqualTo(firstDump.getVersions());
+        }
+      }
+    }
+  }
+
+  /**
+   * Register the MemberKiller CacheWriter on the given vms.
+   */
+  private void registerVMKillerAsCacheWriter(List<VM> vmsToBounce) {
+    vmsToBounce.forEach(vm -> vm.invoke(() -> {
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      region.getAttributesMutator().setCacheWriter(new MemberKiller());
+    }));
+  }
+
+  private void doClear() {
+    Cache cache = cacheRule.getCache();
+    boolean retry;
+    do {
+      retry = false;
+      try {
+        cache.getRegion(REGION_NAME).clear();
+      } catch (PartitionedRegionPartialClearException | CacheWriterException ex) {
+        retry = true;
+      }
+    } while (retry);
+  }
+
+  /**
+   * The test does the following (clear coordinator and region type are parametrized):
+   * - Populates the Partition Region (entries have expiration).
+   * - Verifies that the entries are synchronized on all members.
+   * - Clears the Partition Region once.
+   * - Asserts that, after the clear is finished:
+   * . No expiration tasks were executed.
+   * . All expiration tasks were cancelled.
+   * . Map of expiry tasks per bucket is empty.
+   * . The Partition Region is empty on all members.
+   */
+  @Test
+  @Parameters(method = "vmsAndRegionTypes")
+  @TestCaseName("[{index}] {method}(Coordinator:{0}, RegionType:{1})")
+  public void clearShouldRemoveRegisteredExpirationTasks(TestVM coordinatorVM,
+      RegionShortcut regionShortcut) {
+    final int entries = 500;
+    int expirationTime = (int) GeodeAwaitility.getTimeout().getSeconds();
+    parametrizedSetup(regionShortcut, new ExpirationAttributes(expirationTime, DESTROY));
+    populateRegion(accessor, entries, asList(accessor, server1, server2));
+
+    // Clear the region.
+    getVM(coordinatorVM.vmNumber).invoke(() -> doClear());
+
+    // Assert all expiration tasks were cancelled and none were executed.
+    asList(server1, server2).forEach(vm -> vm.invoke(() -> {
+      ExpirationListener listener = (ExpirationListener) EntryExpiryTask.expiryTaskListener;
+      assertThat(listener.tasksRan.get()).isEqualTo(0);
+      assertThat(listener.tasksCanceled.get()).isEqualTo(listener.tasksScheduled.get());
+
+      PartitionedRegionDataStore dataStore =
+          ((PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME)).getDataStore();
+      Set<BucketRegion> bucketRegions = dataStore.getAllLocalBucketRegions();
+      bucketRegions
+          .forEach(bucketRegion -> assertThat(bucketRegion.entryExpiryTasks.isEmpty()).isTrue());
+    }));
+
+    // Assert Region Buckets are consistent and region is empty,
+    accessor.invoke(this::assertRegionBucketsConsistency);
+    assertRegionIsEmpty(asList(accessor, server1, server2));
+  }
+
+  /**
+   * The test does the following (region type is parametrized):
+   * - Populates the Partition Region (entries have expiration).
+   * - Verifies that the entries are synchronized on all members.
+   * - Sets the {@link MemberKiller} as a {@link CacheWriter} to stop the coordinator VM while the
+   * clear is in progress.
+   * - Clears the Partition Region (at this point the coordinator is restarted).
+   * - Asserts that, after the clear is finished and the expiration time is reached:
+   * . No expiration tasks were cancelled.
+   * . All entries were removed due to the expiration.
+   * . The Partition Region Buckets are consistent on all members.
+   */
+  @Test
+  @Parameters(method = "regionTypes")
+  @TestCaseName("[{index}] {method}(RegionType:{0})")
+  public void clearShouldFailWhenCoordinatorMemberIsBouncedAndExpirationTasksShouldSurvive(
+      RegionShortcut regionShortcut) {
+    final int entries = 1000;
+    ExpirationAttributes expirationAttributes =
+        new ExpirationAttributes(SMALL_EXPIRATION_TIME, DESTROY);
+    parametrizedSetup(regionShortcut, expirationAttributes);
+    populateRegion(accessor, entries, asList(accessor, server1, server2));
+    registerVMKillerAsCacheWriter(Collections.singletonList(server1));
+
+    // Clear the region (it should fail).
+    server1.invoke(() -> {
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      assertThatThrownBy(region::clear)
+          .isInstanceOf(DistributedSystemDisconnectedException.class)
+          .hasCauseInstanceOf(ForcedDisconnectException.class);
+    });
+
+    // Wait for member to get back online and assign all buckets.
+    server1.invoke(() -> {
+      cacheRule.createCache();
+      initDataStore(regionShortcut, expirationAttributes);
+      await().untilAsserted(
+          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
+      PartitionRegionHelper.assignBucketsToPartitions(cacheRule.getCache().getRegion(REGION_NAME));
+    });
+
+    // Wait until all expiration tasks are executed.
+    asList(server1, server2).forEach(vm -> vm.invoke(() -> {
+      PartitionedRegionDataStore dataStore =
+          ((PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME)).getDataStore();
+      Set<BucketRegion> bucketRegions = dataStore.getAllLocalBucketRegions();
+      bucketRegions.forEach(bucketRegion -> await()
+          .untilAsserted(() -> assertThat(bucketRegion.entryExpiryTasks.isEmpty()).isTrue()));
+    }));
+
+    // At this point the entries should be either invalidated or destroyed (expiration tasks ran).
+    asList(accessor, server1, server2).forEach(vm -> vm.invoke(() -> {
+      Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
+      IntStream.range(0, entries).forEach(i -> {
+        String key = String.valueOf(i);
+        assertThat(region.get(key)).isNull();
+      });
+    }));
+
+    // Assert Region Buckets are consistent.
+    accessor.invoke(this::assertRegionBucketsConsistency);
+  }
+
+  /**
+   * The test does the following (clear coordinator and region type are parametrized):
+   * - Populates the Partition Region (entries have expiration).
+   * - Verifies that the entries are synchronized on all members.
+   * - Sets the {@link MemberKiller} as a {@link CacheWriter} to stop a non-coordinator VM while the
+   * clear is in progress (the member has primary buckets, though, so participates on
+   * the clear operation).
+   * - Clears the Partition Region (at this point the non-coordinator is restarted).
+   * - Asserts that, after the clear is finished:
+   * . No expiration tasks were executed on the non-restarted members.
+   * . All expiration tasks were cancelled on the non-restarted members.
+   * . Map of expiry tasks per bucket is empty on the non-restarted members.
+   * . All expiration tasks were executed and all expired on the restarted members.
+   * . The Partition Region is empty and buckets are consistent across all members.
+   */
+  @Test
+  @Parameters(method = "vmsAndRegionTypes")
+  @TestCaseName("[{index}] {method}(Coordinator:{0}, RegionType:{1})")
+  public void clearShouldSucceedAndRemoveRegisteredExpirationTasksWhenNonCoordinatorMemberIsBounced(
+      TestVM coordinatorVM, RegionShortcut regionShortcut) throws Exception {
+    final int entries = 500;
+    // To avoid partition offline exception without redundancy.
+
+    if (regionShortcut == PARTITION_PERSISTENT) {
+      regionShortcut = PARTITION_REDUNDANT_PERSISTENT;
+    } else if (regionShortcut == PARTITION_PERSISTENT_OVERFLOW) {
+      regionShortcut = PARTITION_REDUNDANT_PERSISTENT_OVERFLOW;
+    }
+
+    final RegionShortcut rs = regionShortcut;
+    ExpirationAttributes expirationAttributes = new ExpirationAttributes(EXPIRATION_TIME, DESTROY);
+    parametrizedSetup(regionShortcut, expirationAttributes);
+    registerVMKillerAsCacheWriter(Collections.singletonList(server2));
+    populateRegion(accessor, entries, asList(accessor, server1, server2));
+
+    // Clear the region.
+    getVM(coordinatorVM.vmNumber).invoke(() -> doClear());
+
+    // Wait for member to get back online and assign buckets.
+    server2.invoke(() -> {
+      cacheRule.createCache();
+      initDataStore(rs, expirationAttributes);
+      await().untilAsserted(
+          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNotNull());
+      PartitionRegionHelper.assignBucketsToPartitions(cacheRule.getCache().getRegion(REGION_NAME));
+    });
+
+    // Assert all expiration tasks were cancelled and none were executed (surviving members).
+    server1.invoke(() -> {
+      PartitionedRegionDataStore dataStore =
+          ((PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME)).getDataStore();
+      Set<BucketRegion> bucketRegions = dataStore.getAllLocalBucketRegions();
+      bucketRegions
+          .forEach(bucketRegion -> assertThat(bucketRegion.entryExpiryTasks.isEmpty()).isTrue());
+
+      ExpirationListener listener = (ExpirationListener) EntryExpiryTask.expiryTaskListener;
+      assertThat(listener.tasksRan.get()).isEqualTo(0);
+      assertThat(listener.tasksCanceled.get()).isEqualTo(listener.tasksScheduled.get());
+    });
+
+    // Assert all expiration tasks were expired as the region is empty (restarted member).
+    server2.invoke(() -> {
+      PartitionedRegionDataStore dataStore =
+          ((PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME)).getDataStore();
+      Set<BucketRegion> bucketRegions = dataStore.getAllLocalBucketRegions();
+
+      // During restart, the member loads the region from disk and automatically registers
+      // expiration tasks for each entry. After GII, however, the region is empty due to the
+      // clear operation and the tasks will just expire as there are no entries.
+      bucketRegions.forEach(bucketRegion -> await()
+          .untilAsserted(() -> assertThat(bucketRegion.entryExpiryTasks.isEmpty()).isTrue()));
+
+      ExpirationListener listener = (ExpirationListener) EntryExpiryTask.expiryTaskListener;
+      assertThat(listener.tasksExpired.get()).isEqualTo(listener.tasksRan.get());
+    });
+
+    // Assert Region Buckets are consistent and region is empty,
+    // accessor.invoke(this::assertRegionBucketsConsistency);
+    assertRegionIsEmpty(asList(accessor, server1, server2));
+  }
+
+  /**
+   * Tracks expiration tasks lifecycle.
+   */
+  public static class ExpirationListener implements ExpiryTask.ExpiryTaskListener {
+    final AtomicInteger tasksRan = new AtomicInteger(0);
+    final AtomicInteger tasksExpired = new AtomicInteger(0);
+    final AtomicInteger tasksCanceled = new AtomicInteger(0);
+    final AtomicInteger tasksScheduled = new AtomicInteger(0);
+
+    @Override
+    public void afterSchedule(ExpiryTask et) {
+      tasksScheduled.incrementAndGet();
+    }
+
+    @Override
+    public void afterTaskRan(ExpiryTask et) {
+      tasksRan.incrementAndGet();
+    }
+
+    @Override
+    public void afterReschedule(ExpiryTask et) {}
+
+    @Override
+    public void afterExpire(ExpiryTask et) {
+      tasksExpired.incrementAndGet();
+    }
+
+    @Override
+    public void afterCancel(ExpiryTask et) {
+      tasksCanceled.incrementAndGet();
+    }
+  }
+
+  /**
+   * Shutdowns a member while the clear operation is in progress.
+   * The writer is only installed on the member the test wants to shutdown, doesn't matter whether
+   * it's the clear coordinator or another member holding primary buckets.
+   */
+  public static class MemberKiller extends CacheWriterAdapter<String, String> {
+
+    @Override
+    public synchronized void beforeRegionClear(RegionEvent<String, String> event)
+        throws CacheWriterException {
+      InternalDistributedSystem.getConnectedInstance().stopReconnectingNoDisconnect();
+      MembershipManagerHelper.crashDistributedSystem(
+          InternalDistributedSystem.getConnectedInstance());
+      await().untilAsserted(
+          () -> assertThat(InternalDistributedSystem.getConnectedInstance()).isNull());
+    }
+  }
+}
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRClearIntegrationTest.java b/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRClearIntegrationTest.java
new file mode 100644
index 0000000..894db1b
--- /dev/null
+++ b/geode-core/src/integrationTest/java/org/apache/geode/cache/query/partitioned/PRClearIntegrationTest.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package org.apache.geode.cache.query.partitioned;
+
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.IntStream;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.geode.cache.EntryNotFoundException;
+import org.apache.geode.cache.Region;
+import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.test.junit.rules.ExecutorServiceRule;
+import org.apache.geode.test.junit.rules.ServerStarterRule;
+
+public class PRClearIntegrationTest {
+
+  @Rule
+  public ServerStarterRule server = new ServerStarterRule().withAutoStart();
+
+  @Rule
+  public ExecutorServiceRule executor = new ExecutorServiceRule();
+
+  @Test
+  public void doesNotHangWhenClearWithConcurrentPutsAndInvalidates() throws Exception {
+    InternalCache cache = server.getCache();
+    Region<Object, Object> region = server.createPartitionRegion("regionA", f -> {
+    }, f -> f.setTotalNumBuckets(1));
+    cache.getQueryService().createIndex("indexA", "r", "/regionA r");
+    region.put(0, "value0");
+
+    CompletableFuture<Void> put = executor.runAsync(() -> {
+      Thread.currentThread().setName("put-Thread");
+      IntStream.range(0, 10).forEach(i -> region.put(i, "value" + i));
+    });
+
+    CompletableFuture<Void> invalidate = executor.runAsync(() -> {
+      Thread.currentThread().setName("invalidate-Thread");
+      IntStream.range(0, 10).forEach(i -> {
+        try {
+          region.invalidate(i);
+        } catch (EntryNotFoundException e) {
+          // ignore
+        }
+      });
+    });
+
+    CompletableFuture<Void> clear = executor.runAsync(() -> {
+      Thread.currentThread().setName("Clear-Thread");
+      IntStream.range(0, 10).forEach(i -> region.clear());
+    });
+
+    put.get(5, TimeUnit.SECONDS);
+    invalidate.get(5, TimeUnit.SECONDS);
+    clear.get(5, TimeUnit.SECONDS);
+  }
+}
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionIntegrationTest.java b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionIntegrationTest.java
index 818a855..933bc39 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionIntegrationTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionIntegrationTest.java
@@ -16,15 +16,24 @@
 package org.apache.geode.internal.cache;
 
 import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
 
+import java.util.List;
 import java.util.concurrent.ScheduledExecutorService;
 
 import org.junit.Rule;
 import org.junit.Test;
 
+import org.apache.geode.cache.CacheEvent;
 import org.apache.geode.cache.EvictionAction;
 import org.apache.geode.cache.EvictionAttributes;
+import org.apache.geode.cache.Operation;
+import org.apache.geode.cache.Region;
 import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.cache30.TestCacheListener;
 import org.apache.geode.test.junit.rules.ServerStarterRule;
 
 public class PartitionedRegionIntegrationTest {
@@ -55,4 +64,40 @@ public class PartitionedRegionIntegrationTest {
     ScheduledExecutorService bucketSorter = region.getBucketSorter();
     assertThat(bucketSorter).isNull();
   }
+
+  @Test
+  public void prClearWithDataInvokesCacheListenerAfterClear() {
+    TestCacheListener prCacheListener = new TestCacheListener() {};
+    TestCacheListener spyPRCacheListener = spy(prCacheListener);
+
+    Region region = server.createPartitionRegion("PR1",
+        f -> f.addCacheListener(spyPRCacheListener), f -> f.setTotalNumBuckets(2));
+    region.put("key1", "value2");
+    region.put("key2", "value2");
+    spyPRCacheListener.enableEventHistory();
+
+    region.clear();
+
+    verify(spyPRCacheListener, times(1)).afterRegionClear(any());
+    List cacheEvents = spyPRCacheListener.getEventHistory();
+    assertThat(cacheEvents.size()).isEqualTo(1);
+    assertThat(((CacheEvent) cacheEvents.get(0)).getOperation()).isEqualTo(Operation.REGION_CLEAR);
+  }
+
+  @Test
+  public void prClearWithoutDataInvokesCacheListenerAfterClear() {
+    TestCacheListener prCacheListener = new TestCacheListener() {};
+    TestCacheListener spyPRCacheListener = spy(prCacheListener);
+
+    Region region = server.createPartitionRegion("PR1",
+        f -> f.addCacheListener(spyPRCacheListener), f -> f.setTotalNumBuckets(2));
+    spyPRCacheListener.enableEventHistory();
+
+    region.clear();
+
+    verify(spyPRCacheListener, times(1)).afterRegionClear(any());
+    List cacheEvents = spyPRCacheListener.getEventHistory();
+    assertThat(cacheEvents.size()).isEqualTo(1);
+    assertThat(((CacheEvent) cacheEvents.get(0)).getOperation()).isEqualTo(Operation.REGION_CLEAR);
+  }
 }
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionSingleNodeOperationsJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionSingleNodeOperationsJUnitTest.java
index 151c544..67b969f 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionSingleNodeOperationsJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionSingleNodeOperationsJUnitTest.java
@@ -25,7 +25,6 @@ import static org.junit.Assert.fail;
 
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 import java.util.Set;
@@ -1300,71 +1299,6 @@ public class PartitionedRegionSingleNodeOperationsJUnitTest {
     }
   }
 
-  @Test
-  public void test023UnsupportedOps() throws Exception {
-    Region pr = null;
-    try {
-      pr = PartitionedRegionTestHelper.createPartitionedRegion("testUnsupportedOps",
-          String.valueOf(200), 0);
-
-      pr.put(1, "one");
-      pr.put(2, "two");
-      pr.put(3, "three");
-      pr.getEntry("key");
-
-      try {
-        pr.clear();
-        fail(
-            "PartitionedRegionSingleNodeOperationTest:testUnSupportedOps() operation failed on a blank PartitionedRegion");
-      } catch (UnsupportedOperationException ignored) {
-      }
-
-      // try {
-      // pr.entries(true);
-      // fail();
-      // }
-      // catch (UnsupportedOperationException expected) {
-      // }
-
-      // try {
-      // pr.entrySet(true);
-      // fail();
-      // }
-      // catch (UnsupportedOperationException expected) {
-      // }
-
-      try {
-        HashMap data = new HashMap();
-        data.put("foo", "bar");
-        data.put("bing", "bam");
-        data.put("supper", "hero");
-        pr.putAll(data);
-        // fail("testPutAll() does NOT throw UnsupportedOperationException");
-      } catch (UnsupportedOperationException ignored) {
-      }
-
-
-      // try {
-      // pr.values();
-      // fail("testValues() does NOT throw UnsupportedOperationException");
-      // }
-      // catch (UnsupportedOperationException expected) {
-      // }
-
-
-      try {
-        pr.containsValue("foo");
-      } catch (UnsupportedOperationException ex) {
-        fail("PartitionedRegionSingleNodeOperationTest:testContainsValue() operation failed");
-      }
-
-    } finally {
-      if (pr != null) {
-        pr.destroyRegion();
-      }
-    }
-  }
-
   /**
    * This method validates size operations. It verifies that it returns correct size of the
    * PartitionedRegion.
diff --git a/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt b/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
index 4838e86..29218c9 100644
--- a/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
+++ b/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
@@ -1065,6 +1065,14 @@ org/apache/geode/internal/cache/PartitionRegionConfig,2
 fromData,207
 toData,178
 
+org/apache/geode/internal/cache/PartitionedRegionClearMessage,2
+fromData,40
+toData,36
+
+org/apache/geode/internal/cache/PartitionedRegionClearMessage$PartitionedRegionClearReplyMessage,2
+fromData,32
+toData,28
+
 org/apache/geode/internal/cache/PoolFactoryImpl$PoolAttributes,2
 fromData,161
 toData,161
@@ -1366,6 +1374,14 @@ org/apache/geode/internal/cache/partitioned/BucketSizeMessage$BucketSizeReplyMes
 fromData,27
 toData,27
 
+org/apache/geode/internal/cache/partitioned/ClearPRMessage,2
+fromData,30
+toData,44
+
+org/apache/geode/internal/cache/partitioned/ClearPRMessage$ClearReplyMessage,2
+fromData,17
+toData,17
+
 org/apache/geode/internal/cache/partitioned/ColocatedRegionDetails,2
 fromData,81
 toData,133
diff --git a/geode-junit/src/main/java/org/apache/geode/cache/query/data/City.java b/geode-core/src/main/java/org/apache/geode/cache/PartitionedRegionPartialClearException.java
similarity index 51%
copy from geode-junit/src/main/java/org/apache/geode/cache/query/data/City.java
copy to geode-core/src/main/java/org/apache/geode/cache/PartitionedRegionPartialClearException.java
index 1bae60e..1ddb301 100644
--- a/geode-junit/src/main/java/org/apache/geode/cache/query/data/City.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/PartitionedRegionPartialClearException.java
@@ -12,41 +12,26 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
+package org.apache.geode.cache;
 
-/*
- * City.java
- *
- * Created on September 30, 2005, 6:20 PM
+/**
+ * Indicates a failure to perform a distributed clear operation on a Partitioned Region
+ * after multiple attempts. The clear may not have been successfully applied on some of
+ * the members hosting the region.
  */
+public class PartitionedRegionPartialClearException extends CacheRuntimeException {
 
-package org.apache.geode.cache.query.data;
-
-import java.io.Serializable;
-
-public class City implements Serializable {
-  public String name;
-  public int zip;
+  public PartitionedRegionPartialClearException() {}
 
-  /** Creates a new instance of City */
-  public City(String name, int zip) {
-    this.name = name;
-    this.zip = zip;
-  }// end of constructor 1
-
-  public City(int i) {
-    String[] arr1 = {"MUMBAI", "PUNE", "GANDHINAGAR", "CHANDIGARH"};
-    /* this is for the test to have 50% of the objects belonging to one city */
-    name = arr1[i % 2];
-    zip = 425125 + i;
-  }// end of constructor 2
-
-  ////////////////////////////
+  public PartitionedRegionPartialClearException(String msg) {
+    super(msg);
+  }
 
-  public String getName() {
-    return name;
+  public PartitionedRegionPartialClearException(String msg, Throwable cause) {
+    super(msg, cause);
   }
 
-  public int getZip() {
-    return zip;
+  public PartitionedRegionPartialClearException(Throwable cause) {
+    super(cause);
   }
-}// end of class
+}
diff --git a/geode-core/src/main/java/org/apache/geode/cache/Region.java b/geode-core/src/main/java/org/apache/geode/cache/Region.java
index 3eb2489..b79310c 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/Region.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/Region.java
@@ -1304,7 +1304,11 @@ public interface Region<K, V> extends ConcurrentMap<K, V> {
    * @see java.util.Map#clear()
    * @see CacheListener#afterRegionClear
    * @see CacheWriter#beforeRegionClear
-   * @throws UnsupportedOperationException If the region is a partitioned region
+   * @throws PartitionedRegionPartialClearException when data is partially cleared on partitioned
+   *         region. It is caller responsibility to handle the partial data clear either by retrying
+   *         the clear operation or continue working with the partially cleared partitioned region.
+   * @throws UnsupportedOperationException when data was not cleared because one or more
+   *         of the member servers' version was too old to understand the clear message.
    */
   @Override
   void clear();
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQueryService.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQueryService.java
index d7baa59..0ee3bee 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQueryService.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQueryService.java
@@ -214,7 +214,7 @@ public class DefaultQueryService implements InternalQueryService {
       throw new UnsupportedOperationException(
           "Index creation on the server is not supported from the client.");
     }
-    PartitionedIndex parIndex = null;
+
     if (region == null) {
       region = getRegionFromPath(imports, fromClause);
     }
@@ -242,6 +242,7 @@ public class DefaultQueryService implements InternalQueryService {
       }
     }
     if (region instanceof PartitionedRegion) {
+      PartitionedIndex parIndex = null;
       try {
         parIndex = (PartitionedIndex) ((PartitionedRegion) region).createIndex(false, indexType,
             indexName, indexedExpression, fromClause, imports, loadEntries);
@@ -255,9 +256,7 @@ public class DefaultQueryService implements InternalQueryService {
             exx);
       }
       return parIndex;
-
     } else {
-
       IndexManager indexManager = IndexUtils.getIndexManager(cache, region, true);
       Index index = indexManager.createIndex(indexName, indexType, indexedExpression, fromClause,
           imports, null, null, loadEntries);
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java
index a297c3a..a976812 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java
@@ -279,6 +279,8 @@ public class IndexManager {
     }
 
     try {
+      ((LocalRegion) this.region).lockRVVForBulkOp();
+
       String projectionAttributes = "*"; // for now this is the only option
 
       if (getIndex(indexName) != null) {
@@ -429,7 +431,7 @@ public class IndexManager {
     } finally {
       cache.setPdxReadSerializedOverride(oldReadSerialized);
       ((TXManagerImpl) cache.getCacheTransactionManager()).unpauseTransaction(tx);
-
+      ((LocalRegion) region).unlockRVVForBulkOp();
     }
   }
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java b/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java
index d11a943..a89400f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java
@@ -235,6 +235,7 @@ import org.apache.geode.internal.cache.MemberFunctionStreamingMessage;
 import org.apache.geode.internal.cache.Node;
 import org.apache.geode.internal.cache.PRQueryProcessor;
 import org.apache.geode.internal.cache.PartitionRegionConfig;
+import org.apache.geode.internal.cache.PartitionedRegionClearMessage;
 import org.apache.geode.internal.cache.PreferBytesCachedDeserializable;
 import org.apache.geode.internal.cache.RegionEventImpl;
 import org.apache.geode.internal.cache.ReleaseClearLockMessage;
@@ -289,6 +290,7 @@ import org.apache.geode.internal.cache.partitioned.BucketCountLoadProbe;
 import org.apache.geode.internal.cache.partitioned.BucketProfileUpdateMessage;
 import org.apache.geode.internal.cache.partitioned.BucketSizeMessage;
 import org.apache.geode.internal.cache.partitioned.BucketSizeMessage.BucketSizeReplyMessage;
+import org.apache.geode.internal.cache.partitioned.ClearPRMessage;
 import org.apache.geode.internal.cache.partitioned.ContainsKeyValueMessage;
 import org.apache.geode.internal.cache.partitioned.ContainsKeyValueMessage.ContainsKeyValueReplyMessage;
 import org.apache.geode.internal.cache.partitioned.CreateBucketMessage;
@@ -684,6 +686,10 @@ public class DSFIDFactory implements DataSerializableFixedID {
     serializer.register(PR_DUMP_B2N_REPLY_MESSAGE, DumpB2NReplyMessage.class);
     serializer.register(DESTROY_PARTITIONED_REGION_MESSAGE,
         DestroyPartitionedRegionMessage.class);
+    serializer.register(CLEAR_PARTITIONED_REGION_MESSAGE,
+        PartitionedRegionClearMessage.class);
+    serializer.register(CLEAR_PARTITIONED_REGION_REPLY_MESSAGE,
+        PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage.class);
     serializer.register(INVALIDATE_PARTITIONED_REGION_MESSAGE,
         InvalidatePartitionedRegionMessage.class);
     serializer.register(COMMIT_PROCESS_QUERY_MESSAGE, CommitProcessQueryMessage.class);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
index d39e2fb..77b7083 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
@@ -113,6 +113,7 @@ public abstract class AbstractRegion implements InternalRegion, AttributesMutato
   private static final Logger logger = LogService.getLogger();
   private final ReentrantReadWriteLock readWriteLockForCacheLoader = new ReentrantReadWriteLock();
   private final ReentrantReadWriteLock readWriteLockForCacheWriter = new ReentrantReadWriteLock();
+  @VisibleForTesting
   protected final ConcurrentHashMap<RegionEntry, EntryExpiryTask> entryExpiryTasks =
       new ConcurrentHashMap<>();
   /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java
index a899580..5a49b19 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java
@@ -341,7 +341,12 @@ public abstract class AbstractRegionMap extends BaseRegionMap
     if (lr != null && !(lr instanceof HARegion)) {
       CachePerfStats stats = lr.getCachePerfStats();
       if (stats != null) {
-        stats.incClearCount();
+        if (lr.isUsedForPartitionedRegionBucket()) {
+          stats.incBucketClearCount();
+        } else {
+          stats.incRegionClearCount();
+        }
+
       }
     }
   }
@@ -1279,16 +1284,19 @@ public abstract class AbstractRegionMap extends BaseRegionMap
     DiskRegion dr = owner.getDiskRegion();
     boolean ownerIsInitialized = owner.isInitialized();
 
-    // Fix for Bug #44431. We do NOT want to update the region and wait
-    // later for index INIT as region.clear() can cause inconsistency if
-    // happened in parallel as it also does index INIT.
-    IndexManager oqlIndexManager = owner.getIndexManager();
-    if (oqlIndexManager != null) {
-      oqlIndexManager.waitForIndexInit();
-    }
+    // lock before waitForIndexInit so that we should wait
+    // till a concurrent clear to finish
     lockForCacheModification(owner, event);
-    final boolean locked = owner.lockWhenRegionIsInitializing();
+    boolean locked = false;
     try {
+      // Fix for Bug #44431. We do NOT want to update the region and wait
+      // later for index INIT as region.clear() can cause inconsistency if
+      // happened in parallel as it also does index INIT.
+      IndexManager oqlIndexManager = owner.getIndexManager();
+      if (oqlIndexManager != null) {
+        oqlIndexManager.waitForIndexInit();
+      }
+      locked = owner.lockWhenRegionIsInitializing();
       try {
         try {
           if (forceNewEntry || forceCallbacks) {
@@ -1657,7 +1665,6 @@ public abstract class AbstractRegionMap extends BaseRegionMap
       }
       releaseCacheModificationLock(owner, event);
     }
-
   }
 
   /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketAdvisor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketAdvisor.java
index 2b70f86..9c2c39b 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketAdvisor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketAdvisor.java
@@ -1621,7 +1621,7 @@ public class BucketAdvisor extends CacheDistributionAdvisor {
   /**
    * Returns true if the a primary is known.
    */
-  private boolean hasPrimary() {
+  protected boolean hasPrimary() {
     final byte primaryState = this.primaryState;
     return primaryState == OTHER_PRIMARY_NOT_HOSTING || primaryState == OTHER_PRIMARY_HOSTING
         || primaryState == IS_PRIMARY_HOSTING;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
index 7e65833..472ac86 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
@@ -571,6 +571,38 @@ public class BucketRegion extends DistributedRegion implements Bucket {
     }
   }
 
+  /**
+   * this starts with a primary bucket, clears it, and distribute a DistributedClearOperation
+   * .OperationType.OP_CLEAR operation to other members.
+   * If this member is not locked yet, lock it and send OP_LOCK_FOR_CLEAR to others first.
+   */
+  @Override
+  public void cmnClearRegion(RegionEventImpl regionEvent, boolean cacheWrite, boolean useRVV) {
+    if (!getBucketAdvisor().isPrimary()) {
+      if (logger.isDebugEnabled()) {
+        logger.debug("Not primary bucket when doing clear, do nothing");
+      }
+      return;
+    }
+
+    // get rvvLock
+    Set<InternalDistributedMember> participants =
+        getCacheDistributionAdvisor().adviseInvalidateRegion();
+    boolean isLockedAlready = this.partitionedRegion.getPartitionedRegionClear()
+        .isLockedForListenerAndClientNotification();
+
+    try {
+      obtainWriteLocksForClear(regionEvent, participants, isLockedAlready);
+      // no need to dominate my own rvv.
+      // Clear is on going here, there won't be GII for this member
+      clearRegionLocally(regionEvent, cacheWrite, null);
+      distributeClearOperation(regionEvent, null, participants);
+
+      // TODO: call reindexUserDataRegion if there're lucene indexes
+    } finally {
+      releaseWriteLocksForClear(regionEvent, participants, isLockedAlready);
+    }
+  }
 
   long generateTailKey() {
     long key = eventSeqNum.addAndGet(partitionedRegion.getTotalNumberOfBuckets());
@@ -2122,8 +2154,8 @@ public class BucketRegion extends DistributedRegion implements Bucket {
       // counters to 0.
       oldMemValue = bytesInMemory.getAndSet(0);
     } else {
-      throw new InternalGemFireError(
-          "Trying to clear a bucket region that was not destroyed or in initialization.");
+      // BucketRegion's clear is supported now
+      oldMemValue = bytesInMemory.getAndSet(0);
     }
     if (oldMemValue != BUCKET_DESTROYED) {
       partitionedRegion.getPrStats().incDataStoreEntryCount(-sizeBeforeClear);
@@ -2544,4 +2576,10 @@ public class BucketRegion extends DistributedRegion implements Bucket {
         versionTag, tailKey);
   }
 
+
+  @Override
+  protected void basicClear(RegionEventImpl regionEvent) {
+    basicClear(regionEvent, false);
+  }
+
 }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java
index 0e9f7ac..6f18b55 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/CachePerfStats.java
@@ -118,7 +118,11 @@ public class CachePerfStats {
   static final int indexUpdateInProgressId;
   static final int indexUpdateCompletedId;
   static final int indexUpdateTimeId;
-  static final int clearsId;
+  static final int bucketClearsId;
+  static final int regionClearsId;
+  static final int partitionedRegionClearLocalDurationId;
+  static final int partitionedRegionClearTotalDurationId;
+
   private static final int indexInitializationInProgressId;
   private static final int indexInitializationCompletedId;
   private static final int indexInitializationTimeId;
@@ -288,7 +292,14 @@ public class CachePerfStats {
         "Current number of regions configured for reliablity that are missing required roles with Limited access";
     final String reliableRegionsMissingNoAccessDesc =
         "Current number of regions configured for reliablity that are missing required roles with No access";
-    final String clearsDesc = "The total number of times a clear has been done on this cache.";
+    final String regionClearsDesc =
+        "The total number of times a clear has been done on this cache.";
+    final String bucketClearsDesc =
+        "The total number of times a clear has been done on this region and it's bucket regions";
+    final String partitionedRegionClearLocalDurationDesc =
+        "The time in nanoseconds partitioned region clear has been running for the region on this member";
+    final String partitionedRegionClearTotalDurationDesc =
+        "The time in nanoseconds partitioned region clear has been running for the region with this member as coordinator.";
     final String metaDataRefreshCountDesc =
         "Total number of times the meta data is refreshed due to hopping observed.";
     final String conflatedEventsDesc =
@@ -470,7 +481,12 @@ public class CachePerfStats {
             f.createLongCounter("retries",
                 "Number of times a concurrent destroy followed by a create has caused an entry operation to need to retry.",
                 "operations"),
-            f.createLongCounter("clears", clearsDesc, "operations"),
+            f.createLongCounter("regionClears", regionClearsDesc, "operations"),
+            f.createLongCounter("bucketClears", bucketClearsDesc, "operations"),
+            f.createLongCounter("partitionedRegionClearLocalDuration",
+                partitionedRegionClearLocalDurationDesc, "nanoseconds"),
+            f.createLongCounter("partitionedRegionClearTotalDuration",
+                partitionedRegionClearTotalDurationDesc, "nanoseconds"),
             f.createLongGauge("diskTasksWaiting",
                 "Current number of disk tasks (oplog compactions, asynchronous recoveries, etc) that are waiting for a thread to run the operation",
                 "operations"),
@@ -614,7 +630,10 @@ public class CachePerfStats {
     eventsQueuedId = type.nameToId("eventsQueued");
 
     retriesId = type.nameToId("retries");
-    clearsId = type.nameToId("clears");
+    regionClearsId = type.nameToId("regionClears");
+    bucketClearsId = type.nameToId("bucketClears");
+    partitionedRegionClearLocalDurationId = type.nameToId("partitionedRegionClearLocalDuration");
+    partitionedRegionClearTotalDurationId = type.nameToId("partitionedRegionClearTotalDuration");
 
     diskTasksWaitingId = type.nameToId("diskTasksWaiting");
     evictorJobsStartedId = type.nameToId("evictorJobsStarted");
@@ -1404,12 +1423,36 @@ public class CachePerfStats {
     };
   }
 
-  public long getClearCount() {
-    return stats.getLong(clearsId);
+  public long getRegionClearCount() {
+    return stats.getLong(regionClearsId);
+  }
+
+  public long getBucketClearCount() {
+    return stats.getLong(bucketClearsId);
+  }
+
+  public long getPartitionedRegionClearLocalDuration() {
+    return stats.getLong(partitionedRegionClearLocalDurationId);
+  }
+
+  public long getPartitionedRegionClearTotalDuration() {
+    return stats.getLong(partitionedRegionClearTotalDurationId);
+  }
+
+  public void incRegionClearCount() {
+    stats.incLong(regionClearsId, 1L);
+  }
+
+  public void incBucketClearCount() {
+    stats.incLong(bucketClearsId, 1L);
+  }
+
+  public void incPartitionedRegionClearLocalDuration(long durationNanos) {
+    stats.incLong(partitionedRegionClearLocalDurationId, durationNanos);
   }
 
-  public void incClearCount() {
-    stats.incLong(clearsId, 1L);
+  public void incPartitionedRegionClearTotalDuration(long durationNanos) {
+    stats.incLong(partitionedRegionClearTotalDurationId, durationNanos);
   }
 
   public long getConflatedEventsCount() {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ColocationHelper.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ColocationHelper.java
index b23e4d2..3c29e33 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ColocationHelper.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ColocationHelper.java
@@ -271,15 +271,11 @@ public class ColocationHelper {
   }
 
   /**
-   * An utility method to retrieve all partitioned regions(excluding self) in a colocation chain<br>
+   * A utility method to retrieve all partitioned regions(excluding self) in a colocation chain<br>
    * <p>
-   * For example, shipmentPR is colocated with orderPR and orderPR is colocated with customerPR <br>
-   * <br>
-   * getAllColocationRegions(customerPR) --> List{orderPR, shipmentPR}<br>
-   * getAllColocationRegions(orderPR) --> List{customerPR, shipmentPR}<br>
-   * getAllColocationRegions(shipmentPR) --> List{customerPR, orderPR}<br>
    *
-   * @return List of all partitioned regions (excluding self) in a colocated chain
+   * @return Map<String, PartitionedRegion> of all partitioned regions (excluding self) in a
+   *         colocated chain. Keys are the full paths of the PartitionedRegion values.
    * @since GemFire 5.8Beta
    */
   public static Map<String, PartitionedRegion> getAllColocationRegions(
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedClearOperation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedClearOperation.java
index bba3441..5b2e3d7 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedClearOperation.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedClearOperation.java
@@ -163,6 +163,10 @@ public class DistributedClearOperation extends DistributedCacheOperation {
   }
 
 
+  /**
+   * this message is to operate on the BucketRegion level, used by the primary member to distribute
+   * clear message to secondary buckets
+   */
   public static class ClearRegionMessage extends CacheOperationMessage {
 
     protected EventID eventID;
@@ -186,6 +190,10 @@ public class DistributedClearOperation extends DistributedCacheOperation {
       return OperationExecutors.HIGH_PRIORITY_EXECUTOR;
     }
 
+    public OperationType getOperationType() {
+      return clearOp;
+    }
+
     @Override
     protected InternalCacheEvent createEvent(DistributedRegion rgn) throws EntryNotFoundException {
       RegionEventImpl event = createRegionEvent(rgn);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
index 4a3783a..883c75b 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
@@ -192,10 +192,6 @@ public class DistributedRegion extends LocalRegion implements InternalDistribute
   @MutableForTesting
   public static boolean ignoreReconnect = false;
 
-  /**
-   * Lock to prevent multiple threads on this member from performing a clear at the same time.
-   */
-  private final Object clearLock = new Object();
   private final ReentrantReadWriteLock failedInitialImageLock = new ReentrantReadWriteLock(true);
 
   @MakeNotStatic
@@ -932,11 +928,6 @@ public class DistributedRegion extends LocalRegion implements InternalDistribute
     }
   }
 
-  private void lockCheckReadiness() {
-    cache.getCancelCriterion().checkCancelInProgress(null);
-    checkReadiness();
-  }
-
   @Override
   Object validatedDestroy(Object key, EntryEventImpl event)
       throws TimeoutException, EntryNotFoundException, CacheWriterException {
@@ -2011,6 +2002,10 @@ public class DistributedRegion extends LocalRegion implements InternalDistribute
     super.basicClear(regionEvent, cacheWrite);
   }
 
+  void distributeClearOperation(RegionEventImpl regionEvent, RegionVersionVector rvv,
+      Set<InternalDistributedMember> participants) {
+    DistributedClearOperation.clear(regionEvent, rvv, participants);
+  }
 
   @Override
   void cmnClearRegion(RegionEventImpl regionEvent, boolean cacheWrite, boolean useRVV) {
@@ -2030,13 +2025,13 @@ public class DistributedRegion extends LocalRegion implements InternalDistribute
               getCacheDistributionAdvisor().adviseInvalidateRegion();
           // pause all generation of versions and flush from the other members to this one
           try {
-            obtainWriteLocksForClear(regionEvent, participants);
+            obtainWriteLocksForClear(regionEvent, participants, false);
             clearRegionLocally(regionEvent, cacheWrite, null);
             if (!regionEvent.isOriginRemote() && regionEvent.getOperation().isDistributed()) {
-              DistributedClearOperation.clear(regionEvent, null, participants);
+              distributeClearOperation(regionEvent, null, participants);
             }
           } finally {
-            releaseWriteLocksForClear(regionEvent, participants);
+            releaseWriteLocksForClear(regionEvent, participants, false);
           }
         } finally {
           distributedUnlockForClear();
@@ -2046,7 +2041,7 @@ public class DistributedRegion extends LocalRegion implements InternalDistribute
             getCacheDistributionAdvisor().adviseInvalidateRegion();
         clearRegionLocally(regionEvent, cacheWrite, null);
         if (!regionEvent.isOriginRemote() && regionEvent.getOperation().isDistributed()) {
-          DistributedClearOperation.clear(regionEvent, null, participants);
+          distributeClearOperation(regionEvent, null, participants);
         }
       }
     }
@@ -2089,9 +2084,28 @@ public class DistributedRegion extends LocalRegion implements InternalDistribute
   /**
    * obtain locks preventing generation of new versions in other members
    */
-  private void obtainWriteLocksForClear(RegionEventImpl regionEvent,
+  protected void obtainWriteLocksForClear(RegionEventImpl regionEvent,
+      Set<InternalDistributedMember> participants, boolean localLockedAlready) {
+    if (!localLockedAlready) {
+      lockLocallyForClear(getDistributionManager(), getMyId(), regionEvent);
+    }
+    lockAndFlushClearToOthers(regionEvent, participants);
+  }
+
+  /**
+   * releases the locks obtained in obtainWriteLocksForClear
+   */
+  protected void releaseWriteLocksForClear(RegionEventImpl regionEvent,
+      Set<InternalDistributedMember> participants,
+      boolean localLockedAlready) {
+    if (!localLockedAlready) {
+      releaseLockLocallyForClear(regionEvent);
+    }
+    DistributedClearOperation.releaseLocks(regionEvent, participants);
+  }
+
+  void lockAndFlushClearToOthers(RegionEventImpl regionEvent,
       Set<InternalDistributedMember> participants) {
-    lockLocallyForClear(getDistributionManager(), getMyId(), regionEvent);
     DistributedClearOperation.lockAndFlushToOthers(regionEvent, participants);
   }
 
@@ -2126,19 +2140,16 @@ public class DistributedRegion extends LocalRegion implements InternalDistribute
     }
   }
 
-  /**
-   * releases the locks obtained in obtainWriteLocksForClear
-   */
-  private void releaseWriteLocksForClear(RegionEventImpl regionEvent,
-      Set<InternalDistributedMember> participants) {
-
+  protected void releaseLockLocallyForClear(RegionEventImpl regionEvent) {
     ARMLockTestHook armLockTestHook = getRegionMap().getARMLockTestHook();
     if (armLockTestHook != null) {
       armLockTestHook.beforeRelease(this, regionEvent);
     }
 
-    getVersionVector().unlockForClear(getMyId());
-    DistributedClearOperation.releaseLocks(regionEvent, participants);
+    RegionVersionVector rvv = getVersionVector();
+    if (rvv != null) {
+      rvv.unlockForClear(getMyId());
+    }
 
     if (armLockTestHook != null) {
       armLockTestHook.afterRelease(this, regionEvent);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/InternalRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/InternalRegion.java
index 432ecca..8d59aa1 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/InternalRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/InternalRegion.java
@@ -469,4 +469,7 @@ public interface InternalRegion extends Region, HasCachePerfStats, RegionEntryCo
   boolean isRegionCreateNotified();
 
   void setRegionCreateNotified(boolean notified);
+
+  void clearRegionLocally(RegionEventImpl regionEvent, boolean cacheWrite,
+      RegionVersionVector vector);
 }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
index 0c3a396..1c0abe4 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
@@ -325,6 +325,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
    */
   private int txRefCount;
 
+
   private volatile boolean regionInvalid;
 
   /**
@@ -474,6 +475,11 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
   private final Lock clientMetaDataLock = new ReentrantLock();
 
   /**
+   * Lock to prevent multiple threads on this member from performing a clear at the same time.
+   */
+  protected final Object clearLock = new Object();
+
+  /**
    * Lock for updating the cache service profile for the region.
    */
   private final Lock cacheServiceProfileUpdateLock = new ReentrantLock();
@@ -2772,6 +2778,11 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
     checkRegionDestroyed(true);
   }
 
+  protected void lockCheckReadiness() {
+    cache.getCancelCriterion().checkCancelInProgress(null);
+    checkReadiness();
+  }
+
   /**
    * This method should be called when the caller cannot locate an entry and that condition is
    * unexpected. This will first double check the cache and region state before throwing an
@@ -3014,7 +3025,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
   /**
    * @since GemFire 5.7
    */
-  private void serverRegionClear(RegionEventImpl regionEvent) {
+  protected void serverRegionClear(RegionEventImpl regionEvent) {
     if (regionEvent.getOperation().isDistributed()) {
       ServerRegionProxy mySRP = getServerProxy();
       if (mySRP != null) {
@@ -3133,7 +3144,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
     return result;
   }
 
-  private void cacheWriteBeforeRegionClear(RegionEventImpl event)
+  void cacheWriteBeforeRegionClear(RegionEventImpl event)
       throws CacheWriterException, TimeoutException {
     // copy into local var to prevent race condition
     CacheWriter writer = basicGetWriter();
@@ -7989,7 +8000,8 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
     }
   }
 
-  private void cancelAllEntryExpiryTasks() {
+  @VisibleForTesting
+  void cancelAllEntryExpiryTasks() {
     // This method gets called during LocalRegion construction
     // in which case the final entryExpiryTasks field can still be null
     if (entryExpiryTasks.isEmpty()) {
@@ -8004,6 +8016,10 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
       task.cancel();
       doPurge = true;
     }
+
+    // Clear the map after canceling each expiry task.
+    entryExpiryTasks.clear();
+
     if (doPurge) {
       // do a force to not leave any refs to this region
       cache.getExpirationScheduler().forcePurge();
@@ -8475,7 +8491,8 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
    * will not take distributedLock. The clear operation will also clear the local transactional
    * entries. The clear operation will have immediate committed state.
    */
-  void clearRegionLocally(RegionEventImpl regionEvent, boolean cacheWrite,
+  @Override
+  public void clearRegionLocally(RegionEventImpl regionEvent, boolean cacheWrite,
       RegionVersionVector vector) {
     final boolean isRvvDebugEnabled = logger.isTraceEnabled(LogMarker.RVV_VERBOSE);
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
index 2dc2f87..278266b 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
@@ -181,6 +181,7 @@ import org.apache.geode.internal.cache.execute.PartitionedRegionFunctionResultWa
 import org.apache.geode.internal.cache.execute.RegionFunctionContextImpl;
 import org.apache.geode.internal.cache.execute.ServerToClientFunctionResultSender;
 import org.apache.geode.internal.cache.ha.ThreadIdentifier;
+import org.apache.geode.internal.cache.partitioned.ClearPRMessage;
 import org.apache.geode.internal.cache.partitioned.ContainsKeyValueMessage;
 import org.apache.geode.internal.cache.partitioned.ContainsKeyValueMessage.ContainsKeyValueResponse;
 import org.apache.geode.internal.cache.partitioned.DestroyMessage;
@@ -319,6 +320,8 @@ public class PartitionedRegion extends LocalRegion
     }
   };
 
+  private final PartitionedRegionClear partitionedRegionClear = new PartitionedRegionClear(this);
+
   /**
    * Global Region for storing PR config ( PRName->PRConfig). This region would be used to resolve
    * PR name conflict.*
@@ -569,6 +572,14 @@ public class PartitionedRegion extends LocalRegion
     return partitionListeners;
   }
 
+  public CachePerfStats getRegionCachePerfStats() {
+    if (dataStore != null && dataStore.getAllLocalBucketRegions().size() > 0) {
+      BucketRegion bucket = dataStore.getAllLocalBucketRegions().iterator().next();
+      return bucket.getCachePerfStats();
+    }
+    return null;
+  }
+
   /**
    * Return canonical representation for a bucket (for logging)
    *
@@ -2182,18 +2193,13 @@ public class PartitionedRegion extends LocalRegion
     throw new UnsupportedOperationException();
   }
 
-  /**
-   * @since GemFire 5.0
-   * @throws UnsupportedOperationException OVERRIDES
-   */
-  @Override
-  public void clear() {
-    throw new UnsupportedOperationException();
-  }
-
-  @Override
-  void basicClear(RegionEventImpl regionEvent, boolean cacheWrite) {
-    throw new UnsupportedOperationException();
+  List<ClearPRMessage> createClearPRMessages(EventID eventID) {
+    ArrayList<ClearPRMessage> clearMsgList = new ArrayList<>();
+    for (int bucketId = 0; bucketId < getTotalNumberOfBuckets(); bucketId++) {
+      ClearPRMessage clearPRMessage = new ClearPRMessage(bucketId, eventID);
+      clearMsgList.add(clearPRMessage);
+    }
+    return clearMsgList;
   }
 
   @Override
@@ -2609,7 +2615,7 @@ public class PartitionedRegion extends LocalRegion
             retryTime = new RetryTimeKeeper(retryTimeout);
           }
 
-          currentTarget = waitForNodeOrCreateBucket(retryTime, event, bucketId);
+          currentTarget = waitForNodeOrCreateBucket(retryTime, event, bucketId, true);
           if (isDebugEnabled) {
             logger.debug("PR.sendMsgByBucket: event size is {}, new currentTarget is {}",
                 getEntrySize(event), currentTarget);
@@ -2748,7 +2754,7 @@ public class PartitionedRegion extends LocalRegion
             retryTime = new RetryTimeKeeper(retryTimeout);
           }
 
-          currentTarget = waitForNodeOrCreateBucket(retryTime, event, bucketId);
+          currentTarget = waitForNodeOrCreateBucket(retryTime, event, bucketId, true);
           if (logger.isDebugEnabled()) {
             logger.debug("PR.sendMsgByBucket: event size is {}, new currentTarget is {}",
                 getEntrySize(event), currentTarget);
@@ -2993,7 +2999,7 @@ public class PartitionedRegion extends LocalRegion
         if (retryTime == null) {
           retryTime = new RetryTimeKeeper(retryTimeout);
         }
-        currentTarget = waitForNodeOrCreateBucket(retryTime, event, bucketId);
+        currentTarget = waitForNodeOrCreateBucket(retryTime, event, bucketId, true);
 
         // It's possible this is a GemFire thread e.g. ServerConnection
         // which got to this point because of a distributed system shutdown or
@@ -3152,10 +3158,11 @@ public class PartitionedRegion extends LocalRegion
    * @param retryTime the RetryTimeKeeper to track retry times
    * @param event the event used to get the entry size in the event a new bucket should be created
    * @param bucketId the identity of the bucket should it be created
+   * @param createIfNotExist boolean to indicate if to create a bucket if found not exist
    * @return a Node which contains the bucket, potentially null
    */
   private InternalDistributedMember waitForNodeOrCreateBucket(RetryTimeKeeper retryTime,
-      EntryEventImpl event, Integer bucketId) {
+      EntryEventImpl event, Integer bucketId, boolean createIfNotExist) {
     InternalDistributedMember newNode;
     if (retryTime.overMaximum()) {
       PRHARedundancyProvider.timedOut(this, null, null, "allocate a bucket",
@@ -3165,7 +3172,7 @@ public class PartitionedRegion extends LocalRegion
 
     retryTime.waitForBucketsRecovery();
     newNode = getNodeForBucketWrite(bucketId, retryTime);
-    if (newNode == null) {
+    if (newNode == null && createIfNotExist) {
       newNode = createBucket(bucketId, getEntrySize(event), retryTime);
     }
 
@@ -4279,6 +4286,26 @@ public class PartitionedRegion extends LocalRegion
     return null;
   }
 
+  boolean triggerWriter(RegionEventImpl event, SearchLoadAndWriteProcessor processor, int paction,
+      String theKey) {
+    CacheWriter localWriter = basicGetWriter();
+    Set netWriteRecipients = localWriter == null ? this.distAdvisor.adviseNetWrite() : null;
+
+    if (localWriter == null && (netWriteRecipients == null || netWriteRecipients.isEmpty())) {
+      return false;
+    }
+
+    final long start = getCachePerfStats().startCacheWriterCall();
+    try {
+      processor.initialize(this, theKey, null);
+      processor.doNetWrite(event, netWriteRecipients, localWriter, paction);
+      processor.release();
+    } finally {
+      getCachePerfStats().endCacheWriterCall(start);
+    }
+    return true;
+  }
+
   /**
    * This invokes a cache writer before a destroy operation. Although it has the same method
    * signature as the method in LocalRegion, it is invoked in a different code path. LocalRegion
@@ -4288,31 +4315,26 @@ public class PartitionedRegion extends LocalRegion
   @Override
   boolean cacheWriteBeforeRegionDestroy(RegionEventImpl event)
       throws CacheWriterException, TimeoutException {
-
     if (event.getOperation().isDistributed()) {
       serverRegionDestroy(event);
-      CacheWriter localWriter = basicGetWriter();
-      Set netWriteRecipients = localWriter == null ? distAdvisor.adviseNetWrite() : null;
-
-      if (localWriter == null && (netWriteRecipients == null || netWriteRecipients.isEmpty())) {
-        return false;
-      }
-
-      final long start = getCachePerfStats().startCacheWriterCall();
-      try {
-        SearchLoadAndWriteProcessor processor = SearchLoadAndWriteProcessor.getProcessor();
-        processor.initialize(this, "preDestroyRegion", null);
-        processor.doNetWrite(event, netWriteRecipients, localWriter,
-            SearchLoadAndWriteProcessor.BEFOREREGIONDESTROY);
-        processor.release();
-      } finally {
-        getCachePerfStats().endCacheWriterCall(start);
-      }
-      return true;
+      SearchLoadAndWriteProcessor processor = SearchLoadAndWriteProcessor.getProcessor();
+      return triggerWriter(event, processor, SearchLoadAndWriteProcessor.BEFOREREGIONDESTROY,
+          "preDestroyRegion");
     }
     return false;
   }
 
+  @Override
+  void cacheWriteBeforeRegionClear(RegionEventImpl event)
+      throws CacheWriterException, TimeoutException {
+    if (event.getOperation().isDistributed()) {
+      serverRegionClear(event);
+      SearchLoadAndWriteProcessor processor = SearchLoadAndWriteProcessor.getProcessor();
+      triggerWriter(event, processor, SearchLoadAndWriteProcessor.BEFOREREGIONCLEAR,
+          "preClearRegion");
+    }
+  }
+
   /**
    * Test Method: Get the DistributedMember identifier for the vm containing a key
    *
@@ -5183,6 +5205,7 @@ public class PartitionedRegion extends LocalRegion
     return totalNumberOfBuckets;
   }
 
+
   @Override
   public void basicDestroy(final EntryEventImpl event, final boolean cacheWrite,
       final Object expectedOldValue)
@@ -10127,6 +10150,29 @@ public class PartitionedRegion extends LocalRegion
     regionCreationNotified = true;
   }
 
+  protected PartitionedRegionClear getPartitionedRegionClear() {
+    return partitionedRegionClear;
+  }
+
+  @Override
+  void cmnClearRegion(RegionEventImpl regionEvent, boolean cacheWrite, boolean useRVV) {
+    // Synchronized to avoid other threads invoking clear on this vm/node.
+    synchronized (clearLock) {
+      partitionedRegionClear.doClear(regionEvent, cacheWrite);
+    }
+  }
+
+  boolean hasAnyClientsInterested() {
+    // Check local filter
+    if (getFilterProfile() != null && (getFilterProfile().hasInterest() || getFilterProfile()
+        .hasCQs())) {
+      return true;
+    }
+    // check peer server filters
+    return (getRegionAdvisor().hasPRServerWithInterest()
+        || getRegionAdvisor().hasPRServerWithCQs());
+  }
+
   public boolean areRecoveriesInProgress() {
     return prStats.getRecoveriesInProgress() > 0;
   }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
new file mode 100644
index 0000000..539f682
--- /dev/null
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClear.java
@@ -0,0 +1,506 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.logging.log4j.Logger;
+
+import org.apache.geode.CancelException;
+import org.apache.geode.cache.CacheWriterException;
+import org.apache.geode.cache.Operation;
+import org.apache.geode.cache.OperationAbortedException;
+import org.apache.geode.cache.PartitionedRegionPartialClearException;
+import org.apache.geode.cache.partition.PartitionRegionHelper;
+import org.apache.geode.distributed.internal.DistributionManager;
+import org.apache.geode.distributed.internal.MembershipListener;
+import org.apache.geode.distributed.internal.ReplyException;
+import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.serialization.KnownVersion;
+import org.apache.geode.logging.internal.log4j.api.LogService;
+
+public class PartitionedRegionClear {
+
+  private static final Logger logger = LogService.getLogger();
+
+  protected static final String CLEAR_OPERATION = "_clearOperation";
+
+  private final int retryTime = 2 * 60 * 1000;
+
+  private final PartitionedRegion partitionedRegion;
+
+  protected final LockForListenerAndClientNotification lockForListenerAndClientNotification =
+      new LockForListenerAndClientNotification();
+
+  private volatile boolean membershipChange = false;
+
+  protected final PartitionedRegionClearListener partitionedRegionClearListener =
+      new PartitionedRegionClearListener();
+
+  public PartitionedRegionClear(PartitionedRegion partitionedRegion) {
+    this.partitionedRegion = partitionedRegion;
+    partitionedRegion.getDistributionManager()
+        .addMembershipListener(partitionedRegionClearListener);
+  }
+
+  public boolean isLockedForListenerAndClientNotification() {
+    return lockForListenerAndClientNotification.isLocked();
+  }
+
+  void acquireDistributedClearLock(String clearLock) {
+    try {
+      partitionedRegion.getPartitionedRegionLockService().lock(clearLock, -1, -1);
+    } catch (IllegalStateException e) {
+      partitionedRegion.lockCheckReadiness();
+      throw e;
+    }
+  }
+
+  void releaseDistributedClearLock(String clearLock) {
+    try {
+      partitionedRegion.getPartitionedRegionLockService().unlock(clearLock);
+    } catch (IllegalStateException e) {
+      partitionedRegion.lockCheckReadiness();
+    } catch (Exception ex) {
+      logger.warn("Caught exception while unlocking clear distributed lock. " + ex.getMessage());
+    }
+  }
+
+  protected PartitionedRegionClearListener getPartitionedRegionClearListener() {
+    return partitionedRegionClearListener;
+  }
+
+  /**
+   * only called if there are any listeners or clients interested.
+   */
+  void obtainLockForClear(RegionEventImpl event) {
+    obtainClearLockLocal(partitionedRegion.getDistributionManager().getId());
+    sendPartitionedRegionClearMessage(event,
+        PartitionedRegionClearMessage.OperationType.OP_LOCK_FOR_PR_CLEAR);
+  }
+
+  /**
+   * only called if there are any listeners or clients interested.
+   */
+  void releaseLockForClear(RegionEventImpl event) {
+    releaseClearLockLocal();
+    sendPartitionedRegionClearMessage(event,
+        PartitionedRegionClearMessage.OperationType.OP_UNLOCK_FOR_PR_CLEAR);
+  }
+
+  /**
+   * clears local primaries and send message to remote primaries to clear
+   */
+  Set<Integer> clearRegion(RegionEventImpl regionEvent) {
+    // this includes all local primary buckets and their remote secondaries
+    Set<Integer> localPrimaryBuckets = clearRegionLocal(regionEvent);
+    // this includes all remote primary buckets and their secondaries
+    Set<Integer> remotePrimaryBuckets = sendPartitionedRegionClearMessage(regionEvent,
+        PartitionedRegionClearMessage.OperationType.OP_PR_CLEAR);
+
+    Set<Integer> allBucketsCleared = new HashSet<>();
+    allBucketsCleared.addAll(localPrimaryBuckets);
+    allBucketsCleared.addAll(remotePrimaryBuckets);
+    return allBucketsCleared;
+  }
+
+  protected void waitForPrimary(PartitionedRegion.RetryTimeKeeper retryTimer) {
+    boolean retry;
+    do {
+      retry = false;
+      for (BucketRegion bucketRegion : partitionedRegion.getDataStore()
+          .getAllLocalBucketRegions()) {
+        if (!bucketRegion.getBucketAdvisor().hasPrimary()) {
+          if (retryTimer.overMaximum()) {
+            throw new PartitionedRegionPartialClearException(
+                "Unable to find primary bucket region during clear operation on "
+                    + partitionedRegion.getName() + " region.");
+          }
+          retryTimer.waitForBucketsRecovery();
+          retry = true;
+        }
+      }
+    } while (retry);
+  }
+
+  /**
+   * this clears all local primary buckets (each will distribute the clear operation to its
+   * secondary members) and all of their remote secondaries
+   */
+  public Set<Integer> clearRegionLocal(RegionEventImpl regionEvent) {
+    Set<Integer> clearedBuckets = new HashSet<>();
+    long clearStartTime = System.nanoTime();
+    setMembershipChange(false);
+    // Synchronized to handle the requester departure.
+    synchronized (lockForListenerAndClientNotification) {
+      if (partitionedRegion.getDataStore() != null) {
+        partitionedRegion.getDataStore().lockBucketCreationForRegionClear();
+        try {
+          boolean retry;
+          do {
+            waitForPrimary(new PartitionedRegion.RetryTimeKeeper(retryTime));
+            RegionEventImpl bucketRegionEvent;
+            for (BucketRegion localPrimaryBucketRegion : partitionedRegion.getDataStore()
+                .getAllLocalPrimaryBucketRegions()) {
+              if (localPrimaryBucketRegion.size() > 0) {
+                bucketRegionEvent =
+                    new RegionEventImpl(localPrimaryBucketRegion, Operation.REGION_CLEAR, null,
+                        false, partitionedRegion.getMyId(), regionEvent.getEventId());
+                localPrimaryBucketRegion.cmnClearRegion(bucketRegionEvent, false, true);
+              }
+              clearedBuckets.add(localPrimaryBucketRegion.getId());
+            }
+
+            if (getMembershipChange()) {
+              // Retry and reset the membership change status.
+              setMembershipChange(false);
+              retry = true;
+            } else {
+              retry = false;
+            }
+
+          } while (retry);
+          doAfterClear(regionEvent);
+        } finally {
+          partitionedRegion.getDataStore().unlockBucketCreationForRegionClear();
+          if (clearedBuckets.size() != 0 && partitionedRegion.getCachePerfStats() != null) {
+            partitionedRegion.getRegionCachePerfStats().incRegionClearCount();
+            partitionedRegion.getRegionCachePerfStats()
+                .incPartitionedRegionClearLocalDuration(System.nanoTime() - clearStartTime);
+          }
+        }
+      } else {
+        // Non data-store with client queue and listener
+        doAfterClear(regionEvent);
+      }
+    }
+    return clearedBuckets;
+  }
+
+  protected void doAfterClear(RegionEventImpl regionEvent) {
+    if (partitionedRegion.hasAnyClientsInterested()) {
+      notifyClients(regionEvent);
+    }
+
+    if (partitionedRegion.hasListener()) {
+      partitionedRegion.dispatchListenerEvent(EnumListenerEvent.AFTER_REGION_CLEAR, regionEvent);
+    }
+  }
+
+  void notifyClients(RegionEventImpl event) {
+    // Set client routing information into the event
+    // The clear operation in case of PR is distributed differently
+    // hence the FilterRoutingInfo is set here instead of
+    // DistributedCacheOperation.distribute().
+    event.setEventType(EnumListenerEvent.AFTER_REGION_CLEAR);
+    if (!partitionedRegion.isUsedForMetaRegion() && !partitionedRegion
+        .isUsedForPartitionedRegionAdmin()
+        && !partitionedRegion.isUsedForPartitionedRegionBucket() && !partitionedRegion
+            .isUsedForParallelGatewaySenderQueue()) {
+
+      FilterRoutingInfo localCqFrInfo =
+          partitionedRegion.getFilterProfile().getFilterRoutingInfoPart1(event,
+              FilterProfile.NO_PROFILES, Collections.emptySet());
+
+      FilterRoutingInfo localCqInterestFrInfo =
+          partitionedRegion.getFilterProfile().getFilterRoutingInfoPart2(localCqFrInfo, event);
+
+      if (localCqInterestFrInfo != null) {
+        event.setLocalFilterInfo(localCqInterestFrInfo.getLocalFilterInfo());
+      }
+    }
+    partitionedRegion.notifyBridgeClients(event);
+  }
+
+  /**
+   * obtain locks for all local buckets
+   */
+  protected void obtainClearLockLocal(InternalDistributedMember requester) {
+    synchronized (lockForListenerAndClientNotification) {
+      // Check if the member is still part of the distributed system
+      if (!partitionedRegion.getDistributionManager().isCurrentMember(requester)) {
+        return;
+      }
+
+      lockForListenerAndClientNotification.setLocked(requester);
+      if (partitionedRegion.getDataStore() != null) {
+        for (BucketRegion localPrimaryBucketRegion : partitionedRegion.getDataStore()
+            .getAllLocalPrimaryBucketRegions()) {
+          try {
+            localPrimaryBucketRegion.lockLocallyForClear(partitionedRegion.getDistributionManager(),
+                partitionedRegion.getMyId(), null);
+          } catch (Exception ex) {
+            partitionedRegion.checkClosed();
+          }
+        }
+      }
+    }
+  }
+
+  protected void releaseClearLockLocal() {
+    synchronized (lockForListenerAndClientNotification) {
+      if (lockForListenerAndClientNotification.getLockRequester() == null) {
+        // The member has left.
+        return;
+      }
+      try {
+        if (partitionedRegion.getDataStore() != null) {
+
+          for (BucketRegion localPrimaryBucketRegion : partitionedRegion.getDataStore()
+              .getAllLocalPrimaryBucketRegions()) {
+            try {
+              localPrimaryBucketRegion.releaseLockLocallyForClear(null);
+            } catch (Exception ex) {
+              logger.debug(
+                  "Unable to acquire clear lock for bucket region " + localPrimaryBucketRegion
+                      .getName(),
+                  ex.getMessage());
+              partitionedRegion.checkClosed();
+            }
+          }
+        }
+      } finally {
+        lockForListenerAndClientNotification.setUnLocked();
+      }
+    }
+  }
+
+  protected Set<Integer> sendPartitionedRegionClearMessage(RegionEventImpl event,
+      PartitionedRegionClearMessage.OperationType op) {
+    RegionEventImpl eventForLocalClear = (RegionEventImpl) event.clone();
+    eventForLocalClear.setOperation(Operation.REGION_LOCAL_CLEAR);
+
+    do {
+      try {
+        return attemptToSendPartitionedRegionClearMessage(event, op);
+      } catch (ForceReattemptException reattemptException) {
+        // retry
+      }
+    } while (true);
+  }
+
+  /**
+   * @return buckets that are cleared. empty set if any exception happened
+   */
+  protected Set<Integer> attemptToSendPartitionedRegionClearMessage(RegionEventImpl event,
+      PartitionedRegionClearMessage.OperationType op)
+      throws ForceReattemptException {
+    Set<Integer> bucketsOperated = new HashSet<>();
+
+    if (partitionedRegion.getPRRoot() == null) {
+      if (logger.isDebugEnabled()) {
+        logger.debug(
+            "Partition region {} failed to initialize. Remove its profile from remote members.",
+            this.partitionedRegion);
+      }
+      new UpdateAttributesProcessor(partitionedRegion, true).distribute(false);
+      return bucketsOperated;
+    }
+
+    final Set<InternalDistributedMember> configRecipients =
+        new HashSet<>(partitionedRegion.getRegionAdvisor()
+            .adviseAllPRNodes());
+
+    try {
+      final PartitionRegionConfig prConfig =
+          partitionedRegion.getPRRoot().get(partitionedRegion.getRegionIdentifier());
+
+      if (prConfig != null) {
+        for (Node node : prConfig.getNodes()) {
+          InternalDistributedMember idm = node.getMemberId();
+          if (!idm.equals(partitionedRegion.getMyId())) {
+            configRecipients.add(idm);
+          }
+        }
+      }
+    } catch (CancelException ignore) {
+      // ignore
+    }
+
+    try {
+      PartitionedRegionClearMessage.PartitionedRegionClearResponse resp =
+          new PartitionedRegionClearMessage.PartitionedRegionClearResponse(
+              partitionedRegion.getSystem(), configRecipients);
+      PartitionedRegionClearMessage partitionedRegionClearMessage =
+          new PartitionedRegionClearMessage(configRecipients, partitionedRegion, resp, op, event);
+      partitionedRegionClearMessage.send();
+
+      resp.waitForRepliesUninterruptibly();
+      bucketsOperated = resp.bucketsCleared;
+
+    } catch (ReplyException e) {
+      Throwable t = e.getCause();
+      if (t instanceof ForceReattemptException) {
+        throw (ForceReattemptException) t;
+      }
+      if (t instanceof PartitionedRegionPartialClearException) {
+        throw new PartitionedRegionPartialClearException(t.getMessage(), t);
+      }
+      logger.warn(
+          "PartitionedRegionClear#sendPartitionedRegionClearMessage: Caught exception during ClearRegionMessage send and waiting for response",
+          e);
+    }
+    return bucketsOperated;
+  }
+
+  /**
+   * This method returns a boolean to indicate if all server versions support Partition Region clear
+   */
+  public void allServerVersionsSupportPartitionRegionClear() {
+    List<String> memberNames = new ArrayList<>();
+    for (int i = 0; i < partitionedRegion.getTotalNumberOfBuckets(); i++) {
+      InternalDistributedMember internalDistributedMember = partitionedRegion.getBucketPrimary(i);
+      if ((internalDistributedMember != null)
+          && (internalDistributedMember.getVersion().isOlderThan(KnownVersion.GEODE_1_14_0))) {
+        if (!memberNames.contains(internalDistributedMember.getName())) {
+          memberNames.add(internalDistributedMember.getName());
+        }
+      }
+    }
+    if (!memberNames.isEmpty()) {
+      throw new UnsupportedOperationException(
+          "A server's " + memberNames + " version was too old (< "
+              + KnownVersion.GEODE_1_14_0 + ") for : Partitioned Region Clear");
+
+    }
+  }
+
+
+  void doClear(RegionEventImpl regionEvent, boolean cacheWrite) {
+    String lockName = CLEAR_OPERATION + partitionedRegion.getName();
+    long clearStartTime = 0;
+
+    allServerVersionsSupportPartitionRegionClear();
+
+    try {
+      // distributed lock to make sure only one clear op is in progress in the cluster.
+      acquireDistributedClearLock(lockName);
+      clearStartTime = System.nanoTime();
+
+      // Force all primary buckets to be created before clear.
+      assignAllPrimaryBuckets();
+
+      // do cacheWrite
+      if (cacheWrite) {
+        invokeCacheWriter(regionEvent);
+      }
+
+      // Check if there are any listeners or clients interested. If so, then clear write
+      // locks needs to be taken on all local and remote primary buckets in order to
+      // preserve the ordering of client events (for concurrent operations on the region).
+      boolean acquireClearLockForNotification =
+          (partitionedRegion.hasAnyClientsInterested() || partitionedRegion.hasListener());
+      if (acquireClearLockForNotification) {
+        obtainLockForClear(regionEvent);
+      }
+      try {
+        Set<Integer> bucketsCleared = clearRegion(regionEvent);
+
+        if (partitionedRegion.getTotalNumberOfBuckets() != bucketsCleared.size()) {
+          String message = "Unable to clear all the buckets from the partitioned region "
+              + partitionedRegion.getName()
+              + ", either data (buckets) moved or member departed.";
+
+          logger.warn(message + " expected to clear number of buckets: "
+              + partitionedRegion.getTotalNumberOfBuckets() +
+              " actual cleared: " + bucketsCleared.size());
+
+          throw new PartitionedRegionPartialClearException(message);
+        }
+      } finally {
+        if (acquireClearLockForNotification) {
+          releaseLockForClear(regionEvent);
+        }
+      }
+    } finally {
+      releaseDistributedClearLock(lockName);
+      CachePerfStats stats = partitionedRegion.getRegionCachePerfStats();
+      if (stats != null) {
+        partitionedRegion.getRegionCachePerfStats()
+            .incPartitionedRegionClearTotalDuration(System.nanoTime() - clearStartTime);
+      }
+    }
+  }
+
+  protected void invokeCacheWriter(RegionEventImpl regionEvent) {
+    try {
+      partitionedRegion.cacheWriteBeforeRegionClear(regionEvent);
+    } catch (OperationAbortedException operationAbortedException) {
+      throw new CacheWriterException(operationAbortedException);
+    }
+  }
+
+  protected void assignAllPrimaryBuckets() {
+    PartitionedRegion leader = ColocationHelper.getLeaderRegion(partitionedRegion);
+    PartitionRegionHelper.assignBucketsToPartitions(leader);
+  }
+
+  protected void handleClearFromDepartedMember(InternalDistributedMember departedMember) {
+    if (departedMember.equals(lockForListenerAndClientNotification.getLockRequester())) {
+      synchronized (lockForListenerAndClientNotification) {
+        if (lockForListenerAndClientNotification.getLockRequester() != null) {
+          releaseClearLockLocal();
+        }
+      }
+    }
+  }
+
+  class LockForListenerAndClientNotification {
+
+    private boolean locked = false;
+
+    private InternalDistributedMember lockRequester;
+
+    synchronized void setLocked(InternalDistributedMember member) {
+      locked = true;
+      lockRequester = member;
+    }
+
+    synchronized void setUnLocked() {
+      locked = false;
+      lockRequester = null;
+    }
+
+    synchronized boolean isLocked() {
+      return locked;
+    }
+
+    synchronized InternalDistributedMember getLockRequester() {
+      return lockRequester;
+    }
+  }
+
+  protected void setMembershipChange(boolean membershipChange) {
+    this.membershipChange = membershipChange;
+  }
+
+  protected boolean getMembershipChange() {
+    return membershipChange;
+  }
+
+  protected class PartitionedRegionClearListener implements MembershipListener {
+
+    @Override
+    public synchronized void memberDeparted(DistributionManager distributionManager,
+        InternalDistributedMember id, boolean crashed) {
+      setMembershipChange(true);
+      handleClearFromDepartedMember(id);
+    }
+  }
+}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java
new file mode 100755
index 0000000..724256b
--- /dev/null
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java
@@ -0,0 +1,289 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package org.apache.geode.internal.cache;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Set;
+
+import org.apache.geode.DataSerializer;
+import org.apache.geode.cache.CacheException;
+import org.apache.geode.cache.Operation;
+import org.apache.geode.distributed.internal.ClusterDistributionManager;
+import org.apache.geode.distributed.internal.DistributionManager;
+import org.apache.geode.distributed.internal.DistributionMessage;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.ReplyException;
+import org.apache.geode.distributed.internal.ReplyMessage;
+import org.apache.geode.distributed.internal.ReplyProcessor21;
+import org.apache.geode.distributed.internal.ReplySender;
+import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.Assert;
+import org.apache.geode.internal.CopyOnWriteHashSet;
+import org.apache.geode.internal.NanoTimer;
+import org.apache.geode.internal.cache.partitioned.PartitionMessage;
+import org.apache.geode.internal.logging.log4j.LogMarker;
+import org.apache.geode.internal.serialization.DeserializationContext;
+import org.apache.geode.internal.serialization.SerializationContext;
+import org.apache.geode.logging.internal.log4j.api.LogService;
+
+/**
+ * this message is for operations no the partition region level, could be sent by any originating
+ * member to the other members hosting this partition region
+ */
+public class PartitionedRegionClearMessage extends PartitionMessage {
+
+  public enum OperationType {
+    OP_LOCK_FOR_PR_CLEAR, OP_UNLOCK_FOR_PR_CLEAR, OP_PR_CLEAR,
+  }
+
+  private Object cbArg;
+
+  private OperationType op;
+
+  private EventID eventID;
+
+  private PartitionedRegion partitionedRegion;
+
+  private Set<Integer> bucketsCleared;
+
+  @Override
+  public EventID getEventID() {
+    return eventID;
+  }
+
+  public PartitionedRegionClearMessage() {}
+
+  PartitionedRegionClearMessage(Set<InternalDistributedMember> recipients, PartitionedRegion region,
+      ReplyProcessor21 processor, PartitionedRegionClearMessage.OperationType operationType,
+      final RegionEventImpl event) {
+    super(recipients, region.getPRId(), processor);
+    partitionedRegion = region;
+    op = operationType;
+    cbArg = event.getRawCallbackArgument();
+    eventID = event.getEventId();
+  }
+
+  public OperationType getOp() {
+    return op;
+  }
+
+  public void send() {
+    Assert.assertTrue(getRecipients() != null, "ClearMessage NULL recipients set");
+    setTransactionDistributed(partitionedRegion.getCache().getTxManager().isDistributed());
+    partitionedRegion.getDistributionManager().putOutgoing(this);
+  }
+
+  @Override
+  protected Throwable processCheckForPR(PartitionedRegion pr,
+      DistributionManager distributionManager) {
+    if (pr != null && !pr.getDistributionAdvisor().isInitialized()) {
+      return new ForceReattemptException(
+          String.format("%s : could not find partitioned region with Id %s",
+              distributionManager.getDistributionManagerId(),
+              pr.getRegionIdentifier()));
+    }
+    return null;
+  }
+
+  @Override
+  protected boolean operateOnPartitionedRegion(ClusterDistributionManager dm,
+      PartitionedRegion partitionedRegion,
+      long startTime) throws CacheException {
+
+    if (partitionedRegion == null) {
+      return true;
+    }
+
+    if (partitionedRegion.isDestroyed()) {
+      return true;
+    }
+
+    if (op == OperationType.OP_LOCK_FOR_PR_CLEAR) {
+      partitionedRegion.getPartitionedRegionClear().obtainClearLockLocal(getSender());
+    } else if (op == OperationType.OP_UNLOCK_FOR_PR_CLEAR) {
+      partitionedRegion.getPartitionedRegionClear().releaseClearLockLocal();
+    } else {
+      RegionEventImpl event =
+          new RegionEventImpl(partitionedRegion, Operation.REGION_CLEAR, this.cbArg, true,
+              partitionedRegion.getMyId(),
+              getEventID());
+      bucketsCleared = partitionedRegion.getPartitionedRegionClear().clearRegionLocal(event);
+    }
+    return true;
+  }
+
+  @Override
+  protected void appendFields(StringBuilder buff) {
+    super.appendFields(buff);
+    buff.append(" cbArg=").append(this.cbArg).append(" op=").append(this.op);
+  }
+
+  @Override
+  public int getDSFID() {
+    return CLEAR_PARTITIONED_REGION_MESSAGE;
+  }
+
+  @Override
+  public void fromData(DataInput in,
+      DeserializationContext context) throws IOException, ClassNotFoundException {
+    super.fromData(in, context);
+    this.cbArg = DataSerializer.readObject(in);
+    op = PartitionedRegionClearMessage.OperationType.values()[in.readByte()];
+    eventID = DataSerializer.readObject(in);
+  }
+
+  @Override
+  public void toData(DataOutput out,
+      SerializationContext context) throws IOException {
+    super.toData(out, context);
+    DataSerializer.writeObject(this.cbArg, out);
+    out.writeByte(op.ordinal());
+    DataSerializer.writeObject(eventID, out);
+  }
+
+  /**
+   * The response on which to wait for all the replies. This response ignores any exceptions
+   * received from the "far side"
+   */
+  public static class PartitionedRegionClearResponse extends ReplyProcessor21 {
+    CopyOnWriteHashSet<Integer> bucketsCleared = new CopyOnWriteHashSet<>();
+
+    public PartitionedRegionClearResponse(InternalDistributedSystem system,
+        Set<InternalDistributedMember> initMembers) {
+      super(system, initMembers);
+    }
+
+    @Override
+    public void process(DistributionMessage msg) {
+      if (msg instanceof PartitionedRegionClearReplyMessage) {
+        Set<Integer> buckets = ((PartitionedRegionClearReplyMessage) msg).bucketsCleared;
+        if (buckets != null) {
+          bucketsCleared.addAll(buckets);
+        }
+      }
+      super.process(msg, true);
+    }
+  }
+
+  @Override
+  protected void sendReply(InternalDistributedMember member, int processorId,
+      DistributionManager distributionManager, ReplyException ex,
+      PartitionedRegion partitionedRegion, long startTime) {
+    if (partitionedRegion != null) {
+      if (startTime > 0) {
+        partitionedRegion.getPrStats().endPartitionMessagesProcessing(startTime);
+      }
+    }
+    PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage
+        .send(member, processorId, getReplySender(distributionManager), op, bucketsCleared,
+            ex);
+  }
+
+  public static class PartitionedRegionClearReplyMessage extends ReplyMessage {
+
+    private Set<Integer> bucketsCleared;
+
+    private OperationType op;
+
+    @Override
+    public boolean getInlineProcess() {
+      return true;
+    }
+
+    /**
+     * Empty constructor to conform to DataSerializable interface
+     */
+    public PartitionedRegionClearReplyMessage() {}
+
+    private PartitionedRegionClearReplyMessage(int processorId, OperationType op,
+        Set<Integer> bucketsCleared, ReplyException ex) {
+      super();
+      this.bucketsCleared = bucketsCleared;
+      this.op = op;
+      setProcessorId(processorId);
+      setException(ex);
+    }
+
+    /** Send an ack */
+    public static void send(InternalDistributedMember recipient, int processorId, ReplySender dm,
+        OperationType op, Set<Integer> bucketsCleared, ReplyException ex) {
+
+      Assert.assertTrue(recipient != null, "partitionedRegionClearReplyMessage NULL reply message");
+
+      PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage m =
+          new PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage(processorId, op,
+              bucketsCleared, ex);
+
+      m.setRecipient(recipient);
+      dm.putOutgoing(m);
+    }
+
+    /**
+     * Processes this message. This method is invoked by the receiver of the message.
+     *
+     * @param dm the distribution manager that is processing the message.
+     */
+    @Override
+    public void process(final DistributionManager dm, final ReplyProcessor21 rp) {
+      final long startTime = getTimestamp();
+
+      if (rp == null) {
+        if (LogService.getLogger().isTraceEnabled(LogMarker.DM_VERBOSE)) {
+          LogService.getLogger().trace(LogMarker.DM_VERBOSE, "{}: processor not found", this);
+        }
+        return;
+      }
+
+      rp.process(this);
+
+      dm.getStats().incReplyMessageTime(NanoTimer.getTime() - startTime);
+    }
+
+    @Override
+    public int getDSFID() {
+      return CLEAR_PARTITIONED_REGION_REPLY_MESSAGE;
+    }
+
+    @Override
+    public void fromData(DataInput in,
+        DeserializationContext context) throws IOException, ClassNotFoundException {
+      super.fromData(in, context);
+      op = PartitionedRegionClearMessage.OperationType.values()[in.readByte()];
+      bucketsCleared = DataSerializer.readObject(in);
+    }
+
+    @Override
+    public void toData(DataOutput out,
+        SerializationContext context) throws IOException {
+      super.toData(out, context);
+      out.writeByte(op.ordinal());
+      DataSerializer.writeObject(bucketsCleared, out);
+    }
+
+    @Override
+    public String toString() {
+      StringBuffer sb = new StringBuffer();
+      sb.append("PartitionedRegionClearReplyMessage ")
+          .append("processorId=").append(this.processorId)
+          .append(" sender=").append(sender)
+          .append(" bucketsCleared ").append(this.bucketsCleared)
+          .append(" exception=").append(getException());
+      return sb.toString();
+    }
+  }
+}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java
index 3cfa9b0..56d7a33 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java
@@ -960,6 +960,14 @@ public class PartitionedRegionDataStore implements HasCachePerfStats {
     }
   }
 
+  protected void lockBucketCreationForRegionClear() {
+    bucketCreationLock.writeLock().lock();
+  }
+
+  protected void unlockBucketCreationForRegionClear() {
+    bucketCreationLock.writeLock().unlock();
+  }
+
   /**
    * Gets the total amount of memory in bytes allocated for all values for this PR in this VM. This
    * is the current memory (MB) watermark for data in this PR.
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionEventImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionEventImpl.java
index 201a9d1..3c52fd4 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionEventImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionEventImpl.java
@@ -118,6 +118,11 @@ public class RegionEventImpl
     return region;
   }
 
+  public void setRegion(LocalRegion region) {
+    this.region = region;
+    this.distributedMember = region.getMyId();
+  }
+
   @Override
   public Operation getOperation() {
     return op;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionPerfStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionPerfStats.java
index 498b246..cfdc8b6 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionPerfStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionPerfStats.java
@@ -520,9 +520,15 @@ class RegionPerfStats extends CachePerfStats implements RegionStats {
   }
 
   @Override
-  public void incClearCount() {
-    stats.incLong(clearsId, 1L);
-    cachePerfStats.incClearCount();
+  public void incRegionClearCount() {
+    stats.incLong(regionClearsId, 1L);
+    cachePerfStats.incRegionClearCount();
+  }
+
+  @Override
+  public void incBucketClearCount() {
+    stats.incLong(bucketClearsId, 1L);
+    cachePerfStats.incBucketClearCount();
   }
 
   @Override
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionStats.java b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionStats.java
index e5e76ad..8f1e0a4 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionStats.java
@@ -135,7 +135,9 @@ public interface RegionStats {
 
   void incEvictWorkTime(long delta);
 
-  void incClearCount();
+  void incBucketClearCount();
+
+  void incRegionClearCount();
 
   void incPRQueryRetries();
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java
new file mode 100644
index 0000000..2603b78
--- /dev/null
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java
@@ -0,0 +1,320 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package org.apache.geode.internal.cache.partitioned;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Set;
+
+import org.apache.logging.log4j.Logger;
+
+import org.apache.geode.DataSerializer;
+import org.apache.geode.annotations.VisibleForTesting;
+import org.apache.geode.cache.CacheException;
+import org.apache.geode.cache.Operation;
+import org.apache.geode.cache.persistence.PartitionOfflineException;
+import org.apache.geode.distributed.DistributedMember;
+import org.apache.geode.distributed.internal.ClusterDistributionManager;
+import org.apache.geode.distributed.internal.DirectReplyProcessor;
+import org.apache.geode.distributed.internal.DistributionManager;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.ReplyException;
+import org.apache.geode.distributed.internal.ReplyMessage;
+import org.apache.geode.distributed.internal.ReplyProcessor21;
+import org.apache.geode.distributed.internal.ReplySender;
+import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.Assert;
+import org.apache.geode.internal.InternalDataSerializer;
+import org.apache.geode.internal.NanoTimer;
+import org.apache.geode.internal.cache.BucketRegion;
+import org.apache.geode.internal.cache.EventID;
+import org.apache.geode.internal.cache.ForceReattemptException;
+import org.apache.geode.internal.cache.PartitionedRegion;
+import org.apache.geode.internal.cache.RegionEventImpl;
+import org.apache.geode.internal.logging.log4j.LogMarker;
+import org.apache.geode.internal.serialization.DeserializationContext;
+import org.apache.geode.internal.serialization.SerializationContext;
+import org.apache.geode.logging.internal.log4j.api.LogService;
+
+public class ClearPRMessage extends PartitionMessageWithDirectReply {
+  private static final Logger logger = LogService.getLogger();
+
+  private Integer bucketId;
+
+  private EventID eventID;
+
+  public static final String BUCKET_NON_PRIMARY_MESSAGE =
+      "The bucket region on target member is no longer primary";
+  public static final String EXCEPTION_THROWN_DURING_CLEAR_OPERATION =
+      "An exception was thrown during the local clear operation: ";
+
+  /**
+   * state from operateOnRegion that must be preserved for transmission from the waiting pool
+   */
+  transient boolean result = false;
+
+  /**
+   * Empty constructor to satisfy {@link DataSerializer}requirements
+   */
+  public ClearPRMessage() {}
+
+  public ClearPRMessage(int bucketId, EventID eventID) {
+    this.bucketId = bucketId;
+    this.eventID = eventID;
+  }
+
+  public void initMessage(PartitionedRegion region, Set<InternalDistributedMember> recipients,
+      DirectReplyProcessor replyProcessor) {
+    this.resetRecipients();
+    if (recipients != null) {
+      setRecipients(recipients);
+    }
+    this.regionId = region.getPRId();
+    this.processor = replyProcessor;
+    this.processorId = replyProcessor == null ? 0 : replyProcessor.getProcessorId();
+    if (replyProcessor != null) {
+      replyProcessor.enableSevereAlertProcessing();
+    }
+  }
+
+  public ClearResponse send(DistributedMember recipient, PartitionedRegion region)
+      throws ForceReattemptException {
+    Set<InternalDistributedMember> recipients =
+        Collections.singleton((InternalDistributedMember) recipient);
+    ClearResponse clearResponse = new ClearResponse(region.getSystem(), recipients);
+    initMessage(region, recipients, clearResponse);
+    if (logger.isDebugEnabled()) {
+      logger.debug("ClearPRMessage.send: recipient is {}, msg is {}", recipient, this);
+    }
+
+    Set<InternalDistributedMember> failures = region.getDistributionManager().putOutgoing(this);
+    if (failures != null && failures.size() > 0) {
+      throw new ForceReattemptException("Failed sending <" + this + "> due to " + failures);
+    }
+    return clearResponse;
+  }
+
+  @Override
+  public int getDSFID() {
+    return PR_CLEAR_MESSAGE;
+  }
+
+  @Override
+  public void toData(DataOutput out, SerializationContext context) throws IOException {
+    super.toData(out, context);
+    if (bucketId == null) {
+      InternalDataSerializer.writeSignedVL(-1, out);
+    } else {
+      InternalDataSerializer.writeSignedVL(bucketId, out);
+    }
+    DataSerializer.writeObject(this.eventID, out);
+  }
+
+  @Override
+  public void fromData(DataInput in, DeserializationContext context)
+      throws IOException, ClassNotFoundException {
+    super.fromData(in, context);
+    this.bucketId = (int) InternalDataSerializer.readSignedVL(in);
+    this.eventID = (EventID) DataSerializer.readObject(in);
+  }
+
+  @Override
+  public EventID getEventID() {
+    return null;
+  }
+
+  /**
+   * This method is called upon receipt and make the desired changes to the PartitionedRegion Note:
+   * It is very important that this message does NOT cause any deadlocks as the sender will wait
+   * indefinitely for the acknowledgement
+   */
+  @Override
+  @VisibleForTesting
+  protected boolean operateOnPartitionedRegion(ClusterDistributionManager distributionManager,
+      PartitionedRegion region, long startTime) {
+    try {
+      this.result = doLocalClear(region);
+    } catch (ForceReattemptException ex) {
+      sendReply(getSender(), getProcessorId(), distributionManager, new ReplyException(ex), region,
+          startTime);
+      return false;
+    }
+    return this.result;
+  }
+
+  public Integer getBucketId() {
+    return this.bucketId;
+  }
+
+  public boolean doLocalClear(PartitionedRegion region)
+      throws ForceReattemptException {
+    // Retrieve local bucket region which matches target bucketId
+    BucketRegion bucketRegion =
+        region.getDataStore().getInitializedBucketForId(null, this.bucketId);
+
+    boolean lockedForPrimary = bucketRegion.doLockForPrimary(false);
+    // Check if we obtained primary lock, throw exception if not
+    if (!lockedForPrimary) {
+      throw new ForceReattemptException(BUCKET_NON_PRIMARY_MESSAGE);
+    }
+    try {
+      RegionEventImpl regionEvent = new RegionEventImpl(bucketRegion, Operation.REGION_CLEAR, null,
+          false, region.getMyId(), eventID);
+      bucketRegion.cmnClearRegion(regionEvent, false, true);
+    } catch (PartitionOfflineException poe) {
+      logger.info(
+          "All members holding data for bucket {} are offline, no more retries will be attempted",
+          this.bucketId,
+          poe);
+      throw poe;
+    } catch (Exception ex) {
+      throw new ForceReattemptException(
+          EXCEPTION_THROWN_DURING_CLEAR_OPERATION + ex.getClass().getName(), ex);
+    } finally {
+      bucketRegion.doUnlockForPrimary();
+    }
+
+    return true;
+  }
+
+  @Override
+  public boolean canStartRemoteTransaction() {
+    return false;
+  }
+
+  @Override
+  protected void sendReply(InternalDistributedMember member, int processorId,
+      DistributionManager distributionManager, ReplyException ex,
+      PartitionedRegion partitionedRegion, long startTime) {
+    if (partitionedRegion != null) {
+      if (startTime > 0) {
+        partitionedRegion.getPrStats().endPartitionMessagesProcessing(startTime);
+      }
+    }
+    ClearReplyMessage.send(member, processorId, getReplySender(distributionManager), this.result,
+        ex);
+  }
+
+  @Override
+  protected void appendFields(StringBuilder buff) {
+    super.appendFields(buff);
+    buff.append("; bucketId=").append(this.bucketId);
+  }
+
+  public static class ClearReplyMessage extends ReplyMessage {
+    @Override
+    public boolean getInlineProcess() {
+      return true;
+    }
+
+    /**
+     * Empty constructor to conform to DataSerializable interface
+     */
+    @SuppressWarnings("unused")
+    public ClearReplyMessage() {}
+
+    private ClearReplyMessage(int processorId, boolean result, ReplyException ex) {
+      super();
+      setProcessorId(processorId);
+      if (ex != null) {
+        setException(ex);
+      } else {
+        setReturnValue(result);
+      }
+    }
+
+    /**
+     * Send an ack
+     */
+    public static void send(InternalDistributedMember recipient, int processorId,
+        ReplySender replySender,
+        boolean result, ReplyException ex) {
+      Assert.assertNotNull(recipient, "ClearReplyMessage recipient was NULL.");
+      ClearReplyMessage message = new ClearReplyMessage(processorId, result, ex);
+      message.setRecipient(recipient);
+      replySender.putOutgoing(message);
+    }
+
+    /**
+     * Processes this message. This method is invoked by the receiver of the message.
+     *
+     * @param distributionManager the distribution manager that is processing the message.
+     */
+    @Override
+    public void process(final DistributionManager distributionManager,
+        final ReplyProcessor21 replyProcessor) {
+      final long startTime = getTimestamp();
+      if (replyProcessor == null) {
+        if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) {
+          logger.trace(LogMarker.DM_VERBOSE, "{}: processor not found", this);
+        }
+        return;
+      }
+      if (replyProcessor instanceof ClearResponse) {
+        ((ClearResponse) replyProcessor).setResponse(this);
+      }
+      replyProcessor.process(this);
+
+      if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) {
+        logger.trace(LogMarker.DM_VERBOSE, "{} processed {}", replyProcessor, this);
+      }
+      distributionManager.getStats().incReplyMessageTime(NanoTimer.getTime() - startTime);
+    }
+
+    @Override
+    public int getDSFID() {
+      return PR_CLEAR_REPLY_MESSAGE;
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder stringBuilder = new StringBuilder(super.toString());
+      stringBuilder.append(" returnValue=");
+      stringBuilder.append(getReturnValue());
+      return stringBuilder.toString();
+    }
+  }
+
+  /**
+   * A processor to capture the value returned by {@link ClearPRMessage}
+   */
+  public static class ClearResponse extends PartitionResponse {
+    private volatile boolean returnValue;
+
+    public ClearResponse(InternalDistributedSystem distributedSystem,
+        Set<InternalDistributedMember> recipients) {
+      super(distributedSystem, recipients, false);
+    }
+
+    public void setResponse(ClearReplyMessage response) {
+      if (response.getException() == null) {
+        this.returnValue = (boolean) response.getReturnValue();
+      }
+    }
+
+    /**
+     * @return the result of the remote clear operation
+     * @throws ForceReattemptException if the peer is no longer available
+     * @throws CacheException if the peer generates an error
+     */
+    public boolean waitForResult() throws CacheException, ForceReattemptException {
+      waitForCacheException();
+      return this.returnValue;
+    }
+  }
+}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java
index bf8dd21..0012587 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java
@@ -415,6 +415,7 @@ public class PutAllPRMessage extends PartitionMessageWithDirectReply {
       Object[] keys = getKeysToBeLocked();
       if (!notificationOnly) {
         boolean locked = false;
+        boolean rvvLocked = false;
         try {
           if (putAllPRData.length > 0) {
             if (posDup && bucketRegion.getConcurrencyChecksEnabled()) {
@@ -440,6 +441,10 @@ public class PutAllPRMessage extends PartitionMessageWithDirectReply {
             bucketRegion.recordBulkOpStart(membershipID, eventID);
           }
           locked = bucketRegion.waitUntilLocked(keys);
+          if (!rvvLocked) {
+            bucketRegion.lockRVVForBulkOp();
+            rvvLocked = true;
+          }
           boolean lockedForPrimary = false;
           final HashMap succeeded = new HashMap();
           PutAllPartialResult partialKeys = new PutAllPartialResult(putAllPRDataSize);
@@ -520,6 +525,10 @@ public class PutAllPRMessage extends PartitionMessageWithDirectReply {
         } catch (RegionDestroyedException e) {
           ds.checkRegionDestroyedOnBucket(bucketRegion, true, e);
         } finally {
+          if (rvvLocked) {
+            bucketRegion.unlockRVVForBulkOp();
+            rvvLocked = false;
+          }
           if (locked) {
             bucketRegion.removeAndNotifyKeys(keys);
           }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RegionAdvisor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RegionAdvisor.java
index 362445e..7648ba2 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RegionAdvisor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RegionAdvisor.java
@@ -856,10 +856,21 @@ public class RegionAdvisor extends CacheDistributionAdvisor {
         && prof.filterProfile.hasInterest();
   };
 
+  @Immutable
+  private static final Filter prServerWithCqFilter = profile -> {
+    CacheProfile prof = (CacheProfile) profile;
+    return prof.isPartitioned && prof.hasCacheServer && prof.filterProfile != null
+        && prof.filterProfile.hasCQs();
+  };
+
   public boolean hasPRServerWithInterest() {
     return satisfiesFilter(prServerWithInterestFilter);
   }
 
+  public boolean hasPRServerWithCQs() {
+    return satisfiesFilter(prServerWithCqFilter);
+  }
+
   /**
    * return the set of all members who must receive operation notifications
    *
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveAllPRMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveAllPRMessage.java
index ccf3719..416ec1c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveAllPRMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveAllPRMessage.java
@@ -408,6 +408,7 @@ public class RemoveAllPRMessage extends PartitionMessageWithDirectReply {
 
       if (!notificationOnly) {
         boolean locked = false;
+        boolean rvvLocked = false;
         try {
           if (removeAllPRData.length > 0) {
             if (posDup && bucketRegion.getConcurrencyChecksEnabled()) {
@@ -433,6 +434,10 @@ public class RemoveAllPRMessage extends PartitionMessageWithDirectReply {
             bucketRegion.recordBulkOpStart(membershipID, eventID);
           }
           locked = bucketRegion.waitUntilLocked(keys);
+          if (!rvvLocked) {
+            bucketRegion.lockRVVForBulkOp();
+            rvvLocked = true;
+          }
           boolean lockedForPrimary = false;
           final ArrayList<Object> succeeded = new ArrayList<>();
           PutAllPartialResult partialKeys = new PutAllPartialResult(removeAllPRDataSize);
@@ -526,6 +531,10 @@ public class RemoveAllPRMessage extends PartitionMessageWithDirectReply {
         } catch (RegionDestroyedException e) {
           ds.checkRegionDestroyedOnBucket(bucketRegion, true, e);
         } finally {
+          if (rvvLocked) {
+            bucketRegion.unlockRVVForBulkOp();
+            rvvLocked = false;
+          }
           if (locked) {
             bucketRegion.removeAndNotifyKeys(keys);
           }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/versions/RegionVersionVector.java b/geode-core/src/main/java/org/apache/geode/internal/cache/versions/RegionVersionVector.java
index 3e0627c..cc99476 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/versions/RegionVersionVector.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/versions/RegionVersionVector.java
@@ -320,7 +320,7 @@ public abstract class RegionVersionVector<T extends VersionSource<?>>
         // this method is invoked by memberDeparted events and may not be for the current lock owner
         return;
       }
-      unlockVersionGeneration(locker);
+      unlockVersionGeneration();
     }
   }
 
@@ -416,7 +416,7 @@ public abstract class RegionVersionVector<T extends VersionSource<?>>
 
   }
 
-  private void unlockVersionGeneration(final InternalDistributedMember locker) {
+  private void unlockVersionGeneration() {
     synchronized (clearLockSync) {
       doUnlock = true;
       clearLockSync.notifyAll();
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/i18n/CliStrings.java b/geode-core/src/main/java/org/apache/geode/management/internal/i18n/CliStrings.java
index ba31f14..da6f499 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/i18n/CliStrings.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/i18n/CliStrings.java
@@ -864,6 +864,14 @@ public class CliStrings {
   public static final String CLEAR_DEFINED_INDEX__SUCCESS__MSG =
       "Index definitions successfully cleared";
 
+  /* clear region */
+  public static final String CLEAR_REGION = "clear region";
+  public static final String CLEAR_REGION_HELP =
+      "Clears/Removes all keys from the specified region.";
+  public static final String CLEAR_REGION_REGION_NAME = "name";
+  public static final String CLEAR_REGION_REGION_NAME_HELP = "Region to clear keys from.";
+  public static final String CLEAR_REGION_CLEARED_ALL_KEYS = "Cleared all keys in the region";
+
   /* create region */
   public static final String CREATE_REGION = "create region";
   public static final String CREATE_REGION__HELP =
@@ -1983,9 +1991,9 @@ public class CliStrings {
   public static final String REMOVE__MSG__KEY_EMPTY = "Key is Null";
   public static final String REMOVE__MSG__REGION_NOT_FOUND = "Region <{0}> Not Found";
   public static final String REMOVE__MSG__KEY_NOT_FOUND_REGION = "Key is not present in the region";
-  public static final String REMOVE__MSG__CLEARED_ALL_CLEARS = "Cleared all keys in the region";
-  public static final String REMOVE__MSG__CLEARALL_NOT_SUPPORTED_FOR_PARTITIONREGION =
-      "Option --" + REMOVE__ALL + " is not supported on partitioned region";
+  public static final String REMOVE__MSG__CLEARALL_DEPRECATION_WARNING =
+      "Warning: The --all option for the 'remove' command is deprecated. Please"
+          + " use the 'clear' command instead.";
 
   /* resume gateway-sender */
   public static final String RESUME_GATEWAYSENDER = "resume gateway-sender";
diff --git a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
index 5211eb5..6f3a615 100644
--- a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
+++ b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
@@ -79,6 +79,7 @@ org/apache/geode/cache/NoSubscriptionServersAvailableException,true,848408601915
 org/apache/geode/cache/Operation,true,-7521751729852504238,ordinal:byte
 org/apache/geode/cache/OperationAbortedException,true,-8293166225026556949
 org/apache/geode/cache/PartitionedRegionDistributionException,true,-3004093739855972548
+org/apache/geode/cache/PartitionedRegionPartialClearException,false
 org/apache/geode/cache/PartitionedRegionStorageException,true,5905463619475329732
 org/apache/geode/cache/RegionAccessException,true,3142958723089038406
 org/apache/geode/cache/RegionDestroyedException,true,319804842308010754,regionFullPath:java/lang/String
@@ -302,6 +303,7 @@ org/apache/geode/internal/cache/PRContainsValueFunction,false
 org/apache/geode/internal/cache/PRHARedundancyProvider$ArrayListWithClearState,true,1,wasCleared:boolean
 org/apache/geode/internal/cache/PartitionedRegion$PRIdMap,true,3667357372967498179,cleared:boolean
 org/apache/geode/internal/cache/PartitionedRegion$SizeEntry,false,isPrimary:boolean,size:int
+org/apache/geode/internal/cache/PartitionedRegionClearMessage$OperationType,false
 org/apache/geode/internal/cache/PartitionedRegionDataStore$CreateBucketResult,false,nowExists:boolean
 org/apache/geode/internal/cache/PartitionedRegionException,true,5113786059279106007
 org/apache/geode/internal/cache/PartitionedRegionQueryEvaluator$MemberResultsList,false,isLastChunkReceived:boolean
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java
index 71e2f36..591dc95 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionJUnitTest.java
@@ -14,9 +14,11 @@
  */
 package org.apache.geode.internal.cache;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.Mockito.anyLong;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
@@ -31,7 +33,10 @@ import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
+import org.junit.Test;
+
 import org.apache.geode.cache.RegionAttributes;
+import org.apache.geode.internal.cache.versions.RegionVersionVector;
 import org.apache.geode.internal.statistics.StatisticsClock;
 
 public class BucketRegionJUnitTest extends DistributedRegionJUnitTest {
@@ -46,7 +51,9 @@ public class BucketRegionJUnitTest extends DistributedRegionJUnitTest {
     when(ba.getPrimaryMoveReadLock()).thenReturn(primaryMoveReadLock);
     when(ba.getProxyBucketRegion()).thenReturn(mock(ProxyBucketRegion.class));
     when(ba.isPrimary()).thenReturn(true);
-
+    PartitionedRegionClear clearPR = mock(PartitionedRegionClear.class);
+    when(clearPR.isLockedForListenerAndClientNotification()).thenReturn(true);
+    when(pr.getPartitionedRegionClear()).thenReturn(clearPR);
     ira.setPartitionedRegion(pr).setPartitionedRegionBucketRedundancy(1).setBucketAdvisor(ba);
   }
 
@@ -128,4 +135,80 @@ public class BucketRegionJUnitTest extends DistributedRegionJUnitTest {
     }
   }
 
+  @Test
+  public void cmnClearRegionWillDoNothingIfNotPrimary() {
+    RegionEventImpl event = createClearRegionEvent();
+    BucketRegion region = (BucketRegion) event.getRegion();
+    BucketAdvisor ba = mock(BucketAdvisor.class);
+    RegionVersionVector rvv = mock(RegionVersionVector.class);
+    doReturn(rvv).when(region).getVersionVector();
+    doReturn(ba).when(region).getBucketAdvisor();
+    when(ba.isPrimary()).thenReturn(false);
+    region.cmnClearRegion(event, true, true);
+    verify(region, never()).clearRegionLocally(eq(event), eq(true), eq(rvv));
+  }
+
+  @Test
+  public void cmnClearRegionCalledOnPrimary() {
+    RegionEventImpl event = createClearRegionEvent();
+    BucketRegion region = (BucketRegion) event.getRegion();
+    BucketAdvisor ba = mock(BucketAdvisor.class);
+    RegionVersionVector rvv = mock(RegionVersionVector.class);
+    doReturn(rvv).when(region).getVersionVector();
+    doReturn(true).when(region).getConcurrencyChecksEnabled();
+    doReturn(ba).when(region).getBucketAdvisor();
+    doNothing().when(region).distributeClearOperation(any(), any(), any());
+    doNothing().when(region).lockLocallyForClear(any(), any(), any());
+    doNothing().when(region).lockAndFlushClearToOthers(any(), any());
+    doNothing().when(region).clearRegionLocally(event, true, null);
+    when(ba.isPrimary()).thenReturn(true);
+    region.cmnClearRegion(event, true, true);
+    verify(region, times(1)).clearRegionLocally(eq(event), eq(true), eq(null));
+  }
+
+  @Test
+  public void clearWillUseNullAsRVVWhenConcurrencyCheckDisabled() {
+    RegionEventImpl event = createClearRegionEvent();
+    BucketRegion region = (BucketRegion) event.getRegion();
+    BucketAdvisor ba = mock(BucketAdvisor.class);
+    doReturn(false).when(region).getConcurrencyChecksEnabled();
+    doReturn(ba).when(region).getBucketAdvisor();
+    doNothing().when(region).distributeClearOperation(any(), any(), any());
+    doNothing().when(region).lockLocallyForClear(any(), any(), any());
+    doNothing().when(region).lockAndFlushClearToOthers(any(), any());
+    doNothing().when(region).clearRegionLocally(event, true, null);
+    when(ba.isPrimary()).thenReturn(true);
+    region.cmnClearRegion(event, true, true);
+    verify(region, times(1)).clearRegionLocally(eq(event), eq(true), eq(null));
+  }
+
+  @Test
+  public void obtainWriteLocksForClearInBRShouldDistribute() {
+    RegionEventImpl event = createClearRegionEvent();
+    BucketRegion region = (BucketRegion) event.getRegion();
+    doNothing().when(region).lockLocallyForClear(any(), any(), any());
+    doNothing().when(region).lockAndFlushClearToOthers(any(), any());
+    region.obtainWriteLocksForClear(event, null, false);
+    verify(region).lockLocallyForClear(any(), any(), eq(event));
+    verify(region).lockAndFlushClearToOthers(eq(event), eq(null));
+  }
+
+  @Test
+  public void updateSizeToZeroOnClearBucketRegion() {
+    RegionEventImpl event = createClearRegionEvent();
+    BucketRegion region = (BucketRegion) event.getRegion();
+    PartitionedRegion pr = region.getPartitionedRegion();
+    PartitionedRegionDataStore prds = mock(PartitionedRegionDataStore.class);
+    PartitionedRegionStats prStats = mock(PartitionedRegionStats.class);
+    when(pr.getPrStats()).thenReturn(prStats);
+    doNothing().when(prStats).incDataStoreEntryCount(anyInt());
+    doNothing().when(prds).updateMemoryStats(anyInt());
+    when(pr.getDataStore()).thenReturn(prds);
+    region.updateSizeOnCreate("key1", 20);
+    long sizeBeforeClear = region.getTotalBytes();
+    assertEquals(20, sizeBeforeClear);
+    region.updateSizeOnClearRegion((int) sizeBeforeClear);
+    long sizeAfterClear = region.getTotalBytes();
+    assertEquals(0, sizeAfterClear);
+  }
 }
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java
index f5dcd8e..a80e667 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java
@@ -14,9 +14,9 @@
  */
 package org.apache.geode.internal.cache;
 
+import static org.apache.geode.internal.cache.CachePerfStats.bucketClearsId;
 import static org.apache.geode.internal.cache.CachePerfStats.cacheListenerCallsCompletedId;
 import static org.apache.geode.internal.cache.CachePerfStats.cacheWriterCallsCompletedId;
-import static org.apache.geode.internal.cache.CachePerfStats.clearsId;
 import static org.apache.geode.internal.cache.CachePerfStats.createsId;
 import static org.apache.geode.internal.cache.CachePerfStats.deltaFailedUpdatesId;
 import static org.apache.geode.internal.cache.CachePerfStats.deltaFullValuesRequestedId;
@@ -43,11 +43,14 @@ import static org.apache.geode.internal.cache.CachePerfStats.loadsCompletedId;
 import static org.apache.geode.internal.cache.CachePerfStats.missesId;
 import static org.apache.geode.internal.cache.CachePerfStats.netloadsCompletedId;
 import static org.apache.geode.internal.cache.CachePerfStats.netsearchesCompletedId;
+import static org.apache.geode.internal.cache.CachePerfStats.partitionedRegionClearLocalDurationId;
+import static org.apache.geode.internal.cache.CachePerfStats.partitionedRegionClearTotalDurationId;
 import static org.apache.geode.internal.cache.CachePerfStats.previouslySeenEventsId;
 import static org.apache.geode.internal.cache.CachePerfStats.putAllsId;
 import static org.apache.geode.internal.cache.CachePerfStats.putTimeId;
 import static org.apache.geode.internal.cache.CachePerfStats.putsId;
 import static org.apache.geode.internal.cache.CachePerfStats.queryExecutionsId;
+import static org.apache.geode.internal.cache.CachePerfStats.regionClearsId;
 import static org.apache.geode.internal.cache.CachePerfStats.removeAllsId;
 import static org.apache.geode.internal.cache.CachePerfStats.retriesId;
 import static org.apache.geode.internal.cache.CachePerfStats.txCommitChangesId;
@@ -429,30 +432,60 @@ public class CachePerfStatsTest {
 
   @Test
   public void getClearsDelegatesToStatistics() {
-    statistics.incLong(clearsId, Long.MAX_VALUE);
+    statistics.incLong(regionClearsId, Long.MAX_VALUE);
 
-    assertThat(cachePerfStats.getClearCount()).isEqualTo(Long.MAX_VALUE);
+    assertThat(cachePerfStats.getRegionClearCount()).isEqualTo(Long.MAX_VALUE);
   }
 
+  @Test
+  public void incRegionClearCountIncrementsClears() {
+    cachePerfStats.incRegionClearCount();
 
+    assertThat(statistics.getLong(regionClearsId)).isEqualTo(1L);
+  }
 
   @Test
-  public void incClearCountIncrementsClears() {
-    cachePerfStats.incClearCount();
+  public void incBucketClearCountIncrementsClears() {
+    cachePerfStats.incBucketClearCount();
 
-    assertThat(statistics.getLong(clearsId)).isEqualTo(1L);
+    assertThat(statistics.getLong(bucketClearsId)).isEqualTo(1L);
+  }
+
+  @Test
+  public void incPartitionedRegionClearLocalDurationIncrementsPartitionedRegionClearLocalDuration() {
+    cachePerfStats.incPartitionedRegionClearLocalDuration(100L);
+
+    assertThat(statistics.getLong(partitionedRegionClearLocalDurationId)).isEqualTo(100L);
+  }
+
+
+
+  @Test
+  public void incPartitionedRegionClearTotalDurationIncrementsPartitionedRegionClearTotalDuration() {
+    cachePerfStats.incPartitionedRegionClearTotalDuration(100L);
+
+    assertThat(statistics.getLong(partitionedRegionClearTotalDurationId)).isEqualTo(100L);
   }
 
   /**
    * Characterization test: {@code clears} currently wraps to negative from max long value.
    */
   @Test
-  public void clearsWrapsFromMaxLongToNegativeValue() {
-    statistics.incLong(clearsId, Long.MAX_VALUE);
+  public void regionClearsWrapsFromMaxLongToNegativeValue() {
+    statistics.incLong(regionClearsId, Long.MAX_VALUE);
+
+    cachePerfStats.incRegionClearCount();
+
+    assertThat(cachePerfStats.getRegionClearCount()).isNegative();
+  }
+
+  @Test
+  public void bucketClearsWrapsFromMaxLongToNegativeValue() {
+    statistics.incLong(bucketClearsId, Long.MAX_VALUE);
 
-    cachePerfStats.incClearCount();
+    cachePerfStats.incBucketClearCount();
 
-    assertThat(cachePerfStats.getClearCount()).isNegative();
+    assertThat(cachePerfStats.getBucketClearCount()).isNegative();
   }
 
   @Test
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionJUnitTest.java
index 9070bc0..74bc5fd 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionJUnitTest.java
@@ -14,6 +14,7 @@
  */
 package org.apache.geode.internal.cache;
 
+import static org.apache.geode.internal.Assert.fail;
 import static org.apache.geode.internal.statistics.StatisticsClockFactory.disabledClock;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertFalse;
@@ -53,6 +54,14 @@ public class DistributedRegionJUnitTest
   @Override
   protected void setInternalRegionArguments(InternalRegionArguments ira) {}
 
+  protected RegionEventImpl createClearRegionEvent() {
+    DistributedRegion region = prepare(true, true);
+    DistributedMember member = mock(DistributedMember.class);
+    RegionEventImpl regionEvent = new RegionEventImpl(region, Operation.REGION_CLEAR, null, false,
+        member, true);
+    return regionEvent;
+  }
+
   @Override
   protected DistributedRegion createAndDefineRegion(boolean isConcurrencyChecksEnabled,
       RegionAttributes ra, InternalRegionArguments ira, GemFireCacheImpl cache,
@@ -246,4 +255,13 @@ public class DistributedRegionJUnitTest
     region.basicBridgeReplace("key1", "value1", false, null, client, true, clientEvent);
     assertThat(clientEvent.getVersionTag().equals(tag));
   }
+
+  @Test(expected = UnsupportedOperationException.class)
+  public void localClearIsNotSupportedOnReplicatedRegion() {
+    RegionEventImpl event = createClearRegionEvent();
+    DistributedRegion region = (DistributedRegion) event.getRegion();
+    region.basicLocalClear(event);
+    fail("Expect UnsupportedOperationException");
+  }
+
 }
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/LocalRegionTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/LocalRegionTest.java
index f5145c4..6f01aa4 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/LocalRegionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/LocalRegionTest.java
@@ -24,6 +24,7 @@ import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
@@ -337,4 +338,25 @@ public class LocalRegionTest {
     assertThat(clientEvent.isConcurrencyConflict()).isTrue();
     assertThat(clientEvent.getVersionTag()).isEqualTo(tag);
   }
+
+  @Test
+  public void cancelAllEntryExpiryTasksShouldClearMapOfExpiryTasks() {
+    when(cache.getExpirationScheduler()).thenReturn(mock(ExpirationScheduler.class));
+    LocalRegion region =
+        spy(new LocalRegion("region", regionAttributes, null, cache, internalRegionArguments,
+            internalDataView, regionMapConstructor, serverRegionProxyConstructor, entryEventFactory,
+            poolFinder, regionPerfStatsFactory, disabledClock()));
+
+    RegionEntry regionEntry1 = mock(RegionEntry.class);
+    RegionEntry regionEntry2 = mock(RegionEntry.class);
+    EntryExpiryTask entryExpiryTask1 = spy(new EntryExpiryTask(region, regionEntry1));
+    EntryExpiryTask entryExpiryTask2 = spy(new EntryExpiryTask(region, regionEntry2));
+    region.entryExpiryTasks.put(regionEntry1, entryExpiryTask1);
+    region.entryExpiryTasks.put(regionEntry2, entryExpiryTask2);
+
+    region.cancelAllEntryExpiryTasks();
+    assertThat(region.entryExpiryTasks).isEmpty();
+    verify(entryExpiryTask1, times(1)).cancel();
+    verify(entryExpiryTask2, times(1)).cancel();
+  }
 }
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java
new file mode 100644
index 0000000..3b66e67
--- /dev/null
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionClearTest.java
@@ -0,0 +1,897 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache;
+
+import static java.util.Collections.emptySet;
+import static java.util.Collections.singleton;
+import static org.apache.geode.internal.cache.FilterProfile.NO_PROFILES;
+import static org.apache.geode.util.internal.UncheckedUtils.uncheckedCast;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.catchThrowable;
+import static org.mockito.ArgumentCaptor.forClass;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.ArgumentCaptor;
+
+import org.apache.geode.CancelCriterion;
+import org.apache.geode.cache.PartitionedRegionPartialClearException;
+import org.apache.geode.cache.Region;
+import org.apache.geode.distributed.DistributedLockService;
+import org.apache.geode.distributed.internal.DMStats;
+import org.apache.geode.distributed.internal.DistributionManager;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.MembershipListener;
+import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.cache.PartitionedRegion.RetryTimeKeeper;
+import org.apache.geode.internal.cache.PartitionedRegionClear.PartitionedRegionClearListener;
+import org.apache.geode.internal.cache.PartitionedRegionClearMessage.OperationType;
+import org.apache.geode.internal.cache.partitioned.RegionAdvisor;
+import org.apache.geode.internal.serialization.KnownVersion;
+
+public class PartitionedRegionClearTest {
+
+  private DistributionManager distributionManager;
+  private PartitionedRegion partitionedRegion;
+  private RegionAdvisor regionAdvisor;
+  private InternalDistributedMember internalDistributedMember;
+
+  private PartitionedRegionClear partitionedRegionClear;
+
+  @Before
+  public void setUp() {
+    distributionManager = mock(DistributionManager.class);
+    internalDistributedMember = mock(InternalDistributedMember.class);
+    partitionedRegion = mock(PartitionedRegion.class);
+    regionAdvisor = mock(RegionAdvisor.class);
+
+    when(distributionManager.getDistributionManagerId()).thenReturn(internalDistributedMember);
+    when(distributionManager.getId()).thenReturn(internalDistributedMember);
+    when(internalDistributedMember.getVersion()).thenReturn(KnownVersion.CURRENT);
+    when(partitionedRegion.getDistributionManager()).thenReturn(distributionManager);
+    when(partitionedRegion.getName()).thenReturn("prRegion");
+    when(partitionedRegion.getRegionAdvisor()).thenReturn(regionAdvisor);
+    when(regionAdvisor.getDistributionManager()).thenReturn(distributionManager);
+
+    partitionedRegionClear = new PartitionedRegionClear(partitionedRegion);
+  }
+
+  @Test
+  public void isLockedForListenerAndClientNotificationReturnsTrueWhenLocked() {
+    // arrange
+    when(distributionManager.isCurrentMember(internalDistributedMember)).thenReturn(true);
+    partitionedRegionClear.obtainClearLockLocal(internalDistributedMember);
+
+    // act
+    boolean result = partitionedRegionClear.isLockedForListenerAndClientNotification();
+
+    // assert
+    assertThat(result).isTrue();
+  }
+
+  @Test
+  public void isLockedForListenerAndClientNotificationReturnsFalseWhenMemberNotInTheSystemRequestsLock() {
+    // arrange
+    when(distributionManager.isCurrentMember(internalDistributedMember)).thenReturn(false);
+
+    // act
+    boolean result = partitionedRegionClear.isLockedForListenerAndClientNotification();
+
+    // assert
+    assertThat(result).isFalse();
+  }
+
+  @Test
+  public void acquireDistributedClearLockGetsDistributedLock() {
+    // arrange
+    DistributedLockService distributedLockService = mock(DistributedLockService.class);
+    String lockName = PartitionedRegionClear.CLEAR_OPERATION + partitionedRegion.getName();
+    when(partitionedRegion.getPartitionedRegionLockService()).thenReturn(distributedLockService);
+
+    // act
+    partitionedRegionClear.acquireDistributedClearLock(lockName);
+
+    // assert
+    verify(distributedLockService).lock(lockName, -1, -1);
+  }
+
+  @Test
+  public void releaseDistributedClearLockReleasesDistributedLock() {
+    // arrange
+    DistributedLockService distributedLockService = mock(DistributedLockService.class);
+    String lockName = PartitionedRegionClear.CLEAR_OPERATION + partitionedRegion.getName();
+    when(partitionedRegion.getPartitionedRegionLockService()).thenReturn(distributedLockService);
+
+    // act
+    partitionedRegionClear.releaseDistributedClearLock(lockName);
+
+    // assert
+    verify(distributedLockService).unlock(lockName);
+  }
+
+  @Test
+  public void obtainLockForClearGetsLocalLockAndSendsMessageForRemote() throws Exception {
+    // arrange
+    Region<String, PartitionRegionConfig> region = uncheckedCast(mock(Region.class));
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    // partial mocking to stub some methods and verify
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+    when(partitionedRegion.getPRRoot())
+        .thenReturn(region);
+    when(regionEvent.clone())
+        .thenReturn(mock(RegionEventImpl.class));
+    doReturn(emptySet())
+        .when(spyPartitionedRegionClear)
+        .attemptToSendPartitionedRegionClearMessage(regionEvent,
+            OperationType.OP_LOCK_FOR_PR_CLEAR);
+
+    // act
+    spyPartitionedRegionClear.obtainLockForClear(regionEvent);
+
+    // assert
+    verify(spyPartitionedRegionClear)
+        .obtainClearLockLocal(internalDistributedMember);
+    verify(spyPartitionedRegionClear)
+        .sendPartitionedRegionClearMessage(regionEvent, OperationType.OP_LOCK_FOR_PR_CLEAR);
+  }
+
+  @Test
+  public void releaseLockForClearReleasesLocalLockAndSendsMessageForRemote() throws Exception {
+    // arrange
+    Region<String, PartitionRegionConfig> region = uncheckedCast(mock(Region.class));
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    when(partitionedRegion.getPRRoot())
+        .thenReturn(region);
+    when(regionEvent.clone())
+        .thenReturn(mock(RegionEventImpl.class));
+
+    // partial mocking to stub some methods and verify
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+    doReturn(emptySet())
+        .when(spyPartitionedRegionClear)
+        .attemptToSendPartitionedRegionClearMessage(regionEvent,
+            OperationType.OP_UNLOCK_FOR_PR_CLEAR);
+
+    // act
+    spyPartitionedRegionClear.releaseLockForClear(regionEvent);
+
+    // assert
+    verify(spyPartitionedRegionClear)
+        .releaseClearLockLocal();
+    verify(spyPartitionedRegionClear)
+        .sendPartitionedRegionClearMessage(regionEvent, OperationType.OP_UNLOCK_FOR_PR_CLEAR);
+  }
+
+  @Test
+  public void clearRegionClearsLocalAndSendsMessageForRemote() throws Exception {
+    // arrange
+    Region<String, PartitionRegionConfig> region = uncheckedCast(mock(Region.class));
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    when(partitionedRegion.getPRRoot())
+        .thenReturn(region);
+    when(regionEvent.clone())
+        .thenReturn(mock(RegionEventImpl.class));
+
+    // partial mocking to stub some methods and verify
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+    doReturn(emptySet())
+        .when(spyPartitionedRegionClear)
+        .attemptToSendPartitionedRegionClearMessage(regionEvent, OperationType.OP_PR_CLEAR);
+
+    // act
+    spyPartitionedRegionClear.clearRegion(regionEvent);
+
+    // assert
+    verify(spyPartitionedRegionClear)
+        .clearRegionLocal(regionEvent);
+    verify(spyPartitionedRegionClear)
+        .sendPartitionedRegionClearMessage(regionEvent, OperationType.OP_PR_CLEAR);
+  }
+
+  @Test
+  public void waitForPrimaryReturnsAfterFindingAllPrimary() {
+    // arrange
+    BucketAdvisor bucketAdvisor = mock(BucketAdvisor.class);
+    PartitionedRegionDataStore dataStore = mock(PartitionedRegionDataStore.class);
+    RetryTimeKeeper retryTimer = mock(RetryTimeKeeper.class);
+    when(bucketAdvisor.hasPrimary()).thenReturn(true);
+    when(partitionedRegion.getDataStore()).thenReturn(dataStore);
+    setupBucketRegions(dataStore, bucketAdvisor);
+
+    // act
+    partitionedRegionClear.waitForPrimary(retryTimer);
+
+    // assert
+    verify(retryTimer, never()).waitForBucketsRecovery();
+  }
+
+  @Test
+  public void waitForPrimaryReturnsAfterRetryForPrimary() {
+    // arrange
+    BucketAdvisor bucketAdvisor = mock(BucketAdvisor.class);
+    PartitionedRegionDataStore dataStore = mock(PartitionedRegionDataStore.class);
+    RetryTimeKeeper retryTimer = mock(RetryTimeKeeper.class);
+    when(bucketAdvisor.hasPrimary()).thenReturn(false).thenReturn(true);
+    when(partitionedRegion.getDataStore()).thenReturn(dataStore);
+    setupBucketRegions(dataStore, bucketAdvisor);
+
+    // act
+    partitionedRegionClear.waitForPrimary(retryTimer);
+
+    // assert
+    verify(retryTimer).waitForBucketsRecovery();
+  }
+
+  @Test
+  public void waitForPrimaryThrowsPartitionedRegionPartialClearException() {
+    // arrange
+    BucketAdvisor bucketAdvisor = mock(BucketAdvisor.class);
+    PartitionedRegionDataStore dataStore = mock(PartitionedRegionDataStore.class);
+    RetryTimeKeeper retryTimer = mock(RetryTimeKeeper.class);
+    when(partitionedRegion.getDataStore())
+        .thenReturn(dataStore);
+    when(retryTimer.overMaximum())
+        .thenReturn(true);
+    setupBucketRegions(dataStore, bucketAdvisor);
+
+    // act
+    Throwable thrown = catchThrowable(() -> partitionedRegionClear.waitForPrimary(retryTimer));
+
+    // assert
+    assertThat(thrown)
+        .isInstanceOf(PartitionedRegionPartialClearException.class)
+        .hasMessage(
+            "Unable to find primary bucket region during clear operation on prRegion region.");
+    verify(retryTimer, never())
+        .waitForBucketsRecovery();
+  }
+
+  @Test
+  public void clearRegionLocalCallsClearOnLocalPrimaryBucketRegions() {
+    // arrange
+    BucketAdvisor bucketAdvisor = mock(BucketAdvisor.class);
+    PartitionedRegionDataStore dataStore = mock(PartitionedRegionDataStore.class);
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+    when(bucketAdvisor.hasPrimary()).thenReturn(true);
+    when(partitionedRegion.getDataStore()).thenReturn(dataStore);
+    doNothing().when(dataStore).lockBucketCreationForRegionClear();
+    Set<BucketRegion> buckets = setupBucketRegions(dataStore, bucketAdvisor);
+
+    // act
+    Set<Integer> bucketsCleared = partitionedRegionClear.clearRegionLocal(regionEvent);
+
+    // assert
+    assertThat(bucketsCleared).hasSameSizeAs(buckets);
+    ArgumentCaptor<RegionEventImpl> captor = forClass(RegionEventImpl.class);
+    for (BucketRegion bucketRegion : buckets) {
+      verify(bucketRegion).cmnClearRegion(captor.capture(), eq(false), eq(true));
+      Region<?, ?> region = captor.getValue().getRegion();
+      assertThat(region).isEqualTo(bucketRegion);
+    }
+  }
+
+  @Test
+  public void clearRegionLocalRetriesClearOnNonClearedLocalPrimaryBucketRegionsWhenMembershipChanges() {
+    // arrange
+    BucketAdvisor bucketAdvisor = mock(BucketAdvisor.class);
+    PartitionedRegionDataStore dataStore = mock(PartitionedRegionDataStore.class);
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    when(bucketAdvisor.hasPrimary())
+        .thenReturn(true);
+    doNothing()
+        .when(dataStore)
+        .lockBucketCreationForRegionClear();
+
+    Set<BucketRegion> buckets = setupBucketRegions(dataStore, bucketAdvisor);
+
+    Set<BucketRegion> allBuckets = new HashSet<>(buckets);
+    for (int i = 0; i < 3; i++) {
+      BucketRegion bucketRegion = mock(BucketRegion.class);
+      when(bucketRegion.getBucketAdvisor())
+          .thenReturn(bucketAdvisor);
+      when(bucketRegion.getId())
+          .thenReturn(i + buckets.size());
+      when(bucketRegion.size())
+          .thenReturn(1);
+      allBuckets.add(bucketRegion);
+    }
+
+    // After the first try, add 3 extra buckets to the local bucket regions
+    when(dataStore.getAllLocalBucketRegions())
+        .thenReturn(buckets)
+        .thenReturn(allBuckets);
+    when(dataStore.getAllLocalPrimaryBucketRegions())
+        .thenReturn(buckets)
+        .thenReturn(allBuckets);
+    when(partitionedRegion.getDataStore())
+        .thenReturn(dataStore);
+
+    // partial mocking to stub some methods
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+    when(spyPartitionedRegionClear.getMembershipChange())
+        .thenReturn(true)
+        .thenReturn(false);
+
+    // act
+    Set<Integer> bucketsCleared = spyPartitionedRegionClear.clearRegionLocal(regionEvent);
+
+    // assert
+    assertThat(bucketsCleared).hasSameSizeAs(allBuckets);
+    ArgumentCaptor<RegionEventImpl> captor = forClass(RegionEventImpl.class);
+    for (BucketRegion bucketRegion : allBuckets) {
+      verify(bucketRegion)
+          .cmnClearRegion(captor.capture(), eq(false), eq(true));
+      Region<?, ?> region = captor.getValue().getRegion();
+      assertThat(region).isEqualTo(bucketRegion);
+    }
+  }
+
+  @Test
+  public void doAfterClearCallsNotifyClientsWhenClientHaveInterests() {
+    // arrange
+    FilterProfile filterProfile = mock(FilterProfile.class);
+    FilterRoutingInfo filterRoutingInfo = mock(FilterRoutingInfo.class);
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    when(filterProfile.getFilterRoutingInfoPart1(regionEvent, NO_PROFILES, emptySet()))
+        .thenReturn(filterRoutingInfo);
+    when(filterProfile.getFilterRoutingInfoPart2(filterRoutingInfo, regionEvent))
+        .thenReturn(filterRoutingInfo);
+    when(partitionedRegion.getFilterProfile()).thenReturn(filterProfile);
+    when(partitionedRegion.hasAnyClientsInterested())
+        .thenReturn(true);
+
+    // act
+    partitionedRegionClear.doAfterClear(regionEvent);
+
+    // assert
+    verify(regionEvent)
+        .setLocalFilterInfo(any());
+    verify(partitionedRegion)
+        .notifyBridgeClients(regionEvent);
+  }
+
+  @Test
+  public void doAfterClearDispatchesListenerEvents() {
+    // arrange
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+    when(partitionedRegion.hasListener())
+        .thenReturn(true);
+
+    // act
+    partitionedRegionClear.doAfterClear(regionEvent);
+
+    verify(partitionedRegion)
+        .dispatchListenerEvent(EnumListenerEvent.AFTER_REGION_CLEAR, regionEvent);
+  }
+
+  @Test
+  public void obtainClearLockLocalGetsLockOnPrimaryBuckets() {
+    // arrange
+    BucketAdvisor bucketAdvisor = mock(BucketAdvisor.class);
+    PartitionedRegionDataStore dataStore = mock(PartitionedRegionDataStore.class);
+
+    when(bucketAdvisor.hasPrimary())
+        .thenReturn(true);
+    when(distributionManager.isCurrentMember(internalDistributedMember))
+        .thenReturn(true);
+    when(partitionedRegion.getDataStore())
+        .thenReturn(dataStore);
+
+    Set<BucketRegion> buckets = setupBucketRegions(dataStore, bucketAdvisor);
+
+    // act
+    partitionedRegionClear.obtainClearLockLocal(internalDistributedMember);
+
+    // assert
+    // TODO: encapsulate lockForListenerAndClientNotification
+    assertThat(partitionedRegionClear.lockForListenerAndClientNotification.getLockRequester())
+        .isSameAs(internalDistributedMember);
+    for (BucketRegion bucketRegion : buckets) {
+      verify(bucketRegion)
+          .lockLocallyForClear(partitionedRegion.getDistributionManager(),
+              partitionedRegion.getMyId(), null);
+    }
+  }
+
+  @Test
+  public void obtainClearLockLocalDoesNotGetLocksOnPrimaryBucketsWhenMemberIsNotCurrent() {
+    // arrange
+    BucketAdvisor bucketAdvisor = mock(BucketAdvisor.class);
+    PartitionedRegionDataStore dataStore = mock(PartitionedRegionDataStore.class);
+
+    when(bucketAdvisor.hasPrimary())
+        .thenReturn(true);
+    when(distributionManager.isCurrentMember(internalDistributedMember))
+        .thenReturn(false);
+    when(partitionedRegion.getDataStore())
+        .thenReturn(dataStore);
+
+    Set<BucketRegion> buckets = setupBucketRegions(dataStore, bucketAdvisor);
+
+    // act
+    partitionedRegionClear.obtainClearLockLocal(internalDistributedMember);
+
+    // assert
+    assertThat(partitionedRegionClear.lockForListenerAndClientNotification.getLockRequester())
+        .isNull();
+    for (BucketRegion bucketRegion : buckets) {
+      verify(bucketRegion, never())
+          .lockLocallyForClear(partitionedRegion.getDistributionManager(),
+              partitionedRegion.getMyId(), null);
+    }
+  }
+
+  @Test
+  public void releaseClearLockLocalReleasesLockOnPrimaryBuckets() {
+    // arrange
+    BucketAdvisor bucketAdvisor = mock(BucketAdvisor.class);
+    PartitionedRegionDataStore dataStore = mock(PartitionedRegionDataStore.class);
+
+    when(bucketAdvisor.hasPrimary())
+        .thenReturn(true);
+    when(distributionManager.isCurrentMember(internalDistributedMember))
+        .thenReturn(true);
+    when(partitionedRegion.getDataStore())
+        .thenReturn(dataStore);
+
+    Set<BucketRegion> buckets = setupBucketRegions(dataStore, bucketAdvisor);
+
+    partitionedRegionClear.lockForListenerAndClientNotification
+        .setLocked(internalDistributedMember);
+
+    // act
+    partitionedRegionClear.releaseClearLockLocal();
+
+    // assert
+    for (BucketRegion bucketRegion : buckets) {
+      verify(bucketRegion)
+          .releaseLockLocallyForClear(null);
+    }
+  }
+
+  @Test
+  public void releaseClearLockLocalDoesNotReleaseLocksOnPrimaryBucketsWhenMemberIsNotCurrent() {
+    // arrange
+    BucketAdvisor bucketAdvisor = mock(BucketAdvisor.class);
+    PartitionedRegionDataStore dataStore = mock(PartitionedRegionDataStore.class);
+
+    when(bucketAdvisor.hasPrimary())
+        .thenReturn(true);
+    when(partitionedRegion.getDataStore())
+        .thenReturn(dataStore);
+
+    Set<BucketRegion> buckets = setupBucketRegions(dataStore, bucketAdvisor);
+
+    // act
+    partitionedRegionClear.releaseClearLockLocal();
+
+    // assert
+    assertThat(partitionedRegionClear.lockForListenerAndClientNotification.getLockRequester())
+        .isNull();
+    for (BucketRegion bucketRegion : buckets) {
+      verify(bucketRegion, never())
+          .releaseLockLocallyForClear(null);
+    }
+  }
+
+  @Test
+  public void sendPartitionedRegionClearMessageSendsClearMessageToPRNodes() {
+    // arrange
+    InternalCache internalCache = mock(InternalCache.class);
+    InternalDistributedMember member = mock(InternalDistributedMember.class);
+    Node node = mock(Node.class);
+    PartitionRegionConfig partitionRegionConfig = mock(PartitionRegionConfig.class);
+    Region<String, PartitionRegionConfig> prRoot = uncheckedCast(mock(Region.class));
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+    InternalDistributedSystem system = mock(InternalDistributedSystem.class);
+    TXManagerImpl txManager = mock(TXManagerImpl.class);
+
+    Set<InternalDistributedMember> prNodes = singleton(member);
+    Set<Node> configNodes = singleton(node);
+
+    when(distributionManager.getCancelCriterion())
+        .thenReturn(mock(CancelCriterion.class));
+    when(distributionManager.getStats())
+        .thenReturn(mock(DMStats.class));
+    when(internalCache.getTxManager())
+        .thenReturn(txManager);
+    when(member.getVersion())
+        .thenReturn(KnownVersion.getCurrentVersion());
+    when(node.getMemberId())
+        .thenReturn(member);
+    when(partitionRegionConfig.getNodes())
+        .thenReturn(configNodes);
+    when(partitionedRegion.getPRRoot())
+        .thenReturn(prRoot);
+    when(regionAdvisor.adviseAllPRNodes())
+        .thenReturn(prNodes);
+    when(regionEvent.clone())
+        .thenReturn(mock(RegionEventImpl.class));
+    when(partitionedRegion.getSystem())
+        .thenReturn(system);
+    when(prRoot.get(anyString()))
+        .thenReturn(partitionRegionConfig);
+    when(system.getDistributionManager())
+        .thenReturn(distributionManager);
+    when(txManager.isDistributed())
+        .thenReturn(false);
+    when(partitionedRegion.getCache())
+        .thenReturn(internalCache);
+
+    // act
+    partitionedRegionClear
+        .sendPartitionedRegionClearMessage(regionEvent, OperationType.OP_PR_CLEAR);
+
+    // assert
+    verify(distributionManager)
+        .putOutgoing(any());
+  }
+
+  @Test
+  public void doClearAcquiresAndReleasesDistributedClearLockAndCreatesAllPrimaryBuckets() {
+    // arrange
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    // partial mocking to stub some methods and verify
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+    doNothing().when(spyPartitionedRegionClear).acquireDistributedClearLock(any());
+    doNothing().when(spyPartitionedRegionClear).assignAllPrimaryBuckets();
+    doReturn(emptySet()).when(spyPartitionedRegionClear).clearRegion(regionEvent);
+
+    // act
+    spyPartitionedRegionClear.doClear(regionEvent, false);
+
+    // assert
+    verify(spyPartitionedRegionClear).acquireDistributedClearLock(any());
+    verify(spyPartitionedRegionClear).releaseDistributedClearLock(any());
+    verify(spyPartitionedRegionClear).assignAllPrimaryBuckets();
+  }
+
+  @Test
+  public void doClearInvokesCacheWriterWhenCacheWriteIsSet() {
+    // arrange
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    // partial mocking to stub some methods and verify
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+    doNothing().when(spyPartitionedRegionClear).acquireDistributedClearLock(any());
+    doNothing().when(spyPartitionedRegionClear).assignAllPrimaryBuckets();
+    doReturn(emptySet()).when(spyPartitionedRegionClear).clearRegion(regionEvent);
+
+    // act
+    spyPartitionedRegionClear.doClear(regionEvent, true);
+
+    // assert
+    verify(spyPartitionedRegionClear).invokeCacheWriter(regionEvent);
+  }
+
+  @Test
+  public void doClearDoesNotInvokesCacheWriterWhenCacheWriteIsNotSet() {
+    // arrange
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    // partial mocking to stub some methods and verify
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+    doNothing().when(spyPartitionedRegionClear).acquireDistributedClearLock(any());
+    doNothing().when(spyPartitionedRegionClear).assignAllPrimaryBuckets();
+    doReturn(emptySet()).when(spyPartitionedRegionClear).clearRegion(regionEvent);
+
+    // act
+    spyPartitionedRegionClear.doClear(regionEvent, false);
+
+    // assert
+    verify(spyPartitionedRegionClear, never()).invokeCacheWriter(regionEvent);
+  }
+
+  @Test
+  public void doClearObtainsAndReleasesLockForClearWhenRegionHasListener() {
+    // arrange
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    when(partitionedRegion.hasAnyClientsInterested()).thenReturn(false);
+    when(partitionedRegion.hasListener()).thenReturn(true);
+
+    // partial mocking to stub some methods and verify
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+    doNothing().when(spyPartitionedRegionClear).acquireDistributedClearLock(any());
+    doNothing().when(spyPartitionedRegionClear).assignAllPrimaryBuckets();
+    doNothing().when(spyPartitionedRegionClear).obtainLockForClear(regionEvent);
+    doNothing().when(spyPartitionedRegionClear).releaseLockForClear(regionEvent);
+    doReturn(emptySet()).when(spyPartitionedRegionClear).clearRegion(regionEvent);
+
+    // act
+    spyPartitionedRegionClear.doClear(regionEvent, false);
+
+    // assert
+    verify(spyPartitionedRegionClear).obtainLockForClear(regionEvent);
+    verify(spyPartitionedRegionClear).releaseLockForClear(regionEvent);
+  }
+
+  @Test
+  public void doClearObtainsAndReleasesLockForClearWhenRegionHasClientInterest() {
+    // arrange
+    boolean cacheWrite = false;
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    when(partitionedRegion.hasAnyClientsInterested()).thenReturn(true);
+    when(partitionedRegion.hasListener()).thenReturn(false);
+
+    // partial mocking to stub some methods and verify
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+    doNothing().when(spyPartitionedRegionClear).acquireDistributedClearLock(any());
+    doNothing().when(spyPartitionedRegionClear).assignAllPrimaryBuckets();
+    doNothing().when(spyPartitionedRegionClear).obtainLockForClear(regionEvent);
+    doNothing().when(spyPartitionedRegionClear).releaseLockForClear(regionEvent);
+    doReturn(emptySet()).when(spyPartitionedRegionClear).clearRegion(regionEvent);
+
+    // act
+    spyPartitionedRegionClear.doClear(regionEvent, cacheWrite);
+
+    // assert
+    verify(spyPartitionedRegionClear).obtainLockForClear(regionEvent);
+    verify(spyPartitionedRegionClear).releaseLockForClear(regionEvent);
+  }
+
+  @Test
+  public void doClearDoesNotObtainLockForClearWhenRegionHasNoListenerAndNoClientInterest() {
+    // arrange
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    when(partitionedRegion.hasAnyClientsInterested()).thenReturn(false);
+    when(partitionedRegion.hasListener()).thenReturn(false);
+
+    // partial mocking to stub some methods and verify
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+    doNothing().when(spyPartitionedRegionClear).acquireDistributedClearLock(any());
+    doNothing().when(spyPartitionedRegionClear).assignAllPrimaryBuckets();
+    doNothing().when(spyPartitionedRegionClear).obtainLockForClear(regionEvent);
+    doNothing().when(spyPartitionedRegionClear).releaseLockForClear(regionEvent);
+    doReturn(emptySet()).when(spyPartitionedRegionClear).clearRegion(regionEvent);
+
+    // act
+    spyPartitionedRegionClear.doClear(regionEvent, false);
+
+    // assert
+    verify(spyPartitionedRegionClear, never()).obtainLockForClear(regionEvent);
+    verify(spyPartitionedRegionClear, never()).releaseLockForClear(regionEvent);
+  }
+
+  @Test
+  public void doClearThrowsPartitionedRegionPartialClearException() {
+    // arrange
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+
+    when(partitionedRegion.hasListener()).thenReturn(false);
+    when(partitionedRegion.hasAnyClientsInterested()).thenReturn(false);
+    when(partitionedRegion.getTotalNumberOfBuckets()).thenReturn(1);
+    when(partitionedRegion.getName()).thenReturn("prRegion");
+
+    // partial mocking to stub some methods
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+    doNothing().when(spyPartitionedRegionClear).acquireDistributedClearLock(any());
+    doNothing().when(spyPartitionedRegionClear).assignAllPrimaryBuckets();
+    doNothing().when(spyPartitionedRegionClear).obtainLockForClear(regionEvent);
+    doNothing().when(spyPartitionedRegionClear).releaseLockForClear(regionEvent);
+    doReturn(emptySet()).when(spyPartitionedRegionClear).clearRegion(regionEvent);
+
+    // act
+    Throwable thrown =
+        catchThrowable(() -> spyPartitionedRegionClear.doClear(regionEvent, false));
+
+    // assert
+    assertThat(thrown)
+        .isInstanceOf(PartitionedRegionPartialClearException.class)
+        .hasMessage(
+            "Unable to clear all the buckets from the partitioned region prRegion, either data (buckets) moved or member departed.");
+  }
+
+  @Test
+  public void doClearThrowsUnsupportedOperationException() {
+    // arrange
+    InternalDistributedMember member = mock(InternalDistributedMember.class);
+    InternalDistributedMember oldMember = mock(InternalDistributedMember.class);
+    Node node = mock(Node.class);
+    Node oldNode = mock(Node.class);
+
+    Set<InternalDistributedMember> prNodes = new HashSet<>();
+    prNodes.add(member);
+    prNodes.add(oldMember);
+
+    Set<Node> configNodes = new HashSet<>();
+    configNodes.add(node);
+    configNodes.add(oldNode);
+
+    InternalCache cache = mock(InternalCache.class);
+    PartitionRegionConfig partitionRegionConfig = mock(PartitionRegionConfig.class);
+    Region<String, PartitionRegionConfig> prRoot = uncheckedCast(mock(Region.class));
+    RegionEventImpl regionEvent = mock(RegionEventImpl.class);
+    InternalDistributedSystem system = mock(InternalDistributedSystem.class);
+    TXManagerImpl txManager = mock(TXManagerImpl.class);
+
+    when(member.getName()).thenReturn("member");
+    when(oldMember.getName()).thenReturn("oldMember");
+    when(node.getMemberId()).thenReturn(member);
+    when(oldNode.getMemberId()).thenReturn(oldMember);
+    when(member.getVersion()).thenReturn(KnownVersion.getCurrentVersion());
+    when(oldMember.getVersion()).thenReturn(KnownVersion.GEODE_1_11_0);
+
+    when(cache.getTxManager()).thenReturn(txManager);
+    when(distributionManager.getCancelCriterion()).thenReturn(mock(CancelCriterion.class));
+    when(distributionManager.getStats()).thenReturn(mock(DMStats.class));
+    when(partitionRegionConfig.getNodes()).thenReturn(configNodes);
+    when(partitionedRegion.getBucketPrimary(0)).thenReturn(member);
+    when(partitionedRegion.getBucketPrimary(1)).thenReturn(oldMember);
+    when(partitionedRegion.getCache()).thenReturn(cache);
+    when(partitionedRegion.getName()).thenReturn("prRegion");
+    when(partitionedRegion.getPRRoot()).thenReturn(prRoot);
+    when(partitionedRegion.getSystem()).thenReturn(system);
+    when(partitionedRegion.getTotalNumberOfBuckets()).thenReturn(2);
+    when(partitionedRegion.hasListener()).thenReturn(false);
+    when(partitionedRegion.hasAnyClientsInterested()).thenReturn(false);
+    when(prRoot.get(anyString())).thenReturn(partitionRegionConfig);
+    when(regionAdvisor.adviseAllPRNodes()).thenReturn(prNodes);
+    when(regionEvent.clone()).thenReturn(mock(RegionEventImpl.class));
+    when(system.getDistributionManager()).thenReturn(distributionManager);
+    when(txManager.isDistributed()).thenReturn(false);
+
+    // partial mocking to stub some methods
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+    doNothing().when(spyPartitionedRegionClear).acquireDistributedClearLock(any());
+    doNothing().when(spyPartitionedRegionClear).assignAllPrimaryBuckets();
+    doNothing().when(spyPartitionedRegionClear).obtainLockForClear(regionEvent);
+    doNothing().when(spyPartitionedRegionClear).releaseLockForClear(regionEvent);
+    doReturn(singleton("2")).when(spyPartitionedRegionClear).clearRegion(regionEvent);
+
+    // act
+    Throwable thrown =
+        catchThrowable(() -> spyPartitionedRegionClear.doClear(regionEvent, false));
+
+    // assert
+    assertThat(thrown)
+        .isInstanceOf(UnsupportedOperationException.class)
+        .hasMessage(
+            "A server's [oldMember] version was too old (< GEODE 1.14.0) for : Partitioned Region Clear");
+  }
+
+  @Test
+  public void handleClearFromDepartedMemberReleasesTheLockForRequesterDeparture() {
+    // arrange
+    InternalDistributedMember member = mock(InternalDistributedMember.class);
+    partitionedRegionClear.lockForListenerAndClientNotification.setLocked(member);
+
+    // partial mocking to verify
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+
+    // act
+    spyPartitionedRegionClear.handleClearFromDepartedMember(member);
+
+    // assert
+    verify(spyPartitionedRegionClear).releaseClearLockLocal();
+  }
+
+  @Test
+  public void handleClearFromDepartedMemberDoesNotReleasesTheLockForNonRequesterDeparture() {
+    // arrange
+    InternalDistributedMember requesterMember = mock(InternalDistributedMember.class);
+    InternalDistributedMember member = mock(InternalDistributedMember.class);
+    partitionedRegionClear.lockForListenerAndClientNotification.setLocked(requesterMember);
+
+    // partial mocking to verify
+    PartitionedRegionClear spyPartitionedRegionClear = spy(partitionedRegionClear);
+
+    // act
+    spyPartitionedRegionClear.handleClearFromDepartedMember(member);
+
+    // assert
+    verify(spyPartitionedRegionClear, never()).releaseClearLockLocal();
+  }
+
+  @Test
+  public void partitionedRegionClearRegistersMembershipListener() {
+    // assert
+    MembershipListener membershipListener =
+        partitionedRegionClear.getPartitionedRegionClearListener();
+    verify(distributionManager).addMembershipListener(membershipListener);
+  }
+
+  @Test
+  public void lockRequesterDepartureReleasesTheLock() {
+    // arrange
+    InternalDistributedMember member = mock(InternalDistributedMember.class);
+    partitionedRegionClear.lockForListenerAndClientNotification.setLocked(member);
+    PartitionedRegionClearListener partitionedRegionClearListener =
+        partitionedRegionClear.getPartitionedRegionClearListener();
+
+    // act
+    partitionedRegionClearListener.memberDeparted(distributionManager, member, true);
+
+    // assert
+    assertThat(partitionedRegionClear.getMembershipChange())
+        .isTrue();
+    assertThat(partitionedRegionClear.lockForListenerAndClientNotification.getLockRequester())
+        .isNull();
+  }
+
+  @Test
+  public void nonLockRequesterDepartureDoesNotReleasesTheLock() {
+    // arrange
+    InternalDistributedMember requesterMember = mock(InternalDistributedMember.class);
+    InternalDistributedMember member = mock(InternalDistributedMember.class);
+    partitionedRegionClear.lockForListenerAndClientNotification.setLocked(requesterMember);
+    PartitionedRegionClearListener partitionedRegionClearListener =
+        partitionedRegionClear.getPartitionedRegionClearListener();
+
+    // act
+    partitionedRegionClearListener.memberDeparted(distributionManager, member, true);
+
+    // assert
+    assertThat(partitionedRegionClear.getMembershipChange())
+        .isTrue();
+    assertThat(partitionedRegionClear.lockForListenerAndClientNotification.getLockRequester())
+        .isNotNull();
+  }
+
+  private Set<BucketRegion> setupBucketRegions(
+      PartitionedRegionDataStore dataStore,
+      BucketAdvisor bucketAdvisor) {
+    return setupBucketRegions(dataStore, bucketAdvisor, 2);
+  }
+
+  private Set<BucketRegion> setupBucketRegions(
+      PartitionedRegionDataStore dataStore,
+      BucketAdvisor bucketAdvisor,
+      int bucketCount) {
+    Set<BucketRegion> bucketRegions = new HashSet<>();
+
+    for (int i = 0; i < bucketCount; i++) {
+      BucketRegion bucketRegion = mock(BucketRegion.class);
+
+      when(bucketRegion.getBucketAdvisor())
+          .thenReturn(bucketAdvisor);
+      when(bucketRegion.getId())
+          .thenReturn(i);
+      when(bucketRegion.size())
+          .thenReturn(1)
+          .thenReturn(0);
+
+      bucketRegions.add(bucketRegion);
+    }
+
+    when(dataStore.getAllLocalBucketRegions())
+        .thenReturn(bucketRegions);
+    when(dataStore.getAllLocalPrimaryBucketRegions())
+        .thenReturn(bucketRegions);
+
+    return bucketRegions;
+  }
+}
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java
index 67fdf9f..fb01334 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionTest.java
@@ -23,11 +23,13 @@ import static org.assertj.core.api.Assertions.assertThatCode;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.assertj.core.api.Assertions.catchThrowable;
 import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.isNull;
 import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doCallRealMethod;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
@@ -40,6 +42,7 @@ import static org.mockito.quality.Strictness.STRICT_STUBS;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -81,6 +84,7 @@ import org.apache.geode.distributed.internal.DistributionManager;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.cache.control.InternalResourceManager;
+import org.apache.geode.internal.cache.partitioned.ClearPRMessage;
 import org.apache.geode.internal.cache.partitioned.colocation.ColocationLoggerFactory;
 import org.apache.geode.test.junit.runners.GeodeParamsRunner;
 
@@ -216,6 +220,28 @@ public class PartitionedRegionTest {
   }
 
   @Test
+  public void clearShouldNotThrowUnsupportedOperationException() {
+    PartitionedRegion spyPartitionedRegion = spy(partitionedRegion);
+    doNothing().when(spyPartitionedRegion).checkReadiness();
+    doCallRealMethod().when(spyPartitionedRegion).basicClear(any());
+    doNothing().when(spyPartitionedRegion).basicClear(any(), anyBoolean());
+    spyPartitionedRegion.clear();
+  }
+
+  @Test
+  public void createClearPRMessagesShouldCreateMessagePerBucket() {
+    PartitionedRegion spyPartitionedRegion = spy(partitionedRegion);
+    RegionEventImpl regionEvent =
+        new RegionEventImpl(spyPartitionedRegion, Operation.REGION_CLEAR, null, false,
+            spyPartitionedRegion.getMyId(), true);
+    when(spyPartitionedRegion.getTotalNumberOfBuckets()).thenReturn(3);
+    EventID eventID = new EventID(spyPartitionedRegion.getCache().getDistributedSystem());
+    List<ClearPRMessage> msgs = spyPartitionedRegion.createClearPRMessages(eventID);
+    assertThat(msgs.size()).isEqualTo(3);
+  }
+
+
+  @Test
   public void getBucketNodeForReadOrWriteReturnsPrimaryNodeForRegisterInterest() {
     // ARRANGE
     EntryEventImpl clientEvent = mock(EntryEventImpl.class);
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ClearPRMessageTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ClearPRMessageTest.java
new file mode 100644
index 0000000..acdd4fc
--- /dev/null
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ClearPRMessageTest.java
@@ -0,0 +1,260 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.cache.partitioned;
... 1639 lines suppressed ...

[geode] 05/20: GEODE-9132: Cleanup PartitionedRegionClearMessage

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 436bc4eec1dbc9ac46ceff654abf21794d8056ce
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Fri Apr 9 17:24:26 2021 -0700

    GEODE-9132: Cleanup PartitionedRegionClearMessage
    
    * Use descriptive names for variables and methods
    * Use Objects.requireNonNull instead of Assert.assertTrue
    * Remove unnecessary uses of final, this, and super
    * Use static logger
    * Reformat some lines with weird formatting
---
 .../partitioned/PRClearCreateIndexDUnitTest.java   |   5 +-
 ...ionedRegionAfterClearNotificationDUnitTest.java |   4 +-
 ...itionedRegionClearWithAlterRegionDUnitTest.java |   2 +-
 ...gionClearWithConcurrentOperationsDUnitTest.java |   2 +-
 .../cache/PartitionedRegionClearMessage.java       | 225 ++++++++++-----------
 .../internal/cache/PartitionRegionClearHATest.java |   2 +-
 6 files changed, 118 insertions(+), 122 deletions(-)

diff --git a/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearCreateIndexDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearCreateIndexDUnitTest.java
index 1c94c2d..423932d 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearCreateIndexDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRClearCreateIndexDUnitTest.java
@@ -236,10 +236,11 @@ public class PRClearCreateIndexDUnitTest implements Serializable {
       if (message instanceof PartitionedRegionClearMessage) {
         PartitionedRegionClearMessage clearMessage = (PartitionedRegionClearMessage) message;
         if (clearMessage
-            .getOp() == PartitionedRegionClearMessage.OperationType.OP_LOCK_FOR_PR_CLEAR) {
+            .getOperationType() == PartitionedRegionClearMessage.OperationType.OP_LOCK_FOR_PR_CLEAR) {
           lock_others = true;
         }
-        if (clearMessage.getOp() == PartitionedRegionClearMessage.OperationType.OP_PR_CLEAR) {
+        if (clearMessage
+            .getOperationType() == PartitionedRegionClearMessage.OperationType.OP_PR_CLEAR) {
           clear_others = true;
         }
       }
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionAfterClearNotificationDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionAfterClearNotificationDUnitTest.java
index 237b6a8..7979cfa 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionAfterClearNotificationDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionAfterClearNotificationDUnitTest.java
@@ -326,7 +326,7 @@ public class PartitionedRegionAfterClearNotificationDUnitTest implements Seriali
       public void beforeProcessMessage(ClusterDistributionManager dm, DistributionMessage message) {
         if (message instanceof PartitionedRegionClearMessage) {
           if (((PartitionedRegionClearMessage) message)
-              .getOp() == PartitionedRegionClearMessage.OperationType.OP_LOCK_FOR_PR_CLEAR) {
+              .getOperationType() == PartitionedRegionClearMessage.OperationType.OP_LOCK_FOR_PR_CLEAR) {
             DistributionMessageObserver.setInstance(null);
             getBlackboard().signalGate("CLOSE_CACHE");
             try {
@@ -348,7 +348,7 @@ public class PartitionedRegionAfterClearNotificationDUnitTest implements Seriali
       public void afterProcessMessage(ClusterDistributionManager dm, DistributionMessage message) {
         if (message instanceof PartitionedRegionClearMessage) {
           if (((PartitionedRegionClearMessage) message)
-              .getOp() == PartitionedRegionClearMessage.OperationType.OP_LOCK_FOR_PR_CLEAR) {
+              .getOperationType() == PartitionedRegionClearMessage.OperationType.OP_LOCK_FOR_PR_CLEAR) {
             DistributionMessageObserver.setInstance(null);
             getBlackboard().signalGate("CLOSE_CACHE");
             try {
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithAlterRegionDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithAlterRegionDUnitTest.java
index fb74eb3..564706e 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithAlterRegionDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithAlterRegionDUnitTest.java
@@ -759,7 +759,7 @@ public class PartitionedRegionClearWithAlterRegionDUnitTest implements Serializa
     private void shutdownMember(DistributionMessage message) {
       if (message instanceof PartitionedRegionClearMessage) {
         if (((PartitionedRegionClearMessage) message)
-            .getOp() == PartitionedRegionClearMessage.OperationType.OP_PR_CLEAR) {
+            .getOperationType() == PartitionedRegionClearMessage.OperationType.OP_PR_CLEAR) {
           DistributionMessageObserver.setInstance(null);
           InternalDistributedSystem.getConnectedInstance().stopReconnectingNoDisconnect();
           MembershipManagerHelper
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
index fdb91c7..77537cb 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
@@ -703,7 +703,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     private void shutdownMember(DistributionMessage message) {
       if (message instanceof PartitionedRegionClearMessage) {
         if (((PartitionedRegionClearMessage) message)
-            .getOp() == PartitionedRegionClearMessage.OperationType.OP_PR_CLEAR) {
+            .getOperationType() == PartitionedRegionClearMessage.OperationType.OP_PR_CLEAR) {
           DistributionMessageObserver.setInstance(null);
           InternalDistributedSystem.getConnectedInstance().stopReconnectingNoDisconnect();
           MembershipManagerHelper
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java
index 724256b..36cdcb6 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionClearMessage.java
@@ -12,14 +12,16 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-
 package org.apache.geode.internal.cache;
 
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
+import java.util.Objects;
 import java.util.Set;
 
+import org.apache.logging.log4j.Logger;
+
 import org.apache.geode.DataSerializer;
 import org.apache.geode.cache.CacheException;
 import org.apache.geode.cache.Operation;
@@ -32,7 +34,6 @@ import org.apache.geode.distributed.internal.ReplyMessage;
 import org.apache.geode.distributed.internal.ReplyProcessor21;
 import org.apache.geode.distributed.internal.ReplySender;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
-import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.CopyOnWriteHashSet;
 import org.apache.geode.internal.NanoTimer;
 import org.apache.geode.internal.cache.partitioned.PartitionMessage;
@@ -41,96 +42,92 @@ import org.apache.geode.internal.serialization.DeserializationContext;
 import org.apache.geode.internal.serialization.SerializationContext;
 import org.apache.geode.logging.internal.log4j.api.LogService;
 
-/**
- * this message is for operations no the partition region level, could be sent by any originating
- * member to the other members hosting this partition region
- */
 public class PartitionedRegionClearMessage extends PartitionMessage {
+  private static final Logger logger = LogService.getLogger();
 
   public enum OperationType {
     OP_LOCK_FOR_PR_CLEAR, OP_UNLOCK_FOR_PR_CLEAR, OP_PR_CLEAR,
   }
 
-  private Object cbArg;
-
-  private OperationType op;
-
-  private EventID eventID;
-
+  private Object callbackArgument;
+  private OperationType operationType;
+  private EventID eventId;
   private PartitionedRegion partitionedRegion;
-
   private Set<Integer> bucketsCleared;
 
-  @Override
-  public EventID getEventID() {
-    return eventID;
+  public PartitionedRegionClearMessage() {
+    // nothing
   }
 
-  public PartitionedRegionClearMessage() {}
+  PartitionedRegionClearMessage(Set<InternalDistributedMember> recipients,
+      PartitionedRegion partitionedRegion, ReplyProcessor21 replyProcessor21,
+      PartitionedRegionClearMessage.OperationType operationType, RegionEventImpl regionEvent) {
+    super(recipients, partitionedRegion.getPRId(), replyProcessor21);
+    this.partitionedRegion = partitionedRegion;
+    this.operationType = operationType;
+    callbackArgument = regionEvent.getRawCallbackArgument();
+    eventId = regionEvent.getEventId();
+  }
 
-  PartitionedRegionClearMessage(Set<InternalDistributedMember> recipients, PartitionedRegion region,
-      ReplyProcessor21 processor, PartitionedRegionClearMessage.OperationType operationType,
-      final RegionEventImpl event) {
-    super(recipients, region.getPRId(), processor);
-    partitionedRegion = region;
-    op = operationType;
-    cbArg = event.getRawCallbackArgument();
-    eventID = event.getEventId();
+  @Override
+  public EventID getEventID() {
+    return eventId;
   }
 
-  public OperationType getOp() {
-    return op;
+  public OperationType getOperationType() {
+    return operationType;
   }
 
   public void send() {
-    Assert.assertTrue(getRecipients() != null, "ClearMessage NULL recipients set");
+    Objects.requireNonNull(getRecipients(), "ClearMessage NULL recipients set");
+
     setTransactionDistributed(partitionedRegion.getCache().getTxManager().isDistributed());
     partitionedRegion.getDistributionManager().putOutgoing(this);
   }
 
   @Override
-  protected Throwable processCheckForPR(PartitionedRegion pr,
+  protected Throwable processCheckForPR(PartitionedRegion partitionedRegion,
       DistributionManager distributionManager) {
-    if (pr != null && !pr.getDistributionAdvisor().isInitialized()) {
+    if (partitionedRegion != null && !partitionedRegion.getDistributionAdvisor().isInitialized()) {
       return new ForceReattemptException(
           String.format("%s : could not find partitioned region with Id %s",
               distributionManager.getDistributionManagerId(),
-              pr.getRegionIdentifier()));
+              partitionedRegion.getRegionIdentifier()));
     }
     return null;
   }
 
   @Override
-  protected boolean operateOnPartitionedRegion(ClusterDistributionManager dm,
-      PartitionedRegion partitionedRegion,
-      long startTime) throws CacheException {
-
+  protected boolean operateOnPartitionedRegion(ClusterDistributionManager distributionManager,
+      PartitionedRegion partitionedRegion, long startTime) throws CacheException {
     if (partitionedRegion == null) {
       return true;
     }
-
     if (partitionedRegion.isDestroyed()) {
       return true;
     }
 
-    if (op == OperationType.OP_LOCK_FOR_PR_CLEAR) {
+    if (operationType == OperationType.OP_LOCK_FOR_PR_CLEAR) {
       partitionedRegion.getPartitionedRegionClear().obtainClearLockLocal(getSender());
-    } else if (op == OperationType.OP_UNLOCK_FOR_PR_CLEAR) {
+    } else if (operationType == OperationType.OP_UNLOCK_FOR_PR_CLEAR) {
       partitionedRegion.getPartitionedRegionClear().releaseClearLockLocal();
     } else {
       RegionEventImpl event =
-          new RegionEventImpl(partitionedRegion, Operation.REGION_CLEAR, this.cbArg, true,
-              partitionedRegion.getMyId(),
-              getEventID());
+          new RegionEventImpl(partitionedRegion, Operation.REGION_CLEAR, callbackArgument, true,
+              partitionedRegion.getMyId(), getEventID());
       bucketsCleared = partitionedRegion.getPartitionedRegionClear().clearRegionLocal(event);
     }
     return true;
   }
 
   @Override
-  protected void appendFields(StringBuilder buff) {
-    super.appendFields(buff);
-    buff.append(" cbArg=").append(this.cbArg).append(" op=").append(this.op);
+  protected void appendFields(StringBuilder stringBuilder) {
+    super.appendFields(stringBuilder);
+    stringBuilder
+        .append(" cbArg=")
+        .append(callbackArgument)
+        .append(" op=")
+        .append(operationType);
   }
 
   @Override
@@ -139,21 +136,32 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
   }
 
   @Override
-  public void fromData(DataInput in,
-      DeserializationContext context) throws IOException, ClassNotFoundException {
+  public void fromData(DataInput in, DeserializationContext context)
+      throws IOException, ClassNotFoundException {
     super.fromData(in, context);
-    this.cbArg = DataSerializer.readObject(in);
-    op = PartitionedRegionClearMessage.OperationType.values()[in.readByte()];
-    eventID = DataSerializer.readObject(in);
+    callbackArgument = DataSerializer.readObject(in);
+    operationType = PartitionedRegionClearMessage.OperationType.values()[in.readByte()];
+    eventId = DataSerializer.readObject(in);
   }
 
   @Override
-  public void toData(DataOutput out,
-      SerializationContext context) throws IOException {
+  public void toData(DataOutput out, SerializationContext context) throws IOException {
     super.toData(out, context);
-    DataSerializer.writeObject(this.cbArg, out);
-    out.writeByte(op.ordinal());
-    DataSerializer.writeObject(eventID, out);
+    DataSerializer.writeObject(callbackArgument, out);
+    out.writeByte(operationType.ordinal());
+    DataSerializer.writeObject(eventId, out);
+  }
+
+  @Override
+  protected void sendReply(InternalDistributedMember recipient, int processorId,
+      DistributionManager distributionManager, ReplyException replyException,
+      PartitionedRegion partitionedRegion, long startTime) {
+    if (partitionedRegion != null && startTime > 0) {
+      partitionedRegion.getPrStats().endPartitionMessagesProcessing(startTime);
+    }
+    PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage
+        .send(recipient, processorId, getReplySender(distributionManager), operationType,
+            bucketsCleared, replyException);
   }
 
   /**
@@ -161,97 +169,85 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
    * received from the "far side"
    */
   public static class PartitionedRegionClearResponse extends ReplyProcessor21 {
+
     CopyOnWriteHashSet<Integer> bucketsCleared = new CopyOnWriteHashSet<>();
 
     public PartitionedRegionClearResponse(InternalDistributedSystem system,
-        Set<InternalDistributedMember> initMembers) {
-      super(system, initMembers);
+        Set<InternalDistributedMember> recipients) {
+      super(system, recipients);
     }
 
     @Override
-    public void process(DistributionMessage msg) {
-      if (msg instanceof PartitionedRegionClearReplyMessage) {
-        Set<Integer> buckets = ((PartitionedRegionClearReplyMessage) msg).bucketsCleared;
+    public void process(DistributionMessage message) {
+      if (message instanceof PartitionedRegionClearReplyMessage) {
+        Set<Integer> buckets = ((PartitionedRegionClearReplyMessage) message).bucketsCleared;
         if (buckets != null) {
           bucketsCleared.addAll(buckets);
         }
       }
-      super.process(msg, true);
-    }
-  }
-
-  @Override
-  protected void sendReply(InternalDistributedMember member, int processorId,
-      DistributionManager distributionManager, ReplyException ex,
-      PartitionedRegion partitionedRegion, long startTime) {
-    if (partitionedRegion != null) {
-      if (startTime > 0) {
-        partitionedRegion.getPrStats().endPartitionMessagesProcessing(startTime);
-      }
+      process(message, true);
     }
-    PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage
-        .send(member, processorId, getReplySender(distributionManager), op, bucketsCleared,
-            ex);
   }
 
   public static class PartitionedRegionClearReplyMessage extends ReplyMessage {
 
     private Set<Integer> bucketsCleared;
 
-    private OperationType op;
+    private OperationType operationType;
 
     @Override
     public boolean getInlineProcess() {
       return true;
     }
 
+    public static void send(InternalDistributedMember recipient, int processorId,
+        ReplySender replySender, OperationType operationType, Set<Integer> bucketsCleared,
+        ReplyException replyException) {
+      Objects.requireNonNull(recipient, "partitionedRegionClearReplyMessage NULL reply message");
+
+      PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage replyMessage =
+          new PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage(processorId,
+              operationType, bucketsCleared, replyException);
+
+      replyMessage.setRecipient(recipient);
+      replySender.putOutgoing(replyMessage);
+    }
+
     /**
      * Empty constructor to conform to DataSerializable interface
      */
-    public PartitionedRegionClearReplyMessage() {}
+    public PartitionedRegionClearReplyMessage() {
+      // Empty constructor to conform to DataSerializable interface
+    }
 
-    private PartitionedRegionClearReplyMessage(int processorId, OperationType op,
-        Set<Integer> bucketsCleared, ReplyException ex) {
-      super();
+    private PartitionedRegionClearReplyMessage(int processorId, OperationType operationType,
+        Set<Integer> bucketsCleared, ReplyException replyException) {
       this.bucketsCleared = bucketsCleared;
-      this.op = op;
+      this.operationType = operationType;
       setProcessorId(processorId);
-      setException(ex);
-    }
-
-    /** Send an ack */
-    public static void send(InternalDistributedMember recipient, int processorId, ReplySender dm,
-        OperationType op, Set<Integer> bucketsCleared, ReplyException ex) {
-
-      Assert.assertTrue(recipient != null, "partitionedRegionClearReplyMessage NULL reply message");
-
-      PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage m =
-          new PartitionedRegionClearMessage.PartitionedRegionClearReplyMessage(processorId, op,
-              bucketsCleared, ex);
-
-      m.setRecipient(recipient);
-      dm.putOutgoing(m);
+      setException(replyException);
     }
 
     /**
      * Processes this message. This method is invoked by the receiver of the message.
      *
-     * @param dm the distribution manager that is processing the message.
+     * @param distributionManager the distribution manager that is processing the message.
      */
     @Override
-    public void process(final DistributionManager dm, final ReplyProcessor21 rp) {
-      final long startTime = getTimestamp();
+    public void process(DistributionManager distributionManager,
+        ReplyProcessor21 replyProcessor21) {
+      long startTime = getTimestamp();
 
-      if (rp == null) {
-        if (LogService.getLogger().isTraceEnabled(LogMarker.DM_VERBOSE)) {
-          LogService.getLogger().trace(LogMarker.DM_VERBOSE, "{}: processor not found", this);
+      if (replyProcessor21 == null) {
+        if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) {
+          logger.trace(LogMarker.DM_VERBOSE, "{}: processor not found", this);
         }
         return;
       }
 
-      rp.process(this);
+      replyProcessor21.process(this);
 
-      dm.getStats().incReplyMessageTime(NanoTimer.getTime() - startTime);
+      distributionManager.getStats().incReplyMessageTime(NanoTimer.getTime() - startTime);
     }
 
     @Override
@@ -260,30 +256,29 @@ public class PartitionedRegionClearMessage extends PartitionMessage {
     }
 
     @Override
-    public void fromData(DataInput in,
-        DeserializationContext context) throws IOException, ClassNotFoundException {
+    public void fromData(DataInput in, DeserializationContext context)
+        throws IOException, ClassNotFoundException {
       super.fromData(in, context);
-      op = PartitionedRegionClearMessage.OperationType.values()[in.readByte()];
+      operationType = PartitionedRegionClearMessage.OperationType.values()[in.readByte()];
       bucketsCleared = DataSerializer.readObject(in);
     }
 
     @Override
-    public void toData(DataOutput out,
-        SerializationContext context) throws IOException {
+    public void toData(DataOutput out, SerializationContext context) throws IOException {
       super.toData(out, context);
-      out.writeByte(op.ordinal());
+      out.writeByte(operationType.ordinal());
       DataSerializer.writeObject(bucketsCleared, out);
     }
 
     @Override
     public String toString() {
-      StringBuffer sb = new StringBuffer();
-      sb.append("PartitionedRegionClearReplyMessage ")
-          .append("processorId=").append(this.processorId)
+      return new StringBuilder()
+          .append("PartitionedRegionClearReplyMessage ")
+          .append("processorId=").append(processorId)
           .append(" sender=").append(sender)
-          .append(" bucketsCleared ").append(this.bucketsCleared)
-          .append(" exception=").append(getException());
-      return sb.toString();
+          .append(" bucketsCleared ").append(bucketsCleared)
+          .append(" exception=").append(getException())
+          .toString();
     }
   }
 }
diff --git a/geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/PartitionRegionClearHATest.java b/geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/PartitionRegionClearHATest.java
index 7d0db0a..5497028 100644
--- a/geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/PartitionRegionClearHATest.java
+++ b/geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/PartitionRegionClearHATest.java
@@ -220,7 +220,7 @@ public class PartitionRegionClearHATest implements Serializable {
       if (message instanceof PartitionedRegionClearMessage) {
         PartitionedRegionClearMessage clearMessage = (PartitionedRegionClearMessage) message;
         if (clearMessage
-            .getOp() == PartitionedRegionClearMessage.OperationType.OP_UNLOCK_FOR_PR_CLEAR) {
+            .getOperationType() == PartitionedRegionClearMessage.OperationType.OP_UNLOCK_FOR_PR_CLEAR) {
           try {
             // count down to 1 so that we can go ahead and restart the server
             latch.countDown();

[geode] 11/20: GEODE-9132: PartitionedRegionClearWithConcurrentOperationsDUnitTest cleanup 1

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch feature/GEODE-7665
in repository https://gitbox.apache.org/repos/asf/geode.git

commit ec48272c1615b27c32e546a58c8736c5f84b427d
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Apr 19 14:38:02 2021 -0700

    GEODE-9132: PartitionedRegionClearWithConcurrentOperationsDUnitTest cleanup 1
---
 ...gionClearWithConcurrentOperationsDUnitTest.java | 97 +++++++++-------------
 1 file changed, 41 insertions(+), 56 deletions(-)

diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
index 77537cb..c9a1e5b 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearWithConcurrentOperationsDUnitTest.java
@@ -28,11 +28,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
 import java.util.stream.IntStream;
 
 import junitparams.JUnitParamsRunner;
@@ -61,7 +56,6 @@ import org.apache.geode.distributed.internal.membership.api.MembershipManagerHel
 import org.apache.geode.internal.cache.versions.RegionVersionHolder;
 import org.apache.geode.internal.cache.versions.RegionVersionVector;
 import org.apache.geode.internal.cache.versions.VersionSource;
-import org.apache.geode.test.awaitility.GeodeAwaitility;
 import org.apache.geode.test.dunit.AsyncInvocation;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.rules.CacheRule;
@@ -73,15 +67,16 @@ import org.apache.geode.test.dunit.rules.DistributedRule;
  * added or removed.
  */
 @RunWith(JUnitParamsRunner.class)
+@SuppressWarnings("serial")
 public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements Serializable {
-  private static final Integer BUCKETS = 13;
+
+  private static final int BUCKETS = 13;
   private static final String REGION_NAME = "PartitionedRegion";
   private static final String TEST_CASE_NAME =
       "[{index}] {method}(Coordinator:{0}, RegionType:{1})";
 
   @Rule
   public DistributedRule distributedRule = new DistributedRule(3);
-
   @Rule
   public CacheRule cacheRule = CacheRule.builder().createCacheInAll().build();
 
@@ -89,22 +84,6 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   private VM server2;
   private VM accessor;
 
-  private enum TestVM {
-    ACCESSOR(0), SERVER1(1), SERVER2(2);
-
-    final int vmNumber;
-
-    TestVM(int vmNumber) {
-      this.vmNumber = vmNumber;
-    }
-  }
-
-  static RegionShortcut[] regionTypes() {
-    return new RegionShortcut[] {
-        RegionShortcut.PARTITION, RegionShortcut.PARTITION_REDUNDANT
-    };
-  }
-
   @SuppressWarnings("unused")
   static TestVM[] coordinators() {
     return new TestVM[] {
@@ -114,7 +93,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
 
   @SuppressWarnings("unused")
   static Object[] coordinatorsAndRegionTypes() {
-    ArrayList<Object[]> parameters = new ArrayList<>();
+    List<Object[]> parameters = new ArrayList<>();
     RegionShortcut[] regionShortcuts = regionTypes();
 
     Arrays.stream(regionShortcuts).forEach(regionShortcut -> {
@@ -125,6 +104,12 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     return parameters.toArray();
   }
 
+  private static RegionShortcut[] regionTypes() {
+    return new RegionShortcut[] {
+        RegionShortcut.PARTITION, RegionShortcut.PARTITION_REDUNDANT
+    };
+  }
+
   @Before
   public void setUp() throws Exception {
     server1 = getVM(TestVM.SERVER1.vmNumber);
@@ -178,7 +163,7 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   /**
    * Populates the region and verifies the data on the selected VMs.
    */
-  private void populateRegion(VM feeder, int entryCount, List<VM> vms) {
+  private void populateRegion(VM feeder, int entryCount, Iterable<VM> vms) {
     feeder.invoke(() -> {
       Region<String, String> region = cacheRule.getCache().getRegion(REGION_NAME);
       IntStream.range(0, entryCount).forEach(i -> region.put(String.valueOf(i), "Value_" + i));
@@ -240,14 +225,13 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
    * Asserts that the region data is consistent across buckets.
    */
   private void assertRegionBucketsConsistency() throws ForceReattemptException {
-    List<BucketDump> bucketDumps;
     PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
     // Redundant copies + 1 primary.
     int expectedCopies = region.getRedundantCopies() + 1;
 
     for (int bId = 0; bId < BUCKETS; bId++) {
       final int bucketId = bId;
-      bucketDumps = region.getAllBucketEntries(bucketId);
+      List<BucketDump> bucketDumps = region.getAllBucketEntries(bucketId);
       assertThat(bucketDumps.size())
           .as("Bucket " + bucketId + " should have " + expectedCopies + " copies, but has "
               + bucketDumps.size())
@@ -379,26 +363,16 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
 
   /**
    * Continuously execute clear operations on the PartitionedRegion every periodInMillis for the
-   * given
-   * durationInMillis.
+   * given durationInMillis.
    */
-  private void executeClears(final long durationInMillis, final long periodInMillis)
-      throws InterruptedException {
+  private void executeClears(final long durationInMillis, final long periodInMillis) {
     Cache cache = cacheRule.getCache();
-    AtomicLong invocationCount = new AtomicLong(0);
     Region<String, String> region = cache.getRegion(REGION_NAME);
-    Long minimumInvocationCount = (durationInMillis / periodInMillis);
-    ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
-    ScheduledFuture<?> scheduledFuture = executor.scheduleWithFixedDelay(() -> {
+    long minimumInvocationCount = durationInMillis / periodInMillis;
+
+    for (int invocationCount = 0; invocationCount < minimumInvocationCount; invocationCount++) {
       region.clear();
-      invocationCount.incrementAndGet();
-    }, 0, periodInMillis, TimeUnit.MILLISECONDS);
-
-    await().untilAsserted(
-        () -> assertThat(invocationCount.get()).isGreaterThanOrEqualTo(minimumInvocationCount));
-    scheduledFuture.cancel(false);
-    executor.shutdown();
-    executor.awaitTermination(GeodeAwaitility.getTimeout().getSeconds(), TimeUnit.SECONDS);
+    }
   }
 
   /**
@@ -413,11 +387,11 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @Parameters(method = "coordinatorsAndRegionTypes")
   public void clearWithConcurrentPutGetRemoveShouldWorkCorrectly(TestVM coordinatorVM,
       RegionShortcut regionShortcut) throws InterruptedException {
-    final int entries = 15000;
-    final int workMillis = 60000;
     parametrizedSetup(regionShortcut);
 
     // Let all VMs continuously execute puts and gets for 60 seconds.
+    final int workMillis = 60000;
+    final int entries = 15000;
     List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
         server1.invokeAsync(() -> executePuts(entries, workMillis)),
         server2.invokeAsync(() -> executeGets(entries, workMillis)),
@@ -448,10 +422,10 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @Parameters(method = "coordinatorsAndRegionTypes")
   public void clearWithConcurrentPutAllRemoveAllShouldWorkCorrectly(TestVM coordinatorVM,
       RegionShortcut regionShortcut) throws InterruptedException {
-    final int workMillis = 15000;
     parametrizedSetup(regionShortcut);
 
     // Let all VMs continuously execute putAll and removeAll for 15 seconds.
+    final int workMillis = 15000;
     List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
         server1.invokeAsync(() -> executePutAlls(0, 2000, workMillis)),
         server1.invokeAsync(() -> executeRemoveAlls(0, 2000, workMillis)),
@@ -486,8 +460,8 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @TestCaseName("[{index}] {method}(RegionType:{0})")
   @Parameters(method = "regionTypes")
   public void clearShouldFailWhenCoordinatorMemberIsBounced(RegionShortcut regionShortcut) {
-    final int entries = 1000;
     parametrizedSetup(regionShortcut);
+    final int entries = 1000;
     populateRegion(accessor, entries, asList(accessor, server1, server2));
 
     // Set the CoordinatorMemberKiller and try to clear the region
@@ -529,13 +503,13 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @TestCaseName("[{index}] {method}(Coordinator:{0})")
   public void clearOnRedundantPartitionRegionWithConcurrentPutGetRemoveShouldWorkCorrectlyWhenNonCoordinatorMembersAreBounced(
       TestVM coordinatorVM) throws InterruptedException {
-    final int entries = 7500;
-    final int workMillis = 30000;
     parametrizedSetup(RegionShortcut.PARTITION_REDUNDANT);
+    final int entries = 7500;
     populateRegion(accessor, entries, asList(accessor, server1, server2));
     server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
 
     // Let all VMs (except the one to kill) continuously execute gets, put and removes for 30"
+    final int workMillis = 30000;
     List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
         server1.invokeAsync(() -> executeGets(entries, workMillis)),
         server1.invokeAsync(() -> executePuts(entries, workMillis)),
@@ -581,13 +555,13 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @TestCaseName("[{index}] {method}(Coordinator:{0})")
   public void clearOnNonRedundantPartitionRegionWithConcurrentPutGetRemoveShouldFailWhenNonCoordinatorMembersAreBounced(
       TestVM coordinatorVM) throws InterruptedException {
-    final int entries = 7500;
-    final int workMillis = 30000;
     parametrizedSetup(RegionShortcut.PARTITION);
+    final int entries = 7500;
     populateRegion(accessor, entries, asList(accessor, server1, server2));
     server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
 
     // Let all VMs (except the one to kill) continuously execute gets, put and removes for 30"
+    final int workMillis = 30000;
     List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
         server1.invokeAsync(() -> executeGets(entries, workMillis)),
         server1.invokeAsync(() -> executePuts(entries, workMillis)),
@@ -620,11 +594,11 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @TestCaseName("[{index}] {method}(Coordinator:{0})")
   public void clearOnRedundantPartitionRegionWithConcurrentPutAllRemoveAllShouldWorkCorrectlyWhenNonCoordinatorMembersAreBounced(
       TestVM coordinatorVM) throws InterruptedException {
-    final int workMillis = 30000;
     parametrizedSetup(RegionShortcut.PARTITION_REDUNDANT);
     server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
 
     // Let all VMs continuously execute putAll/removeAll for 30 seconds.
+    final int workMillis = 30000;
     List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
         server1.invokeAsync(() -> executePutAlls(0, 6000, workMillis)),
         accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)));
@@ -666,10 +640,10 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
   @TestCaseName("[{index}] {method}(Coordinator:{0})")
   public void clearOnNonRedundantPartitionRegionWithConcurrentPutAllRemoveAllShouldFailWhenNonCoordinatorMembersAreBounced(
       TestVM coordinatorVM) throws InterruptedException {
-    final int workMillis = 30000;
     parametrizedSetup(RegionShortcut.PARTITION);
     server2.invoke(() -> DistributionMessageObserver.setInstance(new MemberKiller(false)));
 
+    final int workMillis = 30000;
     List<AsyncInvocation<Void>> asyncInvocationList = Arrays.asList(
         server1.invokeAsync(() -> executePutAlls(0, 6000, workMillis)),
         accessor.invokeAsync(() -> executeRemoveAlls(2000, 4000, workMillis)));
@@ -686,13 +660,24 @@ public class PartitionedRegionClearWithConcurrentOperationsDUnitTest implements
     }
   }
 
+  private enum TestVM {
+    ACCESSOR(0), SERVER1(1), SERVER2(2);
+
+    final int vmNumber;
+
+    TestVM(int vmNumber) {
+      this.vmNumber = vmNumber;
+    }
+  }
+
   /**
    * Shutdowns a coordinator member while the clear operation is in progress.
    */
-  public static class MemberKiller extends DistributionMessageObserver {
+  private static class MemberKiller extends DistributionMessageObserver {
+
     private final boolean coordinator;
 
-    public MemberKiller(boolean coordinator) {
+    private MemberKiller(boolean coordinator) {
       this.coordinator = coordinator;
     }