hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
/**
   * @return LOCKED, if procedure is found and it has the lock; else UNLOCKED.
   * @throws ServiceException if given proc id is found but it is not a LockProcedure.
   */
@return LOCKED, if procedure is found and it has the lock; else UNLOCKED.
@throws ServiceException if given proc id is found but it is not a LockProcedure.
@return LOCKED if procedure is found and it has the lock ; else UNLOCKED . @throws ServiceException if given proc id is found but it is not a LockProcedure .
@Override
  public LockHeartbeatResponse lockHeartbeat(RpcController controller, LockHeartbeatRequest request)
      throws ServiceException {
    try {
      if (master.getLockManager().remoteLocks().lockHeartbeat(request.getProcId(),
          request.getKeepAlive())) {
        return LockHeartbeatResponse.newBuilder().setTimeoutMs(
            master.getConfiguration().getInt(LockProcedure.REMOTE_LOCKS_TIMEOUT_MS_CONF,
                LockProcedure.DEFAULT_REMOTE_LOCKS_TIMEOUT_MS))
            .setLockStatus(LockHeartbeatResponse.LockStatus.LOCKED).build();
      } else {
        return LockHeartbeatResponse.newBuilder()
            .setLockStatus(LockHeartbeatResponse.LockStatus.UNLOCKED).build();
      }
    } catch (IOException e) {
      throw new ServiceException(e);
    }
  }
@ Override public LockHeartbeatResponse lockHeartbeat ( RpcController controller , LockHeartbeatRequest request ) throws ServiceException { try { if ( master . getLockManager ( ) . remoteLocks ( ) . lockHeartbeat ( request . getProcId ( ) , request . getKeepAlive ( ) ) ) { return LockHeartbeatResponse . newBuilder ( ) . setTimeoutMs ( master . getConfiguration ( ) . getInt ( LockProcedure . REMOTE_LOCKS_TIMEOUT_MS_CONF , LockProcedure . DEFAULT_REMOTE_LOCKS_TIMEOUT_MS ) ) . setLockStatus ( LockHeartbeatResponse . LockStatus . LOCKED ) . build ( ) ; } else { return LockHeartbeatResponse . newBuilder ( ) . setLockStatus ( LockHeartbeatResponse . LockStatus . UNLOCKED ) . build ( ) ; } } catch ( IOException e ) { throw new ServiceException ( e ) ; } }
@return LOCKED, if procedure is found and it has the lock; else UNLOCKED.
@return LOCKED if procedure is found and it has the lock ; else UNLOCKED .