[ 
https://issues.apache.org/jira/browse/HDDS-1476?focusedWorklogId=234020&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-234020
 ]

ASF GitHub Bot logged work on HDDS-1476:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Apr/19 19:04
            Start Date: 27/Apr/19 19:04
    Worklog Time Spent: 10m 
      Work Description: arp7 commented on issue #779: HDDS-1476. Fix 
logIfNeeded logic in EndPointStateMachine.
URL: https://github.com/apache/hadoop/pull/779#issuecomment-487311455
 
 
   /retest
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 234020)
    Time Spent: 40m  (was: 0.5h)

> Fix logIfNeeded logic in EndPointStateMachine
> ---------------------------------------------
>
>                 Key: HDDS-1476
>                 URL: https://issues.apache.org/jira/browse/HDDS-1476
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Datanode
>            Reporter: Bharat Viswanadham
>            Assignee: Siddharth Wagle
>            Priority: Major
>              Labels: newbie, pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> {code:java}
> public void E(Exception ex) {
>  LOG.trace("Incrementing the Missed count. Ex : {}", ex);
> this.incMissed();
>  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);
>  }
> }{code}
> This method will be called when any exception occur in stateMachine to log an 
> exception. But to not log aggresively we have this 
> ozone.scm.heartbeat.log.warn.interval.count property to control  logging. 
>  
> There is a small issue here, we don't log the exception first time when it 
> occurred. So, we need to log for the first time and then increment the 
> missingCount.
>  
> Fix is to move the this.incMissed() to end of the method so that we log it 
> for the first time exception occurred and after that every 
> log.warn.interval.count exceptions happened.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to