11use snafu:: { OptionExt , ResultExt , Snafu } ;
22use stackable_operator:: {
33 memory:: { BinaryMultiple , MemoryQuantity } ,
4- role_utils:: { self , JavaCommonConfig , JvmArgumentOverrides , Role } ,
4+ role_utils:: { self , JvmArgumentOverrides } ,
55} ;
66
77use crate :: crd:: {
8- JVM_SECURITY_PROPERTIES_FILE , METRICS_PORT , MetaStoreConfig , MetaStoreConfigFragment ,
8+ HiveRoleType , JVM_SECURITY_PROPERTIES_FILE , METRICS_PORT , MetaStoreConfig ,
99 STACKABLE_CONFIG_DIR , STACKABLE_TRUST_STORE , STACKABLE_TRUST_STORE_PASSWORD ,
10- v1alpha1:: { HiveCluster , HiveMetastoreRoleConfig } ,
10+ v1alpha1:: HiveCluster ,
1111} ;
1212
1313const JAVA_HEAP_FACTOR : f32 = 0.8 ;
@@ -29,7 +29,7 @@ pub enum Error {
2929/// All JVM arguments.
3030fn construct_jvm_args (
3131 hive : & HiveCluster ,
32- role : & Role < MetaStoreConfigFragment , HiveMetastoreRoleConfig , JavaCommonConfig > ,
32+ role : & HiveRoleType ,
3333 role_group : & str ,
3434) -> Result < Vec < String > , Error > {
3535 let mut jvm_args = vec ! [
@@ -60,7 +60,7 @@ fn construct_jvm_args(
6060/// [`construct_hadoop_heapsize_env`]).
6161pub fn construct_non_heap_jvm_args (
6262 hive : & HiveCluster ,
63- role : & Role < MetaStoreConfigFragment , HiveMetastoreRoleConfig , JavaCommonConfig > ,
63+ role : & HiveRoleType ,
6464 role_group : & str ,
6565) -> Result < String , Error > {
6666 let mut jvm_args = construct_jvm_args ( hive, role, role_group) ?;
@@ -190,12 +190,7 @@ mod tests {
190190
191191 fn construct_boilerplate (
192192 hive_cluster : & str ,
193- ) -> (
194- HiveCluster ,
195- MetaStoreConfig ,
196- Role < MetaStoreConfigFragment , HiveMetastoreRoleConfig , JavaCommonConfig > ,
197- String ,
198- ) {
193+ ) -> ( HiveCluster , MetaStoreConfig , HiveRoleType , String ) {
199194 let hive: HiveCluster = serde_yaml:: from_str ( hive_cluster) . expect ( "illegal test input" ) ;
200195
201196 let hive_role = HiveRole :: MetaStore ;
0 commit comments