class UpgradeCatalog270 extends AbstractUpgradeCatalog {

  @Override
  protected void updateKerberosDescriptorArtifact(ArtifactDAO artifactDAO, ArtifactEntity artifactEntity) throws AmbariException {
    if (artifactEntity == null) {
      return;
    }

    Map<String, Object> data = artifactEntity.getArtifactData();
    if (data == null) {
      return;
    }

    final KerberosDescriptor kerberosDescriptor = new KerberosDescriptorFactory().createInstance(data);
    if (kerberosDescriptor == null) {
      return;
    }

    final boolean updateInfraKerberosDescriptor = updateInfraKerberosDescriptor(kerberosDescriptor);
    final boolean updateWebHCatHostKerberosDescriptor = updateWebHCatHostKerberosDescriptor(kerberosDescriptor);
    final boolean updateYarnKerberosDescriptor = updateYarnKerberosDescriptor(kerberosDescriptor);

    if (updateInfraKerberosDescriptor || updateWebHCatHostKerberosDescriptor || updateYarnKerberosDescriptor) {
      artifactEntity.setArtifactData(kerberosDescriptor.toMap());
      artifactDAO.merge(artifactEntity);
    }
  }

  @Inject public  UpgradeCatalog270(Injector injector);

}