ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject ambari git commit: AMBARI-14164. Downgrade could not save cluster state to remove configs (ncole)
Date Thu, 03 Dec 2015 00:34:35 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk c7c5a1b98 -> cf867cfd8


AMBARI-14164. Downgrade could not save cluster state to remove configs (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cf867cfd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cf867cfd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cf867cfd

Branch: refs/heads/trunk
Commit: cf867cfd8b535dfe564adf67ee00592a4cd2387f
Parents: c7c5a1b
Author: Nate Cole <ncole@hortonworks.com>
Authored: Wed Dec 2 16:58:56 2015 -0500
Committer: Nate Cole <ncole@hortonworks.com>
Committed: Wed Dec 2 17:46:54 2015 -0500

----------------------------------------------------------------------
 .../server/orm/entities/ClusterConfigEntity.java  | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cf867cfd/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
index f28cc02..ceefa60 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
@@ -202,16 +202,19 @@ public class ClusterConfigEntity {
 
     ClusterConfigEntity that = (ClusterConfigEntity) o;
 
+    if (configId != null ? !configId.equals(that.configId) : that.configId != null) {
+      return false;
+    }
+
     if (clusterId != null ? !clusterId.equals(that.clusterId) : that.clusterId != null) {
       return false;
     }
 
-    if (configJson != null ? !configJson.equals(that.configJson) : that.configJson != null)
{
+    if (type != null ? !type.equals(that.type) : that.type != null) {
       return false;
     }
 
-    if (configAttributesJson != null ? !configAttributesJson
-      .equals(that.configAttributesJson) : that.configAttributesJson != null) {
+    if (tag != null ? !tag.equals(that.tag) : that.tag != null) {
       return false;
     }
 
@@ -220,14 +223,17 @@ public class ClusterConfigEntity {
     }
 
     return true;
+
   }
 
   @Override
   public int hashCode() {
-    int result = clusterId != null ? clusterId.intValue() : 0;
-    result = 31 * result + (configJson != null ? configJson.hashCode() : 0);
-    result = 31 * result + (configAttributesJson != null ? configAttributesJson.hashCode()
: 0);
+    int result = configId != null ? configId.intValue() : 0;
+    result = 31 * result + (clusterId != null ? clusterId.intValue() : 0);
+    result = 31 * result + (type != null ? type.hashCode() : 0);
+    result = 31 * result + (tag != null ? tag.hashCode() : 0);
     result = 31 * result + (stack != null ? stack.hashCode() : 0);
+
     return result;
   }
 


Mime
View raw message