@@ -64,9 +64,7 @@ def render_cassandra_config(
64
64
seeds = seeds or self .seeds ,
65
65
),
66
66
self ._cassandra_authentication_config (
67
- authentication
68
- if authentication is not None
69
- else self .authentication
67
+ authentication if authentication is not None else self .authentication
70
68
),
71
69
self ._cassandra_peer_tls_config (
72
70
enabled = enable_peer_tls
@@ -95,12 +93,8 @@ def render_env(self, cassandra_limit_memory_mb: int | None) -> None:
95
93
self ._render_env (
96
94
self ._merge_dicts (
97
95
[
98
- self ._map_env (
99
- self .workload .cassandra_paths .env .read_text ().split ("\n " )
100
- ),
101
- self ._env_heap_config (
102
- cassandra_limit_memory_mb = cassandra_limit_memory_mb
103
- ),
96
+ self ._map_env (self .workload .cassandra_paths .env .read_text ().split ("\n " )),
97
+ self ._env_heap_config (cassandra_limit_memory_mb = cassandra_limit_memory_mb ),
104
98
self ._env_jmx_exporter_config (
105
99
self .workload .cassandra_paths .jmx_exporter .as_posix (),
106
100
self .workload .cassandra_paths .jmx_exporter_config .as_posix (),
@@ -138,9 +132,7 @@ def _env_heap_config(cassandra_limit_memory_mb: int | None) -> dict[str, str]:
138
132
if cassandra_limit_memory_mb is not None and cassandra_limit_memory_mb < 1024 :
139
133
raise ValueError ("cassandra_limit_memory_mb should be at least 1024" )
140
134
return {
141
- "MAX_HEAP_SIZE" : f"{ cassandra_limit_memory_mb } M"
142
- if cassandra_limit_memory_mb
143
- else "" ,
135
+ "MAX_HEAP_SIZE" : f"{ cassandra_limit_memory_mb } M" if cassandra_limit_memory_mb else "" ,
144
136
"HEAP_NEWSIZE" : f"{ cassandra_limit_memory_mb // 2 } M"
145
137
if cassandra_limit_memory_mb
146
138
else "" ,
@@ -216,9 +208,7 @@ def _cassandra_peer_tls_config(
216
208
@staticmethod
217
209
def _cassandra_authentication_config (enabled : bool ) -> dict [str , Any ]:
218
210
return {
219
- "authenticator" : "PasswordAuthenticator"
220
- if enabled
221
- else "AllowAllAuthenticator" ,
211
+ "authenticator" : "PasswordAuthenticator" if enabled else "AllowAllAuthenticator" ,
222
212
}
223
213
224
214
@staticmethod
0 commit comments