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

mcmellawatt 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 c258adc  Searching for answers
c258adc is described below

commit c258adcae0704b5a72727ec821be33037a492619
Author: Ryan McMahon <[email protected]>
AuthorDate: Wed Feb 6 16:40:33 2019 -0800

    Searching for answers
---
 .../geode/internal/cache/GemFireCacheImpl.java     | 26 ++++++++++++++++++++++
 .../internal/cache/control/HeapMemoryMonitor.java  | 10 +++++----
 2 files changed, 32 insertions(+), 4 deletions(-)

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 fa6fc2a..b4a41ba 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
@@ -175,6 +175,7 @@ import org.apache.geode.internal.DSCODE;
 import org.apache.geode.internal.SystemTimer;
 import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.backup.BackupService;
+import org.apache.geode.internal.cache.control.HeapMemoryMonitor;
 import org.apache.geode.internal.cache.control.InternalResourceManager;
 import 
org.apache.geode.internal.cache.control.InternalResourceManager.ResourceType;
 import org.apache.geode.internal.cache.control.ResourceAdvisor;
@@ -1200,13 +1201,21 @@ public class GemFireCacheImpl implements InternalCache, 
InternalClientCache, Has
    * references to this instance in this method (vs. the constructor).
    */
   private void initialize() {
+    HeapMemoryMonitor heapMemoryMonitor = new HeapMemoryMonitor();
+
+    System.out.println("RYGUY Usage 1: " + heapMemoryMonitor.getBytesUsed());
+
     for (CacheLifecycleListener listener : cacheLifecycleListeners) {
       listener.cacheCreated(this);
     }
 
+    System.out.println("RYGUY Usage 2: " + heapMemoryMonitor.getBytesUsed());
+
     // set ClassPathLoader and then deploy cluster config jars
     
ClassPathLoader.setLatestToDefault(this.system.getConfig().getDeployWorkingDir());
 
+    System.out.println("RYGUY Usage 3: " + heapMemoryMonitor.getBytesUsed());
+
     try {
       
ccLoader.deployJarsReceivedFromClusterConfiguration(this.configurationResponse);
     } catch (IOException | ClassNotFoundException e) {
@@ -1215,12 +1224,18 @@ public class GemFireCacheImpl implements InternalCache, 
InternalClientCache, Has
           e);
     }
 
+    System.out.println("RYGUY Usage 4: " + heapMemoryMonitor.getBytesUsed());
+
     SystemMemberCacheEventProcessor.send(this, Operation.CACHE_CREATE);
     this.resourceAdvisor.initializationGate();
 
+    System.out.println("RYGUY Usage 5: " + heapMemoryMonitor.getBytesUsed());
+
     // Register function that we need to execute to fetch available REST 
service endpoints in DS
     FunctionService.registerFunction(new FindRestEnabledServersFunction());
 
+    System.out.println("RYGUY Usage 6: " + heapMemoryMonitor.getBytesUsed());
+
     // moved this after initializeDeclarativeCache because in the future
     // distributed system creation will not happen until we have read
     // cache.xml file.
@@ -1230,17 +1245,28 @@ public class GemFireCacheImpl implements InternalCache, 
InternalClientCache, Has
     // This call may need to be moved inside initializeDeclarativeCache.
     this.jmxAdvisor.initializationGate(); // Entry to GemFire Management 
service
 
+    System.out.println("RYGUY Usage 7: " + heapMemoryMonitor.getBytesUsed());
+
     // this starts up the ManagementService, register and federate the 
internal beans
     this.system.handleResourceEvent(ResourceEvent.CACHE_CREATE, this);
 
+    System.out.println("RYGUY Usage 8: " + heapMemoryMonitor.getBytesUsed());
+
     initializeServices();
 
+    System.out.println("RYGUY Usage 9: " + heapMemoryMonitor.getBytesUsed());
+
     boolean completedCacheXml = false;
     try {
       if (!isClient) {
         applyJarAndXmlFromClusterConfig();
       }
+      System.out.println("RYGUY Usage 10: " + 
heapMemoryMonitor.getBytesUsed());
+
       initializeDeclarativeCache();
+
+      System.out.println("RYGUY Usage 11: " + 
heapMemoryMonitor.getBytesUsed());
+
       completedCacheXml = true;
     } catch (RuntimeException e) {
       logger.error("Cache initialization for {} failed because: {}", this, e); 
// fix GEODE-3038
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 0922b94..2107554 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
@@ -135,10 +135,10 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
   // Set to true when setEvictionThreshold(...) is called.
   private boolean hasEvictionThreshold = false;
 
-  private final InternalResourceManager resourceManager;
-  private final ResourceAdvisor resourceAdvisor;
-  private final InternalCache cache;
-  private final ResourceManagerStats stats;
+  private InternalResourceManager resourceManager;
+  private ResourceAdvisor resourceAdvisor;
+  private InternalCache cache;
+  private ResourceManagerStats stats;
 
   private static boolean testDisableMemoryUpdates = false;
   private static long testBytesUsedForThresholdSet = -1;
@@ -171,6 +171,8 @@ public class HeapMemoryMonitor implements 
NotificationListener, MemoryMonitor {
         || (HEAP_POOL != null && name.equals(HEAP_POOL));
   }
 
+  public HeapMemoryMonitor() {}
+
   HeapMemoryMonitor(final InternalResourceManager resourceManager, final 
InternalCache cache,
       final ResourceManagerStats stats) {
     this.resourceManager = resourceManager;

Reply via email to