public static SnapshotDescription validate(SnapshotDescription snapshot, Configuration conf)
    throws IllegalArgumentException, IOException {
    if (!snapshot.hasTable()) {
      throw new IllegalArgumentException(
        "Descriptor doesn't apply to a table, so we can't build it.");
    }

    SnapshotDescription.Builder builder = snapshot.toBuilder();

    // set the creation time, if one hasn't been set
    long time = snapshot.getCreationTime();
    if (time == SnapshotDescriptionUtils.NO_SNAPSHOT_START_TIME_SPECIFIED) {
      time = EnvironmentEdgeManager.currentTime();
      LOG.debug("Creation time not specified, setting to:" + time + " (current time:"
        + EnvironmentEdgeManager.currentTime() + ").");
      builder.setCreationTime(time);
    }

    long ttl = snapshot.getTtl();
    // set default ttl(sec) if it is not set already or the value is out of the range
    if (
      ttl == SnapshotDescriptionUtils.NO_SNAPSHOT_TTL_SPECIFIED
        || ttl > TimeUnit.MILLISECONDS.toSeconds(Long.MAX_VALUE)
    ) {
      final long defaultSnapshotTtl =
        conf.getLong(HConstants.DEFAULT_SNAPSHOT_TTL_CONFIG_KEY, HConstants.DEFAULT_SNAPSHOT_TTL);
      if (LOG.isDebugEnabled()) {
        LOG.debug("Snapshot current TTL value: {} resetting it to default value: {}", ttl,
          defaultSnapshotTtl);
      }
      ttl = defaultSnapshotTtl;
    }
    builder.setTtl(ttl);

    if (!snapshot.hasVersion()) {
      builder.setVersion(SnapshotDescriptionUtils.SNAPSHOT_LAYOUT_VERSION);
      LOG.debug("Snapshot {} VERSION not specified, setting to {}", snapshot.getName(),
        SnapshotDescriptionUtils.SNAPSHOT_LAYOUT_VERSION);
    }

    RpcServer.getRequestUser().ifPresent(user -> {
      if (AccessChecker.isAuthorizationSupported(conf)) {
        builder.setOwner(user.getShortName());
        LOG.debug("Set {} as owner of Snapshot", user.getShortName());
      }
    });

    snapshot = builder.build();

    // set the acl to snapshot if security feature is enabled.
    if (isSecurityAvailable(conf)) {
      snapshot = writeAclToSnapshotDescription(snapshot, conf);
    }
    return snapshot;
  }
Convert the passed snapshot description into a 'full' snapshot description based on default
parameters, if none have been supplied. This resolves any 'optional' parameters that aren't
supplied to their default values.
@param snapshot general snapshot descriptor
@param conf     Configuration to read configured snapshot defaults if snapshot is not complete
@return a valid snapshot description
@throws IllegalArgumentException if the {@link SnapshotDescription} is not a complete
                                 {@link SnapshotDescription}.
hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.java