This is an automated email from the ASF dual-hosted git repository.
bharat pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 5bca062 HDDS-1476. Fix logIfNeeded logic in EndPointStateMachine.
(#779)
5bca062 is described below
commit 5bca062d0e8a00dcb97c36b442dd6fcbf4dc72fa
Author: Siddharth <[email protected]>
AuthorDate: Mon Apr 29 12:05:38 2019 -0700
HDDS-1476. Fix logIfNeeded logic in EndPointStateMachine. (#779)
---
.../ozone/container/common/statemachine/EndpointStateMachine.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/EndpointStateMachine.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/EndpointStateMachine.java
index 5f78a33..a243c93 100644
---
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/EndpointStateMachine.java
+++
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/EndpointStateMachine.java
@@ -200,16 +200,15 @@ public class EndpointStateMachine
* @param ex - Exception
*/
public void logIfNeeded(Exception ex) {
- LOG.trace("Incrementing the Missed count. Ex : {}", ex);
- this.incMissed();
- if (this.getMissedCount() % getLogWarnInterval(conf) ==
- 0) {
+ if (this.getMissedCount() % getLogWarnInterval(conf) == 0) {
LOG.error(
"Unable to communicate to SCM server at {} for past {} seconds.",
this.getAddress().getHostString() + ":" +
this.getAddress().getPort(),
TimeUnit.MILLISECONDS.toSeconds(
this.getMissedCount() * getScmHeartbeatInterval(this.conf)), ex);
}
+ LOG.trace("Incrementing the Missed count. Ex : {}", ex);
+ this.incMissed();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]