public synchronized void updateDeployMode ( DeployMode mode ) { mDeployMode = mode ; if ( mDeployMode == DeployMode . EMBEDDED ) { // Ensure that the journal properties are set correctly. for ( int i = 0 ; i < mMasters . size ( ) ; i ++ ) { Master master = mMasters . get ( i ) ; MasterNetAddress address = mMasterAddresses . get ( i ) ; master . updateConf ( PropertyKey . MASTER_EMBEDDED_JOURNAL_PORT , Integer . toString ( address . getEmbeddedJournalPort ( ) ) ) ; File journalDir = new File ( mWorkDir , "journal" + i ) ; journalDir . mkdirs ( ) ; master . updateConf ( PropertyKey . MASTER_JOURNAL_FOLDER , journalDir . getAbsolutePath ( ) ) ; } } }
Updates the cluster s deploy mode .