Skip to content

Commit

Permalink
Rename operator_generated -> jvm_config
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernauer committed Dec 3, 2024
1 parent d87e8cd commit 398f299
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions rust/operator-binary/src/config/jvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub fn jvm_config(
},
)?;

let mut operator_generated = match product_version {
let mut jvm_config = match product_version {
// Copied from https://trino.io/docs/451/installation/deployment.html
"451" => Ok(formatdoc!(
"-server
Expand Down Expand Up @@ -123,7 +123,7 @@ pub fn jvm_config(
.fail(),
}?;

operator_generated.push_str(&formatdoc!("
jvm_config.push_str(&formatdoc!("
# Enable the export of Prometheus metrics on port {METRICS_PORT}
-javaagent:/stackable/jmx/jmx_prometheus_javaagent.jar={METRICS_PORT}:/stackable/jmx/config.yaml
Expand All @@ -132,21 +132,21 @@ pub fn jvm_config(

let additional_jvm_arguments = &merged_config.experimental_additional_jvm_arguments;
if !additional_jvm_arguments.is_empty() {
operator_generated.push_str("\n# Additional JVM arguments specified on Custom Resource");
jvm_config.push_str("\n# Additional JVM arguments specified on Custom Resource");
for (key, JvmArgument(value)) in additional_jvm_arguments {
match value {
Some(value) => {
operator_generated.push_str(&format!("\n{key}={value}"));
jvm_config.push_str(&format!("\n{key}={value}"));
}
None => {
operator_generated.push_str(&format!("\n{key}"));
jvm_config.push_str(&format!("\n{key}"));
}
}
}
operator_generated.push('\n');
jvm_config.push('\n');
}

Ok(operator_generated)
Ok(jvm_config)
}

#[cfg(test)]
Expand Down

0 comments on commit 398f299

Please sign in to comment.