@Override
  public ReportProcedureDoneResponse reportProcedureDone(RpcController controller,
    ReportProcedureDoneRequest request) throws ServiceException {
    // Check Masters is up and ready for duty before progressing. Remote side will keep trying.
    try {
      this.server.checkServiceStarted();
      for (RemoteProcedureResult result : request.getResultList()) {
        // -1 is less than any possible MasterActiveCode
        long initiatingMasterActiveTime =
          result.hasInitiatingMasterActiveTime() ? result.getInitiatingMasterActiveTime() : -1;
        throwOnOldMaster(result.getProcId(), initiatingMasterActiveTime);
      }
    } catch (IOException ioe) {
      throw new ServiceException(ioe);
    }
    request.getResultList().forEach(result -> {
      if (result.getStatus() == RemoteProcedureResult.Status.SUCCESS) {
        server.remoteProcedureCompleted(result.getProcId());
      } else {
        server.remoteProcedureFailed(result.getProcId(),
          RemoteProcedureException.fromProto(result.getError()));
      }
    });
    return ReportProcedureDoneResponse.getDefaultInstance();
  }
@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.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java