bharatviswa504 commented on a change in 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org