public void stopBookie ( int bookieIndex ) { Preconditions . checkState ( this . servers . size ( ) > 0 , "No Bookies initialized. Call startAll()." ) ; Preconditions . checkState ( this . servers . get ( 0 ) != null , "Bookie already stopped." ) ; val bk = this . servers . get ( bookieIndex ) ; bk . shutdown ( ) ; this . servers . set ( bookieIndex , null ) ; log . info ( "Bookie {} stopped." , bookieIndex ) ; }
Stops the BookieService with the given index .