You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/05/02 19:46:53 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #4196: Configure static PulsarByteBufAllocator to handle OOM errors

merlimat commented on a change in pull request #4196: Configure static PulsarByteBufAllocator to handle OOM errors
URL: https://github.com/apache/pulsar/pull/4196#discussion_r280569698
 
 

 ##########
 File path: pulsar-common/src/main/java/org/apache/pulsar/common/stats/JvmMetrics.java
 ##########
 @@ -113,26 +109,8 @@ public JvmMetrics(ScheduledExecutorService executor, String componentName, JvmGC
         m.put("jvm_direct_memory_used", getJvmDirectMemoryUsed());
         m.put("jvm_max_direct_memory", PlatformDependent.maxDirectMemory());
         m.put("jvm_thread_cnt", getThreadCount());
-        
-        this.gcLogger.logMetrics(m);
-
-        long totalAllocated = 0;
-        long totalUsed = 0;
 
-        for (PoolArenaMetric arena : PooledByteBufAllocator.DEFAULT.directArenas()) {
-            for (PoolChunkListMetric list : arena.chunkLists()) {
-                for (PoolChunkMetric chunk : list) {
-                    int size = chunk.chunkSize();
-                    int used = size - chunk.freeBytes();
-
-                    totalAllocated += size;
-                    totalUsed += used;
-                }
-            }
-        }
-
-        m.put(this.componentName + "_default_pool_allocated", totalAllocated);
 
 Review comment:
   Reverted back

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services