class LZOCheck extends AbstractCheckDescriptor {

  @Override
  public void perform(PrerequisiteCheck prerequisiteCheck, PrereqCheckRequest request) throws AmbariException {
    if (config.getGplLicenseAccepted()){
      return;
    }
    List<String> errorMessages = new ArrayList<>();
    PrereqCheckStatus checkStatus = PrereqCheckStatus.WARNING;

    String codecs = getProperty(request, "core-site", IO_COMPRESSION_CODECS);
    if (codecs!= null && codecs.contains(LZO_ENABLE_VALUE)) {
      errorMessages.add(getFailReason(IO_COMPRESSION_CODECS, prerequisiteCheck, request));
    }
    String classValue = getProperty(request, "core-site", LZO_ENABLE_KEY);

    if (LZO_ENABLE_VALUE.equals(classValue)) {
      errorMessages.add(getFailReason(LZO_ENABLE_KEY, prerequisiteCheck, request));
    }

    if (!errorMessages.isEmpty()) {
      prerequisiteCheck.setFailReason(StringUtils.join(errorMessages, "You have LZO codec enabled in the core-site config of your cluster. " +
          "You have to accept GPL license during ambari-server setup to have LZO installed automatically. " +
          "If any hosts require LZO, it should be installed before starting the upgrade. " +
          "Consult Ambari documentation for instructions on how to do this."));
      prerequisiteCheck.getFailedOn().add("LZO");
      prerequisiteCheck.setStatus(checkStatus);
    }
  }

  public  LZOCheck();

}