public synchronized void formatJournal ( ) throws IOException { if ( mDeployMode == DeployMode . EMBEDDED ) { for ( Master master : mMasters ) { File journalDir = new File ( master . getConf ( ) . get ( PropertyKey . MASTER_JOURNAL_FOLDER ) ) ; FileUtils . deleteDirectory ( journalDir ) ; journalDir . mkdirs ( ) ; } return ; } try ( Closeable c = new ConfigurationRule ( mProperties , ServerConfiguration . global ( ) ) . toResource ( ) ) { Format . format ( Format . Mode . MASTER , ServerConfiguration . global ( ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } }
Formats the cluster journal .