Package org.apache.sqoop.validation

Examples of org.apache.sqoop.validation.ValidationThreshold


  protected void doValidate(SqoopOptions options, Configuration conf,
                            ValidationContext validationContext)
    throws ValidationException {
    Validator validator = (Validator) ReflectionUtils.newInstance(
        options.getValidatorClass(), conf);
    ValidationThreshold threshold = (ValidationThreshold)
        ReflectionUtils.newInstance(options.getValidationThresholdClass(),
          conf);
    ValidationFailureHandler failureHandler = (ValidationFailureHandler)
        ReflectionUtils.newInstance(options.getValidationFailureHandlerClass(),
          conf);

    StringBuilder sb = new StringBuilder();
    sb.append("Validating the integrity of the import using the "
      + "following configuration\n");
    sb.append("\tValidator : ").append(validator.getClass().getName())
      .append('\n');
    sb.append("\tThreshold Specifier : ")
      .append(threshold.getClass().getName()).append('\n');
    sb.append("\tFailure Handler : ")
      .append(failureHandler.getClass().getName()).append('\n');
    LOG.info(sb.toString());
    validator.validate(validationContext, threshold, failureHandler);
  }
View Full Code Here

TOP

Related Classes of org.apache.sqoop.validation.ValidationThreshold

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.