You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2013/11/28 19:13:35 UTC
svn commit: r1546433 - in
/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket:
BucketCache.java ByteBufferIOEngine.java
Author: liyin
Date: Thu Nov 28 18:13:35 2013
New Revision: 1546433
URL: http://svn.apache.org/r1546433
Log:
[master] GC disabled L2 cache and reset some stat counters
Author: arjen
Summary: During the testing of disabling the L2 cache I forgot to check if the memory allocated to the L2 cache is properly released to the OS, allowing it to be reused as FS cache and continue running in a known state. This diff properly releases the memory used by the L2 cache and resets some of the metrics to reflect this.
Test Plan: Built and deployed a jar to hbase481.frc3. While running with L2 cache enabled the resident memory is ~32GB. After disabling the cache the rresident memory drops to ~24GB and ODS graphs reflect this change properly.
Reviewers: aaiyer, liyintang
Reviewed By: liyintang
Differential Revision: https://phabricator.fb.com/D1074744
Task ID: 2325295
Modified:
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/ByteBufferIOEngine.java
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java?rev=1546433&r1=1546432&r2=1546433&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java Thu Nov 28 18:13:35 2013
@@ -772,6 +772,10 @@ public class BucketCache implements Heap
writerThreads[i].interrupt();
this.ramCache.clear();
this.backingMap.clear();
+ // Reset counters and stats
+ this.blockNumber.set(0);
+ this.realCacheSize.set(0);
+ this.heapSize.set(0);
this.cacheStats.reset();
}
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/ByteBufferIOEngine.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/ByteBufferIOEngine.java?rev=1546433&r1=1546432&r2=1546433&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/ByteBufferIOEngine.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/ByteBufferIOEngine.java Thu Nov 28 18:13:35 2013
@@ -70,14 +70,13 @@ public class ByteBufferIOEngine implemen
*/
@Override
public void sync() {
-
}
/**
- * No operation for the shutdown in the memory IO engine
+ * Shutdown the memory IO engine by de-referencing the buffer array.
*/
@Override
public void shutdown() {
-
+ bufferArray = null;
}
}