You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by sz...@apache.org on 2022/05/10 05:23:26 UTC
[ozone] branch master updated: HDDS-6715. Avoid using GrpcClientProtocolService.LOG (#3393)
This is an automated email from the ASF dual-hosted git repository.
szetszwo 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 6e0c85eb43 HDDS-6715. Avoid using GrpcClientProtocolService.LOG (#3393)
6e0c85eb43 is described below
commit 6e0c85eb435288913cd9a3ebd0ec60c4bf8ec4d8
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Tue May 10 07:23:20 2022 +0200
HDDS-6715. Avoid using GrpcClientProtocolService.LOG (#3393)
Co-authored-by: Tsz-Wo Nicholas Sze <sz...@apache.org>
---
.../org/apache/hadoop/hdds/scm/TestRatisPipelineLeader.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestRatisPipelineLeader.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestRatisPipelineLeader.java
index 0cb3e65535..6a0a615a33 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestRatisPipelineLeader.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestRatisPipelineLeader.java
@@ -34,9 +34,6 @@ import org.apache.ozone.test.GenericTestUtils;
import org.apache.ozone.test.tag.Flaky;
import static org.apache.hadoop.ozone.OzoneConfigKeys.DFS_RATIS_LEADER_ELECTION_MINIMUM_TIMEOUT_DURATION_KEY;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.ratis.grpc.client.GrpcClientProtocolService;
import org.apache.ratis.protocol.ClientId;
import org.apache.ratis.protocol.GroupInfoReply;
import org.apache.ratis.protocol.GroupInfoRequest;
@@ -46,7 +43,9 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
+import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.slf4j.event.Level;
/**
* Test pipeline leader information is correctly used.
@@ -55,7 +54,7 @@ import org.slf4j.LoggerFactory;
public class TestRatisPipelineLeader {
private static MiniOzoneCluster cluster;
private static OzoneConfiguration conf;
- private static final org.slf4j.Logger LOG =
+ private static final Logger LOG =
LoggerFactory.getLogger(TestRatisPipelineLeader.class);
@BeforeAll
@@ -97,9 +96,11 @@ public class TestRatisPipelineLeader {
// Verify client connects to Leader without NotLeaderException
XceiverClientRatis xceiverClientRatis =
XceiverClientRatis.newXceiverClientRatis(ratisPipeline, conf);
- Logger.getLogger(GrpcClientProtocolService.class).setLevel(Level.DEBUG);
+ final Logger log = LoggerFactory.getLogger(
+ "org.apache.ratis.grpc.server.GrpcClientProtocolService");
+ GenericTestUtils.setLogLevel(log, Level.DEBUG);
GenericTestUtils.LogCapturer logCapturer =
- GenericTestUtils.LogCapturer.captureLogs(GrpcClientProtocolService.LOG);
+ GenericTestUtils.LogCapturer.captureLogs(log);
xceiverClientRatis.connect();
ContainerProtocolCalls.createContainer(xceiverClientRatis, 1L, null);
logCapturer.stopCapturing();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org