diff --git a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceImpl.java b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceImpl.java index fafa9d0..b0c9ec3 100644 --- a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceImpl.java +++ b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceImpl.java @@ -183,12 +183,12 @@ public class MetricsHBaseServerSourceImpl extends BaseSourceImpl @Override public void sentBytes(long count) { - this.sentBytes.incr(count); + // this.sentBytes.incr(count); } @Override public void receivedBytes(int count) { - this.receivedBytes.incr(count); + // this.receivedBytes.incr(count); } @Override diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java index 298dcf7..07642cb 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java @@ -41,7 +41,7 @@ public class CacheStats { /** The number of getBlock requests that were cache hits from primary replica */ private final Counter primaryHitCount = new Counter(); - + /** * The number of getBlock requests that were cache hits, but only from * requests that were set to use the block cache. This is because all reads @@ -149,6 +149,7 @@ public class CacheStats { public void miss(boolean caching, boolean primary, BlockType type) { + if (true) return; missCount.increment(); if (primary) primaryMissCount.increment(); if (caching) missCachingCount.increment(); @@ -195,6 +196,7 @@ public class CacheStats { } public void hit(boolean caching, boolean primary, BlockType type) { + if (true) return; hitCount.increment(); if (primary) primaryHitCount.increment(); if (caching) hitCachingCount.increment(); @@ -243,10 +245,12 @@ public class CacheStats { } public void evict() { + if (true) return; evictionCount.increment(); } public void evicted(final long t, boolean primary) { + if (true) return; if (t > this.startTime) this.ageAtEviction.add(t - this.startTime,1); this.evictedBlockCount.increment(); if (primary) { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java index 786d00d..e827f73 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java @@ -389,6 +389,7 @@ public class HFileReaderV2 extends AbstractHFileReader { boolean updateCacheMetrics, BlockType expectedBlockType, DataBlockEncoding expectedDataBlockEncoding) throws IOException { + if (true) updateCacheMetrics = false; if (dataBlockIndexReader == null) { throw new IOException("Block index not loaded"); } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java index 5b6c6c8..ff39d05 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java @@ -185,7 +185,7 @@ public abstract class RpcExecutor { MonitoredRPCHandler status = RpcServer.getStatus(); cr.setStatus(status); try { - activeHandlerCount.incrementAndGet(); + // activeHandlerCount.incrementAndGet(); cr.run(); } catch (Throwable e) { if (e instanceof Error) { @@ -208,7 +208,7 @@ public abstract class RpcExecutor { LOG.warn("Handler exception " + StringUtils.stringifyException(e)); } } finally { - activeHandlerCount.decrementAndGet(); + // activeHandlerCount.decrementAndGet(); } } } @@ -265,4 +265,4 @@ public abstract class RpcExecutor { } currentQueueLimit = conf.getInt(configKey, currentQueueLimit); } -} \ No newline at end of file +} diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java index 02fe1df..823d220 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java @@ -1940,7 +1940,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { totalRequestSize, traceInfo, this.addr, timeout); if (!scheduler.dispatch(new CallRunner(RpcServer.this, call))) { - callQueueSize.add(-1 * call.getSize()); + // callQueueSize.add(-1 * call.getSize()); ByteArrayOutputStream responseBuffer = new ByteArrayOutputStream(); metrics.exception(CALL_QUEUE_TOO_BIG_EXCEPTION); @@ -2065,7 +2065,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { final InetSocketAddress bindAddress, Configuration conf, RpcScheduler scheduler) throws IOException { - + if (conf.getBoolean("hbase.ipc.server.reservoir.enabled", true)) { this.reservoir = new BoundedByteBufferPool( conf.getInt("hbase.ipc.server.reservoir.max.buffer.size", 1024 * 1024), @@ -2275,11 +2275,11 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { } long requestSize = param.getSerializedSize(); long responseSize = result.getSerializedSize(); - metrics.dequeuedCall(qTime); - metrics.processedCall(processingTime); - metrics.totalCall(totalTime); - metrics.receivedRequest(requestSize); - metrics.sentResponse(responseSize); + //metrics.dequeuedCall(qTime); + //metrics.processedCall(processingTime); + // metrics.totalCall(totalTime); + // metrics.receivedRequest(requestSize); + // metrics.sentResponse(responseSize); // log any RPC responses that are slower than the configured warn // response time or larger than configured warning size boolean tooSlow = (processingTime > warnResponseTime && warnResponseTime > -1); @@ -2301,7 +2301,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { if (e instanceof ServiceException) e = e.getCause(); // increment the number of requests that were exceptions. - metrics.exception(e); + // metrics.exception(e); if (e instanceof LinkageError) throw new DoNotRetryIOException(e); if (e instanceof IOException) throw (IOException)e; @@ -2408,7 +2408,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { @Override public void addCallSize(final long diff) { - this.callQueueSize.add(diff); + // this.callQueueSize.add(diff); } /** @@ -2453,7 +2453,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { protected long channelWrite(GatheringByteChannel channel, BufferChain bufferChain) throws IOException { long count = bufferChain.write(channel, NIO_BUFFER_LIMIT); - if (count > 0) this.metrics.sentBytes(count); + // if (count > 0) this.metrics.sentBytes(count); return count; } @@ -2475,7 +2475,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { int count = (buffer.remaining() <= NIO_BUFFER_LIMIT) ? channel.read(buffer) : channelIO(channel, null, buffer); if (count > 0) { - metrics.receivedBytes(count); + // metrics.receivedBytes(count); } return count; } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index c497ec0..dc25a4a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -1131,7 +1131,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi @Override public void updateReadRequestsCount(long i) { - readRequestsCount.add(i); + // readRequestsCount.add(i); } @Override @@ -6997,7 +6997,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi for (Cell cell : results) { totalSize += CellUtil.estimatedSerializedSizeOf(cell); } - this.metricsRegion.updateGetSize(totalSize); + // this.metricsRegion.updateGetSize(totalSize); this.metricsRegion.updateGet(EnvironmentEdgeManager.currentTime() - before); }