Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
9 changes: 0 additions & 9 deletions hadoop-hdds/common/src/main/resources/ozone-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,6 @@ public static void setLogLevel(org.slf4j.Logger logger,
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,6 @@ public void testCloseContainerCommandOnRestart() throws Exception {
MiniOzoneCluster cluster = MiniOzoneCluster.newBuilder(conf)
.setHbInterval(1000)
.setHbProcessorInterval(3000)
.setTrace(false)
.setNumDatanodes(1)
.build();
cluster.waitForClusterToBeReady();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ abstract class Builder {
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 Optional<String> scmId = Optional.empty();
Expand Down Expand Up @@ -503,18 +502,6 @@ public Builder setHbProcessorInterval(int val) {
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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
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
Expand Down Expand Up @@ -722,7 +721,6 @@ protected void initializeConfiguration() throws IOException {
// pipeline.
conf.setInt(HddsConfigKeys.HDDS_SCM_SAFEMODE_MIN_DATANODE,
numOfDatanodes >= 3 ? 3 : 1);
configureTrace();
}

void removeConfiguration() {
Expand Down Expand Up @@ -967,15 +965,6 @@ protected void configureDatanodePorts(ConfigurationTarget conf) {
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();

Expand Down