Repository: ambari Updated Branches: refs/heads/trunk 64f4f66b7 -> 19ce4a6ca
AMBARI-10309. entries, entry_labels and entry_descriptions should not be defined as a flat list (mpapyrkovskyy via srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/19ce4a6c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/19ce4a6c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/19ce4a6c Branch: refs/heads/trunk Commit: 19ce4a6ca8ff20ab08e67d53d1c4fe06b2745e7e Parents: 64f4f66 Author: Srimanth Gunturi <[email protected]> Authored: Thu Apr 2 12:25:34 2015 -0700 Committer: Srimanth Gunturi <[email protected]> Committed: Thu Apr 2 12:25:44 2015 -0700 ---------------------------------------------------------------------- .../controller/StackConfigurationResponse.java | 12 +- .../StackLevelConfigurationResponse.java | 4 +- .../StackConfigurationResourceProvider.java | 8 +- .../ambari/server/state/PropertyInfo.java | 26 +- .../server/state/ValueAttributesInfo.java | 76 ++-- .../ambari/server/state/ValueEntryInfo.java | 57 +++ .../HDFS/2.1.0.2.0/configuration/hdfs-site.xml | 14 +- .../HIVE/0.12.0.2.0/configuration/hive-site.xml | 58 --- .../src/main/resources/properties.json | 1 + .../services/HIVE/configuration/hive-site.xml | 23 +- .../services/HIVE/configuration/hive-site.xml | 350 +++++++++++++++---- .../server/api/services/AmbariMetaInfoTest.java | 6 +- 12 files changed, 426 insertions(+), 209 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/19ce4a6c/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 7e1bfae..ee2ad5c 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 @@ -60,7 +60,7 @@ public class StackConfigurationResponse { * @param dependedByProperties depended by properties set */ public StackConfigurationResponse(String propertyName, String propertyValue, - String propertyDescription, String type, + String propertyDescription, String propertyDisplayName, String type, Boolean isRequired, Set<PropertyType> propertyTypes, Map<String, String> propertyAttributes, @@ -70,6 +70,7 @@ public class StackConfigurationResponse { setPropertyName(propertyName); setPropertyValue(propertyValue); setPropertyDescription(propertyDescription); + setPropertyDisplayName(propertyDisplayName); setType(type); setRequired(isRequired); setPropertyType(propertyTypes); @@ -85,6 +86,7 @@ public class StackConfigurationResponse { private String propertyName; private String propertyValue; private String propertyDescription; + private String propertyDisplayName; private String type; private Map<String, String> propertyAttributes; private ValueAttributesInfo propertyValueAttributes; @@ -141,6 +143,14 @@ public class StackConfigurationResponse { this.propertyDescription = propertyDescription; } + public String getPropertyDisplayName() { + return propertyDisplayName; + } + + public void setPropertyDisplayName(String propertyDisplayName) { + this.propertyDisplayName = propertyDisplayName; + } + /** * Configuration type * @return Configuration type (*-site.xml) http://git-wip-us.apache.org/repos/asf/ambari/blob/19ce4a6c/ambari-server/src/main/java/org/apache/ambari/server/controller/StackLevelConfigurationResponse.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackLevelConfigurationResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackLevelConfigurationResponse.java index f1e0344..42abf15 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackLevelConfigurationResponse.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackLevelConfigurationResponse.java @@ -29,13 +29,13 @@ import org.apache.ambari.server.state.ValueAttributesInfo; public class StackLevelConfigurationResponse extends StackConfigurationResponse { public StackLevelConfigurationResponse(String propertyName, - String propertyValue, String propertyDescription, String type, + String propertyValue, String propertyDescription, String propertyDisplayName, String type, Boolean isRequired, Set<PropertyType> propertyTypes, Map<String, String> propertyAttributes, ValueAttributesInfo propertyValueAttributes, Set<PropertyDependencyInfo> dependsOnProperties, Set<PropertyDependencyInfo> dependedByProperties) { - super(propertyName, propertyValue, propertyDescription, type, isRequired, + super(propertyName, propertyValue, propertyDescription, propertyDisplayName, type, isRequired, propertyTypes, propertyAttributes, propertyValueAttributes, dependsOnProperties, dependedByProperties); } http://git-wip-us.apache.org/repos/asf/ambari/blob/19ce4a6c/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java index 9707cbd..f00a46f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java @@ -68,7 +68,10 @@ public class StackConfigurationResourceProvider extends public static final String PROPERTY_DESCRIPTION_PROPERTY_ID = PropertyHelper .getPropertyId("StackConfigurations", "property_description"); - + + public static final String PROPERTY_DISPLAY_NAME_PROPERTY_ID = PropertyHelper + .getPropertyId("StackConfigurations", "property_display_name"); + public static final String PROPERTY_PROPERTY_TYPE_PROPERTY_ID = PropertyHelper .getPropertyId("StackConfigurations", "property_type"); @@ -145,6 +148,9 @@ public class StackConfigurationResourceProvider extends setResourceProperty(resource, PROPERTY_DESCRIPTION_PROPERTY_ID, response.getPropertyDescription(), requestedIds); + + setResourceProperty(resource, PROPERTY_DISPLAY_NAME_PROPERTY_ID, + response.getPropertyDisplayName(), requestedIds); setResourceProperty(resource, PROPERTY_PROPERTY_TYPE_PROPERTY_ID, response.getPropertyType(), requestedIds); http://git-wip-us.apache.org/repos/asf/ambari/blob/19ce4a6c/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 a440bb3..3596487 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 @@ -22,6 +22,8 @@ package org.apache.ambari.server.state; import org.apache.ambari.server.controller.StackConfigurationResponse; import org.w3c.dom.Element; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; @@ -35,14 +37,23 @@ import java.util.List; import java.util.Map; import java.util.Set; +@XmlAccessorType(XmlAccessType.FIELD) public class PropertyInfo { private String name; private String value; private String description; + + @XmlElement(name = "display-name") + private String displayName; + private String filename; private boolean deleted; + + @XmlAttribute(name = "require-input") private boolean requireInput; - + + @XmlElement(name = "property-type") + @XmlList private Set<PropertyType> propertyTypes = new HashSet<PropertyType>(); @XmlAnyElement @@ -89,6 +100,14 @@ public class PropertyInfo { this.description = description; } + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + public String getFilename() { return filename; } @@ -97,8 +116,6 @@ public class PropertyInfo { this.filename = filename; } - @XmlElement(name = "property-type") - @XmlList public Set<PropertyType> getPropertyTypes() { return propertyTypes; } @@ -109,7 +126,7 @@ public class PropertyInfo { public StackConfigurationResponse convertToResponse() { return new StackConfigurationResponse(getName(), getValue(), - getDescription() , getFilename(), isRequireInput(), getPropertyTypes(), + getDescription(), getDisplayName() , getFilename(), isRequireInput(), getPropertyTypes(), getAttributesMap(), getPropertyValueAttributes(), getDependsOnProperties(), getDependedByProperties()); } @@ -142,7 +159,6 @@ public class PropertyInfo { return dependedByProperties; } - @XmlAttribute(name = "require-input") public boolean isRequireInput() { return requireInput; } http://git-wip-us.apache.org/repos/asf/ambari/blob/19ce4a6c/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java index c17a40d..67f5eb2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java @@ -18,12 +18,17 @@ package org.apache.ambari.server.state; +import org.codehaus.jackson.annotate.JsonProperty; import org.codehaus.jackson.map.annotate.JsonSerialize; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlElements; +import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; @XmlAccessorType(XmlAccessType.FIELD) @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL) @@ -32,18 +37,16 @@ public class ValueAttributesInfo { private String maximum; private String minimum; private String unit; - private String[] entries; - @XmlElement(name = "entry_labels") - private String[] entryLabels; - - @XmlElement(name = "entry_descriptions") - private String[] entryDescriptions; + @XmlElementWrapper(name = "entries") + @XmlElements(@XmlElement(name = "entry")) + private Collection<ValueEntryInfo> entries = new ArrayList<ValueEntryInfo>(); @XmlElement(name = "entries_editable") private Boolean entriesEditable; - @XmlElement(name = "selection_cardinality") + @XmlElement(name = "selection-cardinality") + @JsonProperty("selection_cardinality") private String selectionCardinality; public ValueAttributesInfo() { @@ -82,30 +85,14 @@ public class ValueAttributesInfo { this.unit = unit; } - public String[] getEntries() { + public Collection<ValueEntryInfo> getEntries() { return entries; } - public void setEntries(String[] entries) { + public void setEntries(Collection<ValueEntryInfo> entries) { this.entries = entries; } - public String[] getEntryLabels() { - return entryLabels; - } - - public void setEntryLabels(String[] entryLabels) { - this.entryLabels = entryLabels; - } - - public String[] getEntryDescriptions() { - return entryDescriptions; - } - - public void setEntryDescriptions(String[] entryDescriptions) { - this.entryDescriptions = entryDescriptions; - } - public Boolean getEntriesEditable() { return entriesEditable; } @@ -129,22 +116,15 @@ public class ValueAttributesInfo { ValueAttributesInfo that = (ValueAttributesInfo) o; - if (!Arrays.equals(entries, that.entries)) return false; + if (entries != null ? !entries.equals(that.entries) : that.entries != null) return false; if (entriesEditable != null ? !entriesEditable.equals(that.entriesEditable) : that.entriesEditable != null) return false; - if (!Arrays.equals(entryDescriptions, that.entryDescriptions)) - return false; - if (!Arrays.equals(entryLabels, that.entryLabels)) return false; - if (maximum != null ? !maximum.equals(that.maximum) : that.maximum != null) - return false; - if (minimum != null ? !minimum.equals(that.minimum) : that.minimum != null) - return false; + if (maximum != null ? !maximum.equals(that.maximum) : that.maximum != null) return false; + if (minimum != null ? !minimum.equals(that.minimum) : that.minimum != null) return false; if (selectionCardinality != null ? !selectionCardinality.equals(that.selectionCardinality) : that.selectionCardinality != null) return false; - if (type != null ? !type.equals(that.type) : that.type != null) - return false; - if (unit != null ? !unit.equals(that.unit) : that.unit != null) - return false; + if (type != null ? !type.equals(that.type) : that.type != null) return false; + if (unit != null ? !unit.equals(that.unit) : that.unit != null) return false; return true; } @@ -155,9 +135,7 @@ public class ValueAttributesInfo { result = 31 * result + (maximum != null ? maximum.hashCode() : 0); result = 31 * result + (minimum != null ? minimum.hashCode() : 0); result = 31 * result + (unit != null ? unit.hashCode() : 0); - result = 31 * result + (entries != null ? Arrays.hashCode(entries) : 0); - result = 31 * result + (entryLabels != null ? Arrays.hashCode(entryLabels) : 0); - result = 31 * result + (entryDescriptions != null ? Arrays.hashCode(entryDescriptions) : 0); + result = 31 * result + (entries != null ? entries.hashCode() : 0); result = 31 * result + (entriesEditable != null ? entriesEditable.hashCode() : 0); result = 31 * result + (selectionCardinality != null ? selectionCardinality.hashCode() : 0); return result; @@ -166,16 +144,14 @@ public class ValueAttributesInfo { @Override public String toString() { return "ValueAttributesInfo{" + - "type='" + type + '\'' + - ", maximum=" + maximum + - ", minimum=" + minimum + - ", unit='" + unit + '\'' + - ", entries=" + Arrays.toString(entries) + - ", entryLabels=" + Arrays.toString(entryLabels) + - ", entryDescriptions=" + Arrays.toString(entryDescriptions) + - ", entriesEditable=" + entriesEditable + - ", selectionCardinality='" + selectionCardinality + '\'' + - '}'; + "entries=" + entries + + ", type='" + type + '\'' + + ", maximum='" + maximum + '\'' + + ", minimum='" + minimum + '\'' + + ", unit='" + unit + '\'' + + ", entriesEditable=" + entriesEditable + + ", selectionCardinality='" + selectionCardinality + '\'' + + '}'; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/19ce4a6c/ambari-server/src/main/java/org/apache/ambari/server/state/ValueEntryInfo.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ValueEntryInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ValueEntryInfo.java new file mode 100644 index 0000000..9f67114 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ValueEntryInfo.java @@ -0,0 +1,57 @@ +/* + * 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.state; + +import org.codehaus.jackson.map.annotate.JsonSerialize; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; + +@XmlAccessorType(XmlAccessType.FIELD) +@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL) +public class ValueEntryInfo { + + private String value; + private String label; + private String description; + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/19ce4a6c/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml index 9c704f9..8f3cb5e 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml @@ -171,10 +171,16 @@ <display-name>Minimum replicated blocks %ge</display-name> <value-attributes> <type>value-list</type> - <entries>0.99</entries> - <entries>1.0</entries> - <entry_labels>NN HA</entry_labels> - <entry_labels>No NN HA</entry_labels> + <entries> + <entry> + <value>0.99</value> + <label>NN HA</label> + </entry> + <entry> + <value>1.0</value> + <label>No NN HA</label> + </entry> + </entries> <selection_cardinality>1</selection_cardinality> </value-attributes> </property> http://git-wip-us.apache.org/repos/asf/ambari/blob/19ce4a6c/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml index bf6a933..2d58557 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml @@ -115,15 +115,6 @@ limitations under the License. <name>hive.security.authorization.enabled</name> <value>false</value> <description>enable or disable the hive client authorization</description> - <display-name>Enable Authorization</display-name> - <value-attributes> - <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> - <selection-cardinality>1</selection-cardinality> - </value-attributes> </property> <property> @@ -156,15 +147,6 @@ limitations under the License. submitted the query. But if the parameter is set to false, the query will run as the user that the hiveserver2 process runs as. </description> - <display-name>Run as end user instead of Hive user</display-name> - <value-attributes> - <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> - <selection-cardinality>1</selection-cardinality> - </value-attributes> </property> <property> @@ -177,19 +159,6 @@ limitations under the License. <name>hive.server2.authentication</name> <description>Authentication mode, default NONE. Options are NONE, NOSASL, KERBEROS, LDAP, PAM and CUSTOM</description> <value>NONE</value> - <display-name>HiveServer2 Authentication</display-name> - <value-attributes> - <type>value-list</type> - <entries>NONE</entries> - <entries>LDAP</entries> - <entries>KERBEROS</entries> - <entries>PAM</entries> - <entry_labels>None</entry_labels> - <entry_labels>Lightweight Directory Access Protocol</entry_labels> - <entry_labels>Kerberos</entry_labels> - <entry_labels>Pluggable Authentication Modules</entry_labels> - <selection-cardinality>1</selection-cardinality> - </value-attributes> </property> <property> @@ -208,15 +177,6 @@ limitations under the License. <name>hive.enforce.bucketing</name> <value>true</value> <description>Whether bucketing is enforced. If true, while inserting into the table, bucketing is enforced.</description> - <display-name>Enforce bucketing</display-name> - <value-attributes> - <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> - <selection-cardinality>1</selection-cardinality> - </value-attributes> </property> <property> @@ -334,15 +294,6 @@ limitations under the License. <value>true</value> <description>This flag controls the vectorized mode of query execution as documented in HIVE-4160 (as of Hive 0.13.0) </description> - <display-name>Enable Vectorization and Map Vectorization</display-name> - <value-attributes> - <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> - <selection-cardinality>1</selection-cardinality> - </value-attributes> </property> <property> @@ -358,15 +309,6 @@ limitations under the License. <description> Whether to enable automatic use of indexes </description> - <display-name>Push Filters to Storage</display-name> - <value-attributes> - <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> - <selection-cardinality>1</selection-cardinality> - </value-attributes> </property> <property> http://git-wip-us.apache.org/repos/asf/ambari/blob/19ce4a6c/ambari-server/src/main/resources/properties.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/properties.json b/ambari-server/src/main/resources/properties.json index 94374bc..300d77e 100644 --- a/ambari-server/src/main/resources/properties.json +++ b/ambari-server/src/main/resources/properties.json @@ -236,6 +236,7 @@ "StackConfigurations/property_depends_on", "StackConfigurations/property_depended_by", "StackConfigurations/property_description", + "StackConfigurations/property_display_name", "StackConfigurations/type", "StackConfigurations/final", "StackConfigurations/adding_forbidden", http://git-wip-us.apache.org/repos/asf/ambari/blob/19ce4a6c/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 24fefff..6e65890 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 @@ -391,15 +391,6 @@ limitations under the License. stored in metastore. For basic stats collection turn on the config hive.stats.autogather to true. For more advanced stats collection need to run analyze table queries. </description> - <display-name>Compute simple queries using stats only</display-name> - <value-attributes> - <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> - <selection-cardinality>1</selection-cardinality> - </value-attributes> </property> <property> @@ -466,10 +457,16 @@ limitations under the License. <display-name>Run Compactor</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> http://git-wip-us.apache.org/repos/asf/ambari/blob/19ce4a6c/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml index 57d1c87..d58b9f3 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml @@ -26,10 +26,16 @@ limitations under the License. <display-name>Enable Cost Based Optimizer</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>On</entry_labels> - <entry_labels>Off</entry_labels> + <entries> + <entry> + <value>true</value> + <label>On</label> + </entry> + <entry> + <value>false</value> + <label>Off</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -245,10 +251,16 @@ limitations under the License. <display-name>Allow all partitions to be Dynamic</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -481,10 +493,16 @@ limitations under the License. <display-name>ORC Compression Algorithm</display-name> <value-attributes> <type>value-list</type> - <entries>ZLIB</entries> - <entries>SNAPPY</entries> - <entry_labels>zlib Compression Library</entry_labels> - <entry_labels>Snappy Compression Library</entry_labels> + <entries> + <entry> + <value>ZLIB</value> + <label>zlib Compression Library</label> + </entry> + <entry> + <value>SNAPPY</value> + <label>Snappy Compression Library</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -553,6 +571,21 @@ limitations under the License. <name>hive.enforce.bucketing</name> <value>true</value> <description>Whether bucketing is enforced. If true, while inserting into the table, bucketing is enforced.</description> + <display-name>Enforce bucketing</display-name> + <value-attributes> + <type>value-list</type> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> + <selection-cardinality>1</selection-cardinality> + </value-attributes> </property> <property> <name>hive.enforce.sorting</name> @@ -639,10 +672,16 @@ limitations under the License. <display-name>Sort Partitions Dynamically</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -674,10 +713,16 @@ limitations under the License. <display-name>Fetch partition stats at compiler</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>On</entry_labels> - <entry_labels>Off</entry_labels> + <entries> + <entry> + <value>true</value> + <label>On</label> + </entry> + <entry> + <value>false</value> + <label>Off</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -693,10 +738,16 @@ limitations under the License. <display-name>Fetch column stats at compiler</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>On</entry_labels> - <entry_labels>Off</entry_labels> + <entries> + <entry> + <value>true</value> + <label>On</label> + </entry> + <entry> + <value>false</value> + <label>Off</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -720,10 +771,16 @@ limitations under the License. <display-name>Transaction Manager</display-name> <value-attributes> <type>value-list</type> - <entries>org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager</entries> - <entries>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</entries> - <entry_labels>org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager (off)</entry_labels> - <entry_labels>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager (on)</entry_labels> + <entries> + <entry> + <value>org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager</value> + <label>org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager (off)</label> + </entry> + <entry> + <value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</value> + <label>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager (on)</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -748,10 +805,16 @@ limitations under the License. <display-name>Use Locking</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -824,6 +887,21 @@ limitations under the License. <name>hive.security.authorization.enabled</name> <value>false</value> <description>enable or disable the Hive client authorization</description> + <display-name>Enable Authorization</display-name> + <value-attributes> + <type>value-list</type> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> + <selection-cardinality>1</selection-cardinality> + </value-attributes> </property> <property> @@ -937,6 +1015,29 @@ limitations under the License. <name>hive.server2.authentication</name> <description>Authentication mode, default NONE. Options are NONE, NOSASL, KERBEROS, LDAP, PAM and CUSTOM</description> <value>NONE</value> + <display-name>HiveServer2 Authentication</display-name> + <value-attributes> + <type>value-list</type> + <entries> + <entry> + <value>NONE</value> + <label>None</label> + </entry> + <entry> + <value>LDAP</value> + <label>Lightweight Directory Access Protocol</label> + </entry> + <entry> + <value>KERBEROS</value> + <label>Kerberos</label> + </entry> + <entry> + <value>PAM</value> + <label>Pluggable Authentication Modules</label> + </entry> + </entries> + <selection-cardinality>1</selection-cardinality> + </value-attributes> </property> <property> @@ -958,6 +1059,21 @@ limitations under the License. Setting this property to true will have HiveServer2 execute Hive operations as the user making the calls to it. </description> + <display-name>Run as end user instead of Hive user</display-name> + <value-attributes> + <type>value-list</type> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> + <selection-cardinality>1</selection-cardinality> + </value-attributes> </property> <property> <name>hive.server2.table.type.mapping</name> @@ -978,10 +1094,16 @@ limitations under the License. <display-name>Use SSL</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -1018,10 +1140,16 @@ limitations under the License. <display-name>Hold Containers to Reduce Latency</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -1068,10 +1196,16 @@ limitations under the License. <display-name>Allow dynamic numbers of reducers</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -1095,10 +1229,16 @@ limitations under the License. <display-name>Allow dynamic partition pruning</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -1166,6 +1306,21 @@ limitations under the License. This flag should be set to true to enable vectorized mode of query execution. The default value is false. </description> + <display-name>Enable Vectorization and Map Vectorization</display-name> + <value-attributes> + <type>value-list</type> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> + <selection-cardinality>1</selection-cardinality> + </value-attributes> </property> <property> @@ -1181,6 +1336,21 @@ limitations under the License. <name>hive.optimize.index.filter</name> <value>true</value> <description>Whether to enable automatic use of indexes</description> + <display-name>Push Filters to Storage</display-name> + <value-attributes> + <type>value-list</type> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> + <selection-cardinality>1</selection-cardinality> + </value-attributes> </property> <property> @@ -1193,10 +1363,16 @@ limitations under the License. <display-name>Exection Engine</display-name> <value-attributes> <type>value-list</type> - <entries>mr</entries> - <entries>tez</entries> - <entry_labels>MapReduce</entry_labels> - <entry_labels>TEZ</entry_labels> + <entries> + <entry> + <value>mr</value> + <label>MapReduce</label> + </entry> + <entry> + <value>tez</value> + <label>TEZ</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -1224,10 +1400,16 @@ limitations under the License. <display-name>Compute simple queries using stats only</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>On</entry_labels> - <entry_labels>Off</entry_labels> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -1266,10 +1448,16 @@ limitations under the License. <display-name>Start Tez session at Initialization</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -1286,10 +1474,16 @@ limitations under the License. <display-name>ORC Encoding Strategy</display-name> <value-attributes> <type>value-list</type> - <entries>SPEED</entries> - <entries>COMPRESSION</entries> - <entry_labels>Speed</entry_labels> - <entry_labels>Compression</entry_labels> + <entries> + <entry> + <value>SPEED</value> + <label>Speed</label> + </entry> + <entry> + <value>COMPRESSION</value> + <label>Compression</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -1304,10 +1498,16 @@ limitations under the License. <display-name>ORC Compression Strategy</display-name> <value-attributes> <type>value-list</type> - <entries>SPEED</entries> - <entries>COMPRESSION</entries> - <entry_labels>Speed</entry_labels> - <entry_labels>Compression</entry_labels> + <entries> + <entry> + <value>SPEED</value> + <label>Speed</label> + </entry> + <entry> + <value>COMPRESSION</value> + <label>Compression</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> @@ -1322,10 +1522,16 @@ limitations under the License. <display-name>Enable Reduce Vectorization</display-name> <value-attributes> <type>value-list</type> - <entries>true</entries> - <entries>false</entries> - <entry_labels>True</entry_labels> - <entry_labels>False</entry_labels> + <entries> + <entry> + <value>true</value> + <label>True</label> + </entry> + <entry> + <value>false</value> + <label>False</label> + </entry> + </entries> <selection-cardinality>1</selection-cardinality> </value-attributes> </property> http://git-wip-us.apache.org/repos/asf/ambari/blob/19ce4a6c/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 f0c1f43..a9eff8c 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 @@ -813,10 +813,10 @@ public class AmbariMetaInfoTest { Assert.assertEquals("int", newEnhancedProperty.getPropertyValueAttributes().getType()); Assert.assertEquals("512", newEnhancedProperty.getPropertyValueAttributes().getMinimum()); Assert.assertEquals("15360", newEnhancedProperty.getPropertyValueAttributes().getMaximum()); - Assert.assertNull(newEnhancedProperty.getPropertyValueAttributes().getEntries()); + Assert.assertTrue(newEnhancedProperty.getPropertyValueAttributes().getEntries().isEmpty()); Assert.assertNull(newEnhancedProperty.getPropertyValueAttributes().getEntriesEditable()); - Assert.assertNull(newEnhancedProperty.getPropertyValueAttributes().getEntryDescriptions()); - Assert.assertNull(newEnhancedProperty.getPropertyValueAttributes().getEntryLabels()); +// Assert.assertNull(newEnhancedProperty.getPropertyValueAttributes().getEntryDescriptions()); +// Assert.assertNull(newEnhancedProperty.getPropertyValueAttributes().getEntryLabels()); // Original property Assert.assertNotNull(originalProperty); Assert.assertEquals("mapreduce.shuffle", originalProperty.getValue());
