#NEWLINE# def _StartScriptAtMaster( self , script , * params ) : #NEWLINE# #INDENT# 'Injects script to master instance and runs it as hadoop user.\n\n    run-script-remote.sh script copies the specified file to the master\n    instance, and executes it on the master with specified parameters.\n    Additinal parameters are passed to the script.\n\n    Args:\n      script: Script file to be run on master instance.\n      *params: Additional parameters to be passed to the script.\n    Raises:\n      RemoteExecutionError: Remote command has an error.\n    ' #NEWLINE# command = ' ' . join ( ( [ MakeScriptRelativePath ( 'run-script-remote.sh' ) , ( self . flags . project or '""' ) , ( self . zone or '""' ) , self . master_name , script , 'hadoop' ] + list ( params ) ) ) #NEWLINE# logging . debug ( 'Remote command at master: %s' , command ) #NEWLINE# if subprocess . call ( script , shell = True ) : #NEWLINE# #INDENT# raise RemoteExecutionError ( 'Remote execution error' )