question: public static boolean checkChrootPath ( String zkHost , boolean create ) throws KeeperException , InterruptedException { if ( ! SolrZkClient . containsChroot ( zkHost ) ) { return true ; } log . trace ( "zkHost includes chroot" ) ; String chrootPath = zkHost . substring ( zkHost . indexOf ( "/" ) , zkHost . length ( ) ) ; SolrZkClient tmpClient = new SolrZkClient ( zkHost . substring ( 0 , zkHost . indexOf ( "/" ) ) , 60000 , 30000 , null , null , null ) ; boolean exists = tmpClient . exists ( chrootPath , true ) ; if ( ! exists && create ) { tmpClient . makePath ( chrootPath , false , true ) ; exists = true ; } tmpClient . close ( ) ; return exists ; }
target:  Validates if the chroot exists in zk (or if it is successfully created). Optionally, if create is set to true this method will create the path in case it doesn't exist