You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2016/10/31 15:20:22 UTC
ambari git commit: Revert "AMBARI-18711: Ambari-server: DB changes to
enable/disable credential store support". Reason: Add Upgrade Catalog to this
change.
Repository: ambari
Updated Branches:
refs/heads/trunk 40637b167 -> 59430dccc
Revert "AMBARI-18711: Ambari-server: DB changes to enable/disable credential store support". Reason: Add Upgrade Catalog to this change.
This reverts commit edc74e6f2a6375064c5a49bef709c24546f09932.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/59430dcc
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/59430dcc
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/59430dcc
Branch: refs/heads/trunk
Commit: 59430dccc51490d0868b87f6cc63e970947e182a
Parents: 40637b1
Author: Nahappan Somasundaram <ns...@hortonworks.com>
Authored: Mon Oct 31 08:18:29 2016 -0700
Committer: Nahappan Somasundaram <ns...@hortonworks.com>
Committed: Mon Oct 31 08:18:59 2016 -0700
----------------------------------------------------------------------
.../orm/entities/ServiceDesiredStateEntity.java | 22 -----
.../org/apache/ambari/server/state/Service.java | 31 -------
.../apache/ambari/server/state/ServiceImpl.java | 95 --------------------
.../main/resources/Ambari-DDL-Derby-CREATE.sql | 2 -
.../main/resources/Ambari-DDL-MySQL-CREATE.sql | 2 -
.../main/resources/Ambari-DDL-Oracle-CREATE.sql | 2 -
.../resources/Ambari-DDL-Postgres-CREATE.sql | 2 -
.../resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 2 -
.../resources/Ambari-DDL-SQLServer-CREATE.sql | 2 -
9 files changed, 160 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/59430dcc/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java
index f2ed50f..6cb3dde 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java
@@ -67,12 +67,6 @@ public class ServiceDesiredStateEntity {
@Enumerated(value = EnumType.STRING)
private SecurityState securityState = SecurityState.UNSECURED;
- @Column(name = "credential_store_supported", nullable = false, insertable = true, updatable = true)
- private Short credentialStoreSupported = 0;
-
- @Column(name = "credential_store_enabled", nullable = false, insertable = true, updatable = true)
- private Short credentialStoreEnabled = 0;
-
@OneToOne
@javax.persistence.JoinColumns(
{
@@ -137,22 +131,6 @@ public class ServiceDesiredStateEntity {
this.securityState = securityState;
}
- public boolean isCredentialStoreSupported() {
- return credentialStoreSupported != 0;
- }
-
- public void setCredentialStoreSupported(boolean credentialStoreSupported) {
- this.credentialStoreSupported = (short)((credentialStoreSupported == false) ? 0 : 1);
- }
-
- public boolean isCredentialStoreEnabled() {
- return credentialStoreEnabled != 0;
- }
-
- public void setCredentialStoreEnabled(boolean credentialStoreEnabled) {
- this.credentialStoreEnabled = (short)((credentialStoreEnabled == false) ? 0 : 1);
- }
-
@Override
public boolean equals(Object o) {
if (this == o) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/59430dcc/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 cf36a8b..df3cfd8 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
@@ -102,37 +102,6 @@ public interface Service {
*/
MaintenanceState getMaintenanceState();
- /**
- * Get a true or false value specifying
- * whether credential store is supported by this service.
- * @return true or false
- */
- boolean isCredentialStoreSupported();
-
- /**
- * Set a true or false value specifying if this
- * service supports credential store.
- *
- * @param credentialStoreSupported - true or false
- */
- void setCredentialStoreSupported(boolean credentialStoreSupported);
-
- /**
- * Get a true or false value specifying whether
- * credential store use is enabled for this service.
- *
- * @return true or false
- */
- boolean isCredentialStoreEnabled();
-
- /**
- * Set a true or false value specifying whether this
- * service is to be enabled for credential store use.
- *
- * @param credentialStoreEnabled - true or false
- */
- void setCredentialStoreEnabled(boolean credentialStoreEnabled);
-
enum Type {
HDFS,
GLUSTERFS,
http://git-wip-us.apache.org/repos/asf/ambari/blob/59430dcc/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 6f8d306..9b56059 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
@@ -318,101 +318,6 @@ public class ServiceImpl implements Service {
return cluster;
}
- /**
- * Get a true or false value specifying whether
- * credential store is supported by this service.
- *
- * @return true or false
- */
- @Override
- public boolean isCredentialStoreSupported() {
- ServiceDesiredStateEntity desiredStateEntity = getServiceDesiredStateEntity();
-
- if (desiredStateEntity != null) {
- return desiredStateEntity.isCredentialStoreSupported();
- } else {
- LOG.warn("Trying to fetch a member from an entity object that may " +
- "have been previously deleted, serviceName = " + getName());
- }
- return false;
- }
-
-
- /**
- * Set a true or false value specifying whether this
- * service supports credential store.
- *
- * @param credentialStoreSupported - true or false
- */
- @Override
- public void setCredentialStoreSupported(boolean credentialStoreSupported) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Setting CredentialStoreEnabled of Service" + ", clusterName="
- + cluster.getClusterName() + ", clusterId="
- + cluster.getClusterId() + ", serviceName=" + getName()
- + ", oldCredentialStoreSupported=" + isCredentialStoreSupported()
- + ", newCredentialStoreSupported=" + credentialStoreSupported);
- }
-
- ServiceDesiredStateEntity desiredStateEntity = getServiceDesiredStateEntity();
-
- if (desiredStateEntity != null) {
- desiredStateEntity.setCredentialStoreSupported(credentialStoreSupported);
- serviceDesiredStateDAO.merge(desiredStateEntity);
-
- } else {
- LOG.warn("Setting a member on an entity object that may have been "
- + "previously deleted, serviceName = " + getName());
- }
- }
-
- /**
- * Get a true or false value specifying whether
- * credential store use is enabled for this service.
- *
- * @return true or false
- */
- @Override
- public boolean isCredentialStoreEnabled() {
- ServiceDesiredStateEntity desiredStateEntity = getServiceDesiredStateEntity();
-
- if (desiredStateEntity != null) {
- return desiredStateEntity.isCredentialStoreEnabled();
- } else {
- LOG.warn("Trying to fetch a member from an entity object that may " +
- "have been previously deleted, serviceName = " + getName());
- }
- return false;
- }
-
-
- /**
- * Set a true or false value specifying whether this
- * service is to be enabled for credential store use.
- *
- * @param credentialStoreEnabled - true or false
- */
- @Override
- public void setCredentialStoreEnabled(boolean credentialStoreEnabled) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Setting CredentialStoreEnabled of Service" + ", clusterName="
- + cluster.getClusterName() + ", clusterId="
- + cluster.getClusterId() + ", serviceName=" + getName()
- + ", oldCredentialStoreEnabled=" + isCredentialStoreEnabled()
- + ", newCredentialStoreEnabled=" + credentialStoreEnabled);
- }
-
- ServiceDesiredStateEntity desiredStateEntity = getServiceDesiredStateEntity();
-
- if (desiredStateEntity != null) {
- desiredStateEntity.setCredentialStoreEnabled(credentialStoreEnabled);
- desiredStateEntity = serviceDesiredStateDAO.merge(desiredStateEntity);
- } else {
- LOG.warn("Setting a member on an entity object that may have been "
- + "previously deleted, serviceName = " + getName());
- }
- }
-
@Override
public void debugDump(StringBuilder sb) {
sb.append("Service={ serviceName=" + getName() + ", clusterName=" + cluster.getClusterName()
http://git-wip-us.apache.org/repos/asf/ambari/blob/59430dcc/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
index 8cf2c0d..a0a0afd 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
@@ -259,8 +259,6 @@ CREATE TABLE servicedesiredstate (
service_name VARCHAR(255) NOT NULL,
maintenance_state VARCHAR(32) NOT NULL,
security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED',
- credential_store_supported SMALLINT NOT NULL DEFAULT 0,
- credential_store_enabled SMALLINT NOT NULL DEFAULT 0,
CONSTRAINT PK_servicedesiredstate PRIMARY KEY (cluster_id, service_name),
CONSTRAINT FK_sds_desired_stack_id FOREIGN KEY (desired_stack_id) REFERENCES stack(stack_id),
CONSTRAINT servicedesiredstateservicename FOREIGN KEY (service_name, cluster_id) REFERENCES clusterservices (service_name, cluster_id));
http://git-wip-us.apache.org/repos/asf/ambari/blob/59430dcc/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 37a9757..7a02315 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
@@ -259,8 +259,6 @@ CREATE TABLE servicedesiredstate (
service_name VARCHAR(255) NOT NULL,
maintenance_state VARCHAR(32) NOT NULL DEFAULT 'ACTIVE',
security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED',
- credential_store_supported SMALLINT NOT NULL DEFAULT 0,
- credential_store_enabled SMALLINT NOT NULL DEFAULT 0,
CONSTRAINT PK_servicedesiredstate PRIMARY KEY (cluster_id, service_name),
CONSTRAINT FK_sds_desired_stack_id FOREIGN KEY (desired_stack_id) REFERENCES stack(stack_id),
CONSTRAINT servicedesiredstateservicename FOREIGN KEY (service_name, cluster_id) REFERENCES clusterservices (service_name, cluster_id));
http://git-wip-us.apache.org/repos/asf/ambari/blob/59430dcc/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
index 2507b45..4ba371a 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
@@ -250,8 +250,6 @@ CREATE TABLE servicedesiredstate (
service_name VARCHAR2(255) NOT NULL,
maintenance_state VARCHAR2(32) NOT NULL,
security_state VARCHAR2(32) DEFAULT 'UNSECURED' NOT NULL,
- credential_store_supported SMALLINT DEFAULT 0 NOT NULL,
- credential_store_enabled SMALLINT DEFAULT 0 NOT NULL,
CONSTRAINT PK_servicedesiredstate PRIMARY KEY (cluster_id, service_name),
CONSTRAINT FK_sds_desired_stack_id FOREIGN KEY (desired_stack_id) REFERENCES stack(stack_id),
CONSTRAINT servicedesiredstateservicename FOREIGN KEY (service_name, cluster_id) REFERENCES clusterservices (service_name, cluster_id));
http://git-wip-us.apache.org/repos/asf/ambari/blob/59430dcc/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
index 5a82a52..c5a9119 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
@@ -259,8 +259,6 @@ CREATE TABLE servicedesiredstate (
service_name VARCHAR(255) NOT NULL,
maintenance_state VARCHAR(32) NOT NULL,
security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED',
- credential_store_supported SMALLINT NOT NULL DEFAULT 0,
- credential_store_enabled SMALLINT NOT NULL DEFAULT 0,
CONSTRAINT PK_servicedesiredstate PRIMARY KEY (cluster_id, service_name),
CONSTRAINT FK_sds_desired_stack_id FOREIGN KEY (desired_stack_id) REFERENCES stack(stack_id),
CONSTRAINT servicedesiredstateservicename FOREIGN KEY (service_name, cluster_id) REFERENCES clusterservices (service_name, cluster_id));
http://git-wip-us.apache.org/repos/asf/ambari/blob/59430dcc/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
index 659e4dc..2905eda 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
@@ -248,8 +248,6 @@ CREATE TABLE servicedesiredstate (
service_name VARCHAR(255) NOT NULL,
maintenance_state VARCHAR(32) NOT NULL DEFAULT 'ACTIVE',
security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED',
- credential_store_supported SMALLINT NOT NULL DEFAULT 0,
- credential_store_enabled SMALLINT NOT NULL DEFAULT 0,
CONSTRAINT PK_servicedesiredstate PRIMARY KEY (cluster_id, service_name),
CONSTRAINT FK_sds_desired_stack_id FOREIGN KEY (desired_stack_id) REFERENCES stack(stack_id),
CONSTRAINT servicedesiredstateservicename FOREIGN KEY (service_name, cluster_id) REFERENCES clusterservices (service_name, cluster_id));
http://git-wip-us.apache.org/repos/asf/ambari/blob/59430dcc/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
index e9a258a..6b19974 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
@@ -262,8 +262,6 @@ CREATE TABLE servicedesiredstate (
service_name VARCHAR(255) NOT NULL,
maintenance_state VARCHAR(32) NOT NULL,
security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED',
- credential_store_supported SMALLINT NOT NULL DEFAULT 0,
- credential_store_enabled SMALLINT NOT NULL DEFAULT 0,
CONSTRAINT PK_servicedesiredstate PRIMARY KEY CLUSTERED (cluster_id,service_name),
CONSTRAINT FK_sds_desired_stack_id FOREIGN KEY (desired_stack_id) REFERENCES stack(stack_id),
CONSTRAINT servicedesiredstateservicename FOREIGN KEY (service_name, cluster_id) REFERENCES clusterservices (service_name, cluster_id));