hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Simonov <dimmobor...@gmail.com>
Subject recoverLeaseInternal: why current leasehonder is forbidden to append the file?
Date Tue, 24 Feb 2015 08:10:11 GMT

Could you please explain, why this check exists in class
"org.apache.hadoop.hdfs.server.namenode.FSNamesystem", method

Lease leaseFile = leaseManager.getLeaseByPath(src);
        if (leaseFile != null && leaseFile.equals(lease)) {
          throw new AlreadyBeingCreatedException(
            "failed to create file " + src + " for " + holder +
            " for client " + clientMachine +
            " because current leaseholder is trying to recreate file.");

It prevents leaseholder to recover the lease if the lease already belongs
to him.

This method is called both in append() and create() methods
of org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer

It seems to me that current leaseholder should be able to append the file
normally. Am I wrong?

Hadoop version: 2.5.1

Best regards, Dmitrii Simonov.

View raw message