[
https://issues.apache.org/jira/browse/HDDS-1829?focusedWorklogId=283613&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-283613
]
ASF GitHub Bot logged work on HDDS-1829:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Jul/19 20:47
Start Date: 26/Jul/19 20:47
Worklog Time Spent: 10m
Work Description: smengcl commented on pull request #1164: HDDS-1829 On
OM reload/restart OmMetrics#numKeys should be updated
URL: https://github.com/apache/hadoop/pull/1164#discussion_r307904383
##########
File path:
hadoop-hdds/common/src/main/java/org/apache/hadoop/utils/db/RDBTable.java
##########
@@ -183,4 +183,14 @@ public String getName() throws IOException {
public void close() throws Exception {
// Nothing do for a Column Family.
}
+
+ @Override
+ public long getEstimatedKeyCount() throws IOException {
+ try {
+ return db.getLongProperty(handle, "rocksdb.estimate-num-keys");
+ } catch (RocksDBException e) {
+ throw new IOException(
+ "Failed to get estimated key count of the table.");
Review comment:
Sure! Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 283613)
Time Spent: 1h 50m (was: 1h 40m)
> On OM reload/restart OmMetrics#numKeys should be updated
> --------------------------------------------------------
>
> Key: HDDS-1829
> URL: https://issues.apache.org/jira/browse/HDDS-1829
> Project: Hadoop Distributed Data Store
> Issue Type: Sub-task
> Reporter: Hanisha Koneru
> Assignee: Siyao Meng
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> When OM is restarted or the state is reloaded, OM Metrics is re-initialized.
> The saved numKeys value might not be valid as the DB state could have
> changed. Hence, the numKeys metric must be updated with the correct value on
> metrics re-initialization.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]