#NEWLINE# def _map_to_user_inputs( self , hadoop_version , configs ) : #NEWLINE# #INDENT# config_objs = self . get_all_configs ( hadoop_version ) #NEWLINE# config_objs_map = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for config_obj in config_objs : #NEWLINE# #INDENT# applicable_target = config_obj . applicable_target #NEWLINE# confs = config_objs_map . get ( applicable_target , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# confs [ config_obj . name ] = config_obj #NEWLINE# config_objs_map [ configs ] = confs #NEWLINE# #UNINDENT# result = [ ] #NEWLINE# for applicable_target in configs : #NEWLINE# #INDENT# for config_name in configs [ applicable_target ] : #NEWLINE# #INDENT# confs = config_objs_map . get ( applicable_target ) #NEWLINE# if ( not confs ) : #NEWLINE# #INDENT# raise ex . ConfigurationError ( ( _ ( "Can't find applicable target '%(applicable_target)s' for '%(config_name)s'" ) % { #NEWLINE# #INDENT# 'applicable_target' : applicable_target , #NEWLINE# 'config_name' : config_name , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# #UNINDENT# conf = confs . get ( config_name ) #NEWLINE# if ( not conf ) : #NEWLINE# #INDENT# raise ex . ConfigurationError ( ( _ ( "Can't find config '%(config_name)s' in '%(applicable_target)s'" ) % { #NEWLINE# #INDENT# 'config_name' : config_name , #NEWLINE# 'applicable_target' : applicable_target , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# #UNINDENT# result . append ( UserInput ( conf , configs [ applicable_target ] [ config_name ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# return sorted ( result )