Adding depricated implementation to column_family
Some of the depricated method in column family are replaced by counters in Origin. Still, some tools, like nodetool uses the depricated API. This adds an implementation to some of the depricated method that is based on the column family counters similiar to origin. Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This commit is contained in:
parent
713f8a5c75
commit
5feb4d3841
@ -160,7 +160,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getMemtableDataSize() {
|
||||
log(" getMemtableDataSize()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/memtable_on_heap_size/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -185,7 +185,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public int getMemtableSwitchCount() {
|
||||
log(" getMemtableSwitchCount()");
|
||||
return c.getIntValue("");
|
||||
return c.getIntValue("/column_family/metrics/memtable_switch_count/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -206,7 +206,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long[] getSSTablesPerReadHistogram() {
|
||||
log(" getSSTablesPerReadHistogram()");
|
||||
return c.getLongArrValue("");
|
||||
return c.getEstimatedHistogramAsLongArrValue("/column_family/metrics/sstables_per_read_histogram/" +getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -216,7 +216,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getReadCount() {
|
||||
log(" getReadCount()");
|
||||
return c.getLongValue("");
|
||||
return c.getIntValue("/column_family/metrics/read/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -226,7 +226,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getTotalReadLatencyMicros() {
|
||||
log(" getTotalReadLatencyMicros()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/read_latency/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -266,7 +266,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getWriteCount() {
|
||||
log(" getWriteCount()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/write/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -276,7 +276,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getTotalWriteLatencyMicros() {
|
||||
log(" getTotalWriteLatencyMicros()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/write_latency/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -316,7 +316,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public int getPendingTasks() {
|
||||
log(" getPendingTasks()");
|
||||
return c.getIntValue("");
|
||||
return c.getIntValue("/column_family/metrics/pending_flushes/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -326,7 +326,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public int getLiveSSTableCount() {
|
||||
log(" getLiveSSTableCount()");
|
||||
return c.getIntValue("");
|
||||
return c.getIntValue("/column_family/metrics/live_ss_table_count/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -336,7 +336,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getLiveDiskSpaceUsed() {
|
||||
log(" getLiveDiskSpaceUsed()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/live_disk_space_used/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -347,7 +347,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getTotalDiskSpaceUsed() {
|
||||
log(" getTotalDiskSpaceUsed()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/total_disk_space_used/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -366,7 +366,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getMinRowSize() {
|
||||
log(" getMinRowSize()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/min_row_size/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -376,7 +376,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getMaxRowSize() {
|
||||
log(" getMaxRowSize()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/max_row_size/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -386,7 +386,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getMeanRowSize() {
|
||||
log(" getMeanRowSize()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/mean_row_size/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -395,7 +395,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getBloomFilterFalsePositives() {
|
||||
log(" getBloomFilterFalsePositives()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/bloom_filter_false_positives/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -404,7 +404,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getRecentBloomFilterFalsePositives() {
|
||||
log(" getRecentBloomFilterFalsePositives()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/recent_bloom_filter_false_positives/" +getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -413,7 +413,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public double getBloomFilterFalseRatio() {
|
||||
log(" getBloomFilterFalseRatio()");
|
||||
return c.getDoubleValue("");
|
||||
return c.getDoubleValue("/column_family/metrics/bloom_filter_false_ratio/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -422,7 +422,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public double getRecentBloomFilterFalseRatio() {
|
||||
log(" getRecentBloomFilterFalseRatio()");
|
||||
return c.getDoubleValue("");
|
||||
return c.getDoubleValue("/column_family/metrics/recent_bloom_filter_false_ratio/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -431,7 +431,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getBloomFilterDiskSpaceUsed() {
|
||||
log(" getBloomFilterDiskSpaceUsed()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/bloom_filter_disk_space_used/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -440,7 +440,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getBloomFilterOffHeapMemoryUsed() {
|
||||
log(" getBloomFilterOffHeapMemoryUsed()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/bloom_filter_off_heap_memory_used/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -449,7 +449,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getIndexSummaryOffHeapMemoryUsed() {
|
||||
log(" getIndexSummaryOffHeapMemoryUsed()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/index_summary_off_heap_memory_used/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -458,7 +458,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long getCompressionMetadataOffHeapMemoryUsed() {
|
||||
log(" getCompressionMetadataOffHeapMemoryUsed()");
|
||||
return c.getLongValue("");
|
||||
return c.getLongValue("/column_family/metrics/compression_metadata_off_heap_memory_used/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -603,7 +603,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public long[] getEstimatedColumnCountHistogram() {
|
||||
log(" getEstimatedColumnCountHistogram()");
|
||||
return c.getLongArrValue("");
|
||||
return c.getLongArrValue("/column_family/metrics/estimated_column_count_histogram/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -612,7 +612,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
||||
@Deprecated
|
||||
public double getCompressionRatio() {
|
||||
log(" getCompressionRatio()");
|
||||
return c.getDoubleValue("");
|
||||
return c.getDoubleValue("/column_family/metrics/compression_ratio/" + getCFName());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user