class UpgradeCatalog270 extends AbstractUpgradeCatalog {

  protected void updateStormConfigs() throws AmbariException {
    AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class);
    Clusters clusters = ambariManagementController.getClusters();
    if (clusters != null) {
      Map<String, Cluster> clusterMap = clusters.getClusters();

      if (clusterMap != null && !clusterMap.isEmpty()) {
        Set<String> removeProperties = Sets.newHashSet("_storm.thrift.nonsecure.transport",
          "_storm.thrift.secure.transport");
        String stormSecurityClassKey = "storm.thrift.transport";
        String stormSecurityClassValue = "org.apache.storm.security.auth.SimpleTransportPlugin";
        String stormSite = "storm-site";
        for (final Cluster cluster : clusterMap.values()) {
          Config config = cluster.getDesiredConfigByType(stormSite);
          if (config != null) {
            Map<String, String> stormSiteProperties = config.getProperties();
            if (stormSiteProperties.containsKey(stormSecurityClassKey)) {
              LOG.info("Updating " + stormSecurityClassKey);
              if (cluster.getSecurityType() == SecurityType.KERBEROS) {
                stormSecurityClassValue = "org.apache.storm.security.auth.kerberos.KerberosSaslTransportPlugin";
              }
              Map<String, String> updateProperty = Collections.singletonMap(stormSecurityClassKey, stormSecurityClassValue);
              updateConfigurationPropertiesForCluster(cluster, stormSite, updateProperty, removeProperties,
                true, false);
            }
          }
        }
      }
    }
  }

  @Inject public  UpgradeCatalog270(Injector injector);

}