public static boolean isPartitionCleanupInProgress ( ZooKeeper zk ) throws KeeperException , InterruptedException { List < String > children = zk . getChildren ( VoltZK . leaders_initiators , null ) ; List < ZKUtil . ChildrenCallback > childrenCallbacks = Lists . newArrayList ( ) ; for ( String child : children ) { ZKUtil . ChildrenCallback callback = new ZKUtil . ChildrenCallback ( ) ; zk . getChildren ( ZKUtil . joinZKPath ( VoltZK . leaders_initiators , child ) , false , callback , null ) ; childrenCallbacks . add ( callback ) ; } for ( ZKUtil . ChildrenCallback callback : childrenCallbacks ) { if ( callback . get ( ) . isEmpty ( ) ) { return true ; } } return false ; }
Checks if the cluster suffered an aborted join or node shutdown and is still in the process of cleaning up .