@Override
  public SnapshotResponse snapshot(RpcController controller, SnapshotRequest request)
    throws ServiceException {
    try {
      server.checkInitialized();
      server.snapshotManager.checkSnapshotSupport();

      LOG.info(server.getClientIdAuditPrefix() + " snapshot request for:"
        + ClientSnapshotDescriptionUtils.toString(request.getSnapshot()));
      // get the snapshot information
      SnapshotDescription snapshot =
        SnapshotDescriptionUtils.validate(request.getSnapshot(), server.getConfiguration());
      // send back the max amount of time the client should wait for the snapshot to complete
      long waitTime = SnapshotDescriptionUtils.getMaxMasterTimeout(server.getConfiguration(),
        snapshot.getType(), SnapshotDescriptionUtils.DEFAULT_MAX_WAIT_TIME);

      SnapshotResponse.Builder builder = SnapshotResponse.newBuilder().setExpectedTimeout(waitTime);

      // If there is nonce group and nonce in the snapshot request, then the client can
      // handle snapshot procedure procId. And if enable the snapshot procedure, we
      // will do the snapshot work with proc-v2, otherwise we will fall back to zk proc.
      if (
        request.hasNonceGroup() && request.hasNonce()
          && server.snapshotManager.snapshotProcedureEnabled()
      ) {
        long nonceGroup = request.getNonceGroup();
        long nonce = request.getNonce();
        long procId = server.snapshotManager.takeSnapshot(snapshot, nonceGroup, nonce);
        return builder.setProcId(procId).build();
      } else {
        server.snapshotManager.takeSnapshot(snapshot);
        return builder.build();
      }
    } catch (ForeignException e) {
      throw new ServiceException(e.getCause());
    } catch (IOException e) {
      throw new ServiceException(e);
    }
  }
Triggers an asynchronous attempt to take a snapshot. {@inheritDoc}
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java