#NEWLINE# def _build_command( self , wf_dir , paths , builtin_paths , updated_job_configs ) : #NEWLINE# #INDENT# indep_params = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# indep_params [ 'app_jar' ] = paths . pop ( 0 ) #NEWLINE# indep_params [ 'job_class' ] = updated_job_configs [ 'configs' ] [ 'edp.java.main_class' ] #NEWLINE# if self . plugin_params . get ( 'drivers-to-jars' , None ) : #NEWLINE# #INDENT# paths . extend ( self . plugin_params [ 'drivers-to-jars' ] ) #NEWLINE# #UNINDENT# if builtin_paths : #NEWLINE# #INDENT# indep_params [ 'wrapper_jar' ] = builtin_paths . pop ( 0 ) #NEWLINE# indep_params [ 'wrapper_class' ] = 'org.openstack.sahara.edp.SparkWrapper' #NEWLINE# wrapper_xml = self . _upload_wrapper_xml ( self . master , wf_dir , updated_job_configs ) #NEWLINE# indep_params [ 'wrapper_args' ] = ( '%s %s' % ( wrapper_xml , indep_params [ 'job_class' ] ) ) #NEWLINE# indep_params [ 'addnl_files' ] = wrapper_xml #NEWLINE# indep_params [ 'addnl_jars' ] = ',' . join ( ( ( [ indep_params [ 'wrapper_jar' ] ] + paths ) + builtin_paths ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# indep_params [ 'addnl_jars' ] = ',' . join ( paths ) #NEWLINE# #UNINDENT# if indep_params [ 'addnl_jars' ] : #NEWLINE# #INDENT# indep_params [ 'addnl_jars' ] = ( ' --jars ' + indep_params [ 'addnl_jars' ] ) #NEWLINE# #UNINDENT# indep_params [ 'args' ] = updated_job_configs . get ( 'args' , [ ] ) #NEWLINE# indep_params [ 'args' ] = ' ' . join ( [ su . inject_swift_url_suffix ( arg ) for arg in indep_params [ 'args' ] ] ) #NEWLINE# if indep_params . get ( 'args' ) : #NEWLINE# #INDENT# indep_params [ 'args' ] = ( ' ' + indep_params [ 'args' ] ) #NEWLINE# #UNINDENT# mutual_dict = self . plugin_params . copy ( ) #NEWLINE# mutual_dict . update ( indep_params ) #NEWLINE# self . _check_driver_class_path ( updated_job_configs , mutual_dict , wf_dir ) #NEWLINE# if mutual_dict . get ( 'wrapper_jar' ) : #NEWLINE# #INDENT# cmd = ( '%(spark-user)s%(spark-submit)s%(driver-class-path)s --files %(addnl_files)s --class %(wrapper_class)s%(addnl_jars)s --master %(master)s --deploy-mode %(deploy-mode)s %(app_jar)s %(wrapper_args)s%(args)s' % dict ( mutual_dict ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cmd = ( '%(spark-user)s%(spark-submit)s%(driver-class-path)s --class %(job_class)s%(addnl_jars)s --master %(master)s --deploy-mode %(deploy-mode)s %(app_jar)s%(args)s' % dict ( mutual_dict ) ) #NEWLINE# #UNINDENT# return cmd