[ https://issues.apache.org/jira/browse/HDDS-1829?focusedWorklogId=283009&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-283009 ]
ASF GitHub Bot logged work on HDDS-1829: ---------------------------------------- Author: ASF GitHub Bot Created on: 25/Jul/19 23:36 Start Date: 25/Jul/19 23:36 Worklog Time Spent: 10m Work Description: bharatviswa504 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_r307540522 ########## 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: Minor Nit: Can we add the table name here. ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 283009) Time Spent: 50m (was: 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: 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org