@@ -19,7 +19,7 @@ use crate::{
1919 build:: properties:: {
2020 ConfigFileName , access_control_properties, config_properties,
2121 exchange_manager_properties, log_properties, logging:: get_vector_toml, node_properties,
22- security_properties , spooling_manager_properties , to_java_properties_string ,
22+ render_java_properties , security_properties , spooling_manager_properties ,
2323 } ,
2424 } ,
2525 crd:: { TrinoRole , v1alpha1} ,
@@ -65,7 +65,6 @@ pub enum Error {
6565
6666type Result < T , E = Error > = std:: result:: Result < T , E > ;
6767
68- #[ allow( clippy:: too_many_arguments) ]
6968pub fn build_rolegroup_config_map (
7069 cluster : & ValidatedCluster ,
7170 role : & TrinoRole ,
@@ -94,10 +93,9 @@ pub fn build_rolegroup_config_map(
9493 // Auth files (e.g. password-authenticator file contents) — inserted FIRST
9594 // to match the legacy precedence.
9695 for ( file_name, props) in cluster. cluster_config . authentication . config_files ( role) {
97- let rendered =
98- to_java_properties_string ( & props) . with_context ( |_| WritePropertiesSnafu {
99- file : file_name. clone ( ) ,
100- } ) ?;
96+ let rendered = render_java_properties ( props) . with_context ( |_| WritePropertiesSnafu {
97+ file : file_name. clone ( ) ,
98+ } ) ?;
10199 data. insert ( file_name, rendered) ;
102100 }
103101
@@ -106,7 +104,7 @@ pub fn build_rolegroup_config_map(
106104 . context ( BuildConfigPropertiesSnafu ) ?;
107105 data. insert (
108106 ConfigFileName :: Config . to_string ( ) ,
109- to_java_properties_string ( & cfg) . with_context ( |_| WritePropertiesSnafu {
107+ render_java_properties ( cfg) . with_context ( |_| WritePropertiesSnafu {
110108 file : ConfigFileName :: Config . to_string ( ) ,
111109 } ) ?,
112110 ) ;
@@ -115,7 +113,7 @@ pub fn build_rolegroup_config_map(
115113 let node = node_properties:: build ( cluster, rg) ;
116114 data. insert (
117115 ConfigFileName :: Node . to_string ( ) ,
118- to_java_properties_string ( & node) . with_context ( |_| WritePropertiesSnafu {
116+ render_java_properties ( node) . with_context ( |_| WritePropertiesSnafu {
119117 file : ConfigFileName :: Node . to_string ( ) ,
120118 } ) ?,
121119 ) ;
@@ -125,7 +123,7 @@ pub fn build_rolegroup_config_map(
125123 if !log. is_empty ( ) {
126124 data. insert (
127125 ConfigFileName :: Log . to_string ( ) ,
128- to_java_properties_string ( & log) . with_context ( |_| WritePropertiesSnafu {
126+ render_java_properties ( log) . with_context ( |_| WritePropertiesSnafu {
129127 file : ConfigFileName :: Log . to_string ( ) ,
130128 } ) ?,
131129 ) ;
@@ -135,7 +133,7 @@ pub fn build_rolegroup_config_map(
135133 let sec = security_properties:: build ( rg) ;
136134 data. insert (
137135 ConfigFileName :: Security . to_string ( ) ,
138- to_java_properties_string ( & sec) . with_context ( |_| WritePropertiesSnafu {
136+ render_java_properties ( sec) . with_context ( |_| WritePropertiesSnafu {
139137 file : ConfigFileName :: Security . to_string ( ) ,
140138 } ) ?,
141139 ) ;
@@ -145,7 +143,7 @@ pub fn build_rolegroup_config_map(
145143 if !ac. is_empty ( ) {
146144 data. insert (
147145 ConfigFileName :: AccessControl . to_string ( ) ,
148- to_java_properties_string ( & ac) . with_context ( |_| WritePropertiesSnafu {
146+ render_java_properties ( ac) . with_context ( |_| WritePropertiesSnafu {
149147 file : ConfigFileName :: AccessControl . to_string ( ) ,
150148 } ) ?,
151149 ) ;
@@ -156,7 +154,7 @@ pub fn build_rolegroup_config_map(
156154 if !em. is_empty ( ) {
157155 data. insert (
158156 ConfigFileName :: ExchangeManager . to_string ( ) ,
159- to_java_properties_string ( & em) . with_context ( |_| WritePropertiesSnafu {
157+ render_java_properties ( em) . with_context ( |_| WritePropertiesSnafu {
160158 file : ConfigFileName :: ExchangeManager . to_string ( ) ,
161159 } ) ?,
162160 ) ;
@@ -167,7 +165,7 @@ pub fn build_rolegroup_config_map(
167165 if !sm. is_empty ( ) {
168166 data. insert (
169167 ConfigFileName :: SpoolingManager . to_string ( ) ,
170- to_java_properties_string ( & sm) . with_context ( |_| WritePropertiesSnafu {
168+ render_java_properties ( sm) . with_context ( |_| WritePropertiesSnafu {
171169 file : ConfigFileName :: SpoolingManager . to_string ( ) ,
172170 } ) ?,
173171 ) ;
0 commit comments