private void complete(MasterProcedureEnv env, Throwable error) {
    if (isFinished()) {
      LOG.info("This procedure {} is already finished, skip the rest processes", this.getProcId());
      return;
    }
    if (event == null) {
      LOG.warn("procedure event for {} is null, maybe the procedure is created when recovery",
        getProcId());
      return;
    }
    if (error == null) {
      LOG.info("finish snapshot {} on region {}", snapshot.getName(), region.getEncodedName());
      succ = true;
    }

    event.wake(env.getProcedureScheduler());
    event = null;
  }
A remote procedure which is used to send region snapshot request to region server. The basic
logic of SnapshotRegionProcedure is similar like {@link ServerRemoteProcedure}, only with a
little difference, when {@link FailedRemoteDispatchException} was thrown, SnapshotRegionProcedure
will sleep some time and continue retrying until success.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/SnapshotRegionProcedure.java