BELUGA BEHR created HDFS-9507:
---------------------------------
Summary: 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
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.3.4#6332)