You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kr...@apache.org on 2025/07/14 13:23:07 UTC
(accumulo) branch 2.1 updated: Improve readability of logIfFixed (#5737)
This is an automated email from the ASF dual-hosted git repository.
krathbun pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/2.1 by this push:
new 9811a053da Improve readability of logIfFixed (#5737)
9811a053da is described below
commit 9811a053da5db3aac6f67ed42e6946eeb168faf3
Author: Kevin Rathbun <kr...@apache.org>
AuthorDate: Mon Jul 14 09:23:02 2025 -0400
Improve readability of logIfFixed (#5737)
---
.../main/java/org/apache/accumulo/server/util/SystemPropUtil.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
index 6a7bf345ce..1adc07a53c 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
@@ -64,7 +64,7 @@ public class SystemPropUtil {
}
private static void removePropWithoutDeprecationWarning(ServerContext context, String property) {
- logIfFixed(property, null);
+ logIfFixed(Property.getPropertyByKey(property), null);
context.getPropStore().removeProperties(SystemPropKey.of(context), List.of(property));
}
@@ -111,7 +111,7 @@ public class SystemPropUtil {
throw iae;
}
- logIfFixed(property, value);
+ logIfFixed(Property.getPropertyByKey(property), value);
return property;
}
@@ -121,8 +121,8 @@ public class SystemPropUtil {
* property is fixed, logs a warning that the property change will not take effect until related
* processes are restarted.
*/
- private static void logIfFixed(String property, String value) {
- if (Property.isFixedZooPropertyKey(Property.getPropertyByKey(property))) {
+ private static void logIfFixed(Property property, String value) {
+ if (property != null && Property.isFixedZooPropertyKey(property)) {
String s = value == null ? String.format("Removing a fixed property %s. ", property)
: String.format("Setting a fixed property %s to value %s. ", property, value);
log.warn(s + "Change will not take effect until related processes are restarted.");