Hean-Chhinling commented on code in PR #8222:
URL: https://github.com/apache/hadoop/pull/8222#discussion_r2753332261


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/ZKConfigurationStore.java:
##########
@@ -263,10 +264,46 @@ private boolean createNewZkPath(String path) throws 
Exception {
     }
   }
 
+  /*
   @VisibleForTesting
   protected byte[] getZkData(String path) throws Exception {
     return zkManager.getData(path);
   }
+*/
+
+  @VisibleForTesting
+  protected byte[] getZkData(String path) throws Exception {
+    // Should a 'yarn resourcemanager -format-state-store' command is issued
+    // while one of the RM is in a starting state, there is a time period
+    // when the /confstore/CONF_STORE path does not exist, hence the

Review Comment:
   I think there are different states of failures:
   
   - When another RM format the conf-store and then Node is not exists, it will 
throw the following errors which you already addressed.
   ```
   2026-01-23 00:10:45,594 ERROR 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf.ZKConfigurationStore:
 Failed to retrieve configuration from zookeeper store
   org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = 
NoNode for /confstore/CONF_STORE
   ```
   - When another RM access the conf-store while another RM has not finished 
written data to the conf-store. It will throw the following error. The 
conf-store node exists but the data has fully written yet otherwise it will 
throw the above NoNode for CONF_STORE.
   
   ```
   2026-01-26 06:08:40,268 ERROR 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf.ZKConfigurationStore:
 Exception while deserializing scheduler configuration from store
   java.lang.NullPointerException
   ```
   



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