Example usage for org.apache.hadoop.hdfs.server.common HdfsServerConstants NAMENODE_LEASE_HOLDER

List of usage examples for org.apache.hadoop.hdfs.server.common HdfsServerConstants NAMENODE_LEASE_HOLDER

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.server.common HdfsServerConstants NAMENODE_LEASE_HOLDER.

Prototype

String NAMENODE_LEASE_HOLDER

To view the source code for org.apache.hadoop.hdfs.server.common HdfsServerConstants NAMENODE_LEASE_HOLDER.

Click Source Link

Usage

From source file:io.hops.transaction.lock.LeasePathLock.java

License:Apache License

private void acquireLeasePaths(Lease lease) throws StorageException, TransactionContextException {
    Collection<LeasePath> result = acquireLockList(lockType, LeasePath.Finder.ByHolderId, lease.getHolderID());
    if (!lease.getHolder().equals(HdfsServerConstants.NAMENODE_LEASE_HOLDER)) { // We don't need to keep the lps result for namenode-lease.
        leasePaths.addAll(result);//from ww w  .  j av  a  2 s . co m
    }
}

From source file:io.hops.transaction.lock.NameNodeLeaseLock.java

License:Apache License

@Override
protected void acquire(TransactionLocks locks) throws IOException {
    nameNodeLease = acquireLock(lockType, Lease.Finder.ByHolder, HdfsServerConstants.NAMENODE_LEASE_HOLDER);
}