incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [4/5] AMBARI-3728. Remove unused config code from Service, Component, HostComponent (ncole)
Date Fri, 08 Nov 2013 22:25:06 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentConfigMappingEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentConfigMappingEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentConfigMappingEntity.java
deleted file mode 100644
index cf4ffb1..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentConfigMappingEntity.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.orm.entities;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.IdClass;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinColumns;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-@IdClass(HostComponentConfigMappingEntityPK.class)
-@Table(name = "hostcomponentconfigmapping")
-@Entity
-public class HostComponentConfigMappingEntity {
-
-  @Id
-  @Column(name = "cluster_id", insertable = false, updatable = false, nullable = false)
-  private Long clusterId;
-
-  @Id
-  @Column(name = "service_name", insertable = false, updatable = false, nullable = false)
-  private String serviceName;
-
-  @Id
-  @Column(name = "component_name", insertable = false, updatable = false, nullable = false)
-  private String componentName;
-
-  @Id
-  @Column(name = "host_name", insertable = false, updatable = false, nullable = false)
-  private String hostName;
-
-  @Id
-  @Column(name = "config_type", insertable = true, updatable = false, nullable = false)
-  private String configType;
-
-  @Column(name = "config_tag", nullable = false, insertable = true, updatable = true)
-  private String configTag;
-
-  @Column(name="timestamp", nullable = false, insertable = true, updatable = true)
-  private Long timestamp;
-
-  @ManyToOne
-  @JoinColumns({
-      @JoinColumn(name = "cluster_id", referencedColumnName = "cluster_id", nullable = false),
-      @JoinColumn(name = "service_name", referencedColumnName = "service_name", nullable = false),
-      @JoinColumn(name = "component_name", referencedColumnName = "component_name", nullable = false),
-      @JoinColumn(name = "host_name", referencedColumnName = "host_name", nullable = false) })
-  private HostComponentStateEntity hostComponentStateEntity;
-
-  @ManyToOne
-  @JoinColumns({
-      @JoinColumn(name = "cluster_id", referencedColumnName = "cluster_id", nullable = false, insertable = false, updatable = false),
-      @JoinColumn(name = "config_type", referencedColumnName = "type_name", nullable = false, insertable = false, updatable = false),
-      @JoinColumn(name = "config_tag", referencedColumnName = "version_tag", nullable = false, insertable = false, updatable = false)
-  })
-  private ClusterConfigEntity clusterConfigEntity;
-
-
-  public Long getClusterId() {
-    return clusterId;
-  }
-
-  public void setClusterId(Long id) {
-    clusterId = id;
-  }
-
-  public String getServiceName() {
-    return serviceName;
-  }
-
-  public void setServiceName(String name) {
-    serviceName = name;
-  }
-
-  public String getComponentName() {
-    return componentName;
-  }
-
-  public void setComponentName(String name) {
-    componentName = name;
-  }
-
-  public String getHostName() {
-    return hostName;
-  }
-
-  public void setHostName(String name) {
-    hostName = name;
-  }
-
-  public String getConfigType() {
-    return configType;
-  }
-
-  public void setConfigType(String type) {
-    configType = type;
-  }
-
-  public String getVersionTag() {
-    return configTag;
-  }
-
-  public void setVersionTag(String tag) {
-    configTag = tag;
-  }
-
-  public Long getTimestamp() {
-    return timestamp;
-  }
-
-  public void setTimestamp(Long stamp) {
-    timestamp = stamp;
-  }
-
-  public HostComponentStateEntity getHostComponentStateEntity() {
-    return hostComponentStateEntity;
-  }
-
-  public void setHostComponentStateEntity(HostComponentStateEntity entity) {
-    hostComponentStateEntity = entity;
-  }
-
-  public ClusterConfigEntity getClusterConfigEntity() {
-    return clusterConfigEntity;
-  }
-
-  public void setClusterConfigEntity(ClusterConfigEntity clusterConfigEntity) {
-    this.clusterConfigEntity = clusterConfigEntity;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-
-    HostComponentConfigMappingEntity that = (HostComponentConfigMappingEntity) o;
-
-    if (clusterId != null ? !clusterId.equals(that.clusterId) : that.clusterId != null) return false;
-    if (serviceName != null ? !serviceName.equals(that.serviceName) : that.serviceName != null) return false;
-    if (componentName != null ? !componentName.equals(that.componentName) : that.componentName != null) return false;
-    if (hostName != null ? !hostName.equals(that.hostName) : that.hostName != null) return false;
-    if (configType != null ? !configType.equals(that.configType) : that.configType != null) return false;
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = clusterId !=null ? clusterId.intValue() : 0;
-    result = 31 * result + (serviceName != null ? serviceName.hashCode() : 0);
-    result = 31 * result + (componentName != null ? componentName.hashCode() : 0);
-    result = 31 * result + (hostName != null ? hostName.hashCode() : 0);
-    result = 31 * result + (configType != null ? configType.hashCode() : 0);
-    return result;
-  }
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentConfigMappingEntityPK.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentConfigMappingEntityPK.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentConfigMappingEntityPK.java
deleted file mode 100644
index a267039..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentConfigMappingEntityPK.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.orm.entities;
-
-import javax.persistence.Column;
-import javax.persistence.Id;
-import java.io.Serializable;
-
-public class HostComponentConfigMappingEntityPK implements Serializable {
-  private Long clusterId;
-  private String serviceName;
-  private String componentName;
-  private String hostName;
-  private String configType;
-
-  @Id
-  @Column(name = "cluster_id", insertable = true, updatable = true, nullable = false, length = 10)
-  public Long getClusterId() {
-    return clusterId;
-  }
-
-  public void setClusterId(Long clusterId) {
-    this.clusterId = clusterId;
-  }
-
-  @Id
-  @Column(name = "service_name", insertable = true, updatable = true, nullable = false)
-  public String getServiceName() {
-    return serviceName;
-  }
-
-  public void setServiceName(String serviceName) {
-    this.serviceName = serviceName;
-  }
-
-  @Column(name = "component_name", insertable = true, updatable = true, nullable = false)
-  @Id
-  public String getComponentName() {
-    return componentName;
-  }
-
-  public void setComponentName(String name) {
-    componentName = name;
-  }
-
-  @Column(name = "host_name", insertable = true, updatable = true, nullable = false)
-  @Id
-  public String getHostName() {
-    return hostName;
-  }
-
-  public void setHostName(String name) {
-    hostName = name;
-  }
-
-  @Column(name = "config_type", insertable = true, updatable = false, nullable = false)
-  @Id
-  public String getConfigType() {
-    return configType;
-  }
-
-  public void setConfigType(String configType) {
-    this.configType = configType;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-
-    HostComponentConfigMappingEntityPK that = (HostComponentConfigMappingEntityPK) o;
-
-    if (clusterId != null ? !clusterId.equals(that.clusterId) : that.clusterId != null) return false;
-    if (componentName != null ? !componentName.equals(that.componentName) : that.componentName != null) return false;
-    if (serviceName != null ? !serviceName.equals(that.serviceName) : that.serviceName != null) return false;
-    if (hostName != null ? !hostName.equals(that.hostName) : that.hostName != null) return false;
-    if (configType != null ? !configType.equals(that.configType) : that.configType != null) return false;
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = clusterId != null ? clusterId.intValue() : 0;
-    result = 31 * result + (serviceName != null ? serviceName.hashCode() : 0);
-    result = 31 * result + (componentName != null ? componentName.hashCode() : 0);
-    result = 31 * result + (hostName != null ? hostName.hashCode() : 0);
-    result = 31 * result + (configType != null ? configType.hashCode() : 0);
-    return result;
-  }
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredConfigMappingEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredConfigMappingEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredConfigMappingEntity.java
deleted file mode 100644
index 454556a..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredConfigMappingEntity.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.orm.entities;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.IdClass;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinColumns;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-@IdClass(HostComponentDesiredConfigMappingEntityPK.class)
-@Table(name = "hcdesiredconfigmapping")
-@Entity
-public class HostComponentDesiredConfigMappingEntity {
-
-  @Id
-  @Column(name = "cluster_id", insertable = false, updatable = false, nullable = false)
-  private Long clusterId;
-
-  @Id
-  @Column(name = "service_name", insertable = false, updatable = false, nullable = false)
-  private String serviceName;
-
-  @Id
-  @Column(name = "component_name", insertable = false, updatable = false, nullable = false)
-  private String componentName;
-
-  @Id
-  @Column(name = "host_name", insertable = false, updatable = false, nullable = false)
-  private String hostName;
-
-  @Id
-  @Column(name = "config_type", insertable = true, updatable = false, nullable = false)
-  private String configType;
-
-  @Column(name = "config_tag", nullable = false, insertable = true, updatable = true)
-  private String configTag;
-
-  @Column(name="timestamp", nullable = false, insertable = true, updatable = true)
-  private Long timestamp;
-
-  @ManyToOne
-  @JoinColumns({
-      @JoinColumn(name = "cluster_id", referencedColumnName = "cluster_id", nullable = false),
-      @JoinColumn(name = "service_name", referencedColumnName = "service_name", nullable = false),
-      @JoinColumn(name = "component_name", referencedColumnName = "component_name", nullable = false),
-      @JoinColumn(name = "host_name", referencedColumnName = "host_name", nullable = false) })
-  private HostComponentDesiredStateEntity hostComponentDesiredStateEntity;
-
-  @ManyToOne
-  @JoinColumns({
-      @JoinColumn(name = "cluster_id", referencedColumnName = "cluster_id", nullable = false, insertable = false, updatable = false),
-      @JoinColumn(name = "config_type", referencedColumnName = "type_name", nullable = false, insertable = false, updatable = false),
-      @JoinColumn(name = "config_tag", referencedColumnName = "version_tag", nullable = false, insertable = false, updatable = false)
-  })
-  private ClusterConfigEntity clusterConfigEntity;
-
-  public Long getClusterId() {
-    return clusterId;
-  }
-  
-  public void setClusterId(Long id) {
-    clusterId = id;
-  }
-
-  public String getServiceName() {
-    return serviceName;
-  }
-  
-  public void setServiceName(String name) {
-    serviceName = name;
-  }
-
-  public String getComponentName() {
-    return componentName;
-  }
-  
-  public void setComponentName(String name) {
-    componentName = name;
-  }
-
-  public String getHostName() {
-    return hostName;
-  }
-  
-  public void setHostName(String name) {
-    hostName = name;
-  }
-
-  public String getConfigType() {
-    return configType;
-  }
-  
-  public void setConfigType(String type) {
-    configType = type;
-  }
-
-  public String getVersionTag() {
-    return configTag;
-  }
-  
-  public void setVersionTag(String tag) {
-    configTag = tag;
-  }
-  
-  public Long getTimestamp() {
-    return timestamp;
-  }
-  
-  public void setTimestamp(Long stamp) {
-    timestamp = stamp;
-  }
-
-  public HostComponentDesiredStateEntity getHostComponentDesiredStateEntity() {
-    return hostComponentDesiredStateEntity;
-  }
-  
-  public void setHostComponentDesiredStateEntity(HostComponentDesiredStateEntity entity) {
-    hostComponentDesiredStateEntity = entity;
-  }
-
-  public ClusterConfigEntity getClusterConfigEntity() {
-    return clusterConfigEntity;
-  }
-
-  public void setClusterConfigEntity(ClusterConfigEntity clusterConfigEntity) {
-    this.clusterConfigEntity = clusterConfigEntity;
-  }
-
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-
-    HostComponentDesiredConfigMappingEntity that = (HostComponentDesiredConfigMappingEntity) o;
-
-    if (clusterId != null ? !clusterId.equals(that.clusterId) : that.clusterId != null) return false;
-    if (serviceName != null ? !serviceName.equals(that.serviceName) : that.serviceName != null) return false;
-    if (componentName != null ? !componentName.equals(that.componentName) : that.componentName != null) return false;
-    if (hostName != null ? !hostName.equals(that.hostName) : that.hostName != null) return false;
-    if (configType != null ? !configType.equals(that.configType) : that.configType != null) return false;
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = clusterId !=null ? clusterId.intValue() : 0;
-    result = 31 * result + (serviceName != null ? serviceName.hashCode() : 0);
-    result = 31 * result + (componentName != null ? componentName.hashCode() : 0);
-    result = 31 * result + (hostName != null ? hostName.hashCode() : 0);
-    result = 31 * result + (configType != null ? configType.hashCode() : 0);
-    return result;
-  }  
-  
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredConfigMappingEntityPK.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredConfigMappingEntityPK.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredConfigMappingEntityPK.java
deleted file mode 100644
index 165f466..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredConfigMappingEntityPK.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.orm.entities;
-
-import javax.persistence.Column;
-import javax.persistence.Id;
-import java.io.Serializable;
-
-public class HostComponentDesiredConfigMappingEntityPK implements Serializable {
-  private Long clusterId;
-  private String serviceName;
-  private String componentName;
-  private String hostName;
-  private String configType;
-
-  @Id
-  @Column(name = "cluster_id", insertable = true, updatable = true, nullable = false, length = 10)
-  public Long getClusterId() {
-    return clusterId;
-  }
-
-  public void setClusterId(Long clusterId) {
-    this.clusterId = clusterId;
-  }
-
-  @Id
-  @Column(name = "service_name", insertable = true, updatable = true, nullable = false)
-  public String getServiceName() {
-    return serviceName;
-  }
-
-  public void setServiceName(String serviceName) {
-    this.serviceName = serviceName;
-  }
-
-  @Column(name = "component_name", insertable = true, updatable = true, nullable = false)
-  @Id
-  public String getComponentName() {
-    return componentName;
-  }
-
-  public void setComponentName(String name) {
-    componentName = name;
-  }
-
-  @Column(name = "host_name", insertable = true, updatable = true, nullable = false)
-  @Id
-  public String getHostName() {
-    return hostName;
-  }
-
-  public void setHostName(String name) {
-    hostName = name;
-  }
-
-  @Column(name = "config_type", insertable = true, updatable = false, nullable = false)
-  @Id
-  public String getConfigType() {
-    return configType;
-  }
-
-  public void setConfigType(String configType) {
-    this.configType = configType;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-
-    HostComponentDesiredConfigMappingEntityPK that = (HostComponentDesiredConfigMappingEntityPK) o;
-
-    if (clusterId != null ? !clusterId.equals(that.clusterId) : that.clusterId != null) return false;
-    if (componentName != null ? !componentName.equals(that.componentName) : that.componentName != null) return false;
-    if (serviceName != null ? !serviceName.equals(that.serviceName) : that.serviceName != null) return false;
-    if (hostName != null ? !hostName.equals(that.hostName) : that.hostName != null) return false;
-    if (configType != null ? !configType.equals(that.configType) : that.configType != null) return false;
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = clusterId != null ? clusterId.intValue() : 0;
-    result = 31 * result + (serviceName != null ? serviceName.hashCode() : 0);
-    result = 31 * result + (componentName != null ? componentName.hashCode() : 0);
-    result = 31 * result + (hostName != null ? hostName.hashCode() : 0);
-    result = 31 * result + (configType != null ? configType.hashCode() : 0);
-    return result;
-  }
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java
index 179c744..615db27 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java
@@ -66,9 +66,6 @@ public class HostComponentDesiredStateEntity {
   @JoinColumn(name = "host_name", referencedColumnName = "host_name", nullable = false)
   private HostEntity hostEntity;
 
-  @OneToMany(mappedBy = "hostComponentDesiredStateEntity", cascade = {CascadeType.REMOVE, CascadeType.REFRESH})
-  private Collection<HostComponentDesiredConfigMappingEntity> desiredConfigMappingEntities;
-
   public Long getClusterId() {
     return clusterId;
   }
@@ -163,12 +160,4 @@ public class HostComponentDesiredStateEntity {
     this.hostEntity = hostEntity;
   }
 
-  public Collection<HostComponentDesiredConfigMappingEntity> getHostComponentDesiredConfigMappingEntities() {
-    return desiredConfigMappingEntities;
-  }
-
-  public void setHostComponentDesiredConfigMappingEntities(Collection<HostComponentDesiredConfigMappingEntity> entities) {
-    desiredConfigMappingEntities = entities;
-  }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
index 29a906b..7dce204 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
@@ -66,9 +66,6 @@ public class HostComponentStateEntity {
   @JoinColumn(name = "host_name", referencedColumnName = "host_name", nullable = false)
   private HostEntity hostEntity;
 
-  @OneToMany(mappedBy = "hostComponentStateEntity", cascade = {CascadeType.REMOVE, CascadeType.REFRESH})
-  private Collection<HostComponentConfigMappingEntity> configMappingEntities;
-
   public Long getClusterId() {
     return clusterId;
   }
@@ -162,13 +159,4 @@ public class HostComponentStateEntity {
     this.hostEntity = hostEntity;
   }
 
-  public Collection<HostComponentConfigMappingEntity> getHostComponentConfigMappingEntities() {
-    return configMappingEntities;
-  }
-
-  public void setHostComponentConfigMappingEntities(Collection<HostComponentConfigMappingEntity> entities) {
-    configMappingEntities = entities;
-  }
-
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
index f5cca9a..780f8ba 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
@@ -61,9 +61,6 @@ public class ServiceComponentDesiredStateEntity {
   @OneToMany(mappedBy = "serviceComponentDesiredStateEntity")
   private Collection<HostComponentDesiredStateEntity> hostComponentDesiredStateEntities;
 
-  @OneToMany(mappedBy = "serviceComponentDesiredStateEntity", cascade = CascadeType.ALL)
-  private Collection<ComponentConfigMappingEntity> configMappingEntities;
-
   public Long getClusterId() {
     return clusterId;
   }
@@ -155,11 +152,4 @@ public class ServiceComponentDesiredStateEntity {
     this.hostComponentDesiredStateEntities = hostComponentDesiredStateEntities;
   }
 
-  public Collection<ComponentConfigMappingEntity> getComponentConfigMappingEntities() {
-    return configMappingEntities;
-  }
-  
-  public void setComponentConfigMappingEntities(Collection<ComponentConfigMappingEntity> entities) {
-    configMappingEntities = entities;
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigMappingEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigMappingEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigMappingEntity.java
deleted file mode 100644
index 243379f..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigMappingEntity.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.orm.entities;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.IdClass;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinColumns;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-@IdClass(ServiceConfigMappingEntityPK.class)
-@Entity
-@Table(name="serviceconfigmapping")
-public class ServiceConfigMappingEntity {
-
-  @Id
-  @Column(name = "cluster_id", nullable = false, insertable = false, updatable = false)
-  private Long clusterId;
-
-  @Id
-  @Column(name = "service_name", nullable = false, insertable = false, updatable = false)
-  private String serviceName;
-
-  @Id
-  @Column(name = "config_type", nullable = false, insertable = true, updatable = false)
-  private String configType;
-
-  @Column(name = "config_tag", nullable = false, insertable = true, updatable = true)
-  private String configVersion;
-
-  @Column(name = "timestamp", nullable = false, insertable = true, updatable = true)
-  private Long timestamp;
-
-  @ManyToOne
-  @JoinColumns({
-      @JoinColumn(name = "cluster_id", referencedColumnName = "cluster_id", nullable = false),
-      @JoinColumn(name = "service_name", referencedColumnName = "service_name", nullable = false) })
-  private ClusterServiceEntity serviceEntity;
-
-  @ManyToOne
-  @JoinColumns({
-      @JoinColumn(name = "cluster_id", referencedColumnName = "cluster_id", nullable = false, insertable = false, updatable = false),
-      @JoinColumn(name = "config_type", referencedColumnName = "type_name", nullable = false, insertable = false, updatable = false),
-      @JoinColumn(name = "config_tag", referencedColumnName = "version_tag", nullable = false, insertable = false, updatable = false)
-  })
-  private ClusterConfigEntity clusterConfigEntity;
-
-  public Long getClusterId() {
-    return clusterId;
-  }
-
-  public void setClusterId(Long id) {
-    clusterId = id;
-  }
-
-  public String getServiceName() {
-    return serviceName;
-  }
-
-  public void setServiceName(String name) {
-    serviceName = name;
-  }
-
-  public String getConfigType() {
-    return configType;
-  }
-
-  public void setConfigType(String type) {
-    configType = type;
-  }
-
-  public String getVersionTag() {
-    return configVersion;
-  }
-
-  public void setVersionTag(String tag) {
-    configVersion = tag;
-  }
-
-  public Long getTimestamp() {
-    return timestamp;
-  }
-
-  public void setTimestamp(Long stamp) {
-    timestamp = stamp;
-  }
-
-  public ClusterServiceEntity getServiceEntity() {
-    return serviceEntity;
-  }
-
-  public void setServiceEntity(ClusterServiceEntity entity) {
-    serviceEntity = entity;
-  }
-
-  public ClusterConfigEntity getClusterConfigEntity() {
-    return clusterConfigEntity;
-  }
-
-  public void setClusterConfigEntity(ClusterConfigEntity clusterConfigEntity) {
-    this.clusterConfigEntity = clusterConfigEntity;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-
-    ServiceConfigMappingEntity that = (ServiceConfigMappingEntity) o;
-
-    if (clusterId != null ? !clusterId.equals(that.clusterId) : that.clusterId != null) return false;
-    if (serviceName != null ? !serviceName.equals(that.serviceName) : that.serviceName != null) return false;
-    if (configType != null ? !configType.equals(that.configType) : that.configType != null) return false;
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = clusterId !=null ? clusterId.intValue() : 0;
-    result = 31 * result + (serviceName != null ? serviceName.hashCode() : 0);
-    result = 31 * result + (configType != null ? configType.hashCode() : 0);
-    return result;
-  }
-
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigMappingEntityPK.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigMappingEntityPK.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigMappingEntityPK.java
deleted file mode 100644
index 6e30064..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceConfigMappingEntityPK.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ambari.server.orm.entities;
-
-import javax.persistence.Column;
-import javax.persistence.Id;
-import java.io.Serializable;
-
-@SuppressWarnings("serial")
-public class ServiceConfigMappingEntityPK implements Serializable {
-  private Long clusterId;
-  private String serviceName;
-  private String configType;
-
-  @Id
-  @Column(name = "cluster_id", nullable = false, insertable = true, updatable = true, length = 10)
-  public Long getClusterId() {
-    return clusterId;
-  }
-
-  public void setClusterId(Long clusterId) {
-    this.clusterId = clusterId;
-  }
-
-  @Id
-  @Column(name = "service_name", nullable = false, insertable = true, updatable = true)
-  public String getServiceName() {
-    return serviceName;
-  }
-
-  public void setServiceName(String serviceName) {
-    this.serviceName = serviceName;
-  }
-
-  @Id
-  @Column(name = "config_type", nullable = false, insertable = true, updatable = false)
-  public String getConfigType() {
-    return configType;
-  }
-
-  public void setConfigType(String type) {
-    configType = type;
-  }
-
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-
-    ServiceConfigMappingEntityPK that = (ServiceConfigMappingEntityPK) o;
-
-    if (clusterId != null ? !clusterId.equals(that.clusterId) : that.clusterId != null) return false;
-    if (serviceName != null ? !serviceName.equals(that.serviceName) : that.serviceName != null) return false;
-
-    return true;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = clusterId !=null ? clusterId.intValue() : 0;
-    result = 31 * result + (serviceName != null ? serviceName.hashCode() : 0);
-    return result;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/state/Service.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/Service.java b/ambari-server/src/main/java/org/apache/ambari/server/state/Service.java
index 32e75f5..a2ef8ef 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/Service.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/Service.java
@@ -48,10 +48,6 @@ public interface Service {
 
   public void setDesiredState(State state);
 
-  public Map<String, Config> getDesiredConfigs();
-
-  public void updateDesiredConfigs(Map<String, Config> configs);
-
   public StackId getDesiredStackVersion();
 
   public void setDesiredStackVersion(StackId stackVersion);

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponent.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponent.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponent.java
index b5c4e99..a982ef1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponent.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponent.java
@@ -19,13 +19,13 @@
 package org.apache.ambari.server.state;
 
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.locks.ReadWriteLock;
 
-import com.google.inject.persist.Transactional;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.controller.ServiceComponentResponse;
 
+import com.google.inject.persist.Transactional;
+
 public interface ServiceComponent {
 
   public String getName();
@@ -40,12 +40,6 @@ public interface ServiceComponent {
 
   public void setDesiredState(State state);
 
-  public Map<String, Config> getDesiredConfigs();
-
-  public void updateDesiredConfigs(Map<String, Config> configs);
-
-  public void deleteDesiredConfigs(Set<String> configTypes);
-
   public StackId getDesiredStackVersion();
 
   public void setDesiredStackVersion(StackId stackVersion);

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
index c4af55a..b940503 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
@@ -19,14 +19,13 @@
 package org.apache.ambari.server.state;
 
 import java.util.Map;
-import java.util.Set;
-
-import com.google.inject.persist.Transactional;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.controller.ServiceComponentHostResponse;
 import org.apache.ambari.server.state.fsm.InvalidStateTransitionException;
 
+import com.google.inject.persist.Transactional;
+
 
 public interface ServiceComponentHost {
 
@@ -70,14 +69,6 @@ public interface ServiceComponentHost {
 
   public void setDesiredState(State state);
 
-  public Map<String, Config> getDesiredConfigs();
-
-  public Map<String, String> getDesiredConfigVersionsRecursive();
-
-  public void updateDesiredConfigs(Map<String, Config> configs);
-
-  public void deleteDesiredConfigs(Set<String> configTypes);
-
   public StackId getDesiredStackVersion();
 
   public void setDesiredStackVersion(StackId stackVersion);
@@ -86,8 +77,6 @@ public interface ServiceComponentHost {
 
   public void setState(State state);
   
-  public Map<String, Config> getConfigs() throws AmbariException;
-
   public StackId getStackVersion();
 
   public void setStackVersion(StackId stackVersion);

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHostEvent.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHostEvent.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHostEvent.java
index 7712274..64dfe08 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHostEvent.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHostEvent.java
@@ -18,7 +18,6 @@
 
 package org.apache.ambari.server.state;
 
-import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.ambari.server.state.fsm.event.AbstractEvent;
@@ -47,42 +46,22 @@ public abstract class ServiceComponentHostEvent
    */
   private final long opTimestamp;
 
-  // FIXME hack alert!!!
-  // This belongs to start event only
-  private final Map<String, String> configs;
-
   // FIXME hack alert
   // this belongs to install event only
   private final String stackId;
 
   public ServiceComponentHostEvent(ServiceComponentHostEventType type,
-      String serviceComponentName, String hostName, long opTimestamp,
-      Map<String, String> configs) {
-    this(type, serviceComponentName, hostName, opTimestamp,
-        configs, "");
-  }
-
-  public ServiceComponentHostEvent(ServiceComponentHostEventType type,
       String serviceComponentName, String hostName, long opTimestamp) {
-    this(type, serviceComponentName, hostName, opTimestamp,
-        new HashMap<String, String>(), "");
+    this(type, serviceComponentName, hostName, opTimestamp, "");
   }
 
   public ServiceComponentHostEvent(ServiceComponentHostEventType type,
       String serviceComponentName, String hostName, long opTimestamp,
       String stackId) {
-    this(type, serviceComponentName, hostName, opTimestamp,
-        new HashMap<String, String>(), stackId);
-  }
-
-  public ServiceComponentHostEvent(ServiceComponentHostEventType type,
-      String serviceComponentName, String hostName, long opTimestamp,
-      Map<String, String> configs, String stackId) {
     super(type);
     this.serviceComponentName = serviceComponentName;
     this.hostName = hostName;
     this.opTimestamp = opTimestamp;
-    this.configs = configs;
     this.stackId = stackId;
   }
 
@@ -130,7 +109,7 @@ public abstract class ServiceComponentHostEvent
       case HOST_SVCCOMP_STARTED:
         return new ServiceComponentHostStartedEvent(serviceComponentName, hostName, opTimestamp);
       case HOST_SVCCOMP_START:
-        return new ServiceComponentHostStartEvent(serviceComponentName, hostName, opTimestamp, configs);
+        return new ServiceComponentHostStartEvent(serviceComponentName, hostName, opTimestamp);
       case HOST_SVCCOMP_STOP:
         return new ServiceComponentHostStopEvent(serviceComponentName, hostName, opTimestamp);
       case HOST_SVCCOMP_UNINSTALL:
@@ -148,13 +127,6 @@ public abstract class ServiceComponentHostEvent
   }
 
   /**
-   * @return the configs
-   */
-  public Map<String, String> getConfigs() {
-    return configs;
-  }
-
-  /**
    * @return the stackId
    */
   public String getStackId() {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
index b8ebaf8..5deb0a7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
@@ -55,22 +55,15 @@ public class ServiceComponentImpl implements ServiceComponent {
   @Inject
   private ClusterServiceDAO clusterServiceDAO;
   @Inject
-  private HostComponentStateDAO hostComponentStateDAO;
-  @Inject
   private HostComponentDesiredStateDAO hostComponentDesiredStateDAO;
   @Inject
   private ServiceComponentHostFactory serviceComponentHostFactory;
   @Inject
   private AmbariMetaInfo ambariMetaInfo;
-  @Inject
-  private ComponentConfigMappingDAO componentConfigMappingDAO;
 
   boolean persisted = false;
   private ServiceComponentDesiredStateEntity desiredStateEntity;
 
-  // [ type -> versionTag ]
-  private Map<String, String>  desiredConfigs;
-
   private Map<String, ServiceComponentHost> hostComponents;
 
   private final boolean isClientComponent;
@@ -90,7 +83,6 @@ public class ServiceComponentImpl implements ServiceComponent {
     desiredStateEntity.setComponentName(componentName);
     desiredStateEntity.setDesiredState(State.INIT);
 
-    this.desiredConfigs = new HashMap<String, String>();
     setDesiredStackVersion(service.getDesiredStackVersion());
 
     this.hostComponents = new HashMap<String, ServiceComponentHost>();
@@ -121,8 +113,6 @@ public class ServiceComponentImpl implements ServiceComponent {
     this.service = service;
     this.desiredStateEntity = serviceComponentDesiredStateEntity;
 
-    this.desiredConfigs = new HashMap<String, String>();
-
     this.hostComponents = new HashMap<String, ServiceComponentHost>();
     for (HostComponentStateEntity hostComponentStateEntity : desiredStateEntity.getHostComponentStateEntities()) {
       HostComponentDesiredStateEntityPK pk = new HostComponentDesiredStateEntityPK();
@@ -138,10 +128,6 @@ public class ServiceComponentImpl implements ServiceComponent {
               hostComponentStateEntity, hostComponentDesiredStateEntity));
     }
 
-    for (ComponentConfigMappingEntity entity : desiredStateEntity.getComponentConfigMappingEntities()) {
-      desiredConfigs.put(entity.getConfigType(), entity.getVersionTag());
-    }
-
     StackId stackId = service.getDesiredStackVersion();
     ComponentInfo compInfo = ambariMetaInfo.getComponentCategory(
         stackId.getStackName(), stackId.getStackVersion(), service.getName(),
@@ -406,89 +392,6 @@ public class ServiceComponentImpl implements ServiceComponent {
     } finally {
       clusterGlobalLock.readLock().unlock();
     }
-
-
-  }
-
-  @Override
-  public Map<String, Config> getDesiredConfigs() {
-    clusterGlobalLock.readLock().lock();
-    try {
-      readWriteLock.readLock().lock();
-      try {
-        Map<String, Config> map = new HashMap<String, Config>();
-        for (Entry<String, String> entry : desiredConfigs.entrySet()) {
-          Config config = service.getCluster().getConfig(entry.getKey(), entry.getValue());
-          if (null != config) {
-            map.put(entry.getKey(), config);
-          }
-        }
-
-        Map<String, Config> svcConfigs = service.getDesiredConfigs();
-        for (Entry<String, Config> entry : svcConfigs.entrySet()) {
-          if (!map.containsKey(entry.getKey())) {
-            map.put(entry.getKey(), entry.getValue());
-          }
-        }
-
-        return Collections.unmodifiableMap(map);
-      } finally {
-        readWriteLock.readLock().unlock();
-      }
-    } finally {
-      clusterGlobalLock.readLock().unlock();
-    }
-
-
-  }
-
-  @Override
-  public void updateDesiredConfigs(Map<String, Config> configs) {
-
-    clusterGlobalLock.readLock().lock();
-    try {
-      readWriteLock.writeLock().lock();
-      try {
-        for (Entry<String, Config> entry : configs.entrySet()) {
-          boolean contains = false;
-
-          for (ComponentConfigMappingEntity componentConfigMappingEntity : desiredStateEntity.getComponentConfigMappingEntities()) {
-            if (entry.getKey().equals(componentConfigMappingEntity.getConfigType())) {
-              contains = true;
-              componentConfigMappingEntity.setTimestamp(new Date().getTime());
-              componentConfigMappingEntity.setVersionTag(entry.getValue().getVersionTag());
-              if (persisted) {
-                componentConfigMappingDAO.merge(componentConfigMappingEntity);
-              }
-            }
-          }
-
-          if (!contains) {
-            ComponentConfigMappingEntity newEntity = new ComponentConfigMappingEntity();
-            newEntity.setClusterId(desiredStateEntity.getClusterId());
-            newEntity.setServiceName(desiredStateEntity.getServiceName());
-            newEntity.setComponentName(desiredStateEntity.getComponentName());
-            newEntity.setConfigType(entry.getKey());
-            newEntity.setVersionTag(entry.getValue().getVersionTag());
-            newEntity.setTimestamp(new Date().getTime());
-            newEntity.setServiceComponentDesiredStateEntity(desiredStateEntity);
-            desiredStateEntity.getComponentConfigMappingEntities().add(newEntity);
-
-          }
-
-
-          this.desiredConfigs.put(entry.getKey(), entry.getValue().getVersionTag());
-        }
-
-        saveIfPersisted();
-      } finally {
-        readWriteLock.writeLock().unlock();
-      }
-    } finally {
-      clusterGlobalLock.readLock().unlock();
-    }
-
-
   }
 
   @Override
@@ -543,7 +446,7 @@ public class ServiceComponentImpl implements ServiceComponent {
       try {
         ServiceComponentResponse r = new ServiceComponentResponse(
             getClusterId(), service.getCluster().getClusterName(),
-            service.getName(), getName(), this.desiredConfigs,
+            service.getName(), getName(),
             getDesiredStackVersion().getStackId(),
             getDesiredState().toString());
         return r;
@@ -816,26 +719,6 @@ public class ServiceComponentImpl implements ServiceComponent {
   }
 
   @Override
-  public void deleteDesiredConfigs(Set<String> configTypes) {
-    clusterGlobalLock.readLock().lock();
-    try {
-      readWriteLock.writeLock().lock();
-      try {
-        componentConfigMappingDAO.removeByType(configTypes);
-        for (String configType : configTypes) {
-          desiredConfigs.remove(configType);
-        }
-      } finally {
-        readWriteLock.writeLock().unlock();
-      }
-    } finally {
-      clusterGlobalLock.readLock().unlock();
-    }
-
-
-  }
-
-  @Override
   @Transactional
   public void delete() throws AmbariException {
     clusterGlobalLock.writeLock().lock();
@@ -848,8 +731,6 @@ public class ServiceComponentImpl implements ServiceComponent {
           removeEntities();
           persisted = false;
         }
-
-        desiredConfigs.clear();
       } finally {
         readWriteLock.writeLock().unlock();
       }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java
index 99a6d21..0e978ea 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java
@@ -18,8 +18,9 @@
 
 package org.apache.ambari.server.state;
 
-import java.util.*;
-import java.util.Map.Entry;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
@@ -27,8 +28,14 @@ import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.ServiceComponentNotFoundException;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.controller.ServiceResponse;
-import org.apache.ambari.server.orm.dao.*;
-import org.apache.ambari.server.orm.entities.*;
+import org.apache.ambari.server.orm.dao.ClusterDAO;
+import org.apache.ambari.server.orm.dao.ClusterServiceDAO;
+import org.apache.ambari.server.orm.dao.ServiceDesiredStateDAO;
+import org.apache.ambari.server.orm.entities.ClusterEntity;
+import org.apache.ambari.server.orm.entities.ClusterServiceEntity;
+import org.apache.ambari.server.orm.entities.ClusterServiceEntityPK;
+import org.apache.ambari.server.orm.entities.ServiceComponentDesiredStateEntity;
+import org.apache.ambari.server.orm.entities.ServiceDesiredStateEntity;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -52,8 +59,6 @@ public class ServiceImpl implements Service {
 
   private boolean persisted = false;
   private final Cluster cluster;
-  // [ String type -> Config Tag ], no need to hold the direct reference to the config
-  private Map<String, String> desiredConfigs;
   private Map<String, ServiceComponent> components;
   private final boolean isClientOnlyService;
 
@@ -62,16 +67,10 @@ public class ServiceImpl implements Service {
   @Inject
   private ClusterServiceDAO clusterServiceDAO;
   @Inject
-  private Clusters clusters;
-  @Inject
   private ServiceDesiredStateDAO serviceDesiredStateDAO;
   @Inject
-  private ServiceComponentDesiredStateDAO serviceComponentDesiredStateDAO;
-  @Inject
   private ClusterDAO clusterDAO;
   @Inject
-  private ServiceConfigMappingDAO serviceConfigMappingDAO;
-  @Inject
   private ServiceComponentFactory serviceComponentFactory;
   @Inject
   private AmbariMetaInfo ambariMetaInfo;
@@ -93,7 +92,6 @@ public class ServiceImpl implements Service {
     serviceEntity.setServiceDesiredStateEntity(serviceDesiredStateEntity);
 
     this.cluster = cluster;
-    this.desiredConfigs = new HashMap<String, String>();
 
     this.components = new HashMap<String, ServiceComponent>();
 
@@ -118,8 +116,6 @@ public class ServiceImpl implements Service {
     //TODO check for null states?
     this.serviceDesiredStateEntity = serviceEntity.getServiceDesiredStateEntity();
 
-    this.desiredConfigs = new HashMap<String, String>();
-
     this.components = new HashMap<String, ServiceComponent>();
 
     if (!serviceEntity.getServiceComponentDesiredStateEntities().isEmpty()) {
@@ -131,12 +127,6 @@ public class ServiceImpl implements Service {
       }
     }
 
-    for (ServiceConfigMappingEntity mappingEntity :
-        serviceEntity.getServiceConfigMappings()) {
-      desiredConfigs.put(mappingEntity.getConfigType(),
-          mappingEntity.getVersionTag());
-    }
-
     StackId stackId = getDesiredStackVersion();
     ServiceInfo sInfo = ambariMetaInfo.getServiceInfo(stackId.getStackName(),
         stackId.getStackVersion(), getName());
@@ -343,77 +333,6 @@ public class ServiceImpl implements Service {
   }
 
   @Override
-  public Map<String, Config> getDesiredConfigs() {
-    clusterGlobalLock.readLock().lock();
-    try {
-      readWriteLock.readLock().lock();
-      try {
-        Map<String, Config> map = new HashMap<String, Config>();
-        for (Entry<String, String> entry : desiredConfigs.entrySet()) {
-          Config config = cluster.getConfig(entry.getKey(), entry.getValue());
-          if (null != config) {
-            map.put(entry.getKey(), config);
-          } else {
-            // FIXME this is an error - should throw a proper exception
-            throw new RuntimeException("Found an invalid config"
-                + ", clusterName=" + getCluster().getClusterName()
-                + ", serviceName=" + getName()
-                + ", configType=" + entry.getKey()
-                + ", configVersionTag=" + entry.getValue());
-          }
-        }
-        return Collections.unmodifiableMap(map);
-      } finally {
-        readWriteLock.readLock().unlock();
-      }
-    } finally {
-      clusterGlobalLock.readLock().unlock();
-    }
-  }
-
-  @Override
-  public void updateDesiredConfigs(Map<String, Config> configs) {
-    clusterGlobalLock.readLock().lock();
-    try {
-      readWriteLock.writeLock().lock();
-      try {
-        for (Entry<String, Config> entry : configs.entrySet()) {
-          boolean contains = false;
-
-          for (ServiceConfigMappingEntity serviceConfigMappingEntity : serviceEntity.getServiceConfigMappings()) {
-            if (entry.getKey().equals(serviceConfigMappingEntity.getConfigType())) {
-              contains = true;
-              serviceConfigMappingEntity.setTimestamp(new Date().getTime());
-              serviceConfigMappingEntity.setVersionTag(entry.getValue().getVersionTag());
-            }
-          }
-
-          if (!contains) {
-            ServiceConfigMappingEntity newEntity = new ServiceConfigMappingEntity();
-            newEntity.setClusterId(serviceEntity.getClusterId());
-            newEntity.setServiceName(serviceEntity.getServiceName());
-            newEntity.setConfigType(entry.getKey());
-            newEntity.setVersionTag(entry.getValue().getVersionTag());
-            newEntity.setTimestamp(new Date().getTime());
-            newEntity.setServiceEntity(serviceEntity);
-            serviceEntity.getServiceConfigMappings().add(newEntity);
-
-          }
-
-
-          this.desiredConfigs.put(entry.getKey(), entry.getValue().getVersionTag());
-        }
-
-        saveIfPersisted();
-      } finally {
-        readWriteLock.writeLock().unlock();
-      }
-    } finally {
-      clusterGlobalLock.readLock().unlock();
-    }
-  }
-
-  @Override
   public StackId getDesiredStackVersion() {
     clusterGlobalLock.readLock().lock();
     try {
@@ -426,8 +345,6 @@ public class ServiceImpl implements Service {
     } finally {
       clusterGlobalLock.readLock().unlock();
     }
-
-
   }
 
   @Override
@@ -465,7 +382,6 @@ public class ServiceImpl implements Service {
         ServiceResponse r = new ServiceResponse(cluster.getClusterId(),
             cluster.getClusterName(),
             getName(),
-            desiredConfigs,
             getDesiredStackVersion().getStackId(),
             getDesiredState().toString());
         return r;
@@ -493,21 +409,8 @@ public class ServiceImpl implements Service {
             + ", clusterId=" + cluster.getClusterId()
             + ", desiredStackVersion=" + getDesiredStackVersion()
             + ", desiredState=" + getDesiredState().toString()
-            + ", configs=[");
+            + ", components=[ ");
         boolean first = true;
-        if (desiredConfigs != null) {
-          for (Entry<String, String> entry : desiredConfigs.entrySet()) {
-            if (!first) {
-              sb.append(" , ");
-            }
-            first = false;
-            sb.append("{ Config type=" + entry.getKey()
-                + ", versionTag=" + entry.getValue() + "}");
-          }
-        }
-        sb.append("], components=[ ");
-
-        first = true;
         for (ServiceComponent sc : components.values()) {
           if (!first) {
             sb.append(" , ");
@@ -727,8 +630,6 @@ public class ServiceImpl implements Service {
           removeEntities();
           persisted = false;
         }
-
-        desiredConfigs.clear();
       } finally {
         readWriteLock.writeLock().unlock();
       }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/state/State.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/State.java b/ambari-server/src/main/java/org/apache/ambari/server/state/State.java
index e0bc115..91d2a85 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/State.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/State.java
@@ -24,61 +24,55 @@ public enum State {
   /**
    * Initial/Clean state.
    */
-  INIT(0),
+  INIT,
   /**
    * In the process of installing.
    */
-  INSTALLING(1),
+  INSTALLING,
   /**
    * Install failed.
    */
-  INSTALL_FAILED(2),
+  INSTALL_FAILED,
   /**
    * State when install completed successfully.
    */
-  INSTALLED(3),
+  INSTALLED,
   /**
    * In the process of starting.
    */
-  STARTING(4),
+  STARTING,
   /**
    * State when start completed successfully.
    */
-  STARTED(5),
+  STARTED,
   /**
    * In the process of stopping.
    */
-  STOPPING(6),
+  STOPPING,
   /**
    * In the process of uninstalling.
    */
-  UNINSTALLING(7),
+  UNINSTALLING,
   /**
    * State when uninstall completed successfully.
    */
-  UNINSTALLED(8),
+  UNINSTALLED,
   /**
    * In the process of wiping out the install.
    */
-  WIPING_OUT(9),
+  WIPING_OUT,
   /**
    * In the process of upgrading the deployed bits.
    */
-  UPGRADING(10),
+  UPGRADING,
   /**
    * Disabled master's backup state
    */
-  MAINTENANCE(11),
+  MAINTENANCE,
   /**
    * State could not be determined.
    */
-  UNKNOWN(12);
-
-  private final int state;
-
-  private State(int state) {
-    this.state = state;
-  }
+  UNKNOWN;
 
   /**
    * Indicates whether or not it is a valid desired state.
@@ -86,7 +80,7 @@ public enum State {
    * @return true if this is a valid desired state.
    */
   public boolean isValidDesiredState() {
-    switch (State.values()[this.state]) {
+    switch (this) {
       case INIT:
       case INSTALLED:
       case STARTED:
@@ -104,7 +98,7 @@ public enum State {
    * @return true if this is a valid state for a client component.
    */
   public boolean isValidClientComponentState() {
-    switch (State.values()[this.state]) {
+    switch (this) {
       case STARTING:
       case STARTED:
       case STOPPING:
@@ -120,7 +114,7 @@ public enum State {
    * @return true if this is a removable state
    */
   public boolean isRemovableState() {
-    switch (State.values()[this.state]) {
+    switch (this) {
       case INIT:
       case INSTALLING:
       case INSTALLED:
@@ -246,45 +240,4 @@ public enum State {
     }
   }
 
-  /**
-   * Determine whether or not it is safe to update the configuration of the given service
-   * component for the given state.
-   *
-   * @param serviceComponent  the service component
-   * @param desiredState      the desired state
-   *
-   * @throws AmbariException if the changing of configuration is not supported
-   */
-  public static void checkUpdateConfiguration(
-      ServiceComponent serviceComponent,
-      State desiredState)
-      throws AmbariException {
-    for (ServiceComponentHost sch :
-        serviceComponent.getServiceComponentHosts().values()) {
-      checkUpdateConfiguration(sch,
-          sch.getState(), desiredState);
-    }
-  }
-
-  /**
-   * Determine whether or not it is safe to update the configuration of the given service
-   * for the given state.
-   *
-   * @param service       the service
-   * @param desiredState  the desired state
-   *
-   * @throws AmbariException if the changing of configuration is not supported
-   */
-  public static void checkUpdateConfiguration(Service service,
-                                              State desiredState)
-      throws AmbariException {
-    for (ServiceComponent component :
-        service.getServiceComponents().values()) {
-      checkUpdateConfiguration(component,
-          desiredState);
-    }
-  }
-
-
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
index a4897ce..b74a685 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
@@ -18,22 +18,20 @@
 
 package org.apache.ambari.server.state.svccomphost;
 
-import com.google.gson.Gson;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-import com.google.inject.assistedinject.Assisted;
-import com.google.inject.assistedinject.AssistedInject;
-import com.google.inject.persist.Transactional;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.controller.ServiceComponentHostResponse;
-import org.apache.ambari.server.orm.dao.HostComponentConfigMappingDAO;
-import org.apache.ambari.server.orm.dao.HostComponentDesiredConfigMappingDAO;
 import org.apache.ambari.server.orm.dao.HostComponentDesiredStateDAO;
 import org.apache.ambari.server.orm.dao.HostComponentStateDAO;
 import org.apache.ambari.server.orm.dao.HostDAO;
 import org.apache.ambari.server.orm.dao.ServiceComponentDesiredStateDAO;
-import org.apache.ambari.server.orm.entities.HostComponentConfigMappingEntity;
-import org.apache.ambari.server.orm.entities.HostComponentDesiredConfigMappingEntity;
 import org.apache.ambari.server.orm.entities.HostComponentDesiredStateEntity;
 import org.apache.ambari.server.orm.entities.HostComponentDesiredStateEntityPK;
 import org.apache.ambari.server.orm.entities.HostComponentStateEntity;
@@ -43,7 +41,6 @@ import org.apache.ambari.server.orm.entities.ServiceComponentDesiredStateEntity;
 import org.apache.ambari.server.orm.entities.ServiceComponentDesiredStateEntityPK;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
-import org.apache.ambari.server.state.Config;
 import org.apache.ambari.server.state.ConfigHelper;
 import org.apache.ambari.server.state.Host;
 import org.apache.ambari.server.state.HostConfig;
@@ -62,17 +59,12 @@ import org.apache.ambari.server.state.fsm.StateMachineFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
+import com.google.gson.Gson;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.assistedinject.Assisted;
+import com.google.inject.assistedinject.AssistedInject;
+import com.google.inject.persist.Transactional;
 
 public class ServiceComponentHostImpl implements ServiceComponentHost {
 
@@ -103,18 +95,11 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
   @Inject
   Clusters clusters;
   @Inject
-  HostComponentDesiredConfigMappingDAO hostComponentDesiredConfigMappingDAO;
-  @Inject
-  HostComponentConfigMappingDAO hostComponentConfigMappingDAO;
-  @Inject
   ConfigHelper helper;
 
   private HostComponentStateEntity stateEntity;
   private HostComponentDesiredStateEntity desiredStateEntity;
 
-  private Map<String, String> configs;
-  private Map<String, String> desiredConfigs;
-
   private long lastOpStartTime;
   private long lastOpEndTime;
   private long lastOpLastUpdateTime;
@@ -525,15 +510,7 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
       // TODO Audit logs
       // FIXME handle restartOp event
       impl.updateLastOpInfo(event.getType(), event.getOpTimestamp());
-      if (event.getType() == ServiceComponentHostEventType.HOST_SVCCOMP_START) {
-        ServiceComponentHostStartEvent e =
-            (ServiceComponentHostStartEvent) event;
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("Updating live state configs during START event"
-              + ", updated configs set size=" + e.getConfigs().size());
-        }
-        impl.setConfigs(e.getConfigs());
-      } else if (event.getType() ==
+      if (event.getType() ==
           ServiceComponentHostEventType.HOST_SVCCOMP_INSTALL) {
         ServiceComponentHostInstallEvent e =
             (ServiceComponentHostInstallEvent) event;
@@ -652,8 +629,6 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
     }
 
     this.resetLastOpInfo();
-    this.desiredConfigs = new HashMap<String, String>();
-    this.configs = new HashMap<String, String>();
   }
 
   @AssistedInject
@@ -683,14 +658,6 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
       throw new RuntimeException(e);
     }
 
-    desiredConfigs = new HashMap<String, String>();
-    configs = new HashMap<String, String>();
-
-    for (HostComponentDesiredConfigMappingEntity entity : desiredStateEntity.getHostComponentDesiredConfigMappingEntities()) {
-      desiredConfigs.put(entity.getConfigType(), entity.getVersionTag());
-    }
-    // FIXME no configs in live state being persisted in DB??
-
     persisted = true;
   }
 
@@ -953,149 +920,6 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
 
   }
 
-  Map<String, String> getConfigVersions() {
-    clusterGlobalLock.readLock().lock();
-    try {
-      readLock.lock();
-      try {
-        if (this.configs != null) {
-          return Collections.unmodifiableMap(configs);
-        } else {
-          return new HashMap<String, String>();
-        }
-      } finally {
-        readLock.unlock();
-      }
-    } finally {
-      clusterGlobalLock.readLock().unlock();
-    }
-
-
-  }
-
-  @Override
-  public Map<String, Config> getConfigs() throws AmbariException {
-    clusterGlobalLock.readLock().lock();
-    try {
-      readLock.lock();
-      try {
-        Map<String, Config> map = new HashMap<String, Config>();
-        Cluster cluster = clusters.getClusterById(getClusterId());
-        for (Entry<String, String> entry : configs.entrySet()) {
-          Config config = cluster.getConfig(
-              entry.getKey(), entry.getValue());
-          if (null != config) {
-            map.put(entry.getKey(), config);
-          }
-        }
-        return map;
-      } finally {
-        readLock.unlock();
-      }
-    } finally {
-      clusterGlobalLock.readLock().unlock();
-    }
-
-  }
-
-  @Transactional
-  void setConfigs(Map<String, String> configs) {
-    clusterGlobalLock.readLock().lock();
-    try {
-      writeLock.lock();
-      try {
-
-        Set<String> deletedTypes = new HashSet<String>();
-        for (String type : this.configs.keySet()) {
-          if (!configs.containsKey(type)) {
-            deletedTypes.add(type);
-          }
-        }
-
-        long now = Long.valueOf(new Date().getTime());
-
-        for (Entry<String, String> entry : configs.entrySet()) {
-
-          boolean contains = false;
-          for (HostComponentConfigMappingEntity mappingEntity : stateEntity.getHostComponentConfigMappingEntities()) {
-            if (entry.getKey().equals(mappingEntity.getConfigType())) {
-              if (LOG.isDebugEnabled()) {
-                LOG.debug("Updating live config to ServiceComponentHost"
-                    + ", clusterId=" + stateEntity.getClusterId()
-                    + ", serviceName=" + stateEntity.getServiceName()
-                    + ", componentName=" + stateEntity.getComponentName()
-                    + ", hostname=" + stateEntity.getHostName()
-                    + ", configType=" + entry.getKey()
-                    + ", configVersionTag=" + entry.getValue());
-              }
-              contains = true;
-              mappingEntity.setVersionTag(entry.getValue());
-              mappingEntity.setTimestamp(now);
-              hostComponentConfigMappingDAO.merge(mappingEntity);
-              break;
-            }
-          }
-
-          if (!contains) {
-            HostComponentConfigMappingEntity newEntity =
-                new HostComponentConfigMappingEntity();
-            newEntity.setClusterId(stateEntity.getClusterId());
-            newEntity.setServiceName(stateEntity.getServiceName());
-            newEntity.setComponentName(stateEntity.getComponentName());
-            newEntity.setHostName(stateEntity.getHostName());
-            newEntity.setConfigType(entry.getKey());
-            newEntity.setVersionTag(entry.getValue());
-            newEntity.setTimestamp(now);
-
-            if (LOG.isDebugEnabled()) {
-              LOG.debug("Adding new live config to ServiceComponentHost"
-                  + ", clusterId=" + stateEntity.getClusterId()
-                  + ", serviceName=" + stateEntity.getServiceName()
-                  + ", componentName=" + stateEntity.getComponentName()
-                  + ", hostname=" + stateEntity.getHostName()
-                  + ", configType=" + entry.getKey()
-                  + ", configVersionTag=" + entry.getValue());
-            }
-            stateEntity.getHostComponentConfigMappingEntities().add(newEntity);
-            newEntity.setHostComponentStateEntity(stateEntity);
-            hostComponentConfigMappingDAO.create(newEntity);
-          }
-        }
-
-        if (!deletedTypes.isEmpty()) {
-          List<HostComponentConfigMappingEntity> deleteEntities =
-              hostComponentConfigMappingDAO.findByHostComponentAndType(
-                  stateEntity.getClusterId(), stateEntity.getServiceName(),
-                  stateEntity.getComponentName(),
-                  stateEntity.getHostName(), deletedTypes);
-          for (HostComponentConfigMappingEntity deleteEntity : deleteEntities) {
-            if (LOG.isDebugEnabled()) {
-              LOG.debug("Deleting live config to ServiceComponentHost"
-                  + ", clusterId=" + stateEntity.getClusterId()
-                  + ", serviceName=" + stateEntity.getServiceName()
-                  + ", componentName=" + stateEntity.getComponentName()
-                  + ", hostname=" + stateEntity.getHostName()
-                  + ", configType=" + deleteEntity.getConfigType()
-                  + ", configVersionTag=" + deleteEntity.getVersionTag());
-            }
-            stateEntity.getHostComponentConfigMappingEntities().remove(
-                deleteEntity);
-            if (persisted) {
-              hostComponentConfigMappingDAO.remove(deleteEntity);
-            }
-          }
-        }
-        this.configs = configs;
-        saveIfPersisted();
-      } finally {
-        writeLock.unlock();
-      }
-    } finally {
-      clusterGlobalLock.readLock().unlock();
-    }
-
-  }
-
   @Override
   public StackId getStackVersion() {
     clusterGlobalLock.readLock().lock();
@@ -1160,112 +984,6 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
     } finally {
       clusterGlobalLock.readLock().unlock();
     }
-
-  }
-
-  @Override
-  public Map<String, String> getDesiredConfigVersionsRecursive() {
-    clusterGlobalLock.readLock().lock();
-    try {
-      readLock.lock();
-      try {
-        Map<String, String> fullDesiredConfigVersions =
-            new HashMap<String, String>();
-        Map<String, Config> desiredConfs = getDesiredConfigs();
-        for (Config c : desiredConfs.values()) {
-          fullDesiredConfigVersions.put(c.getType(), c.getVersionTag());
-        }
-        return fullDesiredConfigVersions;
-      } finally {
-        readLock.unlock();
-      }
-    } finally {
-      clusterGlobalLock.readLock().unlock();
-    }
-
-  }
-
-
-  @Override
-  public Map<String, Config> getDesiredConfigs() {
-    clusterGlobalLock.readLock().lock();
-    try {
-      Map<String, Config> map = new HashMap<String, Config>();
-      readLock.lock();
-      try {
-        for (Entry<String, String> entry : desiredConfigs.entrySet()) {
-          Config config = clusters.getClusterById(getClusterId()).getConfig(
-              entry.getKey(), entry.getValue());
-          if (null != config) {
-            map.put(entry.getKey(), config);
-          }
-        }
-      } catch (AmbariException e) {
-        // TODO do something
-        return null;
-      } finally {
-        readLock.unlock();
-      }
-      // do a union with component level configs
-      Map<String, Config> compConfigs = serviceComponent.getDesiredConfigs();
-      for (Entry<String, Config> entry : compConfigs.entrySet()) {
-        if (!map.containsKey(entry.getKey())) {
-          map.put(entry.getKey(), entry.getValue());
-        }
-      }
-      return Collections.unmodifiableMap(map);
-    } finally {
-      clusterGlobalLock.readLock().unlock();
-    }
-
-  }
-
-  @Override
-  @Transactional
-  public void updateDesiredConfigs(Map<String, Config> configs) {
-    clusterGlobalLock.readLock().lock();
-    try {
-      writeLock.lock();
-      try {
-
-        for (Entry<String, Config> entry : configs.entrySet()) {
-
-          boolean contains = false;
-          for (HostComponentDesiredConfigMappingEntity desiredConfigMappingEntity : desiredStateEntity.getHostComponentDesiredConfigMappingEntities()) {
-            if (entry.getKey().equals(desiredConfigMappingEntity.getConfigType())) {
-              contains = true;
-              desiredConfigMappingEntity.setVersionTag(entry.getValue().getVersionTag());
-              desiredConfigMappingEntity.setTimestamp(new Date().getTime());
-              hostComponentDesiredConfigMappingDAO.merge(desiredConfigMappingEntity);
-              break;
-            }
-          }
-
-          if (!contains) {
-            HostComponentDesiredConfigMappingEntity newEntity = new HostComponentDesiredConfigMappingEntity();
-            newEntity.setClusterId(desiredStateEntity.getClusterId());
-            newEntity.setServiceName(desiredStateEntity.getServiceName());
-            newEntity.setComponentName(desiredStateEntity.getComponentName());
-            newEntity.setHostName(desiredStateEntity.getHostName());
-            newEntity.setConfigType(entry.getKey());
-            newEntity.setVersionTag(entry.getValue().getVersionTag());
-            newEntity.setTimestamp(new Date().getTime());
-            newEntity.setHostComponentDesiredStateEntity(desiredStateEntity);
-            desiredStateEntity.getHostComponentDesiredConfigMappingEntities().add(newEntity);
-            hostComponentDesiredConfigMappingDAO.create(newEntity);
-          }
-
-          this.desiredConfigs.put(entry.getKey(), entry.getValue().getVersionTag());
-        }
-
-        saveIfPersisted();
-      } finally {
-        writeLock.unlock();
-      }
-    } finally {
-      clusterGlobalLock.readLock().unlock();
-    }
-
   }
 
   @Override
@@ -1312,8 +1030,6 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
             serviceComponent.getServiceName(),
             serviceComponent.getName(),
             getHostName(),
-            configs,
-            desiredConfigs,
             getState().toString(),
             getStackVersion().getStackId(),
             getDesiredState().toString(),
@@ -1502,25 +1218,6 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
   }
 
   @Override
-  public void deleteDesiredConfigs(Set<String> configTypes) {
-    clusterGlobalLock.readLock().lock();
-    try {
-      writeLock.lock();
-      try {
-        hostComponentDesiredConfigMappingDAO.removeByType(configTypes);
-        for (String configType : configTypes) {
-          desiredConfigs.remove(configType);
-        }
-      } finally {
-        writeLock.unlock();
-      }
-    } finally {
-      clusterGlobalLock.readLock().unlock();
-    }
-
-  }
-
-  @Override
   public void delete() {
     clusterGlobalLock.writeLock().lock();
     try {
@@ -1531,7 +1228,6 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
           persisted = false;
         }
         clusters.getCluster(this.getClusterName()).removeServiceComponentHost(this);
-        desiredConfigs.clear();
       } catch (AmbariException ex) {
         if (LOG.isDebugEnabled()) {
           LOG.error(ex.getMessage());

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostStartEvent.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostStartEvent.java b/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostStartEvent.java
index 84febf8..c63fb45 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostStartEvent.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostStartEvent.java
@@ -18,8 +18,6 @@
 
 package org.apache.ambari.server.state.svccomphost;
 
-import java.util.Map;
-
 import org.apache.ambari.server.state.ServiceComponentHostEvent;
 import org.apache.ambari.server.state.ServiceComponentHostEventType;
 
@@ -27,9 +25,9 @@ public class ServiceComponentHostStartEvent extends
     ServiceComponentHostEvent {
 
   public ServiceComponentHostStartEvent(String serviceComponentName,
-      String hostName, long opTimestamp, Map<String, String> configs) {
+      String hostName, long opTimestamp) {
     super(ServiceComponentHostEventType.HOST_SVCCOMP_START,
-        serviceComponentName, hostName, opTimestamp, configs);
+        serviceComponentName, hostName, opTimestamp);
     // TODO Auto-generated constructor stub
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/471403cd/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
index 9369561..1767ff9 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
@@ -30,15 +30,11 @@ CREATE TABLE clusters (cluster_id BIGINT NOT NULL, cluster_info VARCHAR(255) NOT
 CREATE TABLE clusterconfig (version_tag VARCHAR(255) NOT NULL, type_name VARCHAR(255) NOT NULL, cluster_id BIGINT NOT NULL, config_data LONGTEXT NOT NULL, create_timestamp BIGINT NOT NULL, PRIMARY KEY (version_tag, type_name, cluster_id));
 CREATE TABLE clusterservices (service_name VARCHAR(255) NOT NULL, cluster_id BIGINT NOT NULL, service_enabled INTEGER NOT NULL, PRIMARY KEY (service_name, cluster_id));
 CREATE TABLE clusterstate (cluster_id BIGINT NOT NULL, current_cluster_state VARCHAR(255) NOT NULL, current_stack_version VARCHAR(255) NOT NULL, PRIMARY KEY (cluster_id));
-CREATE TABLE componentconfigmapping (config_type VARCHAR(255) NOT NULL, cluster_id BIGINT NOT NULL, component_name VARCHAR(255) NOT NULL, config_tag VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, timestamp BIGINT NOT NULL, PRIMARY KEY (config_type, cluster_id, component_name, service_name));
-CREATE TABLE hostcomponentconfigmapping (config_type VARCHAR(255) NOT NULL, cluster_id BIGINT NOT NULL, component_name VARCHAR(255) NOT NULL, config_tag VARCHAR(255) NOT NULL, host_name VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, timestamp BIGINT NOT NULL, PRIMARY KEY (config_type, cluster_id, component_name, host_name, service_name));
-CREATE TABLE hcdesiredconfigmapping (config_type VARCHAR(255) NOT NULL, cluster_id BIGINT NOT NULL, component_name VARCHAR(255) NOT NULL, config_tag VARCHAR(255) NOT NULL, host_name VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, timestamp BIGINT NOT NULL, PRIMARY KEY (config_type, cluster_id, component_name, host_name, service_name));
 CREATE TABLE hostcomponentdesiredstate (cluster_id BIGINT NOT NULL, component_name VARCHAR(255) NOT NULL, desired_stack_version VARCHAR(255) NOT NULL, desired_state VARCHAR(255) NOT NULL, host_name VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, PRIMARY KEY (cluster_id, component_name, host_name, service_name));
 CREATE TABLE hostcomponentstate (cluster_id BIGINT NOT NULL, component_name VARCHAR(255) NOT NULL, current_stack_version VARCHAR(255) NOT NULL, current_state VARCHAR(255) NOT NULL, host_name VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, PRIMARY KEY (cluster_id, component_name, host_name, service_name));
 CREATE TABLE hosts (host_name VARCHAR(255) NOT NULL, cpu_count INTEGER NOT NULL, cpu_info VARCHAR(255) NOT NULL, discovery_status VARCHAR(2000) NOT NULL, disks_info LONGTEXT NOT NULL, host_attributes LONGTEXT, ipv4 VARCHAR(255), ipv6 VARCHAR(255), last_registration_time BIGINT NOT NULL, os_arch VARCHAR(255) NOT NULL, os_info VARCHAR(1000) NOT NULL, os_type VARCHAR(255) NOT NULL, ph_cpu_count INTEGER NOT NULL, public_host_name VARCHAR(255), rack_info VARCHAR(255) NOT NULL, total_mem BIGINT NOT NULL, PRIMARY KEY (host_name));
 CREATE TABLE hoststate (agent_version VARCHAR(255) NOT NULL, available_mem BIGINT NOT NULL, current_state VARCHAR(255) NOT NULL, health_status VARCHAR(255), host_name VARCHAR(255) NOT NULL, time_in_state BIGINT NOT NULL, PRIMARY KEY (host_name));
 CREATE TABLE servicecomponentdesiredstate (component_name VARCHAR(255) NOT NULL, cluster_id BIGINT NOT NULL, desired_stack_version VARCHAR(255) NOT NULL, desired_state VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, PRIMARY KEY (component_name, cluster_id, service_name));
-CREATE TABLE serviceconfigmapping (config_type VARCHAR(255) NOT NULL, cluster_id BIGINT NOT NULL, config_tag VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, timestamp BIGINT NOT NULL, PRIMARY KEY (config_type, cluster_id, service_name));
 CREATE TABLE servicedesiredstate (cluster_id BIGINT NOT NULL, desired_host_role_mapping INTEGER NOT NULL, desired_stack_version VARCHAR(255) NOT NULL, desired_state VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, PRIMARY KEY (cluster_id, service_name));
 CREATE TABLE roles (role_name VARCHAR(255) NOT NULL, PRIMARY KEY (role_name));
 CREATE TABLE users (user_id INTEGER NOT NULL, create_time TIMESTAMP DEFAULT NOW(), ldap_user INTEGER NOT NULL DEFAULT 0, user_name VARCHAR(255), user_password VARCHAR(255), PRIMARY KEY (user_id));
@@ -59,20 +55,12 @@ ALTER TABLE users ADD CONSTRAINT UNQ_users_0 UNIQUE (user_name, ldap_user);
 ALTER TABLE clusterconfig ADD CONSTRAINT FK_clusterconfig_cluster_id FOREIGN KEY (cluster_id) REFERENCES clusters (cluster_id);
 ALTER TABLE clusterservices ADD CONSTRAINT FK_clusterservices_cluster_id FOREIGN KEY (cluster_id) REFERENCES clusters (cluster_id);
 ALTER TABLE clusterstate ADD CONSTRAINT FK_clusterstate_cluster_id FOREIGN KEY (cluster_id) REFERENCES clusters (cluster_id);
-ALTER TABLE componentconfigmapping ADD CONSTRAINT FK_componentconfigmapping_config_tag FOREIGN KEY (config_tag, config_type, cluster_id) REFERENCES clusterconfig (version_tag, type_name, cluster_id);
-ALTER TABLE componentconfigmapping ADD CONSTRAINT FK_componentconfigmapping_component_name FOREIGN KEY (component_name, cluster_id, service_name) REFERENCES servicecomponentdesiredstate (component_name, cluster_id, service_name);
-ALTER TABLE hostcomponentconfigmapping ADD CONSTRAINT FK_hostcomponentconfigmapping_config_tag FOREIGN KEY (config_tag, config_type, cluster_id) REFERENCES clusterconfig (version_tag, type_name, cluster_id);
-ALTER TABLE hostcomponentconfigmapping ADD CONSTRAINT FK_hostcomponentconfigmapping_cluster_id FOREIGN KEY (cluster_id, component_name, host_name, service_name) REFERENCES hostcomponentstate (cluster_id, component_name, host_name, service_name);
-ALTER TABLE hcdesiredconfigmapping ADD CONSTRAINT FK_hcdesiredconfigmapping_config_tag FOREIGN KEY (config_tag, config_type, cluster_id) REFERENCES clusterconfig (version_tag, type_name, cluster_id);
-ALTER TABLE hcdesiredconfigmapping ADD CONSTRAINT FK_hcdesiredconfigmapping_cluster_id FOREIGN KEY (cluster_id, component_name, host_name, service_name) REFERENCES hostcomponentdesiredstate (cluster_id, component_name, host_name, service_name);
 ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT FK_hostcomponentdesiredstate_host_name FOREIGN KEY (host_name) REFERENCES hosts (host_name);
 ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT FK_hostcomponentdesiredstate_component_name FOREIGN KEY (component_name, cluster_id, service_name) REFERENCES servicecomponentdesiredstate (component_name, cluster_id, service_name);
 ALTER TABLE hostcomponentstate ADD CONSTRAINT FK_hostcomponentstate_component_name FOREIGN KEY (component_name, cluster_id, service_name) REFERENCES servicecomponentdesiredstate (component_name, cluster_id, service_name);
 ALTER TABLE hostcomponentstate ADD CONSTRAINT FK_hostcomponentstate_host_name FOREIGN KEY (host_name) REFERENCES hosts (host_name);
 ALTER TABLE hoststate ADD CONSTRAINT FK_hoststate_host_name FOREIGN KEY (host_name) REFERENCES hosts (host_name);
 ALTER TABLE servicecomponentdesiredstate ADD CONSTRAINT FK_servicecomponentdesiredstate_service_name FOREIGN KEY (service_name, cluster_id) REFERENCES clusterservices (service_name, cluster_id);
-ALTER TABLE serviceconfigmapping ADD CONSTRAINT FK_serviceconfigmapping_config_tag FOREIGN KEY (config_tag, config_type, cluster_id) REFERENCES clusterconfig (version_tag, type_name, cluster_id);
-ALTER TABLE serviceconfigmapping ADD CONSTRAINT FK_serviceconfigmapping_service_name FOREIGN KEY (service_name, cluster_id) REFERENCES clusterservices (service_name, cluster_id);
 ALTER TABLE servicedesiredstate ADD CONSTRAINT FK_servicedesiredstate_service_name FOREIGN KEY (service_name, cluster_id) REFERENCES clusterservices (service_name, cluster_id);
 ALTER TABLE execution_command ADD CONSTRAINT FK_execution_command_task_id FOREIGN KEY (task_id) REFERENCES host_role_command (task_id);
 ALTER TABLE host_role_command ADD CONSTRAINT FK_host_role_command_stage_id FOREIGN KEY (stage_id, request_id) REFERENCES stage (stage_id, request_id);


Mime
View raw message