ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject git commit: Revert "AMBARI-5515. Caputre all Hive properties in the stack definition. Accidental Files committed with no changes. (swagle)"
Date Thu, 01 May 2014 00:35:42 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.6.0 f08b3c4a3 -> 05f2c36d4


Revert "AMBARI-5515. Caputre all Hive properties in the stack definition. Accidental Files
committed with no changes. (swagle)"

This reverts commit f08b3c4a3fd0061ff49eb256c9afe81366cf44a6.


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

Branch: refs/heads/branch-1.6.0
Commit: 05f2c36d4839871213cc78a063b6a558c5035d00
Parents: f08b3c4
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Wed Apr 30 17:34:53 2014 -0700
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Wed Apr 30 17:34:53 2014 -0700

----------------------------------------------------------------------
 .../server/api/services/AmbariMetaInfo.java     | 38 ++++--------
 .../server/api/util/StackExtensionHelper.java   | 24 +-------
 .../ambari/server/controller/AmbariServer.java  |  3 +-
 .../controller/StackConfigurationResponse.java  | 62 +-------------------
 .../internal/ClusterResourceProvider.java       | 28 ++++-----
 .../ambari/server/state/PropertyInfo.java       | 30 +---------
 .../services/HIVE/configuration/global.xml      |  8 +--
 .../services/HIVE/configuration/hive-site.xml   |  5 +-
 .../services/HIVE/configuration/global.xml      |  8 +--
 .../services/HIVE/configuration/hive-site.xml   |  5 +-
 .../services/NAGIOS/configuration/global.xml    |  3 +-
 .../services/HIVE/configuration/hive-site.xml   |  7 +--
 .../server/api/services/AmbariMetaInfoTest.java | 17 ------
 .../internal/BlueprintResourceProviderTest.java | 23 ++------
 .../services/HIVE/configuration/hive-site.xml   |  3 +-
 15 files changed, 47 insertions(+), 217 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
index 61e2954..5fef43a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
@@ -55,7 +55,6 @@ import org.apache.ambari.server.state.PropertyInfo;
 import org.apache.ambari.server.state.RepositoryInfo;
 import org.apache.ambari.server.state.ServiceInfo;
 import org.apache.ambari.server.state.Stack;
-import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.StackInfo;
 import org.apache.ambari.server.state.stack.LatestRepoCallable;
 import org.apache.ambari.server.state.stack.MetricDefinition;
@@ -125,9 +124,6 @@ public class AmbariMetaInfo {
   private File customActionRoot;
   @Inject
   private MetainfoDAO metainfoDAO;
-  // Required properties by stack version
-  private final Map<StackId, Map<String, PropertyInfo>> requiredProperties =
-    new HashMap<StackId, Map<String, PropertyInfo>>();
 
   /**
    * Ambari Meta Info Object
@@ -165,10 +161,10 @@ public class AmbariMetaInfo {
   /**
    * Get component category
    *
-   * @param stackName     stack name
-   * @param version       stack version
-   * @param serviceName   service name
-   * @param componentName component name
+   * @param stackName
+   * @param version
+   * @param serviceName
+   * @param componentName
    * @return component component Info
    * @throws AmbariException
    */
@@ -189,10 +185,10 @@ public class AmbariMetaInfo {
   /**
    * Get components by service
    *
-   * @param stackName     stack name
-   * @param version       stack version
-   * @param serviceName   service name
-   * @return List of ComponentInfo objects
+   * @param stackName
+   * @param version
+   * @param serviceName
+   * @return
    * @throws AmbariException
    */
   public List<ComponentInfo> getComponentsByService(String stackName, String version,
String serviceName)
@@ -760,7 +756,8 @@ public class AmbariMetaInfo {
         + " should be a directory with stack"
         + ", stackRoot = " + stackRootAbsPath);
 
-    StackExtensionHelper stackExtensionHelper = new StackExtensionHelper(stackRoot);
+    StackExtensionHelper stackExtensionHelper = new StackExtensionHelper
+      (stackRoot);
     stackExtensionHelper.fillInfo();
 
     List<StackInfo> stacks = stackExtensionHelper.getAllAvailableStacks();
@@ -817,10 +814,6 @@ public class AmbariMetaInfo {
       // Resolve hooks folder
       String stackHooksToUse = stackExtensionHelper.resolveHooksFolder(stack);
       stack.setStackHooksFolder(stackHooksToUse);
-
-      // Set required config properties
-      requiredProperties.put(new StackId(stack.getName(), stack.getVersion()),
-        stackExtensionHelper.getAllRequiredPropertiesForStack(stack));
     }
 
     es.invokeAll(lookupList);
@@ -828,15 +821,6 @@ public class AmbariMetaInfo {
     es.shutdown();
   }
 
-  /**
-   * Get properties with require_input attribute set to true.
-   * @param stackName Name of the stack, e.g.: HDP
-   * @param stackVersion Version of the stack
-   * @return Map of config type to Properties
-   */
-  public Map<String, PropertyInfo> getRequiredPropertiesForStack(String stackName,
String stackVersion) {
-    return requiredProperties.get(new StackId(stackName, stackVersion));
-  }
 
   public String getServerVersion() {
     return serverVersion;
@@ -908,6 +892,8 @@ public class AmbariMetaInfo {
     return sb.toString();
   }
 
+
+
   /**
    * @param stackName the stack name
    * @param stackVersion the stack version

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
index 89afb14..08a545f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java
@@ -532,12 +532,7 @@ public class StackExtensionHelper {
 
   }
 
-  /**
-   * Get populated stackInfo for the stack definition at the provided path.
-   * @param stackVersionFolder Path to stack definition.
-   * @return StackInfo StackInfo object
-   * @throws JAXBException
-   */
+
   private StackInfo getStackInfo(File stackVersionFolder) throws JAXBException {
     StackInfo stackInfo = new StackInfo();
 
@@ -632,23 +627,6 @@ public class StackExtensionHelper {
     }
   }
 
-  /**
-   * Get all properties with require-input attribute set to true.
-   * @param stackInfo StackInfo object.
-   */
-  public Map<String, PropertyInfo> getAllRequiredPropertiesForStack(StackInfo stackInfo)
{
-    Map<String, PropertyInfo> requiredProperties = new HashMap<String, PropertyInfo>();
-    for (ServiceInfo serviceInfo : stackInfo.getServices()) {
-      List<PropertyInfo> properties = serviceInfo.getProperties();
-      for (PropertyInfo propertyInfo : properties) {
-        if (propertyInfo.isRequireInput()) {
-          requiredProperties.put(propertyInfo.getName(), propertyInfo);
-        }
-      }
-    }
-    return requiredProperties;
-  }
-
   
   public static <T> T unmarshal(Class<T> clz, File file) throws JAXBException
{
     Unmarshaller u = _jaxbContexts.get(clz).createUnmarshaller();

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index fd9f5a7..91632c0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -509,8 +509,7 @@ public class AmbariServer {
     StackDefinedPropertyProvider.init(injector);
     NagiosPropertyProvider.init(injector);
     AbstractControllerResourceProvider.init(injector.getInstance(ResourceProviderFactory.class));
-    BlueprintResourceProvider.init(injector.getInstance(BlueprintDAO.class),
-        injector.getInstance(Gson.class));
+    BlueprintResourceProvider.init(injector.getInstance(BlueprintDAO.class), injector.getInstance(Gson.class));
     StackDependencyResourceProvider.init(ambariMetaInfo);
     ClusterResourceProvider.injectBlueprintDAO(injector.getInstance(BlueprintDAO.class));
     ViewRegistry.init(injector.getInstance(ViewDAO.class), injector.getInstance(ViewInstanceDAO.class));

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java
index c4baefb..e5cbdf7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java
@@ -21,13 +21,7 @@ package org.apache.ambari.server.controller;
 
 public class StackConfigurationResponse {
 
-  /**
-   * Stack configuration response.
-   * @param propertyName Property Key
-   * @param propertyValue Property Value
-   * @param propertyDescription Property Description
-   * @param type Configuration type
-   */
+  
   public StackConfigurationResponse(String propertyName, String propertyValue, String propertyDescription,
String type) {
     setPropertyName(propertyName);
     setPropertyValue(propertyValue);
@@ -35,26 +29,6 @@ public class StackConfigurationResponse {
     setType(type);
   }
 
-  /**
-   * Stack configuration response with all properties.
-   * @param propertyName Property Key
-   * @param propertyValue Property Value
-   * @param propertyDescription Property Description
-   * @param type Configuration type
-   * @param isRequired Is required to be set
-   * @param propertyType Property Type
-   */
-  public StackConfigurationResponse(String propertyName, String propertyValue,
-                                    String propertyDescription, String type,
-                                    Boolean isRequired, String propertyType) {
-    setPropertyName(propertyName);
-    setPropertyValue(propertyValue);
-    setPropertyDescription(propertyDescription);
-    setType(type);
-    setRequired(isRequired);
-    setPropertyType(propertyType);
-  }
-
   private String stackName;
   private String stackVersion;
   private String serviceName;
@@ -62,8 +36,6 @@ public class StackConfigurationResponse {
   private String propertyValue;
   private String propertyDescription;
   private String type;
-  private Boolean isRequired;
-  private String propertyType;
 
   public String getStackName() {
     return stackName;
@@ -113,10 +85,6 @@ public class StackConfigurationResponse {
     this.propertyDescription = propertyDescription;
   }
 
-  /**
-   * Configuration type
-   * @return Configuration type (*-site.xml)
-   */
   public String getType() {
     return type;
   }
@@ -124,32 +92,4 @@ public class StackConfigurationResponse {
   public void setType(String type) {
     this.type = type;
   }
-
-  /**
-   * Is property a isRequired property
-   * @return True/False
-   */
-  public Boolean isRequired() {
-    return isRequired;
-  }
-
-  /**
-   * Set required attribute on this property.
-   * @param required True/False.
-   */
-  public void setRequired(Boolean required) {
-    this.isRequired = required;
-  }
-
-  /**
-   * Get type of property as set in the stack definition.
-   * @return Property type.
-   */
-  public String getPropertyType() {
-    return propertyType;
-  }
-
-  public void setPropertyType(String propertyType) {
-    this.propertyType = propertyType;
-  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
index 19bca09..7771b73 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
@@ -17,6 +17,14 @@
  */
 package org.apache.ambari.server.controller.internal;
 
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
 import com.google.gson.Gson;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.StackAccessException;
@@ -52,13 +60,6 @@ import org.apache.ambari.server.orm.entities.HostGroupConfigEntity;
 import org.apache.ambari.server.orm.entities.HostGroupEntity;
 import org.apache.ambari.server.state.Config;
 import org.apache.ambari.server.state.ConfigImpl;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
 
 /**
  * Resource provider for cluster resources.
@@ -76,7 +77,8 @@ public class ClusterResourceProvider extends AbstractControllerResourceProvider
 
 
   private static Set<String> pkPropertyIds =
-      new HashSet<String>(Arrays.asList(new String[]{CLUSTER_ID_PROPERTY_ID}));
+      new HashSet<String>(Arrays.asList(new String[]{
+          CLUSTER_ID_PROPERTY_ID}));
 
   /**
    * Data access object used to obtain blueprint entities.
@@ -820,7 +822,6 @@ public class ClusterResourceProvider extends AbstractControllerResourceProvider
     // HIVE_SERVER
     propertyUpdaters.put("hive.metastore.uris", new SingleHostPropertyUpdater("HIVE_SERVER"));
     propertyUpdaters.put("hive_ambari_host", new SingleHostPropertyUpdater("HIVE_SERVER"));
-    propertyUpdaters.put("javax.jdo.option.ConnectionURL", new SingleHostPropertyUpdater("MYSQL_SERVER"));
 
     // OOZIE_SERVER
     propertyUpdaters.put("oozie.base.url", new SingleHostPropertyUpdater("OOZIE_SERVER"));
@@ -1109,14 +1110,14 @@ public class ClusterResourceProvider extends AbstractControllerResourceProvider
      * @throws AmbariException an exception occurred getting configurations from the stack
definition
      */
     private void parseConfigurations(String service) throws AmbariException {
-      Map<String, Map<String, String>> mapServiceConfig = new HashMap<String,
Map<String, String>>();
+      Map<String, Map<String, String>> mapServiceConfig =
+          new HashMap<String, Map<String, String>>();
 
       serviceConfigurations.put(service, mapServiceConfig);
 
-      Set<StackConfigurationResponse> serviceConfigs =
-        getManagementController().getStackConfigurations(
+      Set<StackConfigurationResponse> serviceConfigs = getManagementController().getStackConfigurations(
           Collections.singleton(new StackConfigurationRequest(name, version, service, null)
-        ));
+          ));
 
       for (StackConfigurationResponse config : serviceConfigs) {
         String type = config.getType();
@@ -1129,7 +1130,6 @@ public class ClusterResourceProvider extends AbstractControllerResourceProvider
           mapTypeConfig = new HashMap<String, String>();
           mapServiceConfig.put(type, mapTypeConfig);
         }
-
         mapTypeConfig.put(config.getPropertyName(), config.getPropertyValue());
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java
b/ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java
index 6257157..acc5f4a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java
@@ -18,19 +18,14 @@
 
 package org.apache.ambari.server.state;
 
-
 import org.apache.ambari.server.controller.StackConfigurationResponse;
 
-import javax.xml.bind.annotation.XmlAttribute;
-
 public class PropertyInfo {
   private String name;
   private String value;
   private String description;
   private String filename;
   private boolean deleted;
-  private boolean requireInput;
-  private PropertyType type = PropertyType.DEFAULT;
 
   public String getName() {
     return name;
@@ -65,8 +60,7 @@ public class PropertyInfo {
   }
   
   public StackConfigurationResponse convertToResponse() {
-    return new StackConfigurationResponse(getName(), getValue(),
-      getDescription() , getFilename(), isRequireInput(), getType().name());
+    return new StackConfigurationResponse(getName(), getValue(), getDescription() , getFilename());
   }
 
   public boolean isDeleted() {
@@ -77,23 +71,6 @@ public class PropertyInfo {
     this.deleted = deleted;
   }
 
-  @XmlAttribute(name = "require-input")
-  public boolean isRequireInput() {
-    return requireInput;
-  }
-
-  public void setRequireInput(boolean requireInput) {
-    this.requireInput = requireInput;
-  }
-
-  public PropertyType getType() {
-    return type;
-  }
-
-  public void setType(PropertyType type) {
-    this.type = type;
-  }
-
   @Override
   public int hashCode() {
     final int prime = 31;
@@ -137,9 +114,4 @@ public class PropertyInfo {
       return false;
     return true;
   }
-
-  public enum PropertyType {
-    DEFAULT,
-    PASSWORD
-  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/global.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/global.xml
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/global.xml
index fa999fc..f3c274a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/global.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/global.xml
@@ -22,11 +22,6 @@
 
 <configuration>
   <property>
-    <name>hive_database_type</name>
-    <value>mysql</value>
-    <description>Default HIVE DB type.</description>
-  </property>
-  <property>
     <name>hive_database</name>
     <value>New MySQL Database</value>
     <description>
@@ -48,10 +43,9 @@
     <value>hive</value>
     <description>Database username to use to connect to the database.</description>
   </property>    
-  <property require-input="true">
+  <property>
     <name>hive_metastore_user_passwd</name>
     <value></value>
-    <type>PASSWORD</type>
     <description>Database password to use to connect to the database.</description>
   </property>    
   <property>

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
index 4a42ea4..3a6ed76 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/configuration/hive-site.xml
@@ -26,7 +26,7 @@ limitations under the License.
 
   <property>
     <name>javax.jdo.option.ConnectionURL</name>
-    <value>jdbc:mysql://localhost/hive?createDatabaseIfNotExist=true</value>
+    <value>jdbc</value>
     <description>JDBC connect string for a JDBC metastore</description>
   </property>
 
@@ -42,10 +42,9 @@ limitations under the License.
     <description>username to use against metastore database</description>
   </property>
 
-  <property require-input="true">
+  <property>
     <name>javax.jdo.option.ConnectionPassword</name>
     <value> </value>
-    <type>PASSWORD</type>
     <description>password to use against metastore database</description>
   </property>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/global.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/global.xml
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/global.xml
index 3d8cadc..e164c64 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/global.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/global.xml
@@ -22,11 +22,6 @@
 
 <configuration>
   <property>
-    <name>hive_database_type</name>
-    <value>mysql</value>
-    <description>Default HIVE DB type.</description>
-  </property>
-  <property>
     <name>hive_database</name>
     <value>New MySQL Database</value>
     <description>
@@ -48,10 +43,9 @@
     <value>hive</value>
     <description>Database username to use to connect to the database.</description>
   </property>    
-  <property require-input="true">
+  <property>
     <name>hive_metastore_user_passwd</name>
     <value></value>
-    <type>PASSWORD</type>
     <description>Database password to use to connect to the database.</description>
   </property>    
   <property>

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
index 7e026bd..6336a70 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml
@@ -27,7 +27,7 @@ limitations under the License.
 
   <property>
     <name>javax.jdo.option.ConnectionURL</name>
-    <value>jdbc:mysql://localhost/hive?createDatabaseIfNotExist=true</value>
+    <value>jdbc</value>
     <description>JDBC connect string for a JDBC metastore</description>
   </property>
 
@@ -43,10 +43,9 @@ limitations under the License.
     <description>username to use against metastore database</description>
   </property>
 
-  <property require-input="true">
+  <property>
     <name>javax.jdo.option.ConnectionPassword</name>
     <value> </value>
-    <type>PASSWORD</type>
     <description>password to use against metastore database</description>
   </property>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/configuration/global.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/configuration/global.xml
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/configuration/global.xml
index fa112e3..61a2b90 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/configuration/global.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/configuration/global.xml
@@ -36,10 +36,9 @@
     <value>nagiosadmin</value>
     <description>Nagios web user.</description>
   </property>
-  <property require-input = "true">
+  <property>
     <name>nagios_web_password</name>
     <value></value>
-    <type>PASSWORD</type>
     <description>Nagios Admin Password.</description>
   </property>
   <property>

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
b/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
index f2c4e87..781fdcb 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/configuration/hive-site.xml
@@ -27,7 +27,7 @@ limitations under the License.
 
   <property>
     <name>javax.jdo.option.ConnectionURL</name>
-    <value>jdbc:mysql://localhost/hive?createDatabaseIfNotExist=true</value>
+    <value>jdbc</value>
     <description>JDBC connect string for a JDBC metastore</description>
   </property>
 
@@ -43,10 +43,9 @@ limitations under the License.
     <description>username to use against metastore database</description>
   </property>
 
-  <property require-input="true">
+  <property>
     <name>javax.jdo.option.ConnectionPassword</name>
-    <value></value>
-    <type>PASSWORD</type>
+    <value> </value>
     <description>password to use against metastore database</description>
   </property>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
index de0cbf7..40e4bf3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
@@ -1332,21 +1332,4 @@ public class AmbariMetaInfoTest {
     assertEquals("cluster", dependency.getScope());
   }
 
-  @Test
-  public void testPasswordPropertyAttribute() throws Exception {
-    ServiceInfo service = metaInfo.getService(STACK_NAME_HDP, "2.0.1", "HIVE");
-    List<PropertyInfo> propertyInfoList = service.getProperties();
-    Assert.assertNotNull(propertyInfoList);
-    PropertyInfo passwordProperty = null;
-    for (PropertyInfo propertyInfo : propertyInfoList) {
-      if (propertyInfo.isRequireInput()
-          && propertyInfo.getType().equals(PropertyInfo.PropertyType.PASSWORD)) {
-        passwordProperty = propertyInfo;
-      } else {
-        Assert.assertEquals(PropertyInfo.PropertyType.DEFAULT, propertyInfo.getType());
-      }
-    }
-    Assert.assertNotNull(passwordProperty);
-    Assert.assertEquals("javax.jdo.option.ConnectionPassword", passwordProperty.getName());
-  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
index 6993420..9e12c63 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
@@ -19,11 +19,6 @@
 package org.apache.ambari.server.controller.internal;
 
 import com.google.gson.Gson;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import junit.framework.Assert;
-import org.apache.ambari.server.AmbariException;
-import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.controller.predicate.EqualsPredicate;
 import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
 import org.apache.ambari.server.controller.spi.NoSuchResourceException;
@@ -35,7 +30,6 @@ import org.apache.ambari.server.controller.spi.ResourceProvider;
 import org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
 import org.apache.ambari.server.controller.utilities.PropertyHelper;
-import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
 import org.apache.ambari.server.orm.dao.BlueprintDAO;
 import org.apache.ambari.server.orm.entities.BlueprintConfigEntity;
 import org.apache.ambari.server.orm.entities.BlueprintEntity;
@@ -44,13 +38,8 @@ import org.apache.ambari.server.orm.entities.HostGroupConfigEntity;
 import org.apache.ambari.server.orm.entities.HostGroupEntity;
 import org.easymock.Capture;
 
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.createMockBuilder;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.hamcrest.core.IsInstanceOf.instanceOf;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
@@ -59,7 +48,6 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import java.io.File;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -86,11 +74,12 @@ import static org.junit.Assert.fail;
 public class BlueprintResourceProviderTest {
 
   private static String BLUEPRINT_NAME = "test-blueprint";
+
   private final static BlueprintDAO dao = createStrictMock(BlueprintDAO.class);
   private final static Gson gson = new Gson();
 
   @BeforeClass
-  public static void initClass() throws Exception {
+  public static void initClass() {
     BlueprintResourceProvider.init(dao, gson);
   }
 
@@ -170,7 +159,7 @@ public class BlueprintResourceProviderTest {
 
   @Test
   public void testGetResourcesNoPredicate() throws SystemException, UnsupportedPropertyException,
-        NoSuchParentResourceException, NoSuchResourceException {
+                                                   NoSuchParentResourceException, NoSuchResourceException
{
     Request request = createNiceMock(Request.class);
 
     ResourceProvider provider = createProvider();
@@ -193,7 +182,7 @@ public class BlueprintResourceProviderTest {
 
   @Test
   public void testGetResourcesNoPredicate_withConfiguration() throws SystemException, UnsupportedPropertyException,
-        NoSuchParentResourceException, NoSuchResourceException {
+      NoSuchParentResourceException, NoSuchResourceException {
     Request request = createNiceMock(Request.class);
 
     ResourceProvider provider = createProvider();
@@ -219,7 +208,7 @@ public class BlueprintResourceProviderTest {
 
   @Test
   public void testDeleteResources() throws SystemException, UnsupportedPropertyException,
-        NoSuchParentResourceException, NoSuchResourceException {
+                                           NoSuchParentResourceException, NoSuchResourceException
{
 
     Capture<BlueprintEntity> entityCapture = new Capture<BlueprintEntity>();
 
@@ -283,12 +272,12 @@ public class BlueprintResourceProviderTest {
     mapProperties.put(BlueprintResourceProvider.BLUEPRINT_NAME_PROPERTY_ID, BLUEPRINT_NAME);
     mapProperties.put(BlueprintResourceProvider.STACK_NAME_PROPERTY_ID, "test-stack-name");
     mapProperties.put(BlueprintResourceProvider.STACK_VERSION_PROPERTY_ID, "test-stack-version");
+    mapProperties.put(BlueprintResourceProvider.STACK_VERSION_PROPERTY_ID, "test-stack-version");
     mapProperties.put(BlueprintResourceProvider.HOST_GROUP_PROPERTY_ID, setHostGroupProperties);
 
     return Collections.singleton(mapProperties);
   }
 
-  @SuppressWarnings("unchecked")
   private void setConfigurationProperties(Set<Map<String, Object>> properties
) {
     Map<String, String> clusterProperties = new HashMap<String, String>();
     clusterProperties.put("core-site/fs.trash.interval", "480");

http://git-wip-us.apache.org/repos/asf/ambari/blob/05f2c36d/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/HIVE/configuration/hive-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/HIVE/configuration/hive-site.xml
b/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/HIVE/configuration/hive-site.xml
index 96b0d17..7d35558 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/HIVE/configuration/hive-site.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.1/services/HIVE/configuration/hive-site.xml
@@ -43,10 +43,9 @@ limitations under the License.
     <description>username to use against metastore database</description>
   </property>
 
-  <property require-input="true">
+  <property>
     <name>javax.jdo.option.ConnectionPassword</name>
     <value></value>
-    <type>PASSWORD</type>
     <description>password to use against metastore database</description>
   </property>
 


Mime
View raw message