Skip to content

Commit 7d41396

Browse files
adwk67claude
andcommitted
refactor: consume the config-file writer from stackable-operator
Replace the vendored Java-properties writer (rust/operator-binary/src/framework/writer.rs) with stackable_operator::v2::config_file_writer (moved there via operator-rs #1217 on the smooth-operator branch). ZooKeeper's copy was a java-only subset of the canonical hdfs writer; the upstream module's additional to_hadoop_xml simply goes unimported. Drop the now-unused java-properties dependency. The framework module now only contains role_utils. No behaviour change; rendered .properties output is byte-identical by construction (same code, new home). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 2bac0f8 commit 7d41396

8 files changed

Lines changed: 30 additions & 109 deletions

File tree

Cargo.lock

Lines changed: 11 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.nix

Lines changed: 17 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const_format = "0.2"
1919
fnv = "1.0"
2020
futures = { version = "0.3", features = ["compat"] }
2121
indoc = "2.0"
22-
java-properties = "2.0"
2322
pin-project = "1.1"
2423
semver = "1.0"
2524
serde = { version = "1.0", features = ["derive"] }

rust/operator-binary/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const_format.workspace = true
1818
fnv.workspace = true
1919
futures.workspace = true
2020
indoc.workspace = true
21-
java-properties.workspace = true
2221
pin-project.workspace = true
2322
semver.workspace = true
2423
serde.workspace = true

rust/operator-binary/src/framework.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@
1010
// Wired into the reconciler in a follow-up commit (validate -> ValidatedCluster).
1111
#[allow(dead_code)]
1212
pub mod role_utils;
13-
pub mod writer;

rust/operator-binary/src/framework/writer.rs

Lines changed: 0 additions & 81 deletions
This file was deleted.

rust/operator-binary/src/zk_controller/build/config_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ use stackable_operator::{
1212
builder::{configmap::ConfigMapBuilder, meta::ObjectMetaBuilder},
1313
k8s_openapi::api::core::v1::ConfigMap,
1414
role_utils::RoleGroupRef,
15+
v2::config_file_writer::{PropertiesWriterError, to_java_properties_string},
1516
};
1617

1718
use crate::{
1819
crd::{ZookeeperRole, v1alpha1},
19-
framework::writer::{PropertiesWriterError, to_java_properties_string},
2020
utils::build_recommended_labels,
2121
zk_controller::{
2222
ZK_CONTROLLER_NAME,

rust/operator-binary/src/zk_controller/build/properties/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub(crate) fn resolved_overrides(
3333
}
3434

3535
/// Converts a `key -> value` map into the `key -> Some(value)` shape expected by
36-
/// [`to_java_properties_string`](crate::framework::writer::to_java_properties_string).
36+
/// [`to_java_properties_string`](stackable_operator::v2::config_file_writer::to_java_properties_string).
3737
pub(crate) fn into_optional_values(
3838
map: BTreeMap<String, String>,
3939
) -> BTreeMap<String, Option<String>> {

0 commit comments

Comments
 (0)