ChenSammi commented on code in PR #10614:
URL: https://github.com/apache/ozone/pull/10614#discussion_r3511367926


##########
hadoop-ozone/cli-debug/src/main/java/org/apache/hadoop/ozone/debug/ldb/DBScanner.java:
##########
@@ -829,6 +836,20 @@ List<Object> 
getFieldsFilteredObjectCollection(Collection<?> valueObject, Map<St
     }
   }
 
+  private Object parseStatefulServiceConfig(Object key, Object value, 
DBColumnFamilyDefinition dbColumnFamily) {
+    if (dbColumnFamily.getName().equals(STATEFUL_SERVICE_CONFIG.getName()) && 
key.equals(SERVICE_NAME) &&
+        value instanceof ByteString) {
+      try {
+        return 
HddsProtos.DeletedBlocksTransactionSummary.parseFrom((ByteString) value);
+      } catch (InvalidProtocolBufferException e) {
+        LOG.error("Failed to parse {} for key {}", 
STATEFUL_SERVICE_CONFIG.getName(), SERVICE_NAME, e);
+      } catch (IOException e) {
+        LOG.error("Failed to parse {} for key {}", 
STATEFUL_SERVICE_CONFIG.getName(), SERVICE_NAME, e);

Review Comment:
   @adoroszlai , STATEFUL_SERVICE_CONFIG is a table which doesn't belong to a 
specific feature of SCM, it's used as a key-value store(String -> ByteString) 
for all SCM features to persist value which need persistent.  Currently it's 
used by container balancer, and Root CA rotation manager, now storage capacity 
feature. So the element in this table is specific to a feature, not like other 
tables in SCM, which has the same value data structure.  
   Currently,  DBScanner can display this table with it raw ByteString value, 
not a understandable format of human, equal to no use during the debug time.  
   This task aims to covert the ByteString value to a storage capacity feature 
data structure and display it, so  DBScanner will be helpful in the debug of 
future storage capacity feature.  I'm not sure if I explain it clearly enough? 
   



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to