ColumnFamilyStore: add support for estimated latency
This patch uses the estimated latency that was added to the column family metrics to get the recent and estimated latency. It follows the same logic as origin does to call the logic in metrics. The following method implementation will be added: getMemtableColumnsCount getRecentSSTablesPerReadHistogram getSSTablesPerReadHistogram getLifetimeReadLatencyHistogramMicros getRecentReadLatencyHistogramMicros getRecentReadLatencyMicros getLifetimeWriteLatencyHistogramMicros getRecentWriteLatencyHistogramMicros getRecentWriteLatencyMicros getRangeCount getTotalRangeLatencyMicros getLifetimeRangeLatencyHistogramMicros getRecentRangeLatencyHistogramMicros getRecentRangeLatencyMicros Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This commit is contained in:
parent
db3b3cdeee
commit
3667682075
@ -172,7 +172,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public long getMemtableColumnsCount() {
|
public long getMemtableColumnsCount() {
|
||||||
log(" getMemtableColumnsCount()");
|
log(" getMemtableColumnsCount()");
|
||||||
return c.getLongValue("");
|
return metric.memtableColumnsCount.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -196,7 +196,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public long[] getRecentSSTablesPerReadHistogram() {
|
public long[] getRecentSSTablesPerReadHistogram() {
|
||||||
log(" getRecentSSTablesPerReadHistogram()");
|
log(" getRecentSSTablesPerReadHistogram()");
|
||||||
return c.getLongArrValue("");
|
return metric.getRecentSSTablesPerRead();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -206,7 +206,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public long[] getSSTablesPerReadHistogram() {
|
public long[] getSSTablesPerReadHistogram() {
|
||||||
log(" getSSTablesPerReadHistogram()");
|
log(" getSSTablesPerReadHistogram()");
|
||||||
return c.getEstimatedHistogramAsLongArrValue("/column_family/metrics/sstables_per_read_histogram/" +getCFName());
|
return metric.sstablesPerRead.getBuckets(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -236,7 +236,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public long[] getLifetimeReadLatencyHistogramMicros() {
|
public long[] getLifetimeReadLatencyHistogramMicros() {
|
||||||
log(" getLifetimeReadLatencyHistogramMicros()");
|
log(" getLifetimeReadLatencyHistogramMicros()");
|
||||||
return c.getLongArrValue("");
|
return metric.readLatency.totalLatencyHistogram.getBuckets(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -246,7 +246,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public long[] getRecentReadLatencyHistogramMicros() {
|
public long[] getRecentReadLatencyHistogramMicros() {
|
||||||
log(" getRecentReadLatencyHistogramMicros()");
|
log(" getRecentReadLatencyHistogramMicros()");
|
||||||
return c.getLongArrValue("");
|
return metric.readLatency.getRecentLatencyHistogram();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -256,7 +256,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public double getRecentReadLatencyMicros() {
|
public double getRecentReadLatencyMicros() {
|
||||||
log(" getRecentReadLatencyMicros()");
|
log(" getRecentReadLatencyMicros()");
|
||||||
return c.getDoubleValue("");
|
return metric.readLatency.getRecentLatency();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -286,7 +286,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public long[] getLifetimeWriteLatencyHistogramMicros() {
|
public long[] getLifetimeWriteLatencyHistogramMicros() {
|
||||||
log(" getLifetimeWriteLatencyHistogramMicros()");
|
log(" getLifetimeWriteLatencyHistogramMicros()");
|
||||||
return c.getLongArrValue("");
|
return metric.writeLatency.totalLatencyHistogram.getBuckets(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -296,7 +296,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public long[] getRecentWriteLatencyHistogramMicros() {
|
public long[] getRecentWriteLatencyHistogramMicros() {
|
||||||
log(" getRecentWriteLatencyHistogramMicros()");
|
log(" getRecentWriteLatencyHistogramMicros()");
|
||||||
return c.getLongArrValue("");
|
return metric.writeLatency.getRecentLatencyHistogram();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -306,7 +306,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public double getRecentWriteLatencyMicros() {
|
public double getRecentWriteLatencyMicros() {
|
||||||
log(" getRecentWriteLatencyMicros()");
|
log(" getRecentWriteLatencyMicros()");
|
||||||
return c.getDoubleValue("");
|
return metric.writeLatency.getRecentLatency();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -594,7 +594,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public long[] getEstimatedRowSizeHistogram() {
|
public long[] getEstimatedRowSizeHistogram() {
|
||||||
log(" getEstimatedRowSizeHistogram()");
|
log(" getEstimatedRowSizeHistogram()");
|
||||||
return c.getEstimatedHistogramAsLongArrValue("/column_family/metrics/estimated_row_size_histogram/" + getCFName());
|
return metric.estimatedRowSizeHistogram.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -603,7 +603,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public long[] getEstimatedColumnCountHistogram() {
|
public long[] getEstimatedColumnCountHistogram() {
|
||||||
log(" getEstimatedColumnCountHistogram()");
|
log(" getEstimatedColumnCountHistogram()");
|
||||||
return c.getLongArrValue("/column_family/metrics/estimated_column_count_histogram/" + getCFName());
|
return metric.estimatedColumnCountHistogram.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -696,35 +696,35 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean {
|
|||||||
public long getRangeCount() {
|
public long getRangeCount() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
log("getRangeCount()");
|
log("getRangeCount()");
|
||||||
return c.getLongValue("");
|
return metric.rangeLatency.latency.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getTotalRangeLatencyMicros() {
|
public long getTotalRangeLatencyMicros() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
log("getTotalRangeLatencyMicros()");
|
log("getTotalRangeLatencyMicros()");
|
||||||
return c.getLongValue("");
|
return metric.rangeLatency.totalLatency.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long[] getLifetimeRangeLatencyHistogramMicros() {
|
public long[] getLifetimeRangeLatencyHistogramMicros() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
log("getLifetimeRangeLatencyHistogramMicros()");
|
log("getLifetimeRangeLatencyHistogramMicros()");
|
||||||
return c.getLongArrValue("");
|
return metric.rangeLatency.totalLatencyHistogram.getBuckets(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long[] getRecentRangeLatencyHistogramMicros() {
|
public long[] getRecentRangeLatencyHistogramMicros() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
log("getRecentRangeLatencyHistogramMicros()");
|
log("getRecentRangeLatencyHistogramMicros()");
|
||||||
return c.getLongArrValue("");
|
return metric.rangeLatency.getRecentLatencyHistogram();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getRecentRangeLatencyMicros() {
|
public double getRecentRangeLatencyMicros() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
log("getRecentRangeLatencyMicros()");
|
log("getRecentRangeLatencyMicros()");
|
||||||
return c.getDoubleValue("");
|
return metric.rangeLatency.getRecentLatency();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user