[ 
https://issues.apache.org/jira/browse/HDFS-9507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16092453#comment-16092453
 ] 

Bharat Viswanadham edited comment on HDFS-9507 at 7/19/17 1:31 AM:
-------------------------------------------------------------------

[~sabhyankar] [~belugabehr] I think here it is not logged at warn level because 
if client is closed or no files are being written by client, there is nothing 
to renew. So, I think it is mentioned at DEBUG level, as this is not quite a 
warning here.
Let me know if you agree on this, or anything I am missing here.


was (Author: bharatviswa):
I think here it is not logged at warn level because if client is closed or no 
files are being written by client, there is nothing to renew. So, I think it is 
mentioned at DEBUG level, as this is not quite a warning here.
Let me know if you agree on this, or anything I am missing here.

> LeaseRenewer Logging Under-Reporting
> ------------------------------------
>
>                 Key: HDFS-9507
>                 URL: https://issues.apache.org/jira/browse/HDFS-9507
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>    Affects Versions: 2.7.1
>            Reporter: BELUGA BEHR
>            Assignee: Bharat Viswanadham
>            Priority: Minor
>
> Why is it that in LeaseRenewer#run() failures to renew a lease on a file are 
> reported with "warn" level logging, but in LeaseRenewer#renew() it is 
> reported with a "debug" level warn?
> In LeaseRenewer#renew(), if the method renewLease() returns 'false' then the 
> problem is silently discarded (continue, no Exception is thrown) and the next 
> client in the list tries to renew.
> {code:title=LeaseRenewer.java|borderStyle=solid}
> private void run(final int id) throws InterruptedException {
>   ...
>   try {
>     renew();
>     lastRenewed = Time.monotonicNow();
>   } catch (SocketTimeoutException ie) {
>     LOG.warn("Failed to renew lease for " + clientsString() + " for "
>     + (elapsed/1000) + " seconds.  Aborting ...", ie);
>     synchronized (this) {
>       while (!dfsclients.isEmpty()) {
>         DFSClient dfsClient = dfsclients.get(0);
>         dfsClient.closeAllFilesBeingWritten(true);
>         closeClient(dfsClient);
>       }
>       //Expire the current LeaseRenewer thread.
>       emptyTime = 0;
>     }
>     break;
>   } catch (IOException ie) {
>     LOG.warn("Failed to renew lease for " + clientsString() + " for "
>       + (elapsed/1000) + " seconds.  Will retry shortly ...", ie);
>   }
> }
> ...
> }
> private void renew() throws IOException {
> {
>    ...
>         if (!c.renewLease()) {
>           LOG.debug("Did not renew lease for client {}", c);
>           continue;
>         }
>    ...
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
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