#NEWLINE# def StartCluster( self ) : #NEWLINE# #INDENT# 'Starts Hadoop cluster on Compute Engine.' #NEWLINE# if ( self . flags . external_ip == 'all' ) : #NEWLINE# #INDENT# self . _GetApi ( ) . DeleteRoute ( self . route_name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _GetApi ( ) . AddRoute ( self . route_name , self . master_name , tags = [ self . worker_tag ] ) #NEWLINE# #UNINDENT# self . _StartInstance ( self . master_name , role = 'master' ) #NEWLINE# self . _WaitForMasterSsh ( ) #NEWLINE# for i in xrange ( self . flags . num_workers ) : #NEWLINE# #INDENT# self . _StartInstance ( self . _WorkerName ( self ) , role = 'worker' ) #NEWLINE# #UNINDENT# self . _WaitForWorkersReady ( ) #NEWLINE# self . _ShowHadoopInformation ( )