@@ -61,7 +61,7 @@ use crate::{
6161 HIVE_PORT , HIVE_PORT_NAME , HiveRole , METRICS_PORT , METRICS_PORT_NAME , STACKABLE_CONFIG_DIR ,
6262 STACKABLE_CONFIG_DIR_NAME , STACKABLE_CONFIG_MOUNT_DIR , STACKABLE_CONFIG_MOUNT_DIR_NAME ,
6363 STACKABLE_LOG_CONFIG_MOUNT_DIR , STACKABLE_LOG_CONFIG_MOUNT_DIR_NAME ,
64- STACKABLE_LOG_DIR_NAME , v1alpha1 ,
64+ STACKABLE_LOG_DIR_NAME ,
6565 } ,
6666} ;
6767
@@ -144,7 +144,6 @@ pub(crate) const HDFS_CONFIG_MOUNT_DIR: &str = "/stackable/mount/hdfs-config";
144144/// The [`Pod`](`stackable_operator::k8s_openapi::api::core::v1::Pod`)s are accessible through the
145145/// corresponding [`Service`](`stackable_operator::k8s_openapi::api::core::v1::Service`) (via [`build_rolegroup_headless_service`](super::service::build_rolegroup_headless_service) and metrics from [`build_rolegroup_metrics_service`](super::service::build_rolegroup_metrics_service)).
146146pub ( crate ) fn build_metastore_rolegroup_statefulset (
147- hive : & v1alpha1:: HiveCluster ,
148147 hive_role : & HiveRole ,
149148 cluster : & ValidatedCluster ,
150149 role_group_name : & RoleGroupName ,
@@ -165,7 +164,7 @@ pub(crate) fn build_metastore_rolegroup_statefulset(
165164 "HADOOP_HEAPSIZE" ,
166165 construct_hadoop_heapsize_env ( merged_config) . context ( ConstructJvmArgumentsSnafu ) ?,
167166 )
168- . add_env_var ( "HADOOP_OPTS" , construct_non_heap_jvm_args ( hive , rg) )
167+ . add_env_var ( "HADOOP_OPTS" , construct_non_heap_jvm_args ( cluster , rg) )
169168 . add_env_var (
170169 "CONTAINERDEBUG_LOG_DIRECTORY" ,
171170 format ! ( "{STACKABLE_LOG_DIR}/containerdebug" ) ,
@@ -178,7 +177,7 @@ pub(crate) fn build_metastore_rolegroup_statefulset(
178177
179178 let mut pod_builder = PodBuilder :: new ( ) ;
180179
181- if let Some ( hdfs) = & hive . spec . cluster_config . hdfs {
180+ if let Some ( hdfs) = & cluster . cluster_config . hdfs {
182181 pod_builder
183182 . add_volume (
184183 VolumeBuilder :: new ( & * HDFS_DISCOVERY_VOLUME_NAME )
@@ -230,7 +229,7 @@ pub(crate) fn build_metastore_rolegroup_statefulset(
230229 . context ( AddVolumeSnafu ) ?;
231230 }
232231
233- let db_type = hive . spec . cluster_config . metadata_database . as_hive_db_type ( ) ;
232+ let db_type = & cluster . cluster_config . db_type ;
234233 let start_command = if resolved_product_image. product_version . starts_with ( "3." ) {
235234 // The schematool version in 3.1.x does *not* support the `-initOrUpgradeSchema` flag yet, so we can not use that.
236235 // As we *only* support HMS 3.1.x (or newer) since SDP release 23.11, we can safely assume we are always coming
@@ -262,7 +261,7 @@ pub(crate) fn build_metastore_rolegroup_statefulset(
262261 "-c" . to_string( ) ,
263262 ] )
264263 . args ( build_container_command_args (
265- hive ,
264+ cluster ,
266265 formatdoc ! { "
267266 {kerberos_container_start_commands}
268267
@@ -274,7 +273,7 @@ pub(crate) fn build_metastore_rolegroup_statefulset(
274273 wait_for_termination $!
275274 {create_vector_shutdown_file_command}
276275 " ,
277- kerberos_container_start_commands = kerberos_container_start_commands( hive ) ,
276+ kerberos_container_start_commands = kerberos_container_start_commands( cluster ) ,
278277 remove_vector_shutdown_file_command =
279278 remove_vector_shutdown_file_command( STACKABLE_LOG_DIR ) ,
280279 create_vector_shutdown_file_command =
@@ -403,8 +402,8 @@ pub(crate) fn build_metastore_rolegroup_statefulset(
403402
404403 add_graceful_shutdown_config ( merged_config, & mut pod_builder) . context ( GracefulShutdownSnafu ) ?;
405404
406- if hive . has_kerberos_enabled ( ) {
407- add_kerberos_pod_config ( hive , hive_role, container_builder, & mut pod_builder)
405+ if cluster . has_kerberos_enabled ( ) {
406+ add_kerberos_pod_config ( cluster , hive_role, container_builder, & mut pod_builder)
408407 . context ( AddKerberosConfigSnafu ) ?;
409408 }
410409
0 commit comments