Skip to content

Commit 6b625f6

Browse files
committed
fix: drop hardcoded hive-site.xml, remove duplicated hive port
1 parent b250784 commit 6b625f6

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

rust/operator-binary/src/controller/build/command.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ pub fn build_container_command_args(
2020
) -> Vec<String> {
2121
let log4j2_properties = ConfigFileName::Log4j2;
2222
let core_site = ConfigFileName::CoreSite;
23+
let hive_site = ConfigFileName::HiveSite;
2324
let mut args = vec![
2425
// copy config files to a writeable empty folder in order to set s3 access and secret keys
2526
format!("echo copying {STACKABLE_CONFIG_MOUNT_DIR} to {STACKABLE_CONFIG_DIR}"),
@@ -36,7 +37,7 @@ pub fn build_container_command_args(
3637
"if test -f {STACKABLE_CONFIG_DIR}/{core_site}; then config-utils template {STACKABLE_CONFIG_DIR}/{core_site}; fi"
3738
),
3839
format!(
39-
"if test -f {STACKABLE_CONFIG_DIR}/hive-site.xml; then config-utils template {STACKABLE_CONFIG_DIR}/hive-site.xml; fi"
40+
"if test -f {STACKABLE_CONFIG_DIR}/{hive_site}; then config-utils template {STACKABLE_CONFIG_DIR}/{hive_site}; fi"
4041
),
4142
// Copy system truststore to stackable truststore
4243
format!(

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ use std::collections::BTreeMap;
44
use snafu::{ResultExt, Snafu};
55
use stackable_operator::{crd::s3, k8s_openapi::api::core::v1::EnvVar};
66

7-
use crate::controller::{
8-
ValidatedClusterConfig, ValidatedMetaStoreConfig, build::opa::build_opa_hive_site_config,
7+
use crate::{
8+
controller::{
9+
ValidatedClusterConfig, ValidatedMetaStoreConfig, build::opa::build_opa_hive_site_config,
10+
},
11+
crd::HIVE_PORT,
912
};
1013

1114
const DEFAULT_WAREHOUSE_DIR: &str = "/stackable/warehouse";
1215
const HIVE_METASTORE_PORT: &str = "hive.metastore.port";
13-
const DEFAULT_HIVE_METASTORE_PORT: &str = "9083";
1416

1517
// Metastore property keys.
1618
const CONNECTION_DRIVER_NAME: &str = "javax.jdo.option.ConnectionDriverName";
@@ -49,10 +51,7 @@ pub fn build(
4951
let mut data: BTreeMap<String, String> = BTreeMap::new();
5052

5153
// 1. Defaults.
52-
data.insert(
53-
HIVE_METASTORE_PORT.to_string(),
54-
DEFAULT_HIVE_METASTORE_PORT.to_string(),
55-
);
54+
data.insert(HIVE_METASTORE_PORT.to_string(), HIVE_PORT.to_string());
5655

5756
// 2. Automatic / operator-injected.
5857
data.insert(

0 commit comments

Comments
 (0)