Hello!

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

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.

Reply via email to