@@ -12,14 +12,11 @@ use crate::{
1212 controller:: {
1313 ValidatedCluster ,
1414 build:: properties:: {
15- core_site, hive_site, logging, resolved_overrides, security_properties,
15+ ConfigFileName , core_site, hive_site, logging, resolved_overrides, security_properties,
1616 } ,
1717 build_recommended_labels,
1818 } ,
19- crd:: {
20- CORE_SITE_XML , HIVE_METASTORE_LOG4J2_PROPERTIES , HIVE_SITE_XML , HiveRole ,
21- JVM_SECURITY_PROPERTIES_FILE , v1alpha1,
22- } ,
19+ crd:: { HiveRole , v1alpha1} ,
2320 framework:: writer:: { to_hadoop_xml, to_java_properties_string} ,
2421} ;
2522
@@ -31,7 +28,7 @@ pub enum Error {
3128 #[ snafu( display( "failed to build hive-site.xml" ) ) ]
3229 BuildHiveSite { source : hive_site:: Error } ,
3330
34- #[ snafu( display( "failed to serialize {JVM_SECURITY_PROPERTIES_FILE}" ) ) ]
31+ #[ snafu( display( "failed to serialize {}" , ConfigFileName :: Security ) ) ]
3532 WriteSecurityProperties {
3633 source : crate :: framework:: writer:: PropertiesWriterError ,
3734 } ,
@@ -101,20 +98,26 @@ pub fn build_metastore_rolegroup_config_map(
10198 . context ( MetadataBuildSnafu ) ?
10299 . build ( ) ,
103100 )
104- . add_data ( HIVE_SITE_XML , to_hadoop_xml ( hive_site_data. iter ( ) ) )
105101 . add_data (
106- JVM_SECURITY_PROPERTIES_FILE ,
102+ ConfigFileName :: HiveSite . to_string ( ) ,
103+ to_hadoop_xml ( hive_site_data. iter ( ) ) ,
104+ )
105+ . add_data (
106+ ConfigFileName :: Security . to_string ( ) ,
107107 to_java_properties_string ( security_data. iter ( ) )
108108 . context ( WriteSecurityPropertiesSnafu ) ?,
109109 ) ;
110110
111111 // core-site.xml is only required when Kerberos is enabled without an HDFS backend.
112112 if let Some ( core_site_data) = core_site:: build ( & cluster. cluster_config ) {
113- cm_builder. add_data ( CORE_SITE_XML , to_hadoop_xml ( core_site_data. iter ( ) ) ) ;
113+ cm_builder. add_data (
114+ ConfigFileName :: CoreSite . to_string ( ) ,
115+ to_hadoop_xml ( core_site_data. iter ( ) ) ,
116+ ) ;
114117 }
115118
116119 if let Some ( log4j2_properties) = logging:: build_log4j2 ( & rg. config . logging ) {
117- cm_builder. add_data ( HIVE_METASTORE_LOG4J2_PROPERTIES , log4j2_properties) ;
120+ cm_builder. add_data ( ConfigFileName :: Log4j2 . to_string ( ) , log4j2_properties) ;
118121 }
119122 if let Some ( vector_config) = logging:: build_vector_config ( rolegroup, & rg. config . logging ) {
120123 cm_builder. add_data ( VECTOR_CONFIG_FILE , vector_config) ;
0 commit comments