#NEWLINE# def finalize_configuration( self , cluster_spec ) : #NEWLINE# #INDENT# rm_hosts = cluster_spec . determine_component_hosts ( 'RESOURCEMANAGER' ) #NEWLINE# if rm_hosts : #NEWLINE# #INDENT# props = { #NEWLINE# #INDENT# 'yarn-site' : [ 'yarn.resourcemanager.resource-tracker.address' , 'yarn.resourcemanager.hostname' , 'yarn.resourcemanager.address' , 'yarn.resourcemanager.scheduler.address' , 'yarn.resourcemanager.webapp.address' , 'yarn.log.server.url' , 'yarn.resourcemanager.admin.address' ] , #NEWLINE# #UNINDENT# } #NEWLINE# self . _replace_config_token ( cluster_spec , '%RM_HOST%' , rm_hosts . pop ( ) . fqdn ( ) , props ) #NEWLINE# #UNINDENT# mapred_site_config = cluster_spec . configurations [ 'mapred-site' ] #NEWLINE# if CONF . enable_data_locality : #NEWLINE# #INDENT# for prop in th . vm_awareness_mapred_config ( ) : #NEWLINE# #INDENT# mapred_site_config [ prop [ 'name' ] ] = prop [ 'value' ] #NEWLINE# #UNINDENT# #UNINDENT# yarn_site_config = cluster_spec . configurations [ 'yarn-site' ] #NEWLINE# nm_node_groups = cluster_spec . get_node_groups_containing_component ( 'NODEMANAGER' ) #NEWLINE# if nm_node_groups : #NEWLINE# #INDENT# common_paths = self . _get_common_paths ( nm_node_groups ) #NEWLINE# yarn_site_config [ 'yarn.nodemanager.local-dirs' ] = self . _generate_storage_path ( common_paths , '/hadoop/yarn/local' )