Package org.apache.hadoop.hbase.exceptions

Examples of org.apache.hadoop.hbase.exceptions.LeaseException


      Lease lease = leases.get(leaseName);
      // We need to check to see if the remove is successful as the poll in the run()
      // method could have completed between the get and the remove which will result
      // in a corrupt leaseQueue.
      if (lease == null || !leaseQueue.remove(lease)) {
        throw new LeaseException("lease '" + leaseName +
        "' does not exist or has already expired");
      }
      lease.resetExpirationTime();
      leaseQueue.add(lease);
    }
View Full Code Here


  Lease removeLease(final String leaseName) throws LeaseException {
    Lease lease =  null;
    synchronized (leaseQueue) {
      lease = leases.remove(leaseName);
      if (lease == null) {
        throw new LeaseException("lease '" + leaseName + "' does not exist");
      }
      leaseQueue.remove(lease);
    }
    return lease;
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.exceptions.LeaseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.