|
@@ -128,7 +128,9 @@ public class LeaseManager {
|
|
|
synchronized void removeLease(Lease lease, String src) {
|
|
|
sortedLeasesByPath.remove(src);
|
|
|
if (!lease.removePath(src)) {
|
|
|
- LOG.error(src + " not found in lease.paths (=" + lease.paths + ")");
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ LOG.debug(src + " not found in lease.paths (=" + lease.paths + ")");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (!lease.hasPath()) {
|
|
@@ -409,13 +411,14 @@ public class LeaseManager {
|
|
|
oldest.getPaths().toArray(leasePaths);
|
|
|
for(String p : leasePaths) {
|
|
|
try {
|
|
|
- if(fsnamesystem.internalReleaseLease(oldest, p, HdfsServerConstants.NAMENODE_LEASE_HOLDER)) {
|
|
|
- LOG.info("Lease recovery for file " + p +
|
|
|
- " is complete. File closed.");
|
|
|
- removing.add(p);
|
|
|
- } else {
|
|
|
- LOG.info("Started block recovery for file " + p +
|
|
|
- " lease " + oldest);
|
|
|
+ boolean completed = fsnamesystem.internalReleaseLease(oldest, p,
|
|
|
+ HdfsServerConstants.NAMENODE_LEASE_HOLDER);
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ if (completed) {
|
|
|
+ LOG.debug("Lease recovery for " + p + " is complete. File closed.");
|
|
|
+ } else {
|
|
|
+ LOG.debug("Started block recovery " + p + " lease " + oldest);
|
|
|
+ }
|
|
|
}
|
|
|
} catch (IOException e) {
|
|
|
LOG.error("Cannot release the path "+p+" in the lease "+oldest, e);
|