You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by dl...@apache.org on 2024/11/20 21:02:03 UTC

(accumulo) branch 2.1 updated: Revert "Added Monitor property to optionally show extent information (#5081)"

This is an automated email from the ASF dual-hosted git repository.

dlmarion 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 fa3de844d1 Revert "Added Monitor property to optionally show extent information (#5081)"
fa3de844d1 is described below

commit fa3de844d158815e68b954fb450561e3da1e0edf
Author: Dave Marion <dl...@apache.org>
AuthorDate: Wed Nov 20 20:54:41 2024 +0000

    Revert "Added Monitor property to optionally show extent information (#5081)"
    
    This reverts commit 943ca69fd6f0dcc18fd8fcb5df6fa474329c7788.
---
 .../src/main/java/org/apache/accumulo/core/conf/Property.java | 10 +---------
 .../src/main/java/org/apache/accumulo/monitor/Monitor.java    | 11 -----------
 .../accumulo/monitor/rest/tservers/TabletServerResource.java  |  3 +--
 3 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index 0f1bf8ee33..0fa037366c 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -994,14 +994,6 @@ public enum Property {
           + " The resources that are used by default can be seen in"
           + " `accumulo/server/monitor/src/main/resources/templates/default.ftl`.",
       "2.0.0"),
-  MONITOR_OBFUSCATE_EXTENTS("monitor.extents.obfuscate", "true", PropertyType.BOOLEAN,
-      "Obfuscates the table extent information displayed in the Monitor if true. Setting"
-          + " this to false will expose data in the row of the keys where tablets split. It"
-          + " is not recommended to set this to false if the Monitor is exposed to entities"
-          + " that should not see this information. The Monitor process reads this property"
-          + " from the accumulo.properties file only, not ZooKeeper, so it cannot be"
-          + " changed at runtime.",
-      "2.1.4"),
   @Deprecated(since = "2.1.0")
   TRACE_PREFIX("trace.", null, PropertyType.PREFIX,
       "Properties in this category affect the behavior of distributed tracing.", "1.3.5"),
@@ -1893,7 +1885,7 @@ public enum Property {
 
       // others
       TSERV_NATIVEMAP_ENABLED, TSERV_SCAN_MAX_OPENFILES, MANAGER_RECOVERY_WAL_EXISTENCE_CACHE_TIME,
-      TSERV_SESSION_MAXIDLE, TSERV_UPDATE_SESSION_MAXIDLE, MONITOR_OBFUSCATE_EXTENTS);
+      TSERV_SESSION_MAXIDLE, TSERV_UPDATE_SESSION_MAXIDLE);
 
   /**
    * Checks if the given property may be changed via Zookeeper, but not recognized until the restart
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
index 315b107e88..80dd69b8cd 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
@@ -115,7 +115,6 @@ public class Monitor extends AbstractServer implements HighlyAvailableService {
   private static final int REFRESH_TIME = 5;
 
   private final long START_TIME;
-  private final boolean obfuscateExtents;
 
   public static void main(String[] args) throws Exception {
     try (Monitor monitor = new Monitor(new ServerOpts(), args)) {
@@ -126,12 +125,6 @@ public class Monitor extends AbstractServer implements HighlyAvailableService {
   Monitor(ServerOpts opts, String[] args) {
     super("monitor", opts, args);
     START_TIME = System.currentTimeMillis();
-    // Using site configuration on purpose. We want to get the value from
-    // accumulo.properties file local to the Monitor. We don't want to
-    // enable someone to change this property dynamically and expose
-    // information.
-    obfuscateExtents =
-        getContext().getSiteConfiguration().getBoolean(Property.MONITOR_OBFUSCATE_EXTENTS);
   }
 
   private final AtomicLong lastRecalc = new AtomicLong(0L);
@@ -1054,8 +1047,4 @@ public class Monitor extends AbstractServer implements HighlyAvailableService {
   public int getLivePort() {
     return livePort;
   }
-
-  public boolean isObfuscateExtents() {
-    return obfuscateExtents;
-  }
 }
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/tservers/TabletServerResource.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/tservers/TabletServerResource.java
index 0c845b01dc..820f3476d0 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/tservers/TabletServerResource.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/rest/tservers/TabletServerResource.java
@@ -319,8 +319,7 @@ public class TabletServerResource {
 
       KeyExtent extent = KeyExtent.fromThrift(info.extent);
       TableId tableId = extent.tableId();
-      String displayExtent = String.format("[%s]",
-          monitor.isObfuscateExtents() ? extent.obscured() : extent.endRow().toString());
+      String displayExtent = String.format("[%s]", extent.obscured());
 
       String tableName = monitor.getContext().getPrintableTableInfoFromId(tableId);