Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

NIO + BDB stats - Code review comments

  • Loading branch information...
commit 5aa371628c1f1c6ce4efa9da91444accb096179e 1 parent dd29d0e
vinoth chandar vinothchandar authored
3  src/java/voldemort/common/nio/ByteBufferBackedInputStream.java
View
@@ -54,7 +54,8 @@ public ByteBufferBackedInputStream(ByteBuffer buffer) {
public ByteBufferBackedInputStream(ByteBuffer buffer, MutableLong sizeTracker) {
this.buffer = buffer;
this.sizeTracker = sizeTracker;
- this.sizeTracker.add(buffer.capacity());
+ if(buffer != null)
+ this.sizeTracker.add(buffer.capacity());
}
public ByteBuffer getBuffer() {
3  src/java/voldemort/common/nio/ByteBufferBackedOutputStream.java
View
@@ -65,7 +65,8 @@ public ByteBufferBackedOutputStream(ByteBuffer buffer, MutableLong sizeTracker)
this.buffer = buffer;
wasExpanded = false;
this.sizeTracker = sizeTracker;
- this.sizeTracker.add(buffer.capacity());
+ if(buffer != null)
+ this.sizeTracker.add(buffer.capacity());
}
public ByteBuffer getBuffer() {
5 src/java/voldemort/store/bdb/stats/BdbEnvironmentStats.java
View
@@ -6,7 +6,6 @@
import voldemort.VoldemortException;
import voldemort.annotations.Experimental;
import voldemort.annotations.jmx.JmxGetter;
-import voldemort.annotations.jmx.JmxOperation;
import voldemort.utils.CachedCallable;
import com.sleepycat.je.Database;
@@ -351,12 +350,12 @@ public long getNumEnvironmentFailureExceptions() {
return numEnvironmentFailureExceptions.longValue();
}
- @JmxOperation(description = "Obtain the number of k-v entries in the store")
+ @JmxGetter(name = "getEntryCount", description = "Obtain the number of k-v entries in the store")
public long getEntryCount() throws Exception {
return entryCount.call();
}
- @JmxOperation(description = "Obtain statistics about the BTree Index for a store")
+ @JmxGetter(name = "getBtreeStats", description = "Obtain statistics about the BTree Index for a store")
public String getBtreeStats() throws Exception {
return btreeStats.call().toString();
}
Please sign in to comment.
Something went wrong with that request. Please try again.