question: private static final void cleanupNamespaceNodes ( ZooKeeper zkc , String root , String selfBrokerUrl ) throws Exception { for ( String node : zkc . getChildren ( root , false ) ) { String currentPath = root + "/" + node ; List < String > children = zkc . getChildren ( currentPath , false ) ; if ( children . size ( ) == 0 ) { cleanupSingleNamespaceNode ( zkc , currentPath , selfBrokerUrl ) ; } else { cleanupNamespaceNodes ( zkc , currentPath , selfBrokerUrl ) ; } } }
target:  cleanupNamespaceNodes is only called when the NamespaceService is initialized. So, no need for synchronization.