public void validate()

in ambari-infra-manager/src/main/java/org/apache/ambari/infra/job/archive/ArchivingProperties.java [197:224]


  public void validate() {
    if (readBlockSize <= 0)
      throw new IllegalArgumentException("The property readBlockSize must be greater than 0!");

    if (writeBlockSize <= 0)
      throw new IllegalArgumentException("The property writeBlockSize must be greater than 0!");

    if (isBlank(fileNameSuffixColumn)) {
      throw new IllegalArgumentException("The property fileNameSuffixColumn can not be null or empty string!");
    }

    requireNonNull(destination, "The property destination can not be null!");
    switch (destination) {
      case LOCAL:
        if (isBlank(localDestinationDirectory))
          throw new IllegalArgumentException(String.format(
                  "The property localDestinationDirectory can not be null or empty string when destination is set to %s!", LOCAL.name()));
        break;

      case HDFS:
        hdfsProperties()
                .orElseThrow(() -> new IllegalArgumentException("HDFS related properties must be set if the destination is " + HDFS.name()))
                .validate();
    }

    requireNonNull(solr, "No solr query was specified for archiving job!");
    solr.validate();
  }