You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2016/04/05 15:02:01 UTC

ambari git commit: AMBARI-15666. Add visibility attribute into SCRIPT params (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk cdb866d7a -> 7debaaee7


AMBARI-15666. Add visibility attribute into SCRIPT params (aonishuk)


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

Branch: refs/heads/trunk
Commit: 7debaaee71cc1a76ecfd453eb8e2088d695c29ef
Parents: cdb866d
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Apr 5 16:01:52 2016 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Apr 5 16:01:52 2016 +0300

----------------------------------------------------------------------
 .../ambari/server/state/alert/ScriptSource.java |  29 +++++
 .../server/upgrade/SchemaUpgradeHelper.java     |  14 +++
 .../server/upgrade/UpgradeCatalog240.java       | 104 +++++++++++++++++-
 .../common-services/HDFS/2.1.0.2.0/alerts.json  | 108 ++++++++++++-------
 .../common-services/HIVE/0.12.0.2.0/alerts.json |  15 ++-
 5 files changed, 226 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7debaaee/ambari-server/src/main/java/org/apache/ambari/server/state/alert/ScriptSource.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/alert/ScriptSource.java b/ambari-server/src/main/java/org/apache/ambari/server/state/alert/ScriptSource.java
index f67a135..5871178 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/alert/ScriptSource.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/alert/ScriptSource.java
@@ -112,6 +112,10 @@ public class ScriptSource extends Source {
     @SerializedName("type")
     private ScriptParameterType m_type;
 
+
+    @SerializedName("visibility")
+    private ScriptParameterVisibility m_visibility;
+
     /**
      * If this script parameter controls a threshold, then its specified here,
      * otherwise it's {@code null}.
@@ -165,6 +169,14 @@ public class ScriptSource extends Source {
     }
 
     /**
+     * Gets the visibility of the parameter.
+     * @return the visibility
+     */
+    public ScriptParameterVisibility getVisibility() {
+      return m_visibility;
+    }
+
+    /**
      * Gets the threshold that this parameter directly controls, or {@code null}
      * for none.
      *
@@ -188,6 +200,7 @@ public class ScriptSource extends Source {
       result = prime * result + ((m_type == null) ? 0 : m_type.hashCode());
       result = prime * result + ((m_units == null) ? 0 : m_units.hashCode());
       result = prime * result + ((m_value == null) ? 0 : m_value.hashCode());
+      result = prime * result + ((m_visibility == null) ? 0 : m_visibility.hashCode());
       return result;
     }
 
@@ -247,6 +260,13 @@ public class ScriptSource extends Source {
       } else if (!m_value.equals(other.m_value)) {
         return false;
       }
+      if (m_visibility == null) {
+        if (other.m_visibility != null) {
+          return false;
+        }
+      } else if (!m_visibility.equals(other.m_visibility)) {
+        return false;
+      }
       return true;
     }
 
@@ -270,5 +290,14 @@ public class ScriptSource extends Source {
        */
       PERCENT
     }
+
+    /**
+     * The {@link ScriptParameterVisibility} enum represents the visibility of script parameter.
+     */
+    public enum ScriptParameterVisibility {
+      VISIBLE,
+      HIDDEN,
+      READ_ONLY
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/7debaaee/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
index 2023a2b..b1f66af 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
@@ -24,6 +24,7 @@ import com.google.inject.multibindings.Multibinder;
 import com.google.inject.persist.PersistService;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.audit.AuditLoggerModule;
+import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.audit.AuditLogger;
 import org.apache.ambari.server.audit.event.AuditEvent;
 import org.apache.ambari.server.configuration.Configuration;
@@ -159,6 +160,18 @@ public class SchemaUpgradeHelper {
    * Extension of main controller module
    */
   public static class UpgradeHelperModule extends ControllerModule {
+    public static class AuditLoggerMock implements AuditLogger {
+
+      @Override
+      public void log(AuditEvent event) {
+
+      }
+
+      @Override
+      public boolean isEnabled() {
+        return false;
+      }
+    }
 
     public UpgradeHelperModule() throws Exception {
     }
@@ -171,6 +184,7 @@ public class SchemaUpgradeHelper {
     protected void configure() {
       super.configure();
       // Add binding to each newly created catalog
+      bind(AuditLogger.class).to(AuditLoggerMock.class);
       Multibinder<UpgradeCatalog> catalogBinder =
         Multibinder.newSetBinder(binder(), UpgradeCatalog.class);
       catalogBinder.addBinding().to(UpgradeCatalog150.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/7debaaee/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
index b3241e0..6fa250d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
@@ -47,6 +47,9 @@ import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Config;
 import org.apache.ambari.server.state.RepositoryType;
 import org.apache.ambari.server.state.State;
+import org.apache.ambari.server.state.alert.AlertDefinition;
+import org.apache.ambari.server.state.alert.ScriptSource;
+import org.apache.ambari.server.state.alert.Source;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.jdbc.support.JdbcUtils;
@@ -263,6 +266,52 @@ public class UpgradeCatalog240 extends AbstractUpgradeCatalog {
   }
 
   protected void updateAlerts() {
+    // map of alert_name -> property_name -> visibility_value
+    final Map<String, String> hdfsVisibilityMap = new HashMap<String, String>(){{
+      put("mergeHaMetrics", "HIDDEN");
+      put("appId", "HIDDEN");
+      put("metricName", "HIDDEN");
+    }};
+    final Map<String, String> defaultKeytabVisibilityMap = new HashMap<String, String>(){{
+      put("default.smoke.principal", "HIDDEN");
+      put("default.smoke.keytab", "HIDDEN");
+    }};
+    Map<String, Map<String, String>> visibilityMap = new HashMap<String, Map<String, String>>(){{
+      put("hive_webhcat_server_status", new HashMap<String, String>(){{
+        put("default.smoke.user", "HIDDEN");
+      }});
+      put("hive_metastore_process", defaultKeytabVisibilityMap);
+      put("hive_server_process", defaultKeytabVisibilityMap);
+      put("namenode_service_rpc_queue_latency_hourly", hdfsVisibilityMap);
+      put("namenode_client_rpc_queue_latency_hourly", hdfsVisibilityMap);
+      put("namenode_service_rpc_processing_latency_hourly", hdfsVisibilityMap);
+      put("namenode_client_rpc_processing_latency_hourly", hdfsVisibilityMap);
+      put("increase_nn_heap_usage_daily", hdfsVisibilityMap);
+      put("namenode_service_rpc_processing_latency_daily", hdfsVisibilityMap);
+      put("namenode_client_rpc_processing_latency_daily", hdfsVisibilityMap);
+      put("namenode_service_rpc_queue_latency_daily", hdfsVisibilityMap);
+      put("namenode_client_rpc_queue_latency_daily", hdfsVisibilityMap);
+      put("namenode_increase_in_storage_capacity_usage_daily", hdfsVisibilityMap);
+      put("increase_nn_heap_usage_weekly", hdfsVisibilityMap);
+      put("namenode_increase_in_storage_capacity_usage_weekly", hdfsVisibilityMap);
+    }};
+
+    // list of alerts that need to get property updates
+    List<String> alertNamesForPropertyUpdates = new ArrayList<String>() {{
+      add("namenode_service_rpc_queue_latency_hourly");
+      add("namenode_client_rpc_queue_latency_hourly");
+      add("namenode_service_rpc_processing_latency_hourly");
+      add("namenode_client_rpc_processing_latency_hourly");
+      add("increase_nn_heap_usage_daily");
+      add("namenode_service_rpc_processing_latency_daily");
+      add("namenode_client_rpc_processing_latency_daily");
+      add("namenode_service_rpc_queue_latency_daily");
+      add("namenode_client_rpc_queue_latency_daily");
+      add("namenode_increase_in_storage_capacity_usage_daily");
+      add("increase_nn_heap_usage_weekly");
+      add("namenode_increase_in_storage_capacity_usage_weekly");
+    }};
+
     LOG.info("Updating alert definitions.");
     AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class);
     AlertDefinitionDAO alertDefinitionDAO = injector.getInstance(AlertDefinitionDAO.class);
@@ -272,6 +321,7 @@ public class UpgradeCatalog240 extends AbstractUpgradeCatalog {
     for (final Cluster cluster : clusterMap.values()) {
       long clusterID = cluster.getClusterId();
 
+      // here goes alerts that need get new properties
       final AlertDefinitionEntity namenodeLastCheckpointAlertDefinitionEntity = alertDefinitionDAO.findByName(
               clusterID, "namenode_last_checkpoint");
       final AlertDefinitionEntity namenodeHAHealthAlertDefinitionEntity = alertDefinitionDAO.findByName(
@@ -307,16 +357,40 @@ public class UpgradeCatalog240 extends AbstractUpgradeCatalog {
       checkedPutToMap(alertDefinitionParams, flumeAgentStatusAlertDefinitionEntity,
               Lists.newArrayList("run.directory"));
 
+      List<AlertDefinitionEntity> definitionsForPropertyUpdates = new ArrayList<>();
+
+      // adding new properties
       for(Map.Entry<AlertDefinitionEntity, List<String>> entry : alertDefinitionParams.entrySet()){
         AlertDefinitionEntity alertDefinition = entry.getKey();
         String source = alertDefinition.getSource();
-
         alertDefinition.setSource(addParam(source, entry.getValue()));
-        alertDefinition.setHash(UUID.randomUUID().toString());
+        definitionsForPropertyUpdates.add(alertDefinition);
+      }
 
-        alertDefinitionDAO.merge(alertDefinition);
+      // here goes alerts that need update for existing properties
+      for(String name : alertNamesForPropertyUpdates) {
+        AlertDefinitionEntity alertDefinition = alertDefinitionDAO.findByName(clusterID, name);
+        if(alertDefinition != null) {
+          definitionsForPropertyUpdates.add(alertDefinition);
+        }
       }
 
+      // updating old and new properties, best way to use map like visibilityMap.
+      for(AlertDefinitionEntity alertDefinition : definitionsForPropertyUpdates) {
+        // here goes property updates
+        if(visibilityMap.containsKey(alertDefinition.getDefinitionName())) {
+          for(Map.Entry<String, String> entry : visibilityMap.get(alertDefinition.getDefinitionName()).entrySet()){
+            String paramName = entry.getKey();
+            String visibilityValue = entry.getValue();
+            String source = alertDefinition.getSource();
+            alertDefinition.setSource(addParamOption(source, paramName, "visibility", visibilityValue));
+          }
+        }
+
+        // regeneration of hash and writing modified alerts to database, must go after all modifications finished
+        alertDefinition.setHash(UUID.randomUUID().toString());
+        alertDefinitionDAO.merge(alertDefinition);
+      }
     }
   }
 
@@ -330,6 +404,30 @@ public class UpgradeCatalog240 extends AbstractUpgradeCatalog {
     }
   }
 
+  /**
+   * Add option to script parameter.
+   * @param source json string of script source
+   * @param paramName parameter name
+   * @param optionName option name
+   * @param optionValue option value
+   * @return modified source
+   */
+  protected String addParamOption(String source, String paramName, String optionName, String optionValue){
+    JsonObject sourceJson = new JsonParser().parse(source).getAsJsonObject();
+    JsonArray parametersJson = sourceJson.getAsJsonArray("parameters");
+    if(parametersJson != null && !parametersJson.isJsonNull()) {
+      for(JsonElement param : parametersJson) {
+        if(param.isJsonObject()) {
+          JsonObject paramObject = param.getAsJsonObject();
+          if(paramObject.has("name") && paramObject.get("name").getAsString().equals(paramName)){
+            paramObject.add(optionName, new JsonPrimitive(optionValue));
+          }
+        }
+      }
+    }
+    return sourceJson.toString();
+  }
+
   protected String addParam(String source, List<String> params) {
     JsonObject sourceJson = new JsonParser().parse(source).getAsJsonObject();
     JsonArray parametersJson = sourceJson.getAsJsonArray("parameters");

http://git-wip-us.apache.org/repos/asf/ambari/blob/7debaaee/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
index fc3e21f..d6f53cc 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json
@@ -537,7 +537,8 @@
               "display_name": "Whether active and stanby NameNodes metrics should be merged",
               "value": "false",
               "type": "STRING",
-              "description": "Whether active and stanby NameNodes metrics should be merged."
+              "description": "Whether active and stanby NameNodes metrics should be merged.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "interval",
@@ -551,14 +552,16 @@
               "display_name": "AMS application id",
               "value": "NAMENODE",
               "type": "STRING",
-              "description": "The application id used to retrieve the metric."
+              "description": "The application id used to retrieve the metric.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metricName",
               "display_name": "Metric Name",
               "value": "rpc.rpc.datanode.RpcQueueTimeAvgTime",
               "type": "STRING",
-              "description": "The metric to monitor."
+              "description": "The metric to monitor.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metric.deviation.warning.threshold",
@@ -602,7 +605,8 @@
               "display_name": "Whether active and stanby NameNodes metrics should be merged",
               "value": "false",
               "type": "STRING",
-              "description": "Whether active and stanby NameNodes metrics should be merged."
+              "description": "Whether active and stanby NameNodes metrics should be merged.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "interval",
@@ -616,14 +620,16 @@
               "display_name": "AMS application id",
               "value": "NAMENODE",
               "type": "STRING",
-              "description": "The application id used to retrieve the metric."
+              "description": "The application id used to retrieve the metric.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metricName",
               "display_name": "Metric Name",
               "value": "rpc.rpc.client.RpcQueueTimeAvgTime",
               "type": "STRING",
-              "description": "The metric to monitor."
+              "description": "The metric to monitor.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metric.deviation.warning.threshold",
@@ -667,7 +673,8 @@
               "display_name": "Whether active and stanby NameNodes metrics should be merged",
               "value": "false",
               "type": "STRING",
-              "description": "Whether active and stanby NameNodes metrics should be merged."
+              "description": "Whether active and stanby NameNodes metrics should be merged.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "interval",
@@ -681,14 +688,16 @@
               "display_name": "AMS application id",
               "value": "NAMENODE",
               "type": "STRING",
-              "description": "The application id used to retrieve the metric."
+              "description": "The application id used to retrieve the metric.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metricName",
               "display_name": "Metric Name",
               "value": "rpc.rpc.datanode.RpcProcessingTimeAvgTime",
               "type": "STRING",
-              "description": "The metric to monitor."
+              "description": "The metric to monitor.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metric.deviation.warning.threshold",
@@ -732,7 +741,8 @@
               "display_name": "Whether active and stanby NameNodes metrics should be merged",
               "value": "false",
               "type": "STRING",
-              "description": "Whether active and stanby NameNodes metrics should be merged."
+              "description": "Whether active and stanby NameNodes metrics should be merged.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "interval",
@@ -746,14 +756,16 @@
               "display_name": "AMS application id",
               "value": "NAMENODE",
               "type": "STRING",
-              "description": "The application id used to retrieve the metric."
+              "description": "The application id used to retrieve the metric.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metricName",
               "display_name": "Metric Name",
               "value": "rpc.rpc.client.RpcProcessingTimeAvgTime",
               "type": "STRING",
-              "description": "The metric to monitor."
+              "description": "The metric to monitor.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metric.deviation.warning.threshold",
@@ -797,7 +809,8 @@
               "display_name": "Whether active and stanby NameNodes metrics should be merged",
               "value": "false",
               "type": "STRING",
-              "description": "Whether active and stanby NameNodes metrics should be merged."
+              "description": "Whether active and stanby NameNodes metrics should be merged.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "interval",
@@ -811,14 +824,16 @@
               "display_name": "AMS application id",
               "value": "NAMENODE",
               "type": "STRING",
-              "description": "The application id used to retrieve the metric."
+              "description": "The application id used to retrieve the metric.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metricName",
               "display_name": "Metric Name",
               "value": "jvm.JvmMetrics.MemHeapUsedM",
               "type": "STRING",
-              "description": "The metric to monitor."
+              "description": "The metric to monitor.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metric.deviation.warning.threshold",
@@ -855,7 +870,8 @@
               "display_name": "Whether active and stanby NameNodes metrics should be merged",
               "value": "false",
               "type": "STRING",
-              "description": "Whether active and stanby NameNodes metrics should be merged."
+              "description": "Whether active and stanby NameNodes metrics should be merged.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "interval",
@@ -869,14 +885,16 @@
               "display_name": "AMS application id",
               "value": "NAMENODE",
               "type": "STRING",
-              "description": "The application id used to retrieve the metric."
+              "description": "The application id used to retrieve the metric.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metricName",
               "display_name": "Metric Name",
               "value": "rpc.rpc.datanode.RpcProcessingTimeAvgTime",
               "type": "STRING",
-              "description": "The metric to monitor."
+              "description": "The metric to monitor.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metric.deviation.warning.threshold",
@@ -920,7 +938,8 @@
               "display_name": "Whether active and stanby NameNodes metrics should be merged",
               "value": "false",
               "type": "STRING",
-              "description": "Whether active and stanby NameNodes metrics should be merged."
+              "description": "Whether active and stanby NameNodes metrics should be merged.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "interval",
@@ -934,14 +953,16 @@
               "display_name": "AMS application id",
               "value": "NAMENODE",
               "type": "STRING",
-              "description": "The application id used to retrieve the metric."
+              "description": "The application id used to retrieve the metric.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metricName",
               "display_name": "Metric Name",
               "value": "rpc.rpc.client.RpcProcessingTimeAvgTime",
               "type": "STRING",
-              "description": "The metric to monitor."
+              "description": "The metric to monitor.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metric.deviation.warning.threshold",
@@ -985,7 +1006,8 @@
               "display_name": "Whether active and stanby NameNodes metrics should be merged",
               "value": "false",
               "type": "STRING",
-              "description": "Whether active and stanby NameNodes metrics should be merged."
+              "description": "Whether active and stanby NameNodes metrics should be merged.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "interval",
@@ -999,14 +1021,16 @@
               "display_name": "AMS application id",
               "value": "NAMENODE",
               "type": "STRING",
-              "description": "The application id used to retrieve the metric."
+              "description": "The application id used to retrieve the metric.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metricName",
               "display_name": "Metric Name",
               "value": "rpc.rpc.datanode.RpcQueueTimeAvgTime",
               "type": "STRING",
-              "description": "The metric to monitor."
+              "description": "The metric to monitor.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metric.deviation.warning.threshold",
@@ -1050,7 +1074,8 @@
               "display_name": "Whether active and stanby NameNodes metrics should be merged",
               "value": "false",
               "type": "STRING",
-              "description": "Whether active and stanby NameNodes metrics should be merged."
+              "description": "Whether active and stanby NameNodes metrics should be merged.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "interval",
@@ -1064,14 +1089,16 @@
               "display_name": "AMS application id",
               "value": "NAMENODE",
               "type": "STRING",
-              "description": "The application id used to retrieve the metric."
+              "description": "The application id used to retrieve the metric.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metricName",
               "display_name": "Metric Name",
               "value": "rpc.rpc.client.RpcQueueTimeAvgTime",
               "type": "STRING",
-              "description": "The metric to monitor."
+              "description": "The metric to monitor.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metric.deviation.warning.threshold",
@@ -1115,7 +1142,8 @@
               "display_name": "Whether active and stanby NameNodes metrics should be merged",
               "value": "false",
               "type": "STRING",
-              "description": "Whether active and stanby NameNodes metrics should be merged."
+              "description": "Whether active and stanby NameNodes metrics should be merged.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "interval",
@@ -1129,14 +1157,16 @@
               "display_name": "AMS application id",
               "value": "NAMENODE",
               "type": "STRING",
-              "description": "The application id used to retrieve the metric."
+              "description": "The application id used to retrieve the metric.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metricName",
               "display_name": "Metric Name",
               "value": "dfs.FSNamesystem.CapacityUsed",
               "type": "STRING",
-              "description": "The metric to monitor."
+              "description": "The metric to monitor.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metric.deviation.warning.threshold",
@@ -1173,7 +1203,8 @@
               "display_name": "Whether active and stanby NameNodes metrics should be merged",
               "value": "false",
               "type": "STRING",
-              "description": "Whether active and stanby NameNodes metrics should be merged."
+              "description": "Whether active and stanby NameNodes metrics should be merged.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "interval",
@@ -1187,14 +1218,16 @@
               "display_name": "AMS application id",
               "value": "NAMENODE",
               "type": "STRING",
-              "description": "The application id used to retrieve the metric."
+              "description": "The application id used to retrieve the metric.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metricName",
               "display_name": "Metric Name",
               "value": "jvm.JvmMetrics.MemHeapUsedM",
               "type": "STRING",
-              "description": "The metric to monitor."
+              "description": "The metric to monitor.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metric.deviation.warning.threshold",
@@ -1231,7 +1264,8 @@
               "display_name": "Whether active and stanby NameNodes metrics should be merged",
               "value": "false",
               "type": "STRING",
-              "description": "Whether active and stanby NameNodes metrics should be merged."
+              "description": "Whether active and stanby NameNodes metrics should be merged.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "interval",
@@ -1245,14 +1279,16 @@
               "display_name": "AMS application id",
               "value": "NAMENODE",
               "type": "STRING",
-              "description": "The application id used to retrieve the metric."
+              "description": "The application id used to retrieve the metric.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metricName",
               "display_name": "Metric Name",
               "value": "dfs.FSNamesystem.CapacityUsed",
               "type": "STRING",
-              "description": "The metric to monitor."
+              "description": "The metric to monitor.",
+              "visibility": "HIDDEN"
             },
             {
               "name": "metric.deviation.warning.threshold",

http://git-wip-us.apache.org/repos/asf/ambari/blob/7debaaee/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/alerts.json b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/alerts.json
index 2ff7069..1f86e57 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/alerts.json
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/alerts.json
@@ -33,14 +33,16 @@
               "display_name": "Default Smoke Principal",
               "value": "ambari-qa@EXAMPLE.COM",
               "type": "STRING",
-              "description": "The principal to use when retrieving the kerberos ticket if not specified in cluster-env/smokeuser_principal_name"
+              "description": "The principal to use when retrieving the kerberos ticket if not specified in cluster-env/smokeuser_principal_name",
+              "visibility": "HIDDEN"
             },
             {
               "name": "default.smoke.keytab",
               "display_name": "Default Smoke Keytab",
               "value": "/etc/security/keytabs/smokeuser.headless.keytab",
               "type": "STRING",
-              "description": "The keytab to use when retrieving the kerberos ticket if not specified in cluster-env/smokeuser_keytab"
+              "description": "The keytab to use when retrieving the kerberos ticket if not specified in cluster-env/smokeuser_keytab",
+              "visibility": "HIDDEN"
             }
           ]
         }
@@ -78,14 +80,16 @@
               "display_name": "Default Smoke Principal",
               "value": "ambari-qa@EXAMPLE.COM",
               "type": "STRING",
-              "description": "The principal to use when retrieving the kerberos ticket if not specified in cluster-env/smokeuser_principal_name"
+              "description": "The principal to use when retrieving the kerberos ticket if not specified in cluster-env/smokeuser_principal_name",
+              "visibility": "HIDDEN"
             },
             {
               "name": "default.smoke.keytab",
               "display_name": "Default Smoke Keytab",
               "value": "/etc/security/keytabs/smokeuser.headless.keytab",
               "type": "STRING",
-              "description": "The keytab to use when retrieving the kerberos ticket if not specified in cluster-env/smokeuser_keytab"
+              "description": "The keytab to use when retrieving the kerberos ticket if not specified in cluster-env/smokeuser_keytab",
+              "visibility": "HIDDEN"
             }
           ]
         }
@@ -153,7 +157,8 @@
               "display_name": "Default Smoke User",
               "value": "ambari-qa",
               "type": "STRING",
-              "description": "The user that will run the Hive commands if not specified in cluster-env/smokeuser"
+              "description": "The user that will run the Hive commands if not specified in cluster-env/smokeuser",
+              "visibility": "HIDDEN"
             },
             {
               "name": "connection.timeout",