Class NullStateStoreMetrics
java.lang.Object
org.apache.hadoop.hdfs.server.federation.metrics.StateStoreMetrics
org.apache.hadoop.hdfs.server.federation.metrics.NullStateStoreMetrics
- All Implemented Interfaces:
StateStoreMBean
Implementation of the State Store metrics which does not do anything.
This is used when the metrics are disabled (e.g., tests).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFailure(long latency) voidaddRead(long latency) voidaddRemove(long latency) voidaddWrite(long latency) doublelongdoublelongdoublelongdoublelongvoidreset()voidsetCacheSize(String name, int size) Set the size of the cache for a State Store interface.voidshutdown()Methods inherited from class org.apache.hadoop.hdfs.server.federation.metrics.StateStoreMetrics
create, getCacheLoadMetrics, setCacheLoading, setLocationCache
-
Constructor Details
-
NullStateStoreMetrics
public NullStateStoreMetrics()
-
-
Method Details
-
addRead
public void addRead(long latency) - Overrides:
addReadin classStateStoreMetrics
-
getReadOps
public long getReadOps()- Specified by:
getReadOpsin interfaceStateStoreMBean- Overrides:
getReadOpsin classStateStoreMetrics
-
getReadAvg
public double getReadAvg()- Specified by:
getReadAvgin interfaceStateStoreMBean- Overrides:
getReadAvgin classStateStoreMetrics
-
addWrite
public void addWrite(long latency) - Overrides:
addWritein classStateStoreMetrics
-
getWriteOps
public long getWriteOps()- Specified by:
getWriteOpsin interfaceStateStoreMBean- Overrides:
getWriteOpsin classStateStoreMetrics
-
getWriteAvg
public double getWriteAvg()- Specified by:
getWriteAvgin interfaceStateStoreMBean- Overrides:
getWriteAvgin classStateStoreMetrics
-
addFailure
public void addFailure(long latency) - Overrides:
addFailurein classStateStoreMetrics
-
getFailureOps
public long getFailureOps()- Specified by:
getFailureOpsin interfaceStateStoreMBean- Overrides:
getFailureOpsin classStateStoreMetrics
-
getFailureAvg
public double getFailureAvg()- Specified by:
getFailureAvgin interfaceStateStoreMBean- Overrides:
getFailureAvgin classStateStoreMetrics
-
addRemove
public void addRemove(long latency) - Overrides:
addRemovein classStateStoreMetrics
-
getRemoveOps
public long getRemoveOps()- Specified by:
getRemoveOpsin interfaceStateStoreMBean- Overrides:
getRemoveOpsin classStateStoreMetrics
-
getRemoveAvg
public double getRemoveAvg()- Specified by:
getRemoveAvgin interfaceStateStoreMBean- Overrides:
getRemoveAvgin classStateStoreMetrics
-
setCacheSize
Description copied from class:StateStoreMetricsSet the size of the cache for a State Store interface.- Overrides:
setCacheSizein classStateStoreMetrics- Parameters:
name- Name of the record to cache.size- Number of records.
-
reset
public void reset()- Overrides:
resetin classStateStoreMetrics
-
shutdown
public void shutdown()- Overrides:
shutdownin classStateStoreMetrics
-