This is an automated email from the ASF dual-hosted git repository.
pifta pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 68c6f71b2d HDDS-10287. Remove unused enableTrace from MiniOzoneCluster
(#6159)
68c6f71b2d is described below
commit 68c6f71b2d37bcee40957a8faa9083c9c9ef044f
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Mon Feb 5 10:37:28 2024 +0100
HDDS-10287. Remove unused enableTrace from MiniOzoneCluster (#6159)
---
.../main/java/org/apache/hadoop/ozone/OzoneConfigKeys.java | 3 ---
hadoop-hdds/common/src/main/resources/ozone-default.xml | 9 ---------
.../main/java/org/apache/ozone/test/GenericTestUtils.java | 4 ----
.../apache/hadoop/hdds/scm/TestStorageContainerManager.java | 1 -
.../test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java | 13 -------------
.../java/org/apache/hadoop/ozone/MiniOzoneClusterImpl.java | 11 -----------
6 files changed, 41 deletions(-)
diff --git
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConfigKeys.java
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConfigKeys.java
index 21c89cc3c8..7bfda01840 100644
---
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConfigKeys.java
+++
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConfigKeys.java
@@ -137,9 +137,6 @@ public final class OzoneConfigKeys {
"dfs.container.ratis.ipc.random.port";
public static final boolean DFS_CONTAINER_RATIS_IPC_RANDOM_PORT_DEFAULT =
false;
- public static final String OZONE_TRACE_ENABLED_KEY =
- "ozone.trace.enabled";
- public static final boolean OZONE_TRACE_ENABLED_DEFAULT = false;
public static final String OZONE_METADATA_STORE_ROCKSDB_STATISTICS =
"ozone.metastore.rocksdb.statistics";
diff --git a/hadoop-hdds/common/src/main/resources/ozone-default.xml
b/hadoop-hdds/common/src/main/resources/ozone-default.xml
index c166e534d5..094fbff16d 100644
--- a/hadoop-hdds/common/src/main/resources/ozone-default.xml
+++ b/hadoop-hdds/common/src/main/resources/ozone-default.xml
@@ -1287,15 +1287,6 @@
see ozone.scm.heartbeat.thread.interval before changing this value.
</description>
</property>
- <property>
- <name>ozone.trace.enabled</name>
- <value>false</value>
- <tag>OZONE, DEBUG</tag>
- <description>
- Setting this flag to true dumps the HTTP request/ response in
- the logs. Very useful when debugging REST protocol.
- </description>
- </property>
<property>
<name>ozone.key.preallocation.max.blocks</name>
diff --git
a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/GenericTestUtils.java
b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/GenericTestUtils.java
index 79f0a09374..c9fa668445 100644
---
a/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/GenericTestUtils.java
+++
b/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/GenericTestUtils.java
@@ -218,10 +218,6 @@ public abstract class GenericTestUtils {
setLogLevel(toLog4j(logger), Level.toLevel(level.toString()));
}
- public static void setRootLogLevel(org.slf4j.event.Level level) {
- setLogLevel(LogManager.getRootLogger(), Level.toLevel(level.toString()));
- }
-
public static <T> T mockFieldReflection(Object object, String fieldName)
throws NoSuchFieldException, IllegalAccessException {
Field field = object.getClass().getDeclaredField(fieldName);
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestStorageContainerManager.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestStorageContainerManager.java
index 8626bd0378..e973c842de 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestStorageContainerManager.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestStorageContainerManager.java
@@ -830,7 +830,6 @@ public class TestStorageContainerManager {
MiniOzoneCluster cluster = MiniOzoneCluster.newBuilder(conf)
.setHbInterval(1000)
.setHbProcessorInterval(3000)
- .setTrace(false)
.setNumDatanodes(1)
.build();
cluster.waitForClusterToBeReady();
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java
index d625bf797b..9afc8ce634 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java
@@ -319,7 +319,6 @@ public interface MiniOzoneCluster extends AutoCloseable {
protected int numOfActiveSCMs = ACTIVE_SCMS_NOT_SET;
protected SCMConfigurator scmConfigurator;
- protected Optional<Boolean> enableTrace = Optional.of(false);
protected Optional<Integer> hbInterval = Optional.empty();
protected Optional<Integer> hbProcessorInterval = Optional.empty();
protected String scmId = UUID.randomUUID().toString();
@@ -472,18 +471,6 @@ public interface MiniOzoneCluster extends AutoCloseable {
return this;
}
- /**
- * When set to true, enables trace level logging.
- *
- * @param trace true or false
- *
- * @return MiniOzoneCluster.Builder
- */
- public Builder setTrace(Boolean trace) {
- enableTrace = Optional.of(trace);
- return this;
- }
-
/**
* Sets the reserved space
* {@link org.apache.hadoop.hdds.scm.ScmConfigKeys}
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneClusterImpl.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneClusterImpl.java
index fa22b30cad..ec1b118330 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneClusterImpl.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneClusterImpl.java
@@ -108,7 +108,6 @@ import static
org.apache.ozone.test.GenericTestUtils.PortAllocator.localhostWith
import org.hadoop.ozone.recon.codegen.ReconSqlDbConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.slf4j.event.Level;
/**
* MiniOzoneCluster creates a complete in-process Ozone cluster suitable for
@@ -722,7 +721,6 @@ public class MiniOzoneClusterImpl implements
MiniOzoneCluster {
// pipeline.
conf.setInt(HddsConfigKeys.HDDS_SCM_SAFEMODE_MIN_DATANODE,
numOfDatanodes >= 3 ? 3 : 1);
- configureTrace();
}
void removeConfiguration() {
@@ -956,15 +954,6 @@ public class MiniOzoneClusterImpl implements
MiniOzoneCluster {
conf.setFromObject(new ReplicationConfig().setPort(getFreePort()));
}
- private void configureTrace() {
- if (enableTrace.isPresent()) {
- conf.setBoolean(OzoneConfigKeys.OZONE_TRACE_ENABLED_KEY,
- enableTrace.get());
- GenericTestUtils.setRootLogLevel(Level.TRACE);
- }
- GenericTestUtils.setRootLogLevel(Level.INFO);
- }
-
protected void configureRecon() throws IOException {
ConfigurationProvider.resetConfiguration();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]