Skip to content

Commit 474bdfe

Browse files
committed
added constant
1 parent 67d6e54 commit 474bdfe

File tree

1 file changed

+6
-4
lines changed
  • rust/operator-binary/src/crd

1 file changed

+6
-4
lines changed

rust/operator-binary/src/crd/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ pub const LISTENER_VOLUME_DIR: &str = "/stackable/listener";
8080
const DEFAULT_REGION_MOVER_TIMEOUT: Duration = Duration::from_minutes_unchecked(59);
8181
const DEFAULT_REGION_MOVER_DELTA_TO_SHUTDOWN: Duration = Duration::from_minutes_unchecked(1);
8282

83+
const DEFAULT_LISTENER_CLASS: &str = "cluster-internal";
84+
8385
#[derive(Snafu, Debug)]
8486
pub enum Error {
8587
#[snafu(display("the role [{role}] is invalid and does not exist in HBase"))]
@@ -677,7 +679,7 @@ impl HbaseRole {
677679
affinity: get_affinity(cluster_name, self, hdfs_discovery_cm_name),
678680
graceful_shutdown_timeout: Some(graceful_shutdown_timeout),
679681
requested_secret_lifetime: Some(requested_secret_lifetime),
680-
listener_class: Some("cluster-internal".to_string()),
682+
listener_class: Some(DEFAULT_LISTENER_CLASS.to_string()),
681683
}
682684
}
683685

@@ -778,7 +780,7 @@ impl AnyConfigFragment {
778780
cli_opts: None,
779781
},
780782
requested_secret_lifetime: Some(HbaseRole::DEFAULT_REGION_SECRET_LIFETIME),
781-
listener_class: Some("cluster-internal".to_string()),
783+
listener_class: Some(DEFAULT_LISTENER_CLASS.to_string()),
782784
})
783785
}
784786
HbaseRole::RestServer => AnyConfigFragment::RestServer(HbaseConfigFragment {
@@ -790,7 +792,7 @@ impl AnyConfigFragment {
790792
HbaseRole::DEFAULT_REST_SERVER_GRACEFUL_SHUTDOWN_TIMEOUT,
791793
),
792794
requested_secret_lifetime: Some(HbaseRole::DEFAULT_REST_SECRET_LIFETIME),
793-
listener_class: Some("cluster-internal".to_string()),
795+
listener_class: Some(DEFAULT_LISTENER_CLASS.to_string()),
794796
}),
795797
HbaseRole::Master => AnyConfigFragment::Master(HbaseConfigFragment {
796798
hbase_rootdir: None,
@@ -801,7 +803,7 @@ impl AnyConfigFragment {
801803
HbaseRole::DEFAULT_MASTER_GRACEFUL_SHUTDOWN_TIMEOUT,
802804
),
803805
requested_secret_lifetime: Some(HbaseRole::DEFAULT_MASTER_SECRET_LIFETIME),
804-
listener_class: Some("cluster-internal".to_string()),
806+
listener_class: Some(DEFAULT_LISTENER_CLASS.to_string()),
805807
}),
806808
}
807809
}

0 commit comments

Comments
 (0)