[geode] branch develop updated (2d5fd39 -> f82304b)

2021-04-01 Thread heybales
This is an automated email from the ASF dual-hosted git repository.

heybales pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from 2d5fd39  Fix self assignment (#6245)
 add f82304b  GEODE-9052: rename the geode-redis module (#6211)

No new revisions were added by this update.

Summary of changes:
 CODEOWNERS  |   2 +-
 boms/geode-all-bom/src/test/resources/expected-pom.xml  |  12 ++--
 ci/pipelines/shared/jinja.variables.yml |   2 +-
 ci/scripts/execute_redis_tests.sh   |   2 +-
 ci/scripts/execute_tests.sh |   2 +-
 {geode-redis => geode-apis-compatible-with-redis}/README.md |   0
 .../build.gradle|   1 +
 {geode-redis => geode-apis-compatible-with-redis}/gfsh.png  | Bin
 .../redis/CommandPipeliningNativeRedisAcceptanceTest.java   |   0
 .../executor/GeodeRedisServerStartUpAcceptanceTest.java |   0
 .../executor/GlobPatternNativeRedisAcceptanceTest.java  |   0
 .../internal/executor/UnknownNativeRedisAcceptanceTest.java |   0
 .../executor/connection/AuthNativeRedisAcceptanceTest.java  |   0
 .../executor/connection/EchoNativeRedisAcceptanceTest.java  |   0
 .../executor/connection/PingNativeRedisAcceptanceTest.java  |   0
 .../connection/SelectNativeRedisAcceptanceTest.java |   0
 .../executor/hash/HScanNativeRedisAcceptanceTest.java   |   0
 .../executor/hash/HashesNativeRedisAcceptanceTest.java  |   0
 .../executor/hash/HincrByFloatNativeRedisAccetanceTest.java |   0
 .../internal/executor/key/DelNativeRedisAcceptanceTest.java |   0
 .../executor/key/ExistsNativeRedisAcceptanceTest.java   |   0
 .../executor/key/ExpireAtNativeRedisAcceptanceTest.java |   0
 .../executor/key/ExpireNativeRedisAcceptanceTest.java   |   0
 .../executor/key/KeysNativeRedisAcceptanceTest.java |   0
 .../executor/key/PExpireAtNativeRedisAcceptanceTest.java|   0
 .../executor/key/PTTLNativeRedisAcceptanceTest.java |   0
 .../executor/key/PersistNativeRedisAcceptanceTest.java  |   0
 .../executor/key/PexpireNativeRedisAcceptanceTest.java  |   0
 .../executor/key/RenameNativeRedisAcceptanceTest.java   |   0
 .../executor/key/ScanNativeRedisAcceptanceTest.java |   0
 .../internal/executor/key/TTLNativeRedisAcceptanceTest.java |   0
 .../executor/key/TypeNativeRedisAcceptanceTest.java |   0
 .../executor/key/UnlinkNativeRedisAcceptanceTest.java   |   0
 .../pubsub/LettucePubSubNativeRedisAcceptanceTest.java  |   0
 .../executor/pubsub/PubSubNativeRedisAcceptanceTest.java|   0
 .../pubsub/SubscriptionsNativeRedisAcceptanceTest.java  |   0
 .../executor/server/DBSizeNativeRedisAcceptanceTest.java|   0
 .../executor/server/FlushAllNativeRedisAcceptanceTest.java  |   0
 .../executor/server/FlushDBNativeRedisAcceptanceTest.java   |   0
 .../server/HitsMissesNativeRedisAcceptanceTest.java |   0
 .../executor/server/InfoNativeRedisAcceptanceTest.java  |   0
 .../executor/server/InfoStatsNativeRedisAcceptanceTest.java |   0
 .../server/MemoryStatsNativeRedisAcceptanceTest.java|   0
 .../executor/server/ShutDownNativeRedisAcceptanceTest.java  |   0
 .../executor/server/SlowlogNativeRedisAcceptanceTest.java   |   0
 .../executor/server/TimeNativeRedisAcceptanceTest.java  |   0
 .../executor/set/SDiffNativeRedisAcceptanceTest.java|   0
 .../executor/set/SInterNativeRedisAcceptanceTest.java   |   0
 .../executor/set/SIsMemberNativeRedisAcceptanceTest.java|   0
 .../executor/set/SMoveNativeRedisAcceptanceTest.java|   0
 .../executor/set/SPopNativeRedisAcceptanceTest.java |   0
 .../executor/set/SRemNativeRedisAcceptanceTest.java |   0
 .../executor/set/SScanNativeRedisAcceptanceTest.java|   0
 .../executor/set/SUnionNativeRedisAcceptanceTest.java   |   0
 .../executor/set/SetsNativeRedisAcceptanceTest.java |   0
 .../executor/string/AppendNativeRedisAcceptanceTest.java|   0
 .../executor/string/BitCountNativeRedisAcceptanceTest.java  |   0
 .../executor/string/BitOpNativeRedisAcceptanceTest.java |   0
 .../executor/string/BitPosNativeRedisAcceptanceTest.java|   0
 .../executor/string/DecrByNativeRedisAcceptanceTest.java|   0
 .../executor/string/DecrNativeRedisAcceptanceTest.java  |   0
 .../executor/string/GetBitNativeRedisAcceptanceTest.java|   0
 .../executor/string/GetNativeRedisAcceptanceTest.java   |   0
 .../executor/string/GetRangeNativeRedisAcceptanceTest.java  |   0
 .../executor/string/GetSetNativeRedisAcceptanceTest.java|   0
 .../string/IncrByFloatNativeRedisAcceptanceTest.java|   0
 .../executor/string/IncrByNativeRedisAcceptanceTest.java|   0
 .../executor/string/IncrNativeRedisAcceptanceTest.java  |   0
 .../executor/string/MGetNativeRedisAcceptanceTest.java  

[geode] branch support/1.14 updated: GEODE-8965: Support Redis-style OOM error message (#6085) (#6213)

2021-04-01 Thread nnag
This is an automated email from the ASF dual-hosted git repository.

nnag pushed a commit to branch support/1.14
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/support/1.14 by this push:
 new b58bfc5  GEODE-8965:  Support Redis-style OOM error message (#6085) 
(#6213)
b58bfc5 is described below

commit b58bfc50e70973ef56daff95bed8c5bbfc02d43c
Author: Ray Ingles 
AuthorDate: Thu Apr 1 13:23:57 2021 -0400

GEODE-8965:  Support Redis-style OOM error message (#6085) (#6213)

- Allow execution of Redis commands in low-memory conditions
- Test with large key size to guarantee OOM error
- In tests use multiple key sizes to pack used memory more tightly
- force multiple GCs as memory is filled, add memory-pressure thread in 
tests
- Add memory pressure to del and expire tests

Co-authored-by: Ray Ingles 
(cherry picked from commit 08da3aaa1dd3dd5dd212353ecead32819e584c62)
---
 .../internal/cache/control/HeapMemoryMonitor.java  |   3 +-
 .../cache/execute/AllowExecutionInLowMemory.java   |  23 ++
 .../apache/geode/redis/OutOfMemoryDUnitTest.java   | 237 +
 .../geode/redis/internal/RedisConstants.java   |   2 +
 .../redis/internal/executor/RedisResponse.java |   4 +
 .../executor/SingleResultRedisFunction.java|   4 +-
 .../internal/netty/ExecutionHandlerContext.java|   3 +
 7 files changed, 273 insertions(+), 3 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
index 70ded46..72d07bd 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
@@ -47,6 +47,7 @@ import org.apache.geode.internal.cache.InternalCache;
 import 
org.apache.geode.internal.cache.control.InternalResourceManager.ResourceType;
 import org.apache.geode.internal.cache.control.MemoryThresholds.MemoryState;
 import 
org.apache.geode.internal.cache.control.ResourceAdvisor.ResourceManagerProfile;
+import org.apache.geode.internal.cache.execute.AllowExecutionInLowMemory;
 import org.apache.geode.internal.statistics.GemFireStatSampler;
 import org.apache.geode.internal.statistics.LocalStatListener;
 import org.apache.geode.internal.statistics.StatisticsManager;
@@ -710,7 +711,7 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
 
   public LowMemoryException createLowMemoryIfNeeded(Function function,
   Set memberSet) {
-if (function.optimizeForWrite()
+if (function.optimizeForWrite() && !(function instanceof 
AllowExecutionInLowMemory)
 && !MemoryThresholds.isLowMemoryExceptionDisabled()) {
   Set criticalMembersFrom = 
getHeapCriticalMembersFrom(memberSet);
   if (!criticalMembersFrom.isEmpty()) {
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AllowExecutionInLowMemory.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AllowExecutionInLowMemory.java
new file mode 100644
index 000..a5dadb6
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AllowExecutionInLowMemory.java
@@ -0,0 +1,23 @@
+/*
+ * 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.execute;
+
+
+/**
+ * An internal marker interface used to allow functions to run in low-memory 
conditions.
+ */
+public interface AllowExecutionInLowMemory extends InternalFunction {
+
+}
diff --git 
a/geode-redis/src/distributedTest/java/org/apache/geode/redis/OutOfMemoryDUnitTest.java
 
b/geode-redis/src/distributedTest/java/org/apache/geode/redis/OutOfMemoryDUnitTest.java
new file mode 100644
index 000..cd1677e
--- /dev/null
+++ 
b/geode-redis/src/distributedTest/java/org/apache/geode/redis/OutOfMemoryDUnitTest.java
@@ -0,0 +1,237 @@
+/*
+ * 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
+ * copyrigh

[geode] branch feature/GEODE-9060 updated (b531ceb -> 669e3d7)

2021-04-01 Thread zhouxj
This is an automated email from the ASF dual-hosted git repository.

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


from b531ceb  fix based on comments
 add 669e3d7  fix

No new revisions were added by this update.

Summary of changes:
 .../geode/internal/cache/persistence/PersistenceAdvisorImpl.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)


[geode] branch develop updated (f82304b -> b729966)

2021-04-01 Thread boglesby
This is an automated email from the ASF dual-hosted git repository.

boglesby pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from f82304b  GEODE-9052: rename the geode-redis module (#6211)
 add b729966  GEODE-9104: Removed ESCAPE_NON_ASCII feature so non-ASCII 
characters are displayed

No new revisions were added by this update.

Summary of changes:
 .../web/controllers/RestAccessControllerTest.java  | 42 ++
 ...tomer-containing-chinese-query-full-result.json |  7 
 ...mer-containing-chinese-query-struct-result.json |  6 
 .../controllers/customer-containing-chinese.json   |  5 +++
 .../geode/rest/internal/web/util/JSONUtils.java|  2 --
 5 files changed, 60 insertions(+), 2 deletions(-)
 create mode 100644 
geode-web-api/src/integrationTest/resources/org/apache/geode/rest/internal/web/controllers/customer-containing-chinese-query-full-result.json
 create mode 100644 
geode-web-api/src/integrationTest/resources/org/apache/geode/rest/internal/web/controllers/customer-containing-chinese-query-struct-result.json
 create mode 100644 
geode-web-api/src/integrationTest/resources/org/apache/geode/rest/internal/web/controllers/customer-containing-chinese.json


[geode-native] branch support/1.13 updated: Update api links

2021-04-01 Thread dbarnes
This is an automated email from the ASF dual-hosted git repository.

dbarnes pushed a commit to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/support/1.13 by this push:
 new 917633b  Update api links
917633b is described below

commit 917633be4f107af6368439ff18e9407695ea5583
Author: Dave Barnes 
AuthorDate: Thu Apr 1 15:10:38 2021 -0700

Update api links
---
 docs/geode-native-book-cpp/redirects.rb   | 2 ++
 docs/geode-native-book-dotnet/redirects.rb| 2 ++
 docs/geode-native-docs-cpp/about-client-users-guide.html.md.erb   | 4 ++--
 .../geode-native-docs-cpp/configuring/config-client-cache.html.md.erb | 2 +-
 docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb| 4 ++--
 .../configuring/config-client-cache.html.md.erb   | 2 +-
 6 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/docs/geode-native-book-cpp/redirects.rb 
b/docs/geode-native-book-cpp/redirects.rb
index 9b5dbf4..3976e8d 100644
--- a/docs/geode-native-book-cpp/redirects.rb
+++ b/docs/geode-native-book-cpp/redirects.rb
@@ -17,6 +17,8 @@
 r301 %r{/releases/latest/javadoc/(.*)}, 
'https://geode.apache.org/releases/latest/javadoc/$1'
 r302 %r{/cppdocs/(.*)}, 'https://geode.apache.org/releases/latest/cppdocs/$1'
 r302 %r{/dotnetdocs/(.*)}, 
'https://geode.apache.org/releases/latest/dotnetdocs/$1'
+r302 %r{/cppapiref/(.*)}, 'https://geode.apache.org/releases/latest/cppdocs/$1'
+r302 %r{/dotnetapiref/(.*)}, 
'https://geode.apache.org/releases/latest/dotnetdocs/$1'
 
 # Links to User Guides #
 rewrite '/', '/docs/geode-native/cpp/113/about-client-users-guide.html'
diff --git a/docs/geode-native-book-dotnet/redirects.rb 
b/docs/geode-native-book-dotnet/redirects.rb
index 6261fa5..7e39fe9 100644
--- a/docs/geode-native-book-dotnet/redirects.rb
+++ b/docs/geode-native-book-dotnet/redirects.rb
@@ -17,6 +17,8 @@
 r301 %r{/releases/latest/javadoc/(.*)}, 
'https://geode.apache.org/releases/latest/javadoc/$1'
 r302 %r{/cppdocs/(.*)}, 'https://geode.apache.org/releases/latest/cppdocs/$1'
 r302 %r{/dotnetdocs/(.*)}, 
'https://geode.apache.org/releases/latest/dotnetdocs/$1'
+r302 %r{/cppapiref/(.*)}, 'https://geode.apache.org/releases/latest/cppdocs/$1'
+r302 %r{/dotnetapiref/(.*)}, 
'https://geode.apache.org/releases/latest/dotnetdocs/$1'
 
 # Links to User Guides #
 rewrite '/', '/docs/geode-native/dotnet/113/about-client-users-guide.html'
diff --git a/docs/geode-native-docs-cpp/about-client-users-guide.html.md.erb 
b/docs/geode-native-docs-cpp/about-client-users-guide.html.md.erb
index e55f621..ddb4495 100644
--- a/docs/geode-native-docs-cpp/about-client-users-guide.html.md.erb
+++ b/docs/geode-native-docs-cpp/about-client-users-guide.html.md.erb
@@ -25,8 +25,8 @@ The Apache Geode Native Client is a library that provides 
access for C++ and Mic
 
 See the API docs for API details:
 
-  - [C++ API docs](https://geode.apache.org/releases/latest/cppdocs/index.html)
-  - [.NET API 
docs](https://geode.apache.org/releases/latest/dotnetdocs/index.html)
+  - [C++ API 
docs](https://geode.apache.org/releases/latest/cppdocs/hierarchy.html)
+  - [.NET API 
docs](https://geode.apache.org/releases/latest/dotnetdocs/hierarchy.html)
 
 See the [_<%=vars.product_name_long%> User 
Guide_](serverman/about_<%=vars.product_name.downcase%>.html) for information 
regarding the server.
 
diff --git 
a/docs/geode-native-docs-cpp/configuring/config-client-cache.html.md.erb 
b/docs/geode-native-docs-cpp/configuring/config-client-cache.html.md.erb
index ffe074a..1da5544 100644
--- a/docs/geode-native-docs-cpp/configuring/config-client-cache.html.md.erb
+++ b/docs/geode-native-docs-cpp/configuring/config-client-cache.html.md.erb
@@ -32,5 +32,5 @@ Regions are created from `Cache` instances. Regions provide 
the entry points to
 instances of `Region` and `RegionEntry`.
 
 For more information specific to your client programming language, see the
-[C++ Client API](cppdocs).
+[C++ Client API](cppapiref).
 
diff --git a/docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb 
b/docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb
index e55f621..ddb4495 100644
--- a/docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb
+++ b/docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb
@@ -25,8 +25,8 @@ The Apache Geode Native Client is a library that provides 
access for C++ and Mic
 
 See the API docs for API details:
 
-  - [C++ API docs](https://geode.apache.org/releases/latest/cppdocs/index.html)
-  - [.NET API 
docs](https://geode.apache.org/releases/latest/dotnetdocs/index.html)
+  - [C++ API 
docs](https://geode.apache.org/releases/latest/cppdocs/hierarchy.html)
+  - [.NET API 
docs](https://geode.apache.org/releases/latest/dotnetdocs/hierarchy.html)
 
 See the [_<%=vars.product_name_long%> User 
Guide_](serverman/about_<%=vars.product_na

[geode] branch develop updated (b729966 -> dedcea3)

2021-04-01 Thread eshu11
This is an automated email from the ASF dual-hosted git repository.

eshu11 pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from b729966  GEODE-9104: Removed ESCAPE_NON_ASCII feature so non-ASCII 
characters are displayed
 add dedcea3  GEODE-8926: Calculate filter information after tx is applied 
to cache. (#6232)

No new revisions were added by this update.

Summary of changes:
 .../apache/geode/internal/cache/FilterProfile.java |   8 +-
 .../apache/geode/internal/cache/LocalRegion.java   |   3 +-
 .../cache/PartitionedRegionQueryEvaluator.java | 101 +
 .../apache/geode/internal/cache/TXEntryState.java  |  10 +
 .../org/apache/geode/internal/cache/TXState.java   |  28 ++-
 .../internal/cache/TxCallbackEventFactoryImpl.java |  41 +---
 .../internal/cache/tier/sockets/BaseCommand.java   |   8 +-
 .../cache/PartitionedRegionQueryEvaluatorTest.java | 179 +++
 .../apache/geode/internal/cache/TXStateTest.java   |  25 +++
 .../cache/tier/sockets/FilterProfileJUnitTest.java |   1 +
 .../cq/dunit/PartitionedRegionTxDUnitTest.java | 246 +
 11 files changed, 569 insertions(+), 81 deletions(-)
 create mode 100644 
geode-cq/src/distributedTest/java/org/apache/geode/cache/query/cq/dunit/PartitionedRegionTxDUnitTest.java


[geode] branch develop updated (dedcea3 -> d79a3c7)

2021-04-01 Thread donalevans
This is an automated email from the ASF dual-hosted git repository.

donalevans pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from dedcea3  GEODE-8926: Calculate filter information after tx is applied 
to cache. (#6232)
 add d79a3c7  GEODE-9051: Added a feature to measure the Tenured heap 
consumption (#6176)

No new revisions were added by this update.

Summary of changes:
 .../internal/cache/control/HeapMemoryMonitor.java  |  7 +-
 .../cache/control/InternalResourceManager.java |  3 +-
 .../control/TenuredHeapConsumptionMonitor.java | 70 +++
 .../cache/control/HeapMemoryMonitorTest.java   |  2 +-
 .../control/TenuredHeapConsumptionMonitorTest.java | 99 ++
 5 files changed, 178 insertions(+), 3 deletions(-)
 create mode 100644 
geode-core/src/main/java/org/apache/geode/internal/cache/control/TenuredHeapConsumptionMonitor.java
 create mode 100644 
geode-core/src/test/java/org/apache/geode/internal/cache/control/TenuredHeapConsumptionMonitorTest.java


[geode] branch develop updated (d79a3c7 -> 76a5afd)

2021-04-01 Thread zhouxj
This is an automated email from the ASF dual-hosted git repository.

zhouxj pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from d79a3c7  GEODE-9051: Added a feature to measure the Tenured heap 
consumption (#6176)
 add 76a5afd  GEODE-9060: Remove the member from a copy of replicates as 
GII candid… (#6246)

No new revisions were added by this update.

Summary of changes:
 .../PersistentRecoveryOrderDUnitTest.java  | 34 +-
 .../cache/persistence/PersistenceAdvisorImpl.java  | 18 ++--
 2 files changed, 48 insertions(+), 4 deletions(-)


[geode-benchmarks] 01/05: gradle spA

2021-04-01 Thread upthewaterspout
This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch feature/redis-performance-testing
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git

commit b9c9e637ce1f66cf74c1f7d0e363909e94b5fd71
Author: Dan Smith 
AuthorDate: Thu Apr 1 15:32:19 2021 -0700

gradle spA
---
 .../java/org/apache/geode/benchmark/parameters/GeodeProperties.java | 1 -
 .../src/main/java/org/apache/geode/benchmark/tasks/ProcessControl.java  | 2 +-
 .../java/org/apache/geode/benchmark/tasks/redis/JedisClientManager.java | 2 +-
 .../org/apache/geode/benchmark/tasks/redis/LettuceClientManager.java| 2 +-
 4 files changed, 3 insertions(+), 4 deletions(-)

diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/parameters/GeodeProperties.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/parameters/GeodeProperties.java
index fa37465..bef313b 100644
--- 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/parameters/GeodeProperties.java
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/parameters/GeodeProperties.java
@@ -25,7 +25,6 @@ import static 
org.apache.geode.distributed.ConfigurationProperties.CONSERVE_SOCK
 import static 
org.apache.geode.distributed.ConfigurationProperties.DISTRIBUTED_SYSTEM_ID;
 import static 
org.apache.geode.distributed.ConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION;
 import static 
org.apache.geode.distributed.ConfigurationProperties.ENABLE_TIME_STATISTICS;
-import static 
org.apache.geode.distributed.ConfigurationProperties.LOCATOR_WAIT_TIME;
 import static 
org.apache.geode.distributed.ConfigurationProperties.LOG_DISK_SPACE_LIMIT;
 import static 
org.apache.geode.distributed.ConfigurationProperties.LOG_FILE_SIZE_LIMIT;
 import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL;
diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/ProcessControl.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/ProcessControl.java
index 57905a3..3567157 100644
--- 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/ProcessControl.java
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/ProcessControl.java
@@ -65,7 +65,7 @@ public class ProcessControl {
 format("'%s' command exited with status %d", join(" ", 
processBuilder.command()),
 exitStatus, System.getProperty("user.dir"));
 logger.error(msg);
-if(System.nanoTime() - start > RETRY_TIMEOUT.toNanos()) {
+if (System.nanoTime() - start > RETRY_TIMEOUT.toNanos()) {
   throw new RuntimeException(msg);
 }
 Thread.sleep(100);
diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/redis/JedisClientManager.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/redis/JedisClientManager.java
index 713d987..2b33700 100644
--- 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/redis/JedisClientManager.java
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/redis/JedisClientManager.java
@@ -94,7 +94,7 @@ public final class JedisClientManager implements 
RedisClientManager {
 }
 logger.debug(clusterInfo);
   } catch (Exception e) {
-if(System.nanoTime() - start > CONNECT_TIMEOUT.toNanos()) {
+if (System.nanoTime() - start > CONNECT_TIMEOUT.toNanos()) {
   throw e;
 }
 Thread.sleep(50);
diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/redis/LettuceClientManager.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/redis/LettuceClientManager.java
index df9b160..bc82546 100644
--- 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/redis/LettuceClientManager.java
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/redis/LettuceClientManager.java
@@ -93,7 +93,7 @@ public final class LettuceClientManager implements 
RedisClientManager {
 }
 logger.debug(clusterInfo);
   } catch (Exception e) {
-if(System.nanoTime() - start > CONNECT_TIMEOUT.toNanos()) {
+if (System.nanoTime() - start > CONNECT_TIMEOUT.toNanos()) {
   throw e;
 }
 logger.info("Failed connecting.", e);


[geode-benchmarks] 04/05: Automatically passing properties prefixed with benchmark.system.ROLE. to JVMs

2021-04-01 Thread upthewaterspout
This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch feature/redis-performance-testing
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git

commit 8392f66a41d10ff977f90ef2375a7b5a8f66b2a2
Author: Dan Smith 
AuthorDate: Thu Apr 1 14:43:31 2021 -0700

Automatically passing properties prefixed with benchmark.system.ROLE. to 
JVMs

Adding a way to automatically set system properties in test JVMs. Just add 
a property
with the prefix benchmark.system.ROLE, where ROLE is the role of jvms to 
target. Eg

benchmark.system.server.gemfire.disablePartitionedRegionBucketAck=true 
would set
gemfire.disablePartitionedRegionBucketAck=true  in the server JVMs.
---
 .../apache/geode/perftest/BenchmarkProperties.java | 25 ++
 .../java/org/apache/geode/perftest/TestConfig.java |  3 +--
 .../geode/perftest/BenchmarkPropertiesTest.java| 24 +
 .../geode/perftest/TestRunnerIntegrationTest.java  | 10 +
 4 files changed, 60 insertions(+), 2 deletions(-)

diff --git 
a/harness/src/main/java/org/apache/geode/perftest/BenchmarkProperties.java 
b/harness/src/main/java/org/apache/geode/perftest/BenchmarkProperties.java
new file mode 100644
index 000..0a7fd6e
--- /dev/null
+++ b/harness/src/main/java/org/apache/geode/perftest/BenchmarkProperties.java
@@ -0,0 +1,25 @@
+package org.apache.geode.perftest;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class BenchmarkProperties {
+
+  public static Map> getDefaultJVMArgs() {
+Map> results = new HashMap<>();
+System.getProperties().stringPropertyNames().stream()
+.filter(name -> name.startsWith("benchmark.system."))
+.forEach(name -> {
+  String shortName = name.replace("benchmark.system.", "");
+  String[] roleAndProperty = shortName.split("\\.", 2);
+  String role = roleAndProperty[0];
+  String property = roleAndProperty[1];
+  String value = System.getProperty(name);
+  List roleProperties = results.computeIfAbsent(role, key -> 
new ArrayList<>());
+  roleProperties.add("-D" + property + "=" + value);
+});
+return results;
+  }
+}
diff --git a/harness/src/main/java/org/apache/geode/perftest/TestConfig.java 
b/harness/src/main/java/org/apache/geode/perftest/TestConfig.java
index 1b66fdc..1e454e6 100644
--- a/harness/src/main/java/org/apache/geode/perftest/TestConfig.java
+++ b/harness/src/main/java/org/apache/geode/perftest/TestConfig.java
@@ -21,7 +21,6 @@ import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -39,7 +38,7 @@ public class TestConfig implements Serializable {
 
   private final WorkloadConfig workloadConfig = new WorkloadConfig();
   private Map roles = new LinkedHashMap<>();
-  private Map> jvmArgs = new HashMap<>();
+  private Map> jvmArgs = 
BenchmarkProperties.getDefaultJVMArgs();
   private List before = new ArrayList<>();
   private List workload = new ArrayList<>();
   private List after = new ArrayList<>();
diff --git 
a/harness/src/test/java/org/apache/geode/perftest/BenchmarkPropertiesTest.java 
b/harness/src/test/java/org/apache/geode/perftest/BenchmarkPropertiesTest.java
new file mode 100644
index 000..a8a5105
--- /dev/null
+++ 
b/harness/src/test/java/org/apache/geode/perftest/BenchmarkPropertiesTest.java
@@ -0,0 +1,24 @@
+package org.apache.geode.perftest;
+
+import java.util.List;
+import java.util.Map;
+
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+class BenchmarkPropertiesTest {
+
+  @Test
+  public void canParsePropertiesForRoles() {
+System.setProperty("benchmark.system.role1.p1", "v1");
+System.setProperty("benchmark.system.role1.p2", "v2");
+
+Map> defaultArgs =
+BenchmarkProperties.getDefaultJVMArgs();
+
+Assertions.assertThat(defaultArgs).containsOnlyKeys("role1");
+
+
Assertions.assertThat(defaultArgs.get("role1")).containsExactlyInAnyOrder("-Dp1=v1",
 "-Dp2=v2");
+  }
+
+}
diff --git 
a/harness/src/test/java/org/apache/geode/perftest/TestRunnerIntegrationTest.java
 
b/harness/src/test/java/org/apache/geode/perftest/TestRunnerIntegrationTest.java
index f82cb6c..2bddb1a 100644
--- 
a/harness/src/test/java/org/apache/geode/perftest/TestRunnerIntegrationTest.java
+++ 
b/harness/src/test/java/org/apache/geode/perftest/TestRunnerIntegrationTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.geode.perftest;
 
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
@@ -26,6 +27,7 @@ import java.nio.file.Path;
 import java.util.function.Predicate;
 import java.util.stream.Stream;
 
+impo

[geode-benchmarks] 05/05: Logging all benchmark properties during test run

2021-04-01 Thread upthewaterspout
This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch feature/redis-performance-testing
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git

commit 6bc641f8615e213ef85141d515a222d7e2ddb1e9
Author: Dan Smith 
AuthorDate: Thu Apr 1 15:17:47 2021 -0700

Logging all benchmark properties during test run
---
 geode-benchmarks/build.gradle  |  6 +++---
 .../main/java/org/apache/geode/perftest/TestRunners.java   |  6 +++---
 .../apache/geode/perftest/runner/DefaultTestRunner.java| 14 --
 3 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/geode-benchmarks/build.gradle b/geode-benchmarks/build.gradle
index 49fa625..b2f5e26 100644
--- a/geode-benchmarks/build.gradle
+++ b/geode-benchmarks/build.gradle
@@ -100,9 +100,9 @@ task benchmark(type: Test) {
   systemProperty 'org.slf4j.simpleLogger.dateTimeFormat', '-MM-dd 
HH:mm:ss.SSS'
   systemProperty 'org.slf4j.simpleLogger.showThreadName', 'false'
   systemProperty 'org.slf4j.simpleLogger.showShortLogName', 'true'
-  systemProperty 'TEST_HOSTS', project.findProperty('hosts')
-  systemProperty 'TEST_METADATA', project.findProperty('metadata')
-  systemProperty 'OUTPUT_DIR', outputDir
+  systemProperty 'benchmark.TEST_HOSTS', project.findProperty('hosts')
+  systemProperty 'benchmark.TEST_METADATA', project.findProperty('metadata')
+  systemProperty 'benchmark.OUTPUT_DIR', outputDir
 
   //Set all project properties starting with "benchmark." as system properties 
in the test
   //JVM
diff --git a/harness/src/main/java/org/apache/geode/perftest/TestRunners.java 
b/harness/src/main/java/org/apache/geode/perftest/TestRunners.java
index 680071b..27fddb3 100644
--- a/harness/src/main/java/org/apache/geode/perftest/TestRunners.java
+++ b/harness/src/main/java/org/apache/geode/perftest/TestRunners.java
@@ -38,8 +38,8 @@ import org.apache.geode.perftest.runner.DefaultTestRunner;
  */
 public class TestRunners {
 
-  public static final String TEST_HOSTS = "TEST_HOSTS";
-  public static final String OUTPUT_DIR = "OUTPUT_DIR";
+  public static final String TEST_HOSTS = "benchmark.TEST_HOSTS";
+  public static final String OUTPUT_DIR = "benchmark.OUTPUT_DIR";
 
   public static final String[] JVM_ARGS_SMALL_SIZE = new String[] {
   "-XX:CMSInitiatingOccupancyFraction=60",
@@ -91,7 +91,7 @@ public class TestRunners {
   static TestRunner defaultRunner(String testHosts, File outputDir) {
 if (testHosts == null) {
   throw new IllegalStateException(
-  "You must set the TEST_HOSTS system property to a comma separated 
list of hosts to run the benchmarks on.");
+  "You must set the benchmark.TEST_HOSTS system property to a comma 
separated list of hosts to run the benchmarks on.");
 }
 
 String userName = System.getProperty("user.name");
diff --git 
a/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestRunner.java 
b/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestRunner.java
index ba4d5a8..c26b1c2 100644
--- 
a/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestRunner.java
+++ 
b/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestRunner.java
@@ -74,12 +74,16 @@ public class DefaultTestRunner implements TestRunner {
 }
 
 benchmarkOutput.mkdirs();
+Properties properties = new Properties();
+addVersionProperties(properties, getVersionProperties());
+addSystemProperties(properties);
+logger.info("Benchmark Properties {}", properties);
+
+
 String metadataFilename = outputDir + "/testrunner.properties";
 Path metadataOutput = Paths.get(metadataFilename);
 
 if (!metadataOutput.toFile().exists()) {
-  Properties properties = new Properties(System.getProperties());
-  addVersionProperties(properties, getVersionProperties());
   try (FileWriter writer = new 
FileWriter(metadataOutput.toFile().getAbsoluteFile())) {
 properties.store(writer, "Benchmark metadata generated while running 
tests");
   }
@@ -112,6 +116,12 @@ public class DefaultTestRunner implements TestRunner {
 
   }
 
+  private void addSystemProperties(Properties properties) {
+System.getProperties().stringPropertyNames().stream()
+.filter(name -> name.startsWith("benchmark."))
+.forEach(name -> properties.setProperty(name, 
System.getProperty(name)));
+  }
+
   private void addVersionProperties(Properties jsonMetadata, Properties 
versionProperties) {
 jsonMetadata.put("benchmark.source_version", 
versionProperties.getProperty("Product-Version"));
 jsonMetadata.put("benchmark.source_branch", 
versionProperties.getProperty("Source-Repository"));


[geode-benchmarks] branch feature/redis-performance-testing updated (d61b87d -> 6bc641f)

2021-04-01 Thread upthewaterspout
This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a change to branch feature/redis-performance-testing
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git.


from d61b87d  Fixing the name of the DumpResults class in build.gradle
 new b9c9e63  gradle spA
 new 2ccd1d7  Converting all of the withXXX properties to start with 
benchmark.
 new 002b902  Replacing metadata.json with metadata properties files
 new 8392f66  Automatically passing properties prefixed with 
benchmark.system.ROLE. to JVMs
 new 6bc641f  Logging all benchmark properties during test run

The 5 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:
 geode-benchmarks/build.gradle  | 66 ++
 .../geode/benchmark/parameters/GcParameters.java   |  2 +-
 .../benchmark/parameters/GedisParameters.java  |  3 +-
 .../benchmark/parameters/GeodeProperties.java  |  1 -
 .../geode/benchmark/parameters/HeapParameters.java |  2 +-
 .../geode/benchmark/tasks/ProcessControl.java  |  2 +-
 .../benchmark/tasks/redis/JedisClientManager.java  |  2 +-
 .../tasks/redis/LettuceClientManager.java  |  2 +-
 .../geode/benchmark/tests/GeodeBenchmark.java  |  2 +-
 .../benchmark/tests/redis/RedisBenchmark.java  |  4 +-
 .../benchmark/tests/redis/RedisHsetBenchmark.java  |  2 +-
 .../ClientServerTopologyWithRouterAndSniProxy.java |  4 +-
 .../topology/ClientServerTopologyWithSniProxy.java |  4 +-
 .../apache/geode/benchmark/topology/Topology.java  | 14 ++---
 .../topology/redis/ManualRedisTopology.java|  2 +-
 .../benchmark/parameters/GcParametersTest.java |  2 +-
 .../benchmark/parameters/HeapParametersTest.java   |  2 +-
 .../benchmark/tests/ClientServerBenchmarkTest.java | 12 ++--
 .../topology/ClientServerTopologyTest.java | 23 
 .../ClientServerTopologyWithSniProxyTest.java  |  2 +-
 harness/build.gradle   |  1 -
 .../apache/geode/perftest/BenchmarkProperties.java | 25 
 .../java/org/apache/geode/perftest/TestConfig.java |  3 +-
 .../org/apache/geode/perftest/TestRunners.java |  6 +-
 .../org/apache/geode/perftest/WorkloadConfig.java  |  6 +-
 .../apache/geode/perftest/jvms/JVMLauncher.java|  2 +-
 .../geode/perftest/runner/DefaultTestRunner.java   | 60 +++-
 .../geode/perftest/BenchmarkPropertiesTest.java| 24 
 .../geode/perftest/TestRunnerIntegrationTest.java  | 10 
 .../perftest/yardstick/YardstickTaskTest.java  |  5 +-
 .../geode/infrastructure/BenchmarkMetadata.java|  2 +-
 .../geode/infrastructure/aws/LaunchCluster.java| 20 ---
 32 files changed, 190 insertions(+), 127 deletions(-)
 create mode 100644 
harness/src/main/java/org/apache/geode/perftest/BenchmarkProperties.java
 create mode 100644 
harness/src/test/java/org/apache/geode/perftest/BenchmarkPropertiesTest.java


[geode-benchmarks] 02/05: Converting all of the withXXX properties to start with benchmark.

2021-04-01 Thread upthewaterspout
This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch feature/redis-performance-testing
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git

commit 2ccd1d762b761cab22dc04a8f6d0170dcab7ce0f
Author: Dan Smith 
AuthorDate: Thu Apr 1 13:04:59 2021 -0700

Converting all of the withXXX properties to start with benchmark.

Converting all of the system properties we use in the benchmarks to start 
with the benchmark
prefix. Changing the gradle build to copy all benchmark.* properties as 
system
properties in the tst.

For now, also copying the old set of withXXX properties to not break 
peoples scripts or CI.
---
 geode-benchmarks/build.gradle  | 60 ++
 .../geode/benchmark/parameters/GcParameters.java   |  2 +-
 .../benchmark/parameters/GedisParameters.java  |  3 +-
 .../geode/benchmark/parameters/HeapParameters.java |  2 +-
 .../geode/benchmark/tests/GeodeBenchmark.java  |  2 +-
 .../benchmark/tests/redis/RedisBenchmark.java  |  4 +-
 .../benchmark/tests/redis/RedisHsetBenchmark.java  |  2 +-
 .../ClientServerTopologyWithRouterAndSniProxy.java |  4 +-
 .../topology/ClientServerTopologyWithSniProxy.java |  4 +-
 .../apache/geode/benchmark/topology/Topology.java  | 14 ++---
 .../topology/redis/ManualRedisTopology.java|  2 +-
 .../benchmark/parameters/GcParametersTest.java |  2 +-
 .../benchmark/parameters/HeapParametersTest.java   |  2 +-
 .../benchmark/tests/ClientServerBenchmarkTest.java | 12 ++---
 .../topology/ClientServerTopologyTest.java | 23 +
 .../ClientServerTopologyWithSniProxyTest.java  |  2 +-
 .../org/apache/geode/perftest/WorkloadConfig.java  |  6 +--
 .../apache/geode/perftest/jvms/JVMLauncher.java|  2 +-
 .../perftest/yardstick/YardstickTaskTest.java  |  5 +-
 19 files changed, 88 insertions(+), 65 deletions(-)

diff --git a/geode-benchmarks/build.gradle b/geode-benchmarks/build.gradle
index 49b423f..49fa625 100644
--- a/geode-benchmarks/build.gradle
+++ b/geode-benchmarks/build.gradle
@@ -103,64 +103,80 @@ task benchmark(type: Test) {
   systemProperty 'TEST_HOSTS', project.findProperty('hosts')
   systemProperty 'TEST_METADATA', project.findProperty('metadata')
   systemProperty 'OUTPUT_DIR', outputDir
+
+  //Set all project properties starting with "benchmark." as system properties 
in the test
+  //JVM
+  project.properties.findAll {
+it.key.startsWith("benchmark.")
+  }.each {
+systemProperty(it.getKey(), it.getValue())
+  }
+
+  //
+  //Legacy properties - these properties were added before the benchmark.
+  //prefix convention. They will be passed on to the JVM for now to not break
+  //CI or peoples scripts. Remove these soon!
+  //
   if (project.hasProperty('withGc')) {
-systemProperty 'withGc', project.findProperty('withGc')
+systemProperty 'benchmark.withGc', project.findProperty('withGc')
   }
   if (project.hasProperty('withHeap')) {
-systemProperty 'withHeap', project.findProperty('withHeap')
+systemProperty 'benchmark.withHeap', project.findProperty('withHeap')
   }
   if (project.hasProperty('withThreads')) {
-systemProperty 'withThreads', project.findProperty('withThreads')
+systemProperty 'benchmark.withThreads', project.findProperty('withThreads')
   }
   if (project.hasProperty('withWarmup')) {
-systemProperty 'withWarmup', project.findProperty('withWarmup')
+systemProperty 'benchmark.withWarmup', project.findProperty('withWarmup')
   }
   if (project.hasProperty('withDuration')) {
-systemProperty 'withDuration', project.findProperty('withDuration')
+systemProperty 'benchmark.withDuration', 
project.findProperty('withDuration')
   }
 
   if (project.hasProperty('withMinKey')) {
-systemProperty 'withMinKey', project.findProperty('withMinKey')
+systemProperty 'benchmark.withMinKey', project.findProperty('withMinKey')
   }
   if (project.hasProperty('withMaxKey')) {
-systemProperty 'withMaxKey', project.findProperty('withMaxKey')
+systemProperty 'benchmark.withMaxKey', project.findProperty('withMaxKey')
   }
 
-  systemProperty 'withSsl', project.hasProperty('withSsl')
-  systemProperty 'withSslProtocols', project.findProperty('withSslProtocols')
-  systemProperty 'withSslCiphers', project.findProperty('withSslCiphers')
+  systemProperty 'benchmark.withSsl', project.hasProperty('withSsl')
+  systemProperty 'benchmark.withSslProtocols', 
project.findProperty('withSslProtocols')
+  systemProperty 'benchmark.withSslCiphers', 
project.findProperty('withSslCiphers')
 
   if (project.hasProperty('withSniProxy')) {
-systemProperty 'withSniProxy', project.findProperty('withSniProxy')
+systemProperty 'benchmark.withSniProxy', 
project.findProperty('withSniProxy')
   }
-  systemProperty 'withSniProxyImage', pro

[geode-benchmarks] 03/05: Replacing metadata.json with metadata properties files

2021-04-01 Thread upthewaterspout
This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch feature/redis-performance-testing
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git

commit 002b902f3e79ed59d41728458fa403c56d7f93d5
Author: Dan Smith 
AuthorDate: Thu Apr 1 13:33:05 2021 -0700

Replacing metadata.json with metadata properties files

Getting rid of problematic org.json dependency, and also making
sure we capture *all* system properties that might effect the behavior of 
the
test.
---
 harness/build.gradle   |  1 -
 .../geode/perftest/runner/DefaultTestRunner.java   | 50 +-
 .../geode/infrastructure/BenchmarkMetadata.java|  2 +-
 .../geode/infrastructure/aws/LaunchCluster.java| 20 +
 4 files changed, 23 insertions(+), 50 deletions(-)

diff --git a/harness/build.gradle b/harness/build.gradle
index ab85423..a108f00 100644
--- a/harness/build.gradle
+++ b/harness/build.gradle
@@ -55,7 +55,6 @@ dependencies {
   compile(group: 'commons-io', name: 'commons-io', version: 
project.'commons-io.version')
   compile(group: 'org.yardstickframework', name: 'yardstick', version: 
project.'yardstick.version')
   compile(group: 'org.hdrhistogram', name: 'HdrHistogram', version: 
project.'HdrHistogram.version')
-  compile(group: 'org.json', name: 'json', version: project.'JSON.version')
   compile(group: 'org.apache.geode', name: 'geode-core', version: geodeVersion)
   testCompile(group: 'org.mockito', name: 'mockito-all', version: 
project.'mockito-all.version')
   testCompile(group: 'org.awaitility', name: 'awaitility', version: 
project.'awaitility.version')
diff --git 
a/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestRunner.java 
b/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestRunner.java
index a71b158..ba4d5a8 100644
--- 
a/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestRunner.java
+++ 
b/harness/src/main/java/org/apache/geode/perftest/runner/DefaultTestRunner.java
@@ -21,15 +21,12 @@ import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStream;
-import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
-import org.json.JSONArray;
-import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -77,42 +74,17 @@ public class DefaultTestRunner implements TestRunner {
 }
 
 benchmarkOutput.mkdirs();
-String metadataFilename = outputDir + "/metadata.json";
+String metadataFilename = outputDir + "/testrunner.properties";
 Path metadataOutput = Paths.get(metadataFilename);
-JSONObject JSONmetadata = new JSONObject();
-
-if (metadataOutput.toFile().exists()) {
-  JSONmetadata = new JSONObject(new 
String(Files.readAllBytes(metadataOutput)));
-} else {
-  String metadata = System.getProperty("TEST_METADATA");
-  if (!(metadata == null) && !metadata.isEmpty()) {
-JSONObject testMetadata = new JSONObject();
-String[] metadataEntries = metadata.split(",");
-for (String data : metadataEntries) {
-  String[] kv = data.split(":");
-  if (kv.length == 2) {
-testMetadata.put(kv[0], kv[1]);
-  }
-}
-addVersionProperties(testMetadata, getVersionProperties());
-JSONmetadata.put("testMetadata", testMetadata);
-  }
-}
 
-try {
-  JSONArray testNames = JSONmetadata.getJSONArray("testNames");
-  testNames.put(testName);
-  JSONmetadata.put("testNames", testNames);
-} catch (org.json.JSONException e) {
-  JSONArray testNames = new JSONArray();
-  testNames.put(testName);
-  JSONmetadata.put("testNames", testNames);
+if (!metadataOutput.toFile().exists()) {
+  Properties properties = new Properties(System.getProperties());
+  addVersionProperties(properties, getVersionProperties());
+  try (FileWriter writer = new 
FileWriter(metadataOutput.toFile().getAbsoluteFile())) {
+properties.store(writer, "Benchmark metadata generated while running 
tests");
+  }
 }
 
-FileWriter metadataWriter = new 
FileWriter(metadataOutput.toFile().getAbsoluteFile());
-metadataWriter.write(JSONmetadata.toString());
-metadataWriter.flush();
-
 Map roles = config.getRoles();
 Map> jvmArgs = config.getJvmArgs();
 
@@ -140,10 +112,10 @@ public class DefaultTestRunner implements TestRunner {
 
   }
 
-  private void addVersionProperties(JSONObject jsonMetadata, Properties 
versionProperties) {
-jsonMetadata.put("source_version", 
versionProperties.getProperty("Product-Version"));
-jsonMetadata.put("source_branch", 
versionProperties.getProperty("Source-Repository"));
-jsonMetadata.put("source_revision", 
versionProperties.getProperty("Source-Revision"));
+  private void addVersion

[geode] branch feature/GEODE-9104-revert created (now b058f9e)

2021-04-01 Thread boglesby
This is an automated email from the ASF dual-hosted git repository.

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


  at b058f9e  Revert "GEODE-9104: Removed ESCAPE_NON_ASCII feature so 
non-ASCII characters are displayed"

This branch includes the following new commits:

 new b058f9e  Revert "GEODE-9104: Removed ESCAPE_NON_ASCII feature so 
non-ASCII characters are displayed"

The 1 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.



[geode] 01/01: Revert "GEODE-9104: Removed ESCAPE_NON_ASCII feature so non-ASCII characters are displayed"

2021-04-01 Thread boglesby
This is an automated email from the ASF dual-hosted git repository.

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

commit b058f9e680547a2268af11375116522ce13c260e
Author: Barry Oglesby 
AuthorDate: Thu Apr 1 16:19:09 2021 -0700

Revert "GEODE-9104: Removed ESCAPE_NON_ASCII feature so non-ASCII 
characters are displayed"

This reverts commit b7299661375ed0926303f63484cb46dae1e12ffa.
---
 .../web/controllers/RestAccessControllerTest.java  | 42 --
 ...tomer-containing-chinese-query-full-result.json |  7 
 ...mer-containing-chinese-query-struct-result.json |  6 
 .../controllers/customer-containing-chinese.json   |  5 ---
 .../geode/rest/internal/web/util/JSONUtils.java|  2 ++
 5 files changed, 2 insertions(+), 60 deletions(-)

diff --git 
a/geode-web-api/src/integrationTest/java/org/apache/geode/rest/internal/web/controllers/RestAccessControllerTest.java
 
b/geode-web-api/src/integrationTest/java/org/apache/geode/rest/internal/web/controllers/RestAccessControllerTest.java
index 84e0a8b..5ea7510 100644
--- 
a/geode-web-api/src/integrationTest/java/org/apache/geode/rest/internal/web/controllers/RestAccessControllerTest.java
+++ 
b/geode-web-api/src/integrationTest/java/org/apache/geode/rest/internal/web/controllers/RestAccessControllerTest.java
@@ -105,12 +105,6 @@ public class RestAccessControllerTest {
   private static final String ORDER_CAS_OLD_JSON = "order-cas-old.json";
   private static final String ORDER_CAS_NEW_JSON = "order-cas-new.json";
   private static final String ORDER_CAS_WRONG_OLD_JSON = 
"order-cas-wrong-old.json";
-  private static final String CUSTOMER_CONTAINING_CHINESE_JSON =
-  "customer-containing-chinese.json";
-  private static final String 
CUSTOMER_CONTAINING_CHINESE_QUERY_FULL_RESULT_JSON =
-  "customer-containing-chinese-query-full-result.json";
-  private static final String 
CUSTOMER_CONTAINING_CHINESE_QUERY_STRUCT_RESULT_JSON =
-  "customer-containing-chinese-query-struct-result.json";
 
   private static final String SLASH = "/";
   private static final String KEY_PREFIX = "/?+ @&./";
@@ -173,9 +167,6 @@ public class RestAccessControllerTest {
 loadResource(ORDER_CAS_OLD_JSON);
 loadResource(ORDER_CAS_NEW_JSON);
 loadResource(ORDER_CAS_WRONG_OLD_JSON);
-loadResource(CUSTOMER_CONTAINING_CHINESE_JSON);
-loadResource(CUSTOMER_CONTAINING_CHINESE_QUERY_FULL_RESULT_JSON);
-loadResource(CUSTOMER_CONTAINING_CHINESE_QUERY_STRUCT_RESULT_JSON);
 
 RestAgent.createParameterizedQueryRegion();
 
@@ -1366,39 +1357,6 @@ public class RestAccessControllerTest {
   }
 
 
-  @Test
-  @WithMockUser
-  public void putGetQueryCustomerContainingMandarin() throws Exception {
-// Put customer containing mandarin
-mockMvc.perform(put("/v1/customers/1")
-.content(jsonResources.get(CUSTOMER_CONTAINING_CHINESE_JSON))
-.with(POST_PROCESSOR))
-.andExpect(status().isOk())
-.andExpect(header().string("Location", BASE_URL + "/customers/1"));
-
-// Get customer containing mandarin
-mockMvc.perform(get("/v1/customers/1")
-.with(POST_PROCESSOR))
-.andExpect(status().isOk())
-
.andExpect(content().json(jsonResources.get(CUSTOMER_CONTAINING_CHINESE_JSON)));
-
-// Query full customer containing mandarin
-mockMvc.perform(
-get("/v1/queries/adhoc?q=SELECT * FROM " + SEPARATOR + "customers 
WHERE customerId = 1")
-.with(POST_PROCESSOR))
-.andExpect(status().isOk())
-.andExpect(
-
content().json(jsonResources.get(CUSTOMER_CONTAINING_CHINESE_QUERY_FULL_RESULT_JSON)));
-
-// Query struct customer containing mandarin
-mockMvc.perform(get("/v1/queries/adhoc?q=SELECT firstName, lastName FROM " 
+ SEPARATOR
-+ "customers WHERE customerId = 1")
-.with(POST_PROCESSOR))
-.andExpect(status().isOk())
-.andExpect(content()
-
.json(jsonResources.get(CUSTOMER_CONTAINING_CHINESE_QUERY_STRUCT_RESULT_JSON)));
-  }
-
   private void deleteAllQueries() throws Exception {
 MvcResult result = mockMvc.perform(get("/v1/queries")
 .with(POST_PROCESSOR))
diff --git 
a/geode-web-api/src/integrationTest/resources/org/apache/geode/rest/internal/web/controllers/customer-containing-chinese-query-full-result.json
 
b/geode-web-api/src/integrationTest/resources/org/apache/geode/rest/internal/web/controllers/customer-containing-chinese-query-full-result.json
deleted file mode 100644
index a7d63cf..000
--- 
a/geode-web-api/src/integrationTest/resources/org/apache/geode/rest/internal/web/controllers/customer-containing-chinese-query-full-result.json
+++ /dev/null
@@ -1,7 +0,0 @@
-[
-  {
-"customerId": 1,
-"firstName": "名",
-"lastName": "姓"
-  }
-]
\ No newline at end of file
diff --git 
a/geode-web-api/src/integrationTest/resources/org/apache/geode/rest/internal/web/controllers/customer-co

[geode] branch develop updated: Revert "GEODE-9104: Removed ESCAPE_NON_ASCII feature so non-ASCII characters are displayed" (#6249)

2021-04-01 Thread onichols
This is an automated email from the ASF dual-hosted git repository.

onichols pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
 new 1b2fe6d  Revert "GEODE-9104: Removed ESCAPE_NON_ASCII feature so 
non-ASCII characters are displayed" (#6249)
1b2fe6d is described below

commit 1b2fe6d185edf578aa764c49e85a766526c8ca68
Author: Barry Oglesby 
AuthorDate: Thu Apr 1 18:44:37 2021 -1000

Revert "GEODE-9104: Removed ESCAPE_NON_ASCII feature so non-ASCII 
characters are displayed" (#6249)

This reverts commit b7299661375ed0926303f63484cb46dae1e12ffa.
---
 .../web/controllers/RestAccessControllerTest.java  | 42 --
 ...tomer-containing-chinese-query-full-result.json |  7 
 ...mer-containing-chinese-query-struct-result.json |  6 
 .../controllers/customer-containing-chinese.json   |  5 ---
 .../geode/rest/internal/web/util/JSONUtils.java|  2 ++
 5 files changed, 2 insertions(+), 60 deletions(-)

diff --git 
a/geode-web-api/src/integrationTest/java/org/apache/geode/rest/internal/web/controllers/RestAccessControllerTest.java
 
b/geode-web-api/src/integrationTest/java/org/apache/geode/rest/internal/web/controllers/RestAccessControllerTest.java
index 84e0a8b..5ea7510 100644
--- 
a/geode-web-api/src/integrationTest/java/org/apache/geode/rest/internal/web/controllers/RestAccessControllerTest.java
+++ 
b/geode-web-api/src/integrationTest/java/org/apache/geode/rest/internal/web/controllers/RestAccessControllerTest.java
@@ -105,12 +105,6 @@ public class RestAccessControllerTest {
   private static final String ORDER_CAS_OLD_JSON = "order-cas-old.json";
   private static final String ORDER_CAS_NEW_JSON = "order-cas-new.json";
   private static final String ORDER_CAS_WRONG_OLD_JSON = 
"order-cas-wrong-old.json";
-  private static final String CUSTOMER_CONTAINING_CHINESE_JSON =
-  "customer-containing-chinese.json";
-  private static final String 
CUSTOMER_CONTAINING_CHINESE_QUERY_FULL_RESULT_JSON =
-  "customer-containing-chinese-query-full-result.json";
-  private static final String 
CUSTOMER_CONTAINING_CHINESE_QUERY_STRUCT_RESULT_JSON =
-  "customer-containing-chinese-query-struct-result.json";
 
   private static final String SLASH = "/";
   private static final String KEY_PREFIX = "/?+ @&./";
@@ -173,9 +167,6 @@ public class RestAccessControllerTest {
 loadResource(ORDER_CAS_OLD_JSON);
 loadResource(ORDER_CAS_NEW_JSON);
 loadResource(ORDER_CAS_WRONG_OLD_JSON);
-loadResource(CUSTOMER_CONTAINING_CHINESE_JSON);
-loadResource(CUSTOMER_CONTAINING_CHINESE_QUERY_FULL_RESULT_JSON);
-loadResource(CUSTOMER_CONTAINING_CHINESE_QUERY_STRUCT_RESULT_JSON);
 
 RestAgent.createParameterizedQueryRegion();
 
@@ -1366,39 +1357,6 @@ public class RestAccessControllerTest {
   }
 
 
-  @Test
-  @WithMockUser
-  public void putGetQueryCustomerContainingMandarin() throws Exception {
-// Put customer containing mandarin
-mockMvc.perform(put("/v1/customers/1")
-.content(jsonResources.get(CUSTOMER_CONTAINING_CHINESE_JSON))
-.with(POST_PROCESSOR))
-.andExpect(status().isOk())
-.andExpect(header().string("Location", BASE_URL + "/customers/1"));
-
-// Get customer containing mandarin
-mockMvc.perform(get("/v1/customers/1")
-.with(POST_PROCESSOR))
-.andExpect(status().isOk())
-
.andExpect(content().json(jsonResources.get(CUSTOMER_CONTAINING_CHINESE_JSON)));
-
-// Query full customer containing mandarin
-mockMvc.perform(
-get("/v1/queries/adhoc?q=SELECT * FROM " + SEPARATOR + "customers 
WHERE customerId = 1")
-.with(POST_PROCESSOR))
-.andExpect(status().isOk())
-.andExpect(
-
content().json(jsonResources.get(CUSTOMER_CONTAINING_CHINESE_QUERY_FULL_RESULT_JSON)));
-
-// Query struct customer containing mandarin
-mockMvc.perform(get("/v1/queries/adhoc?q=SELECT firstName, lastName FROM " 
+ SEPARATOR
-+ "customers WHERE customerId = 1")
-.with(POST_PROCESSOR))
-.andExpect(status().isOk())
-.andExpect(content()
-
.json(jsonResources.get(CUSTOMER_CONTAINING_CHINESE_QUERY_STRUCT_RESULT_JSON)));
-  }
-
   private void deleteAllQueries() throws Exception {
 MvcResult result = mockMvc.perform(get("/v1/queries")
 .with(POST_PROCESSOR))
diff --git 
a/geode-web-api/src/integrationTest/resources/org/apache/geode/rest/internal/web/controllers/customer-containing-chinese-query-full-result.json
 
b/geode-web-api/src/integrationTest/resources/org/apache/geode/rest/internal/web/controllers/customer-containing-chinese-query-full-result.json
deleted file mode 100644
index a7d63cf..000
--- 
a/geode-web-api/src/integrationTest/resources/org/apache/geode/rest/internal/web/controllers/customer-containing-chinese-query-full-result.json
+++ /dev/null
@@ -1,7 +0,0 @@
-[
-  {
-"cus

[geode] branch support/1.14 updated: GEODE-9051: Added a feature to measure the Tenured heap consumption (#6176) (#6251)

2021-04-01 Thread nnag
This is an automated email from the ASF dual-hosted git repository.

nnag pushed a commit to branch support/1.14
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/support/1.14 by this push:
 new c2f3161  GEODE-9051: Added a feature to measure the Tenured heap 
consumption (#6176) (#6251)
c2f3161 is described below

commit c2f31616419e14ef18909cc555af35654b6b441d
Author: Nabarun Nag 
AuthorDate: Thu Apr 1 23:19:10 2021 -0700

GEODE-9051: Added a feature to measure the Tenured heap consumption (#6176) 
(#6251)

This feature prints out the tenured heap in the logs after the garbage 
collection. It works with JDK 1.8 build 212 and above.

Co-authored-by: geet 

(cherry picked from commit d79a3c78eab96a9e760db07fa42580e61586b9c5)
---
 .../internal/cache/control/HeapMemoryMonitor.java  |  7 +-
 .../cache/control/InternalResourceManager.java |  5 +-
 .../control/TenuredHeapConsumptionMonitor.java | 70 +++
 .../cache/control/HeapMemoryMonitorTest.java   |  2 +-
 .../control/TenuredHeapConsumptionMonitorTest.java | 99 ++
 5 files changed, 179 insertions(+), 4 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
index 72d07bd..c52eb36 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
@@ -143,6 +143,7 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
   private final ResourceAdvisor resourceAdvisor;
   private final InternalCache cache;
   private final ResourceManagerStats stats;
+  private final TenuredHeapConsumptionMonitor tenuredHeapConsumptionMonitor;
 
   @MutableForTesting
   private static boolean testDisableMemoryUpdates = false;
@@ -154,6 +155,7 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
* names.
*
* Package private for testing.
+   * checkTenuredHeapConsumption
*
* @param memoryPoolMXBean The memory pool MXBean to check.
* @return True if the pool name matches a known tenured pool name, false 
otherwise.
@@ -178,11 +180,13 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
   }
 
   HeapMemoryMonitor(final InternalResourceManager resourceManager, final 
InternalCache cache,
-  final ResourceManagerStats stats) {
+  final ResourceManagerStats stats,
+  TenuredHeapConsumptionMonitor tenuredHeapConsumptionMonitor) {
 this.resourceManager = resourceManager;
 this.resourceAdvisor = (ResourceAdvisor) cache.getDistributionAdvisor();
 this.cache = cache;
 this.stats = stats;
+this.tenuredHeapConsumptionMonitor = tenuredHeapConsumptionMonitor;
   }
 
   /**
@@ -670,6 +674,7 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
 // Not using the information given by the notification in favor
 // of constructing fresh information ourselves.
 if (!testDisableMemoryUpdates) {
+  
tenuredHeapConsumptionMonitor.checkTenuredHeapConsumption(notification);
   updateStateAndSendEvent();
 }
   }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
index 0085c8c..d756597 100755
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
@@ -150,8 +150,9 @@ public class InternalResourceManager implements 
ResourceManager {
 this.stats.getResourceEventPoolStatHelper(), 
getThreadMonitorObj());
 
 // Create the monitors
-Map tempMonitors = new 
HashMap();
-tempMonitors.put(ResourceType.HEAP_MEMORY, new HeapMemoryMonitor(this, 
cache, this.stats));
+Map tempMonitors = new HashMap<>();
+tempMonitors.put(ResourceType.HEAP_MEMORY,
+new HeapMemoryMonitor(this, cache, stats, new 
TenuredHeapConsumptionMonitor()));
 tempMonitors.put(ResourceType.OFFHEAP_MEMORY,
 new OffHeapMemoryMonitor(this, cache, cache.getOffHeapStore(), 
this.stats));
 this.resourceMonitors = Collections.unmodifiableMap(tempMonitors);
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/TenuredHeapConsumptionMonitor.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/TenuredHeapConsumptionMonitor.java
new file mode 100644
index 000..07e2504
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/TenuredHeapConsumptionMonitor.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to th

[geode] branch support/1.13 updated: GEODE-9051: Added a feature to measure the Tenured heap consumption (#6176) (#6252)

2021-04-01 Thread nnag
This is an automated email from the ASF dual-hosted git repository.

nnag pushed a commit to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/support/1.13 by this push:
 new 32779a0  GEODE-9051: Added a feature to measure the Tenured heap 
consumption (#6176) (#6252)
32779a0 is described below

commit 32779a05a30fa91a2dad38245298ceed0e0bab23
Author: Nabarun Nag 
AuthorDate: Thu Apr 1 23:26:09 2021 -0700

GEODE-9051: Added a feature to measure the Tenured heap consumption (#6176) 
(#6252)

This feature prints out the tenured heap in the logs after the garbage 
collection. It works with JDK 1.8 build 212 and above.

Co-authored-by: geetrawat 
(cherry picked from commit d79a3c78eab96a9e760db07fa42580e61586b9c5)
---
 .../internal/cache/control/HeapMemoryMonitor.java  |  7 +-
 .../cache/control/InternalResourceManager.java |  5 +-
 .../control/TenuredHeapConsumptionMonitor.java | 70 +++
 .../cache/control/HeapMemoryMonitorTest.java   |  2 +-
 .../control/TenuredHeapConsumptionMonitorTest.java | 99 ++
 5 files changed, 179 insertions(+), 4 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
index 2b3ef17..438facf 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
@@ -142,6 +142,7 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
   private final ResourceAdvisor resourceAdvisor;
   private final InternalCache cache;
   private final ResourceManagerStats stats;
+  private final TenuredHeapConsumptionMonitor tenuredHeapConsumptionMonitor;
 
   @MutableForTesting
   private static boolean testDisableMemoryUpdates = false;
@@ -153,6 +154,7 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
* names.
*
* Package private for testing.
+   * checkTenuredHeapConsumption
*
* @param memoryPoolMXBean The memory pool MXBean to check.
* @return True if the pool name matches a known tenured pool name, false 
otherwise.
@@ -177,11 +179,13 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
   }
 
   HeapMemoryMonitor(final InternalResourceManager resourceManager, final 
InternalCache cache,
-  final ResourceManagerStats stats) {
+  final ResourceManagerStats stats,
+  TenuredHeapConsumptionMonitor tenuredHeapConsumptionMonitor) {
 this.resourceManager = resourceManager;
 this.resourceAdvisor = (ResourceAdvisor) cache.getDistributionAdvisor();
 this.cache = cache;
 this.stats = stats;
+this.tenuredHeapConsumptionMonitor = tenuredHeapConsumptionMonitor;
   }
 
   /**
@@ -669,6 +673,7 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
 // Not using the information given by the notification in favor
 // of constructing fresh information ourselves.
 if (!testDisableMemoryUpdates) {
+  
tenuredHeapConsumptionMonitor.checkTenuredHeapConsumption(notification);
   updateStateAndSendEvent();
 }
   }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
index 7991479..8d32077 100755
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
@@ -149,8 +149,9 @@ public class InternalResourceManager implements 
ResourceManager {
 0, this.stats.getResourceEventQueueStatHelper());
 
 // Create the monitors
-Map tempMonitors = new 
HashMap();
-tempMonitors.put(ResourceType.HEAP_MEMORY, new HeapMemoryMonitor(this, 
cache, this.stats));
+Map tempMonitors = new HashMap<>();
+tempMonitors.put(ResourceType.HEAP_MEMORY,
+new HeapMemoryMonitor(this, cache, stats, new 
TenuredHeapConsumptionMonitor()));
 tempMonitors.put(ResourceType.OFFHEAP_MEMORY,
 new OffHeapMemoryMonitor(this, cache, cache.getOffHeapStore(), 
this.stats));
 this.resourceMonitors = Collections.unmodifiableMap(tempMonitors);
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/TenuredHeapConsumptionMonitor.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/TenuredHeapConsumptionMonitor.java
new file mode 100644
index 000..07e2504
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/TenuredHeapConsumptionMonitor.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Fo

[geode] branch support/1.12 updated: GEODE-9051: Added a feature to measure the Tenured heap consumption (#6176)

2021-04-01 Thread nnag
This is an automated email from the ASF dual-hosted git repository.

nnag pushed a commit to branch support/1.12
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/support/1.12 by this push:
 new 4ea7a32  GEODE-9051: Added a feature to measure the Tenured heap 
consumption (#6176)
4ea7a32 is described below

commit 4ea7a32f4bd8e77ac5752c8e4d467390267496f4
Author: geetrawat 
AuthorDate: Thu Apr 1 18:33:27 2021 -0400

GEODE-9051: Added a feature to measure the Tenured heap consumption (#6176)

This feature prints out the tenured heap in the logs after the garbage 
collection. It works with JDK 1.8 build 212 and above.

Co-authored-by: geet 
(cherry picked from commit d79a3c78eab96a9e760db07fa42580e61586b9c5)
---
 .../internal/cache/control/HeapMemoryMonitor.java  |  7 +-
 .../cache/control/InternalResourceManager.java |  5 +-
 .../control/TenuredHeapConsumptionMonitor.java | 70 +++
 .../cache/control/HeapMemoryMonitorTest.java   |  2 +-
 .../control/TenuredHeapConsumptionMonitorTest.java | 99 ++
 5 files changed, 179 insertions(+), 4 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
index 2b3ef17..438facf 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/HeapMemoryMonitor.java
@@ -142,6 +142,7 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
   private final ResourceAdvisor resourceAdvisor;
   private final InternalCache cache;
   private final ResourceManagerStats stats;
+  private final TenuredHeapConsumptionMonitor tenuredHeapConsumptionMonitor;
 
   @MutableForTesting
   private static boolean testDisableMemoryUpdates = false;
@@ -153,6 +154,7 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
* names.
*
* Package private for testing.
+   * checkTenuredHeapConsumption
*
* @param memoryPoolMXBean The memory pool MXBean to check.
* @return True if the pool name matches a known tenured pool name, false 
otherwise.
@@ -177,11 +179,13 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
   }
 
   HeapMemoryMonitor(final InternalResourceManager resourceManager, final 
InternalCache cache,
-  final ResourceManagerStats stats) {
+  final ResourceManagerStats stats,
+  TenuredHeapConsumptionMonitor tenuredHeapConsumptionMonitor) {
 this.resourceManager = resourceManager;
 this.resourceAdvisor = (ResourceAdvisor) cache.getDistributionAdvisor();
 this.cache = cache;
 this.stats = stats;
+this.tenuredHeapConsumptionMonitor = tenuredHeapConsumptionMonitor;
   }
 
   /**
@@ -669,6 +673,7 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
 // Not using the information given by the notification in favor
 // of constructing fresh information ourselves.
 if (!testDisableMemoryUpdates) {
+  
tenuredHeapConsumptionMonitor.checkTenuredHeapConsumption(notification);
   updateStateAndSendEvent();
 }
   }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
index 4d65521..6e345ed 100755
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java
@@ -142,8 +142,9 @@ public class InternalResourceManager implements 
ResourceManager {
 0, this.stats.getResourceEventQueueStatHelper());
 
 // Create the monitors
-Map tempMonitors = new 
HashMap();
-tempMonitors.put(ResourceType.HEAP_MEMORY, new HeapMemoryMonitor(this, 
cache, this.stats));
+Map tempMonitors = new HashMap<>();
+tempMonitors.put(ResourceType.HEAP_MEMORY,
+new HeapMemoryMonitor(this, cache, stats, new 
TenuredHeapConsumptionMonitor()));
 tempMonitors.put(ResourceType.OFFHEAP_MEMORY,
 new OffHeapMemoryMonitor(this, cache, cache.getOffHeapStore(), 
this.stats));
 this.resourceMonitors = Collections.unmodifiableMap(tempMonitors);
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/control/TenuredHeapConsumptionMonitor.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/TenuredHeapConsumptionMonitor.java
new file mode 100644
index 000..07e2504
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/control/TenuredHeapConsumptionMonitor.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one