Skip to content

Commit 6e845d6

Browse files
committed
refactor: use non optional properties writer
1 parent 1b2e502 commit 6e845d6

5 files changed

Lines changed: 90 additions & 114 deletions

File tree

Cargo.lock

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

Cargo.nix

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

rust/operator-binary/src/controller/build/properties/core_site.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ use crate::controller::ValidatedClusterConfig;
1111
const HADOOP_SECURITY_AUTHENTICATION: &str = "hadoop.security.authentication";
1212

1313
/// Returns the `core-site.xml` properties, or `None` if the file should be omitted.
14-
pub fn build(cluster_config: &ValidatedClusterConfig) -> Option<BTreeMap<String, Option<String>>> {
14+
pub fn build(cluster_config: &ValidatedClusterConfig) -> Option<BTreeMap<String, String>> {
1515
if cluster_config.needs_kerberos_core_site {
1616
let mut data = BTreeMap::new();
1717
data.insert(
1818
HADOOP_SECURITY_AUTHENTICATION.to_string(),
19-
Some("kerberos".to_string()),
19+
"kerberos".to_string(),
2020
);
2121
Some(data)
2222
} else {
@@ -42,7 +42,7 @@ mod tests {
4242
let data = build(&cluster_config).expect("core-site present");
4343
assert_eq!(
4444
data.get("hadoop.security.authentication"),
45-
Some(&Some("kerberos".to_string()))
45+
Some(&"kerberos".to_string())
4646
);
4747
}
4848
}

0 commit comments

Comments
 (0)