YARN.11590. RM process stuck after calling confStore.format() when ZK SSL/TLS is enabled, as netty thread waits indefinitely. Contributed by Ferenc Erdelyi

This commit is contained in:
Szilard Nemeth 2023-10-16 15:17:58 -04:00
parent c8abca3004
commit 2736f88561
2 changed files with 6 additions and 5 deletions

View File

@ -1903,10 +1903,11 @@ static void deleteRMConfStore(Configuration conf) throws Exception {
}
if (scheduler instanceof MutableConfScheduler && isConfigurationMutable) {
YarnConfigurationStore confStore = YarnConfigurationStoreFactory
.getStore(conf);
confStore.initialize(conf, conf, rmContext);
confStore.format();
try (YarnConfigurationStore confStore = YarnConfigurationStoreFactory
.getStore(conf)) {
confStore.initialize(conf, conf, rmContext);
confStore.format();
}
} else {
System.out.println(String.format("Scheduler Configuration format only " +
"supported by %s.", MutableConfScheduler.class.getSimpleName()));

View File

@ -44,7 +44,7 @@
* {@code getPendingMutations}, and replay/confirm them via
* {@code confirmMutation} as in the normal case.
*/
public abstract class YarnConfigurationStore {
public abstract class YarnConfigurationStore implements AutoCloseable {
public static final Logger LOG =
LoggerFactory.getLogger(YarnConfigurationStore.class);