Browse Source

AMBARI-9534 AMS Service Rename (mpapirkovskyy via dsen)

Dmytro Sen 10 years ago
parent
commit
4eccfbc433
93 changed files with 318 additions and 457 deletions
  1. 2 2
      ambari-admin/pom.xml
  2. 2 2
      ambari-agent/pom.xml
  3. 2 2
      ambari-client/groovy-client/pom.xml
  4. 2 2
      ambari-client/pom.xml
  5. 2 2
      ambari-client/python-client/pom.xml
  6. 1 1
      ambari-metrics/ambari-metrics-timelineservice/conf/unix/ams-site.xml
  7. 1 1
      ambari-metrics/ambari-metrics-timelineservice/conf/windows/ams-site.xml
  8. 2 2
      ambari-metrics/ambari-metrics-timelineservice/src/main/resources/scripts/ams_query.py
  9. 1 1
      ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryClientService.java
  10. 2 2
      ambari-project/pom.xml
  11. 3 3
      ambari-server/pom.xml
  12. 3 3
      ambari-server/src/main/java/org/apache/ambari/server/Role.java
  13. 9 10
      ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java
  14. 7 7
      ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
  15. 2 2
      ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProvider.java
  16. 1 1
      ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java
  17. 1 1
      ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java
  18. 1 1
      ambari-server/src/main/java/org/apache/ambari/server/state/Service.java
  19. 1 1
      ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
  20. 1 1
      ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostSummary.java
  21. 23 23
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/alerts.json
  22. 6 6
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml
  23. 1 3
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml
  24. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml
  25. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-policy.xml
  26. 1 1
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-security-site.xml
  27. 5 5
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml
  28. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml
  29. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-site.xml
  30. 3 3
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json
  31. 9 18
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml
  32. 1 11
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/alerts/alert_ambari_metrics_monitor.py
  33. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/hbaseSmokeVerify.sh
  34. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/__init__.py
  35. 2 18
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
  36. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams_service.py
  37. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/functions.py
  38. 2 16
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
  39. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase_master.py
  40. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase_regionserver.py
  41. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase_service.py
  42. 60 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
  43. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py
  44. 14 28
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
  45. 2 2
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_linux.py
  46. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py
  47. 14 14
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
  48. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_mapping.py
  49. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
  50. 4 13
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status_params.py
  51. 1 1
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/ams_collector_jaas.conf.j2
  52. 1 1
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/ams_zookeeper_jaas.conf.j2
  53. 1 1
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hadoop-metrics2-hbase.properties.j2
  54. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hbase_client_jaas.conf.j2
  55. 1 1
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hbase_grant_permissions.j2
  56. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hbase_master_jaas.conf.j2
  57. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hbase_regionserver_jaas.conf.j2
  58. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metric_groups.conf.j2
  59. 0 0
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metric_monitor.ini.j2
  60. 1 1
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/regionservers.j2
  61. 1 1
      ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/smoketest_metrics.json.j2
  62. 0 124
      ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/metric_collector.py
  63. 2 2
      ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json
  64. 27 0
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/AMBARI_METRICS/metainfo.xml
  65. 9 9
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
  66. 6 6
      ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
  67. 0 0
      ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMBARI_METRICS/configuration/ams-env.xml
  68. 0 0
      ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMBARI_METRICS/configuration/ams-hbase-env.xml
  69. 2 2
      ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMBARI_METRICS/configuration/ams-hbase-site.xml
  70. 0 0
      ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMBARI_METRICS/configuration/ams-log4j.xml
  71. 0 0
      ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMBARI_METRICS/configuration/ams-site.xml
  72. 2 2
      ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMBARI_METRICS/metainfo.xml
  73. 0 26
      ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMS/metainfo.xml
  74. 1 1
      ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/AMBARI_METRICS/metainfo.xml
  75. 2 2
      ambari-server/src/test/java/org/apache/ambari/server/controller/internal/MetricsServiceProviderTest.java
  76. 1 1
      ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
  77. 3 3
      ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
  78. 3 3
      ambari-shell/ambari-groovy-shell/pom.xml
  79. 2 2
      ambari-shell/ambari-python-shell/pom.xml
  80. 2 2
      ambari-shell/pom.xml
  81. 2 2
      ambari-views/pom.xml
  82. 1 2
      ambari-web/app/controllers/wizard/step4_controller.js
  83. 27 27
      ambari-web/app/data/HDP2/site_properties.js
  84. 1 1
      ambari-web/app/models/stack_service.js
  85. 2 2
      ambari-web/pom.xml
  86. 13 13
      ambari-web/test/controllers/wizard/step4_test.js
  87. 3 3
      ambari-web/test/controllers/wizard/step7_test.js
  88. 1 1
      ambari-web/test/mock_data_setup/configs_mock_data.js
  89. 1 1
      ambari-web/test/utils/config_test.js
  90. 1 1
      contrib/views/pom.xml
  91. 2 2
      contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
  92. 2 2
      contrib/views/slider/src/main/resources/ui/app/initialize.js
  93. 1 1
      pom.xml

+ 2 - 2
ambari-admin/pom.xml

@@ -19,7 +19,7 @@
   <parent>
   <parent>
     <groupId>org.apache.ambari</groupId>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-project</artifactId>
     <artifactId>ambari-project</artifactId>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>2.0.0.0</version>
     <relativePath>../ambari-project</relativePath>
     <relativePath>../ambari-project</relativePath>
   </parent>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <modelVersion>4.0.0</modelVersion>
@@ -27,7 +27,7 @@
   <artifactId>ambari-admin</artifactId>
   <artifactId>ambari-admin</artifactId>
   <packaging>jar</packaging>
   <packaging>jar</packaging>
   <name>Ambari Admin View</name>
   <name>Ambari Admin View</name>
-  <version>1.3.0-SNAPSHOT</version>
+  <version>2.0.0.0</version>
   <description>Admin control panel</description>
   <description>Admin control panel</description>
   <build>
   <build>
     <plugins>
     <plugins>

+ 2 - 2
ambari-agent/pom.xml

@@ -19,14 +19,14 @@
   <parent>
   <parent>
     <groupId>org.apache.ambari</groupId>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-project</artifactId>
     <artifactId>ambari-project</artifactId>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>2.0.0.0</version>
     <relativePath>../ambari-project</relativePath>
     <relativePath>../ambari-project</relativePath>
   </parent>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.ambari</groupId>
   <groupId>org.apache.ambari</groupId>
   <artifactId>ambari-agent</artifactId>
   <artifactId>ambari-agent</artifactId>
   <packaging>pom</packaging>
   <packaging>pom</packaging>
-  <version>1.3.0-SNAPSHOT</version>
+  <version>2.0.0.0</version>
   <name>Ambari Agent</name>
   <name>Ambari Agent</name>
   <description>Ambari Agent</description>
   <description>Ambari Agent</description>
   <properties>
   <properties>

+ 2 - 2
ambari-client/groovy-client/pom.xml

@@ -12,14 +12,14 @@
   <parent>
   <parent>
     <artifactId>ambari-client</artifactId>
     <artifactId>ambari-client</artifactId>
     <groupId>org.apache.ambari</groupId>
     <groupId>org.apache.ambari</groupId>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>2.0.0.0</version>
     <relativePath>../../ambari-client/</relativePath>
     <relativePath>../../ambari-client/</relativePath>
   </parent>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.ambari</groupId>
   <groupId>org.apache.ambari</groupId>
   <artifactId>groovy-client</artifactId>
   <artifactId>groovy-client</artifactId>
   <packaging>jar</packaging>
   <packaging>jar</packaging>
-  <version>1.3.0-SNAPSHOT</version>
+  <version>2.0.0.0</version>
   <name>Ambari Groovy Client</name>
   <name>Ambari Groovy Client</name>
   <description>Ambari Groovy client</description>
   <description>Ambari Groovy client</description>
   <properties>
   <properties>

+ 2 - 2
ambari-client/pom.xml

@@ -20,14 +20,14 @@
   <parent>
   <parent>
     <groupId>org.apache.ambari</groupId>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-project</artifactId>
     <artifactId>ambari-project</artifactId>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>2.0.0.0</version>
     <relativePath>../ambari-project</relativePath>
     <relativePath>../ambari-project</relativePath>
   </parent>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.ambari</groupId>
   <groupId>org.apache.ambari</groupId>
   <artifactId>ambari-client</artifactId>
   <artifactId>ambari-client</artifactId>
   <packaging>pom</packaging>
   <packaging>pom</packaging>
-  <version>1.3.0-SNAPSHOT</version>
+  <version>2.0.0.0</version>
   <name>Ambari Client</name>
   <name>Ambari Client</name>
   <description>Ambari client</description>
   <description>Ambari client</description>
   <modules>
   <modules>

+ 2 - 2
ambari-client/python-client/pom.xml

@@ -19,14 +19,14 @@
   <parent>
   <parent>
     <groupId>org.apache.ambari</groupId>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-client</artifactId>
     <artifactId>ambari-client</artifactId>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>2.0.0.0</version>
     <relativePath>../../ambari-client</relativePath>
     <relativePath>../../ambari-client</relativePath>
   </parent>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.ambari</groupId>
   <groupId>org.apache.ambari</groupId>
   <artifactId>python-client</artifactId>
   <artifactId>python-client</artifactId>
   <packaging>pom</packaging>
   <packaging>pom</packaging>
-  <version>1.3.0-SNAPSHOT</version>
+  <version>2.0.0.0</version>
   <name>Ambari Python Client</name>
   <name>Ambari Python Client</name>
   <description>Ambari Python client</description>
   <description>Ambari Python client</description>
   <properties>
   <properties>

+ 1 - 1
ambari-metrics/ambari-metrics-timelineservice/conf/unix/ams-site.xml

@@ -20,6 +20,6 @@
 
 
 <configuration>
 <configuration>
 
 
-  <!-- Site specific AMS configuration properties -->
+  <!-- Site specific AMBARI_METRICS configuration properties -->
 
 
 </configuration>
 </configuration>

+ 1 - 1
ambari-metrics/ambari-metrics-timelineservice/conf/windows/ams-site.xml

@@ -20,6 +20,6 @@
 
 
 <configuration>
 <configuration>
 
 
-  <!-- Site specific AMS configuration properties -->
+  <!-- Site specific AMBARI_METRICS configuration properties -->
 
 
 </configuration>
 </configuration>

+ 2 - 2
ambari-metrics/ambari-metrics-timelineservice/src/main/resources/scripts/ams_query.py

@@ -83,7 +83,7 @@ def main(argv=None):
   parser = optparse.OptionParser()
   parser = optparse.OptionParser()
 
 
   parser.add_option("-H", "--host", dest="host",
   parser.add_option("-H", "--host", dest="host",
-                    help="AMS host")
+                    help="Ambari Metrics host")
   parser.add_option("-t", "--starttime", dest="start_time_secs",
   parser.add_option("-t", "--starttime", dest="start_time_secs",
                     default=int(time.time()),
                     default=int(time.time()),
                     help="start time in seconds, default value is current time")
                     help="start time in seconds, default value is current time")
@@ -92,7 +92,7 @@ def main(argv=None):
   (options, args) = parser.parse_args()
   (options, args) = parser.parse_args()
 
 
   if options.host is None:
   if options.host is None:
-    print "AMS host name is required (--host or -h)"
+    print "Ambari Metrics host name is required (--host or -h)"
     exit(-1)
     exit(-1)
 
 
   if options.node_names is None:
   if options.node_names is None:

+ 1 - 1
ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryClientService.java

@@ -50,7 +50,7 @@ import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.Test;
 
 
-// Timeline service client support is not enabled for AMS
+// Timeline service client support is not enabled for AMBARI_METRICS
 @Ignore
 @Ignore
 public class TestApplicationHistoryClientService extends
 public class TestApplicationHistoryClientService extends
     ApplicationHistoryStoreTestUtils {
     ApplicationHistoryStoreTestUtils {

+ 2 - 2
ambari-project/pom.xml

@@ -18,11 +18,11 @@
   <parent>
   <parent>
     <groupId>org.apache.ambari</groupId>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari</artifactId>
     <artifactId>ambari</artifactId>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>2.0.0.0</version>
   </parent>
   </parent>
   <groupId>org.apache.ambari</groupId>
   <groupId>org.apache.ambari</groupId>
   <artifactId>ambari-project</artifactId>
   <artifactId>ambari-project</artifactId>
-  <version>1.3.0-SNAPSHOT</version>
+  <version>2.0.0.0</version>
   <description>Apache Ambari Project POM</description>
   <description>Apache Ambari Project POM</description>
   <name>Apache Ambari Project POM</name>
   <name>Apache Ambari Project POM</name>
   <licenses>
   <licenses>

+ 3 - 3
ambari-server/pom.xml

@@ -12,7 +12,7 @@
   <parent>
   <parent>
     <groupId>org.apache.ambari</groupId>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-project</artifactId>
     <artifactId>ambari-project</artifactId>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>2.0.0.0</version>
     <relativePath>../ambari-project</relativePath>
     <relativePath>../ambari-project</relativePath>
   </parent>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <modelVersion>4.0.0</modelVersion>
@@ -20,7 +20,7 @@
   <artifactId>ambari-server</artifactId>
   <artifactId>ambari-server</artifactId>
   <packaging>${packagingFormat}</packaging>
   <packaging>${packagingFormat}</packaging>
   <name>Ambari Server</name>
   <name>Ambari Server</name>
-  <version>1.3.0-SNAPSHOT</version>
+  <version>2.0.0.0</version>
   <description>Ambari Server</description>
   <description>Ambari Server</description>
   <properties>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -166,7 +166,7 @@
             <exclude>src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/templates/exclude_hosts_list.j2</exclude>
             <exclude>src/main/resources/stacks/HDP/2.1.GlusterFS/services/YARN/package/templates/exclude_hosts_list.j2</exclude>
             <exclude>src/main/windows/ambari-server.cmd</exclude>
             <exclude>src/main/windows/ambari-server.cmd</exclude>
             <exclude>src/main/windows/ambari-server.ps1</exclude>
             <exclude>src/main/windows/ambari-server.ps1</exclude>
-            <exclude>src/main/resources/common-services/AMS/0.1.0/package/templates/smoketest_metrics.json.j2</exclude>
+            <exclude>src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/smoketest_metrics.json.j2</exclude>
             <exclude>src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/balancer-emulator/balancer-err.log</exclude>
             <exclude>src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/balancer-emulator/balancer-err.log</exclude>
             <exclude>src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/balancer-emulator/balancer.log</exclude>
             <exclude>src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/balancer-emulator/balancer.log</exclude>
             <exclude>src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/balancer-emulator/balancer.log</exclude>
             <exclude>src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/balancer-emulator/balancer.log</exclude>

+ 3 - 3
ambari-server/src/main/java/org/apache/ambari/server/Role.java

@@ -107,9 +107,9 @@ public class Role {
   public static final Role KDC_SERVER = valueOf("KDC_SERVER");
   public static final Role KDC_SERVER = valueOf("KDC_SERVER");
   public static final Role KERBEROS_CLIENT = valueOf("KERBEROS_CLIENT");
   public static final Role KERBEROS_CLIENT = valueOf("KERBEROS_CLIENT");
   public static final Role KERBEROS_SERVICE_CHECK = valueOf("KERBEROS_SERVICE_CHECK");
   public static final Role KERBEROS_SERVICE_CHECK = valueOf("KERBEROS_SERVICE_CHECK");
-  public static final Role METRIC_COLLECTOR = valueOf("METRIC_COLLECTOR");
-  public static final Role METRIC_MONITOR = valueOf("METRIC_MONITOR");
-  public static final Role AMS_SERVICE_CHECK = valueOf("AMS_SERVICE_CHECK");
+  public static final Role METRICS_COLLECTOR = valueOf("METRICS_COLLECTOR");
+  public static final Role METRICS_MONITOR = valueOf("METRICS_MONITOR");
+  public static final Role AMS_SERVICE_CHECK = valueOf("AMBARI_METRICS_SERVICE_CHECK");
 
 
   private String name = null;
   private String name = null;
   
   

+ 9 - 10
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java

@@ -55,7 +55,6 @@ import org.apache.ambari.server.state.State;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
 
 
-import java.net.InetAddress;
 import java.util.Collections;
 import java.util.Collections;
 import java.util.EnumMap;
 import java.util.EnumMap;
 import java.util.HashMap;
 import java.util.HashMap;
@@ -85,7 +84,7 @@ public abstract class AbstractProviderModule implements ProviderModule,
   private static final String HOST_COMPONENT_HOST_NAME_PROPERTY_ID      = PropertyHelper.getPropertyId("HostRoles", "host_name");
   private static final String HOST_COMPONENT_HOST_NAME_PROPERTY_ID      = PropertyHelper.getPropertyId("HostRoles", "host_name");
   private static final String HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID = PropertyHelper.getPropertyId("HostRoles", "component_name");
   private static final String HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID = PropertyHelper.getPropertyId("HostRoles", "component_name");
   private static final String GANGLIA_SERVER                            = "GANGLIA_SERVER";
   private static final String GANGLIA_SERVER                            = "GANGLIA_SERVER";
-  private static final String METRIC_SERVER                             = "METRIC_COLLECTOR";
+  private static final String METRIC_SERVER                             = "METRICS_COLLECTOR";
   private static final String PROPERTIES_CATEGORY = "properties";
   private static final String PROPERTIES_CATEGORY = "properties";
   private static final Map<Service.Type, String> serviceConfigVersions = new ConcurrentHashMap<Service.Type, String>();
   private static final Map<Service.Type, String> serviceConfigVersions = new ConcurrentHashMap<Service.Type, String>();
   private static final Map<Service.Type, String> serviceConfigTypes = new EnumMap<Service.Type, String>(Service.Type.class);
   private static final Map<Service.Type, String> serviceConfigTypes = new EnumMap<Service.Type, String>(Service.Type.class);
@@ -105,7 +104,7 @@ public abstract class AbstractProviderModule implements ProviderModule,
     serviceConfigTypes.put(Service.Type.HBASE, "hbase-site");
     serviceConfigTypes.put(Service.Type.HBASE, "hbase-site");
     serviceConfigTypes.put(Service.Type.YARN, "yarn-site");
     serviceConfigTypes.put(Service.Type.YARN, "yarn-site");
     serviceConfigTypes.put(Service.Type.MAPREDUCE2, "mapred-site");
     serviceConfigTypes.put(Service.Type.MAPREDUCE2, "mapred-site");
-    serviceConfigTypes.put(Service.Type.AMS, "ams-site");
+    serviceConfigTypes.put(Service.Type.AMBARI_METRICS, "ams-site");
 
 
     componentServiceMap.put("NAMENODE", Service.Type.HDFS);
     componentServiceMap.put("NAMENODE", Service.Type.HDFS);
     componentServiceMap.put("DATANODE", Service.Type.HDFS);
     componentServiceMap.put("DATANODE", Service.Type.HDFS);
@@ -335,20 +334,20 @@ public abstract class AbstractProviderModule implements ProviderModule,
       return "80"; // Not called by the provider
       return "80"; // Not called by the provider
     } else if (service.equals(TIMELINE_METRICS)) {
     } else if (service.equals(TIMELINE_METRICS)) {
       try {
       try {
-        String configType = serviceConfigTypes.get(Service.Type.AMS);
+        String configType = serviceConfigTypes.get(Service.Type.AMBARI_METRICS);
         String currentConfigVersion = getDesiredConfigVersion(clusterName, configType);
         String currentConfigVersion = getDesiredConfigVersion(clusterName, configType);
-        String oldConfigVersion = serviceConfigVersions.get(Service.Type.AMS);
+        String oldConfigVersion = serviceConfigVersions.get(Service.Type.AMBARI_METRICS);
 
 
         if (!currentConfigVersion.equals(oldConfigVersion)) {
         if (!currentConfigVersion.equals(oldConfigVersion)) {
-          serviceConfigVersions.put(Service.Type.AMS, currentConfigVersion);
+          serviceConfigVersions.put(Service.Type.AMBARI_METRICS, currentConfigVersion);
 
 
           Map<String, String> configProperties = getDesiredConfigMap
           Map<String, String> configProperties = getDesiredConfigMap
             (clusterName, currentConfigVersion, configType,
             (clusterName, currentConfigVersion, configType,
-              Collections.singletonMap("METRIC_COLLECTOR",
+              Collections.singletonMap("METRICS_COLLECTOR",
                 new String[] { "timeline.metrics.service.webapp.address" }));
                 new String[] { "timeline.metrics.service.webapp.address" }));
 
 
           if (!configProperties.isEmpty()) {
           if (!configProperties.isEmpty()) {
-            clusterMetricServerPort = getPortString(configProperties.get("METRIC_COLLECTOR"));
+            clusterMetricServerPort = getPortString(configProperties.get("METRICS_COLLECTOR"));
           } else {
           } else {
             clusterMetricServerPort = COLLECTOR_DEFAULT_PORT;
             clusterMetricServerPort = COLLECTOR_DEFAULT_PORT;
           }
           }
@@ -399,8 +398,8 @@ public abstract class AbstractProviderModule implements ProviderModule,
       return isHostComponentLive(clusterName, collectorHostName, "GANGLIA",
       return isHostComponentLive(clusterName, collectorHostName, "GANGLIA",
         Role.GANGLIA_SERVER.name());
         Role.GANGLIA_SERVER.name());
     } else if (service.equals(TIMELINE_METRICS)) {
     } else if (service.equals(TIMELINE_METRICS)) {
-      return isHostComponentLive(clusterName, collectorHostName, "AMS",
-        Role.METRIC_COLLECTOR.name());
+      return isHostComponentLive(clusterName, collectorHostName, "AMBARI_METRICS",
+        Role.METRICS_COLLECTOR.name());
     }
     }
     return false;
     return false;
   }
   }

+ 7 - 7
ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java

@@ -52,7 +52,7 @@ import java.util.regex.Pattern;
 
 
 import static org.apache.ambari.server.Role.HBASE_MASTER;
 import static org.apache.ambari.server.Role.HBASE_MASTER;
 import static org.apache.ambari.server.Role.HBASE_REGIONSERVER;
 import static org.apache.ambari.server.Role.HBASE_REGIONSERVER;
-import static org.apache.ambari.server.Role.METRIC_COLLECTOR;
+import static org.apache.ambari.server.Role.METRICS_COLLECTOR;
 import static org.apache.ambari.server.controller.metrics.MetricsServiceProvider.MetricsService.TIMELINE_METRICS;
 import static org.apache.ambari.server.controller.metrics.MetricsServiceProvider.MetricsService.TIMELINE_METRICS;
 import static org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
 import static org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
 
 
@@ -66,7 +66,7 @@ public abstract class AMSPropertyProvider extends MetricsPropertyProvider {
   static {
   static {
     TIMELINE_APPID_MAP.put(HBASE_MASTER.name(), "HBASE");
     TIMELINE_APPID_MAP.put(HBASE_MASTER.name(), "HBASE");
     TIMELINE_APPID_MAP.put(HBASE_REGIONSERVER.name(), "HBASE");
     TIMELINE_APPID_MAP.put(HBASE_REGIONSERVER.name(), "HBASE");
-    TIMELINE_APPID_MAP.put(METRIC_COLLECTOR.name(), "AMS-HBASE");
+    TIMELINE_APPID_MAP.put(METRICS_COLLECTOR.name(), "AMS-HBASE");
 
 
     mapper = new ObjectMapper();
     mapper = new ObjectMapper();
     AnnotationIntrospector introspector = new JaxbAnnotationIntrospector();
     AnnotationIntrospector introspector = new JaxbAnnotationIntrospector();
@@ -158,14 +158,14 @@ public abstract class AMSPropertyProvider extends MetricsPropertyProvider {
 
 
           // Check liveliness of host
           // Check liveliness of host
           if (!hostProvider.isCollectorHostLive(clusterName, TIMELINE_METRICS)) {
           if (!hostProvider.isCollectorHostLive(clusterName, TIMELINE_METRICS)) {
-            LOG.info("METRIC_COLLECTOR host is not live. Skip populating " +
+            LOG.info("METRICS_COLLECTOR host is not live. Skip populating " +
               "resources with metrics.");
               "resources with metrics.");
             return Collections.emptySet();
             return Collections.emptySet();
           }
           }
 
 
           // Check liveliness of Collector
           // Check liveliness of Collector
           if (!hostProvider.isCollectorComponentLive(clusterName, TIMELINE_METRICS)) {
           if (!hostProvider.isCollectorComponentLive(clusterName, TIMELINE_METRICS)) {
-            LOG.info("METRIC_COLLECTOR is not live. Skip populating resources" +
+            LOG.info("METRICS_COLLECTOR is not live. Skip populating resources" +
               " with metrics.");
               " with metrics.");
             return Collections.emptySet();
             return Collections.emptySet();
           }
           }
@@ -358,11 +358,11 @@ public abstract class AMSPropertyProvider extends MetricsPropertyProvider {
 
 
   /**
   /**
    * Return a propertyInfoMap for all metrics. Handles special case for
    * Return a propertyInfoMap for all metrics. Handles special case for
-   * METRIC_COLLECTOR metrics by returning HBase metrics.
+   * METRICS_COLLECTOR metrics by returning HBase metrics.
    */
    */
   @Override
   @Override
   public Map<String, Map<String, PropertyInfo>> getComponentMetrics() {
   public Map<String, Map<String, PropertyInfo>> getComponentMetrics() {
-    if (super.getComponentMetrics().containsKey(METRIC_COLLECTOR.name())) {
+    if (super.getComponentMetrics().containsKey(METRICS_COLLECTOR.name())) {
       return super.getComponentMetrics();
       return super.getComponentMetrics();
     }
     }
 
 
@@ -380,7 +380,7 @@ public abstract class AMSPropertyProvider extends MetricsPropertyProvider {
       amsMetrics.putAll(metricPropertyIds.get(HBASE_REGIONSERVER.name()));
       amsMetrics.putAll(metricPropertyIds.get(HBASE_REGIONSERVER.name()));
     }
     }
     if (!amsMetrics.isEmpty()) {
     if (!amsMetrics.isEmpty()) {
-      super.getComponentMetrics().putAll(Collections.singletonMap(METRIC_COLLECTOR.name(), amsMetrics));
+      super.getComponentMetrics().putAll(Collections.singletonMap(METRICS_COLLECTOR.name(), amsMetrics));
     }
     }
 
 
     return super.getComponentMetrics();
     return super.getComponentMetrics();

+ 2 - 2
ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSReportPropertyProvider.java

@@ -107,14 +107,14 @@ public class AMSReportPropertyProvider extends MetricsReportPropertyProvider {
 
 
     // Check liveliness of host
     // Check liveliness of host
     if (!hostProvider.isCollectorHostLive(clusterName, TIMELINE_METRICS)) {
     if (!hostProvider.isCollectorHostLive(clusterName, TIMELINE_METRICS)) {
-      LOG.info("METRIC_COLLECTOR host is not live. Skip populating " +
+      LOG.info("METRICS_COLLECTOR host is not live. Skip populating " +
         "resources with metrics.");
         "resources with metrics.");
       return true;
       return true;
     }
     }
 
 
     // Check liveliness of Collector
     // Check liveliness of Collector
     if (!hostProvider.isCollectorComponentLive(clusterName, TIMELINE_METRICS)) {
     if (!hostProvider.isCollectorComponentLive(clusterName, TIMELINE_METRICS)) {
-      LOG.info("METRIC_COLLECTOR is not live. Skip populating resources" +
+      LOG.info("METRICS_COLLECTOR is not live. Skip populating resources" +
         " with metrics.");
         " with metrics.");
       return true;
       return true;
     }
     }

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java

@@ -108,7 +108,7 @@ public class FinalizeUpgradeAction extends AbstractServerAction {
       boolean atLeastOneHostInInstalledState = false;
       boolean atLeastOneHostInInstalledState = false;
 
 
       // It is important to only iterate over the hosts with a version, as opposed to all hosts, since some hosts
       // It is important to only iterate over the hosts with a version, as opposed to all hosts, since some hosts
-      // may only have components that do not advertise a version, such as AMS.
+      // may only have components that do not advertise a version, such as AMBARI_METRICS.
       for (HostVersionEntity hostVersion : hostVersions) {
       for (HostVersionEntity hostVersion : hostVersions) {
         boolean isStateCorrect = false;
         boolean isStateCorrect = false;
 
 

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java

@@ -40,7 +40,7 @@ public class ComponentInfo {
    * For example, Masters will typically advertise the version upon a RESTART.
    * For example, Masters will typically advertise the version upon a RESTART.
    * Whereas clients will advertise the version when INSTALLED.
    * Whereas clients will advertise the version when INSTALLED.
    * Some components do not need to advertise a version because it is either redundant, or they don't have a mechanism
    * Some components do not need to advertise a version because it is either redundant, or they don't have a mechanism
-   * at the moment. For instance, ZKFC has the same version as NameNode, while AMS and KERBEROS do not have a mechanism.
+   * at the moment. For instance, ZKFC has the same version as NameNode, while AMBARI_METRICS and KERBEROS do not have a mechanism.
    */
    */
   @XmlElements(@XmlElement(name = "versionAdvertised"))
   @XmlElements(@XmlElement(name = "versionAdvertised"))
   private boolean versionAdvertised = true;
   private boolean versionAdvertised = true;

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/state/Service.java

@@ -133,6 +133,6 @@ public interface Service {
     FLUME,
     FLUME,
     YARN,
     YARN,
     MAPREDUCE2,
     MAPREDUCE2,
-    AMS
+    AMBARI_METRICS
   }
   }
 }
 }

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java

@@ -1256,7 +1256,7 @@ public class ClusterImpl implements Cluster {
         for (HostComponentStateEntity hostComponentStateEntity : allHostComponents) {
         for (HostComponentStateEntity hostComponentStateEntity : allHostComponents) {
           if (hostComponentStateEntity.getVersion().equalsIgnoreCase(
           if (hostComponentStateEntity.getVersion().equalsIgnoreCase(
               State.UNKNOWN.toString())) {
               State.UNKNOWN.toString())) {
-            // Some Components cannot advertise a version. E.g., ZKF, AMS,
+            // Some Components cannot advertise a version. E.g., ZKF, AMBARI_METRICS,
             // Kerberos
             // Kerberos
             ComponentInfo compInfo = ambariMetaInfo.getComponent(
             ComponentInfo compInfo = ambariMetaInfo.getComponent(
                 stackId.getStackName(), stackId.getStackVersion(),
                 stackId.getStackName(), stackId.getStackVersion(),

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostSummary.java

@@ -52,7 +52,7 @@ public class ServiceComponentHostSummary  {
       if (!hostComponentStateEntity.getVersion().equalsIgnoreCase(State.UNKNOWN.toString())) {
       if (!hostComponentStateEntity.getVersion().equalsIgnoreCase(State.UNKNOWN.toString())) {
         versionedHostComponents.add(hostComponentStateEntity);
         versionedHostComponents.add(hostComponentStateEntity);
       } else {
       } else {
-        // Some Components cannot advertise a version. E.g., ZKF, AMS, Kerberos
+        // Some Components cannot advertise a version. E.g., ZKF, AMBARI_METRICS, Kerberos
         ComponentInfo compInfo = ambariMetaInfo.getComponent(
         ComponentInfo compInfo = ambariMetaInfo.getComponent(
             stackName, stackVersion, hostComponentStateEntity.getServiceName(),
             stackName, stackVersion, hostComponentStateEntity.getServiceName(),
             hostComponentStateEntity.getComponentName());
             hostComponentStateEntity.getComponentName());

+ 23 - 23
ambari-server/src/main/resources/common-services/AMS/0.1.0/alerts.json → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/alerts.json

@@ -1,16 +1,16 @@
 {
 {
-  "AMS": {
+  "AMBARI_METRICS": {
     "service": [
     "service": [
       {
       {
-        "name": "ams_metric_monitor_process_percent",
-        "label": "Percent Metric Monitors Available",
-        "description": "This alert is triggered if a percentage of Metric Monitor processes are not up and listening on the network for the configured warning and critical thresholds.",
+        "name": "metrics_monitor_process_percent",
+        "label": "Percent Metrics Monitors Available",
+        "description": "This alert is triggered if a percentage of Metrics Monitor processes are not up and listening on the network for the configured warning and critical thresholds.",
         "interval": 1,
         "interval": 1,
         "scope": "SERVICE",
         "scope": "SERVICE",
         "enabled": true,
         "enabled": true,
         "source": {
         "source": {
           "type": "AGGREGATE",
           "type": "AGGREGATE",
-          "alert_name": "ams_metric_monitor_process",
+          "alert_name": "ams_metrics_monitor_process",
           "reporting": {
           "reporting": {
             "ok": {
             "ok": {
               "text": "affected: [{1}], total: [{0}]"
               "text": "affected: [{1}], total: [{0}]"
@@ -27,11 +27,11 @@
         }
         }
       }
       }
     ],
     ],
-    "METRIC_COLLECTOR": [
+    "METRICS_COLLECTOR": [
       {
       {
-        "name": "ams_metric_collector_process",
-        "label": "Metric Collector Process",
-        "description": "This alert is triggered if the Metric Collector cannot be confirmed to be up and listening on the configured port for number of seconds equal to threshold.",
+        "name": "ams_metrics_collector_process",
+        "label": "Metrics Collector Process",
+        "description": "This alert is triggered if the Metrics Collector cannot be confirmed to be up and listening on the configured port for number of seconds equal to threshold.",
         "interval": 1,
         "interval": 1,
         "scope": "ANY",
         "scope": "ANY",
         "enabled": true,
         "enabled": true,
@@ -55,9 +55,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "ams_metric_collector_hbase_master_process",
-        "label": "Metric Collector - HBase Master Process",
-        "description": "This alert is triggered if the Metric Collector's HBase master processes cannot be confirmed to be up and listening on the network for the configured critical threshold, given in seconds.",
+        "name": "ams_metrics_collector_hbase_master_process",
+        "label": "Metrics Collector - HBase Master Process",
+        "description": "This alert is triggered if the Metrics Collector's HBase master processes cannot be confirmed to be up and listening on the network for the configured critical threshold, given in seconds.",
         "interval": 1,
         "interval": 1,
         "scope": "ANY",
         "scope": "ANY",
         "source": {
         "source": {
@@ -80,9 +80,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "ams_metric_collector_hbase_master_cpu",
-        "label": "Metric Collector HBase Maser CPU Utilization",
-        "description": "This host-level alert is triggered if CPU utilization of the Metric Collector's HBase Master exceeds certain warning and critical thresholds. It checks the HBase Master JMX Servlet for the SystemCPULoad property. The threshold values are in percent.",
+        "name": "ams_metrics_collector_hbase_master_cpu",
+        "label": "Metrics Collector HBase Maser CPU Utilization",
+        "description": "This host-level alert is triggered if CPU utilization of the Metrics Collector's HBase Master exceeds certain warning and critical thresholds. It checks the HBase Master JMX Servlet for the SystemCPULoad property. The threshold values are in percent.",
         "interval": 5,
         "interval": 5,
         "scope": "ANY",
         "scope": "ANY",
         "enabled": true,
         "enabled": true,
@@ -119,9 +119,9 @@
         }
         }
       },
       },
       {
       {
-        "name": "ams_metric_collector_zookeeper_server_process",
-        "label": "Metric Collector - ZooKeeper Server Process",
-        "description": "This host-level alert is triggered if the Metric Collector's ZooKeeper server process cannot be determined to be up and listening on the network.",
+        "name": "ams_metrics_collector_zookeeper_server_process",
+        "label": "Metrics Collector - ZooKeeper Server Process",
+        "description": "This host-level alert is triggered if the Metrics Collector's ZooKeeper server process cannot be determined to be up and listening on the network.",
         "interval": 1,
         "interval": 1,
         "scope": "ANY",
         "scope": "ANY",
         "source": {
         "source": {
@@ -144,16 +144,16 @@
         }
         }
       }
       }
     ],
     ],
-    "METRIC_MONITOR": [
+    "METRICS_MONITOR": [
       {
       {
-        "name": "ams_metric_monitor_process",
-        "label": "Metric Monitor Status",
-        "description": "This alert indicates the status of the Metric Monitor process as determined by the monitor status script.",
+        "name": "ams_metrics_monitor_process",
+        "label": "Metrics Monitor Status",
+        "description": "This alert indicates the status of the Metrics Monitor process as determined by the monitor status script.",
         "interval": 1,
         "interval": 1,
         "scope": "ANY",
         "scope": "ANY",
         "source": {
         "source": {
           "type": "SCRIPT",
           "type": "SCRIPT",
-          "path": "AMS/0.1.0/package/alerts/alert_ambari_metrics_monitor.py"
+          "path": "AMBARI_METRICS/0.1.0/package/alerts/alert_ambari_metrics_monitor.py"
         }
         }
       }
       }
     ]
     ]

+ 6 - 6
ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-env.xml → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml

@@ -20,28 +20,28 @@
 
 
 <configuration>
 <configuration>
   <property>
   <property>
-    <name>ams_user</name>
+    <name>ambari_metrics_user</name>
     <value>ams</value>
     <value>ams</value>
     <property-type>USER</property-type>
     <property-type>USER</property-type>
-    <description>AMS User Name.</description>
+    <description>Ambari Metrics User Name.</description>
   </property>
   </property>
   <property>
   <property>
-    <name>ams_collector_log_dir</name>
+    <name>metrics_collector_log_dir</name>
     <value>/var/log/ambari-metrics-collector</value>
     <value>/var/log/ambari-metrics-collector</value>
     <description>Collector log directory.</description>
     <description>Collector log directory.</description>
   </property>
   </property>
   <property>
   <property>
-    <name>ams_collector_pid_dir</name>
+    <name>metrics_collector_pid_dir</name>
     <value>/var/run/ambari-metrics-collector</value>
     <value>/var/run/ambari-metrics-collector</value>
     <description>Collector pid directory.</description>
     <description>Collector pid directory.</description>
   </property>
   </property>
   <property>
   <property>
-    <name>ams_monitor_pid_dir</name>
+    <name>metrics_monitor_pid_dir</name>
     <value>/var/run/ambari-metrics-monitor</value>
     <value>/var/run/ambari-metrics-monitor</value>
     <description>Monitor pid directory.</description>
     <description>Monitor pid directory.</description>
   </property>
   </property>
   <property>
   <property>
-    <name>ams_monitor_log_dir</name>
+    <name>metrics_monitor_log_dir</name>
     <value>/var/log/ambari-metrics-monitor</value>
     <value>/var/log/ambari-metrics-monitor</value>
     <description>Monitor log directory.</description>
     <description>Monitor log directory.</description>
   </property>
   </property>

+ 1 - 3
ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-hbase-env.xml → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-env.xml

@@ -127,10 +127,8 @@ export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS -Djava.security.auth.login.co
 _HADOOP_NATIVE_LIB="/usr/lib/ams-hbase/lib/hadoop-native/"
 _HADOOP_NATIVE_LIB="/usr/lib/ams-hbase/lib/hadoop-native/"
 export HBASE_OPTS="$HBASE_OPTS -Djava.library.path=${_HADOOP_NATIVE_LIB}"
 export HBASE_OPTS="$HBASE_OPTS -Djava.library.path=${_HADOOP_NATIVE_LIB}"
 
 
-{% if disable_hadoop_environment %}
-# Unset HADOOP_HOME to avoid importing HADOOP installed cluster related configs like: /usr/hdp/2.2.0.0-2041/hadoop/conf/
+#"Unsetting" HADOOP_HOME to avoid importing HADOOP installed cluster related configs like: /usr/hdp/2.2.0.0-2041/hadoop/conf/ 
 export HADOOP_HOME=`pwd`
 export HADOOP_HOME=`pwd`
-{% endif %}
     </value>
     </value>
   </property>
   </property>
 
 

+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-hbase-log4j.xml → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-log4j.xml


+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-hbase-policy.xml → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-policy.xml


+ 1 - 1
ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-hbase-security-site.xml → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-security-site.xml

@@ -74,4 +74,4 @@
   <property>
   <property>
     <name>zookeeper.znode.parent</name>
     <name>zookeeper.znode.parent</name>
   </property>
   </property>
-</configuration>
+</configuration>

+ 5 - 5
ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-hbase-site.xml → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-hbase-site.xml

@@ -25,8 +25,8 @@
     <name>hbase.rootdir</name>
     <name>hbase.rootdir</name>
     <value>file:///var/lib/ambari-metrics-collector/hbase</value>
     <value>file:///var/lib/ambari-metrics-collector/hbase</value>
     <description>
     <description>
-      AMS service uses HBase as default storage backend. Set the rootdir for
-      HBase to either local filesystem path if using AMS in embedded mode or
+      Ambari Metrics service uses HBase as default storage backend. Set the rootdir for
+      HBase to either local filesystem path if using Ambari Metrics in embedded mode or
       to a HDFS dir, example: hdfs://namenode.example.org:9000/hbase.
       to a HDFS dir, example: hdfs://namenode.example.org:9000/hbase.
     </description>
     </description>
   </property>
   </property>
@@ -48,7 +48,7 @@
   </property>
   </property>
   <property>
   <property>
     <name>hbase.cluster.distributed</name>
     <name>hbase.cluster.distributed</name>
-    <value>{{hbase_cluster_distributed}}</value>
+    <value>false</value>
     <description>
     <description>
       The mode the cluster will be in. Possible values are false for
       The mode the cluster will be in. Possible values are false for
       standalone mode and true for distributed mode. If false, startup will run
       standalone mode and true for distributed mode. If false, startup will run
@@ -64,7 +64,7 @@
   </property>
   </property>
   <property>
   <property>
     <name>hbase.zookeeper.quorum</name>
     <name>hbase.zookeeper.quorum</name>
-    <value>{{zookeeper_quorum_hosts}}</value>
+    <value>localhost</value>
     <description>Comma separated list of servers in the ZooKeeper Quorum.
     <description>Comma separated list of servers in the ZooKeeper Quorum.
       For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".
       For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".
       By default this is set to localhost for local and pseudo-distributed modes
       By default this is set to localhost for local and pseudo-distributed modes
@@ -269,4 +269,4 @@
       Controls the number of pre-allocated regions for SYSTEM.SEQUENCE table.
       Controls the number of pre-allocated regions for SYSTEM.SEQUENCE table.
     </description>
     </description>
   </property>
   </property>
-</configuration>
+</configuration>

+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-log4j.xml → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-log4j.xml


+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/configuration/ams-site.xml → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-site.xml


+ 3 - 3
ambari-server/src/main/resources/common-services/AMS/0.1.0/kerberos.json → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/kerberos.json

@@ -1,7 +1,7 @@
 {
 {
   "services": [
   "services": [
     {
     {
-      "name": "AMS",
+      "name": "AMBARI_METRICS",
       "identities": [
       "identities": [
         {
         {
           "name": "/spnego"
           "name": "/spnego"
@@ -12,7 +12,7 @@
       ],
       ],
       "components": [
       "components": [
         {
         {
-          "name": "METRIC_COLLECTOR",
+          "name": "METRICS_COLLECTOR",
           "identities": [
           "identities": [
             {
             {
               "name": "ams_hbase_master_hbase",
               "name": "ams_hbase_master_hbase",
@@ -119,4 +119,4 @@
       ]
       ]
     }
     }
   ]
   ]
-}
+}

+ 9 - 18
ambari-server/src/main/resources/common-services/AMS/0.1.0/metainfo.xml → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml

@@ -19,17 +19,15 @@
   <schemaVersion>2.0</schemaVersion>
   <schemaVersion>2.0</schemaVersion>
   <services>
   <services>
     <service>
     <service>
-      <name>AMS</name>
-      <displayName>AMS</displayName>
+      <name>AMBARI_METRICS</name>
+      <displayName>Ambari Metrics</displayName>
       <version>0.1.0</version>
       <version>0.1.0</version>
-      <comment>Ambari Metrics Service - Monitoring service that provides
-        storage and retrieval capability for metrics collected from services
-        &amp; hosts.
+      <comment>A system for metrics collection that provides storage and retrieval capability for metrics collected from the cluster
       </comment>
       </comment>
       <components>
       <components>
         <component>
         <component>
-          <name>METRIC_COLLECTOR</name>
-          <displayName>Metric Collector</displayName>
+          <name>METRICS_COLLECTOR</name>
+          <displayName>Metrics Collector</displayName>
           <category>MASTER</category>
           <category>MASTER</category>
           <cardinality>1</cardinality>
           <cardinality>1</cardinality>
           <versionAdvertised>false</versionAdvertised>
           <versionAdvertised>false</versionAdvertised>
@@ -43,14 +41,14 @@
             </dependency>
             </dependency>
           </dependencies>
           </dependencies>
           <commandScript>
           <commandScript>
-            <script>scripts/metric_collector.py</script>
+            <script>scripts/metrics_collector.py</script>
             <scriptType>PYTHON</scriptType>
             <scriptType>PYTHON</scriptType>
             <timeout>1200</timeout>
             <timeout>1200</timeout>
           </commandScript>
           </commandScript>
         </component>
         </component>
         <component>
         <component>
-          <name>METRIC_MONITOR</name>
-          <displayName>Metric Monitor</displayName>
+          <name>METRICS_MONITOR</name>
+          <displayName>Metrics Monitor</displayName>
           <category>SLAVE</category>
           <category>SLAVE</category>
           <cardinality>ALL</cardinality>
           <cardinality>ALL</cardinality>
           <versionAdvertised>false</versionAdvertised>
           <versionAdvertised>false</versionAdvertised>
@@ -58,7 +56,7 @@
             <enabled>true</enabled>
             <enabled>true</enabled>
           </auto-deploy>
           </auto-deploy>
           <commandScript>
           <commandScript>
-            <script>scripts/metric_monitor.py</script>
+            <script>scripts/metrics_monitor.py</script>
             <scriptType>PYTHON</scriptType>
             <scriptType>PYTHON</scriptType>
             <timeout>1200</timeout>
             <timeout>1200</timeout>
           </commandScript>
           </commandScript>
@@ -78,9 +76,6 @@
             <package>
             <package>
               <name>ambari-metrics-hadoop-sink</name>
               <name>ambari-metrics-hadoop-sink</name>
             </package>
             </package>
-            <package>
-              <name>gcc</name>
-            </package>
           </packages>
           </packages>
         </osSpecific>
         </osSpecific>
         <osSpecific>
         <osSpecific>
@@ -89,9 +84,6 @@
             <package>
             <package>
               <name>ambari-metrics-assembly</name>
               <name>ambari-metrics-assembly</name>
             </package>
             </package>
-            <package>
-              <name>gcc</name>
-            </package>
           </packages>
           </packages>
         </osSpecific>
         </osSpecific>
         <osSpecific>
         <osSpecific>
@@ -125,7 +117,6 @@
         <config-type>ams-log4j</config-type>
         <config-type>ams-log4j</config-type>
         <config-type>ams-hbase-policy</config-type>
         <config-type>ams-hbase-policy</config-type>
         <config-type>ams-hbase-site</config-type>
         <config-type>ams-hbase-site</config-type>
-        <config-type>ams-hbase-security-site</config-type>
         <config-type>ams-hbase-env</config-type>
         <config-type>ams-hbase-env</config-type>
         <config-type>ams-hbase-log4j</config-type>
         <config-type>ams-hbase-log4j</config-type>
       </configuration-dependencies>
       </configuration-dependencies>

+ 1 - 11
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/alerts/alert_ambari_metrics_monitor.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/alerts/alert_ambari_metrics_monitor.py

@@ -21,8 +21,6 @@ limitations under the License.
 import os
 import os
 import socket
 import socket
 
 
-from ambari_commons import OSConst
-from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from resource_management.libraries.functions.check_process_status import check_process_status
 from resource_management.libraries.functions.check_process_status import check_process_status
 from resource_management.core.exceptions import ComponentIsNotRunning
 from resource_management.core.exceptions import ComponentIsNotRunning
 
 
@@ -40,17 +38,9 @@ def get_tokens():
   return (AMS_MONITOR_PID_DIR,)
   return (AMS_MONITOR_PID_DIR,)
 
 
 
 
-@OsFamilyFuncImpl(OSConst.WINSRV_FAMILY)
-def is_monitor_process_live(pid_file):
-  from ambari_commons.os_windows import WinServiceController, SERVICE_STATUS_RUNNING
-
-  svcStatus = WinServiceController.QueryStatus("AmbariMetricsHostMonitoring")
-  return (SERVICE_STATUS_RUNNING == svcStatus)
-
-@OsFamilyFuncImpl(OsFamilyImpl.DEFAULT)
 def is_monitor_process_live(pid_file):
 def is_monitor_process_live(pid_file):
   """
   """
-  Gets whether the AMS monitor represented by the specified file is running.
+  Gets whether the Metrics Monitor represented by the specified file is running.
   :param pid_file: the PID file of the monitor to check
   :param pid_file: the PID file of the monitor to check
   :return: True if the monitor is running, False otherwise
   :return: True if the monitor is running, False otherwise
   """
   """

+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/files/hbaseSmokeVerify.sh → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/hbaseSmokeVerify.sh


+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/__init__.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/__init__.py


+ 2 - 18
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/ams.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py

@@ -18,7 +18,6 @@ limitations under the License.
 
 
 """
 """
 
 
-import os
 from resource_management import *
 from resource_management import *
 from ambari_commons import OSConst
 from ambari_commons import OSConst
 from service_mapping import *
 from service_mapping import *
@@ -50,14 +49,9 @@ def ams(name=None):
               owner=params.ams_user,
               owner=params.ams_user,
     )
     )
 
 
-    merged_ams_hbase_site = {}
-    merged_ams_hbase_site.update(params.config['configurations']['ams-hbase-site'])
-    if params.security_enabled:
-      merged_ams_hbase_site.update(params.config['configurations']['ams-hbase-security-site'])
-
     XmlConfig( "hbase-site.xml",
     XmlConfig( "hbase-site.xml",
                conf_dir = params.ams_collector_conf_dir,
                conf_dir = params.ams_collector_conf_dir,
-               configurations = merged_ams_hbase_site,
+               configurations = params.config['configurations']['ams-hbase-site'],
                configuration_attributes=params.config['configuration_attributes']['ams-hbase-site'],
                configuration_attributes=params.config['configuration_attributes']['ams-hbase-site'],
                owner = params.ams_user,
                owner = params.ams_user,
     )
     )
@@ -136,24 +130,14 @@ def ams(name=None):
               group=params.user_group
               group=params.user_group
     )
     )
 
 
-    merged_ams_hbase_site = {}
-    merged_ams_hbase_site.update(params.config['configurations']['ams-hbase-site'])
-    if params.security_enabled:
-      merged_ams_hbase_site.update(params.config['configurations']['ams-hbase-security-site'])
-
     XmlConfig( "hbase-site.xml",
     XmlConfig( "hbase-site.xml",
                conf_dir = params.ams_collector_conf_dir,
                conf_dir = params.ams_collector_conf_dir,
-               configurations = merged_ams_hbase_site,
+               configurations = params.config['configurations']['ams-hbase-site'],
                configuration_attributes=params.config['configuration_attributes']['ams-hbase-site'],
                configuration_attributes=params.config['configuration_attributes']['ams-hbase-site'],
                owner = params.ams_user,
                owner = params.ams_user,
                group = params.user_group
                group = params.user_group
     )
     )
 
 
-    if params.security_enabled:
-      TemplateConfig(os.path.join(params.hbase_conf_dir, "ams_collector_jaas.conf"),
-                     owner = params.ams_user,
-                     template_tag = None)
-
     if (params.log4j_props != None):
     if (params.log4j_props != None):
       File(format("{params.ams_collector_conf_dir}/log4j.properties"),
       File(format("{params.ams_collector_conf_dir}/log4j.properties"),
            mode=0644,
            mode=0644,

+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/ams_service.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams_service.py


+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/functions.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/functions.py


+ 2 - 16
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/hbase.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py

@@ -114,14 +114,9 @@ def hbase(name=None # 'master' or 'regionserver' or 'client'
              recursive = True
              recursive = True
   )
   )
 
 
-  merged_ams_hbase_site = {}
-  merged_ams_hbase_site.update(params.config['configurations']['ams-hbase-site'])
-  if params.security_enabled:
-    merged_ams_hbase_site.update(params.config['configurations']['ams-hbase-security-site'])
-
   XmlConfig("hbase-site.xml",
   XmlConfig("hbase-site.xml",
             conf_dir = params.hbase_conf_dir,
             conf_dir = params.hbase_conf_dir,
-            configurations = merged_ams_hbase_site,
+            configurations = params.config['configurations']['ams-hbase-site'],
             configuration_attributes=params.config['configuration_attributes']['ams-hbase-site'],
             configuration_attributes=params.config['configuration_attributes']['ams-hbase-site'],
             owner = params.hbase_user,
             owner = params.hbase_user,
             group = params.user_group
             group = params.user_group
@@ -162,9 +157,7 @@ def hbase(name=None # 'master' or 'regionserver' or 'client'
 
 
   if params.security_enabled:
   if params.security_enabled:
     hbase_TemplateConfig( format("hbase_{name}_jaas.conf"), user=params.hbase_user)
     hbase_TemplateConfig( format("hbase_{name}_jaas.conf"), user=params.hbase_user)
-    hbase_TemplateConfig( format("hbase_client_jaas.conf"), user=params.hbase_user)
-    hbase_TemplateConfig( format("ams_zookeeper_jaas.conf"), user=params.hbase_user)
-
+  
   if name in ["master","regionserver"]:
   if name in ["master","regionserver"]:
 
 
     if params.is_hbase_distributed:
     if params.is_hbase_distributed:
@@ -174,13 +167,6 @@ def hbase(name=None # 'master' or 'regionserver' or 'client'
                            owner=params.hbase_user,
                            owner=params.hbase_user,
                            mode=0775
                            mode=0775
       )
       )
-
-      params.HdfsDirectory(params.hbase_staging_dir,
-                           action="create_delayed",
-                           owner=params.hbase_user,
-                           mode=0711
-      )
-
       params.HdfsDirectory(None, action="create")
       params.HdfsDirectory(None, action="create")
 
 
     else:
     else:

+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/hbase_master.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase_master.py


+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/hbase_regionserver.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase_regionserver.py


+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/hbase_service.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase_service.py


+ 60 - 0
ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py

@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+from resource_management import *
+from ams import ams
+from ams_service import ams_service
+from hbase import hbase
+from status import check_service_status
+
+class AmsCollector(Script):
+  def install(self, env):
+    self.install_packages(env)
+    self.configure(env) # for security
+
+
+  def configure(self, env):
+    import params
+    env.set_params(params)
+    hbase('master')
+    hbase('regionserver')
+    ams(name='collector')
+
+  def start(self, env):
+    self.configure(env) # for security
+
+    ams_service( 'collector',
+                   action = 'start'
+    )
+
+  def stop(self, env):
+    import params
+    env.set_params(params)
+
+    ams_service( 'collector', action = 'stop')
+
+  def status(self, env):
+    import status_params
+    env.set_params(status_params)
+    check_service_status(name='collector')
+
+
+if __name__ == "__main__":
+  AmsCollector().execute()

+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/metric_monitor.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py


+ 14 - 28
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/params.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py

@@ -31,20 +31,20 @@ else:
 config = Script.get_config()
 config = Script.get_config()
 exec_tmp_dir = Script.get_tmp_dir()
 exec_tmp_dir = Script.get_tmp_dir()
 
 
-#AMS data
+#AMBARI_METRICS data
 ams_pid_dir = status_params.ams_collector_pid_dir
 ams_pid_dir = status_params.ams_collector_pid_dir
 
 
 ams_collector_script = "/usr/sbin/ambari-metrics-collector"
 ams_collector_script = "/usr/sbin/ambari-metrics-collector"
 ams_collector_pid_dir = status_params.ams_collector_pid_dir
 ams_collector_pid_dir = status_params.ams_collector_pid_dir
-ams_collector_hosts = default("/clusterHostInfo/metric_collector_hosts", [])
+ams_collector_hosts = default("/clusterHostInfo/metrics_collector_hosts", [])
 ams_collector_host_single = ams_collector_hosts[0] #TODO cardinality is 1+ so we can have more than one host
 ams_collector_host_single = ams_collector_hosts[0] #TODO cardinality is 1+ so we can have more than one host
 metric_collector_port = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188")
 metric_collector_port = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0:6188")
 if metric_collector_port and metric_collector_port.find(':') != -1:
 if metric_collector_port and metric_collector_port.find(':') != -1:
   metric_collector_port = metric_collector_port.split(':')[1]
   metric_collector_port = metric_collector_port.split(':')[1]
 pass
 pass
 
 
-ams_collector_log_dir = config['configurations']['ams-env']['ams_collector_log_dir']
-ams_monitor_log_dir = config['configurations']['ams-env']['ams_monitor_log_dir']
+ams_collector_log_dir = config['configurations']['ams-env']['metrics_collector_log_dir']
+ams_monitor_log_dir = config['configurations']['ams-env']['metrics_monitor_log_dir']
 
 
 ams_monitor_dir = "/usr/lib/python2.6/site-packages/resource_monitoring"
 ams_monitor_dir = "/usr/lib/python2.6/site-packages/resource_monitoring"
 ams_monitor_pid_dir = status_params.ams_monitor_pid_dir
 ams_monitor_pid_dir = status_params.ams_monitor_pid_dir
@@ -65,9 +65,7 @@ hbase_root_dir = config['configurations']['ams-hbase-site']['hbase.rootdir']
 is_hbase_distributed = hbase_root_dir.startswith('hdfs://')
 is_hbase_distributed = hbase_root_dir.startswith('hdfs://')
 
 
 # security is disabled for embedded mode, when HBase is backed by file
 # security is disabled for embedded mode, when HBase is backed by file
-security_enabled = False if not is_hbase_distributed else config['configurations']['cluster-env']['security_enabled']
-# if cluster is secured and embedded we have to disable haddop env
-disable_hadoop_environment = config['configurations']['cluster-env']['security_enabled'] and not is_hbase_distributed
+security_enabled = False if not is_hbase_distributed else config['configurations']['cluster-env']['security_enabled'] 
 
 
 # this is "hadoop-metrics.properties" for 1.x stacks
 # this is "hadoop-metrics.properties" for 1.x stacks
 metric_prop_file_name = "hadoop-metrics2-hbase.properties"
 metric_prop_file_name = "hadoop-metrics2-hbase.properties"
@@ -85,9 +83,6 @@ regionserver_xmn_size = calc_xmn_from_xms(regionserver_heapsize, regionserver_xm
 # For embedded mode
 # For embedded mode
 hbase_heapsize = master_heapsize
 hbase_heapsize = master_heapsize
 
 
-zookeeper_quorum_hosts = ','.join(ams_collector_hosts) if is_hbase_distributed else 'localhost'
-hbase_cluster_distributed = 'true' if is_hbase_distributed else 'false'
-
 ams_checkpoint_dir = config['configurations']['ams-site']['timeline.metrics.aggregator.checkpoint.dir']
 ams_checkpoint_dir = config['configurations']['ams-site']['timeline.metrics.aggregator.checkpoint.dir']
 hbase_pid_dir = status_params.hbase_pid_dir
 hbase_pid_dir = status_params.hbase_pid_dir
 hbase_tmp_dir = config['configurations']['ams-hbase-site']['hbase.tmp.dir']
 hbase_tmp_dir = config['configurations']['ams-hbase-site']['hbase.tmp.dir']
@@ -107,30 +102,21 @@ service_check_data = functions.get_unique_id_and_date()
 user_group = config['configurations']['cluster-env']["user_group"]
 user_group = config['configurations']['cluster-env']["user_group"]
 hadoop_user = "hadoop"
 hadoop_user = "hadoop"
 
 
-kinit_cmd = ""
-
 if security_enabled:
 if security_enabled:
   _hostname_lowercase = config['hostname'].lower()
   _hostname_lowercase = config['hostname'].lower()
+  master_jaas_princ = default('/configurations/ams-hbase-site/hbase.master.kerberos.principal', 'hbase/_HOST@EXAMPLE.COM').replace('_HOST',_hostname_lowercase)
+  regionserver_jaas_princ = default('/configurations/ams-hbase-site/hbase.regionserver.kerberos.principal', 'hbase/_HOST@EXAMPLE.COM').replace('_HOST',_hostname_lowercase)
 
 
-  client_jaas_config_file = format("{hbase_conf_dir}/hbase_client_jaas.conf")
+  master_keytab_path = config['configurations']['ams-hbase-site']['hbase.master.keytab.file']
+  regionserver_keytab_path = config['configurations']['ams-hbase-site']['hbase.regionserver.keytab.file']
   smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
   smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
   hbase_user_keytab = config['configurations']['ams-hbase-env']['hbase_user_keytab']
   hbase_user_keytab = config['configurations']['ams-hbase-env']['hbase_user_keytab']
+  kinit_path_local = functions.get_kinit_path(["/usr/bin", "/usr/kerberos/bin", "/usr/sbin"])
 
 
-  ams_collector_jaas_config_file = format("{hbase_conf_dir}/ams_collector_jaas.conf")
-  ams_collector_keytab_path = config['configurations']['ams-hbase-security-site']['hbase.myclient.keytab']
-  ams_collector_jaas_princ = config['configurations']['ams-hbase-security-site']['hbase.myclient.principal'].replace('_HOST',_hostname_lowercase)
-
-  ams_zookeeper_jaas_config_file = format("{hbase_conf_dir}/ams_zookeeper_jaas.conf")
-  ams_zookeeper_keytab = config['configurations']['ams-hbase-security-site']['ams.zookeeper.keytab']
-  ams_zookeeper_principal_name = config['configurations']['ams-hbase-security-site']['ams.zookeeper.principal'].replace('_HOST',_hostname_lowercase)
-
-  master_jaas_config_file = format("{hbase_conf_dir}/hbase_master_jaas.conf")
-  master_keytab_path = config['configurations']['ams-hbase-security-site']['hbase.master.keytab.file']
-  master_jaas_princ = config['configurations']['ams-hbase-security-site']['hbase.master.kerberos.principal'].replace('_HOST',_hostname_lowercase)
-
-  regionserver_jaas_config_file = format("{hbase_conf_dir}/hbase_regionserver_jaas.conf")
-  regionserver_keytab_path = config['configurations']['ams-hbase-security-site']['hbase.regionserver.keytab.file']
-  regionserver_jaas_princ = config['configurations']['ams-hbase-security-site']['hbase.regionserver.kerberos.principal'].replace('_HOST',_hostname_lowercase)
+if security_enabled:
+   kinit_cmd = format("{kinit_path_local} -kt {hbase_user_keytab} {hbase_user};")
+else:
+   kinit_cmd = ""
 
 
 #log4j.properties
 #log4j.properties
 if (('ams-hbase-log4j' in config['configurations']) and ('content' in config['configurations']['ams-hbase-log4j'])):
 if (('ams-hbase-log4j' in config['configurations']) and ('content' in config['configurations']['ams-hbase-log4j'])):

+ 2 - 2
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/params_linux.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_linux.py

@@ -20,12 +20,12 @@ limitations under the License.
 
 
 from resource_management import *
 from resource_management import *
 from ambari_commons import OSCheck
 from ambari_commons import OSCheck
-
+import status_params
 config = Script.get_config()
 config = Script.get_config()
 
 
 ams_collector_conf_dir = "/etc/ambari-metrics-collector/conf"
 ams_collector_conf_dir = "/etc/ambari-metrics-collector/conf"
 ams_monitor_conf_dir = "/etc/ambari-metrics-monitor/conf/"
 ams_monitor_conf_dir = "/etc/ambari-metrics-monitor/conf/"
-ams_user = config['configurations']['ams-env']['ams_user']
+ams_user = status_params.ams_user
 #RPM versioning support
 #RPM versioning support
 rpm_version = default("/configurations/hadoop-env/rpm_version", None)
 rpm_version = default("/configurations/hadoop-env/rpm_version", None)
 
 

+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/params_windows.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py


+ 14 - 14
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/service_check.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py

@@ -51,20 +51,20 @@ class AMSServiceCheck(Script):
 
 
     #Just check that the services were correctly installed
     #Just check that the services were correctly installed
     #Check the monitor on all hosts
     #Check the monitor on all hosts
-    Logger.info("AMS Monitor service check was started.")
+    Logger.info("Metrics Monitor service check was started.")
     if not check_windows_service_exists(monitor_win_service_name):
     if not check_windows_service_exists(monitor_win_service_name):
-      raise Fail("AMS Monitor service was not properly installed. Check the logs and retry the installation.")
+      raise Fail("Metrics Monitor service was not properly installed. Check the logs and retry the installation.")
     #Check the collector only where installed
     #Check the collector only where installed
     if params.ams_collector_home_dir and os.path.isdir(params.ams_collector_home_dir):
     if params.ams_collector_home_dir and os.path.isdir(params.ams_collector_home_dir):
-      Logger.info("AMS Collector service check was started.")
+      Logger.info("Metrics Collector service check was started.")
       if not check_windows_service_exists(collector_win_service_name):
       if not check_windows_service_exists(collector_win_service_name):
-        raise Fail("AMS Collector service was not properly installed. Check the logs and retry the installation.")
+        raise Fail("Metrics Collector service was not properly installed. Check the logs and retry the installation.")
 
 
   @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
   @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
   def service_check(self, env):
   def service_check(self, env):
     import params
     import params
 
 
-    Logger.info("AMS service check was started.")
+    Logger.info("Ambari Metrics service check was started.")
     env.set_params(params)
     env.set_params(params)
 
 
     random_value1 = random.random()
     random_value1 = random.random()
@@ -90,7 +90,7 @@ class AMSServiceCheck(Script):
                     % (self.AMS_CONNECT_TIMEOUT))
                     % (self.AMS_CONNECT_TIMEOUT))
 
 
     if i == self.AMS_CONNECT_TRIES:
     if i == self.AMS_CONNECT_TRIES:
-      raise Fail("AMS metrics were not saved. Service check has failed. "
+      raise Fail("Metrics were not saved. Service check has failed. "
            "\nConnection failed.")
            "\nConnection failed.")
 
 
     response = conn.getresponse()
     response = conn.getresponse()
@@ -101,14 +101,14 @@ class AMSServiceCheck(Script):
     conn.close()
     conn.close()
 
 
     if response.status == 200:
     if response.status == 200:
-      Logger.info("AMS metrics were saved.")
+      Logger.info("Metrics were saved.")
     else:
     else:
-      Logger.info("AMS metrics were not saved. Service check has failed.")
-      raise Fail("AMS metrics were not saved. Service check has failed. POST request status: %s %s \n%s" %
+      Logger.info("Metrics were not saved. Service check has failed.")
+      raise Fail("Metrics were not saved. Service check has failed. POST request status: %s %s \n%s" %
                  (response.status, response.reason, data))
                  (response.status, response.reason, data))
 
 
     get_metrics_parameters = {
     get_metrics_parameters = {
-      "metricNames": "AMS.SmokeTest.FakeMetric",
+      "metricNames": "AMBARI_METRICS.SmokeTest.FakeMetric",
       "appId": "amssmoketestfake",
       "appId": "amssmoketestfake",
       "hostname": params.hostname,
       "hostname": params.hostname,
       "startTime": 1419860000000,
       "startTime": 1419860000000,
@@ -132,10 +132,10 @@ class AMSServiceCheck(Script):
     conn.close()
     conn.close()
 
 
     if response.status == 200:
     if response.status == 200:
-      Logger.info("AMS metrics were retrieved.")
+      Logger.info("Metrics were retrieved.")
     else:
     else:
-      Logger.info("AMS metrics were not retrieved. Service check has failed.")
-      raise Fail("AMS metrics were not retrieved. Service check has failed. GET request status: %s %s \n%s" %
+      Logger.info("Metrics were not retrieved. Service check has failed.")
+      raise Fail("Metrics were not retrieved. Service check has failed. GET request status: %s %s \n%s" %
                  (response.status, response.reason, data))
                  (response.status, response.reason, data))
     data_json = json.loads(data)
     data_json = json.loads(data)
 
 
@@ -152,7 +152,7 @@ class AMSServiceCheck(Script):
       Logger.info("Values %s and %s were not found in response." % (random_value1, current_time))
       Logger.info("Values %s and %s were not found in response." % (random_value1, current_time))
       raise Fail("Values %s and %s were not found in response." % (random_value1, current_time))
       raise Fail("Values %s and %s were not found in response." % (random_value1, current_time))
 
 
-    Logger.info("AMS service check is finished.")
+    Logger.info("Ambari Metrics service check is finished.")
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
   AMSServiceCheck().execute()
   AMSServiceCheck().execute()

+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/service_mapping.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_mapping.py


+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/status.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py


+ 4 - 13
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/status_params.py → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status_params.py

@@ -20,20 +20,11 @@ limitations under the License.
 
 
 from resource_management import *
 from resource_management import *
 
 
-from ambari_commons import OSCheck
-if OSCheck.is_windows_family():
-    from params_windows import *
-else:
-    from params_linux import *
+config = Script.get_config()
 
 
 hbase_pid_dir = config['configurations']['ams-hbase-env']['hbase_pid_dir']
 hbase_pid_dir = config['configurations']['ams-hbase-env']['hbase_pid_dir']
+ams_user = config['configurations']['ams-env']['ambari_metrics_user']
 hbase_user = ams_user
 hbase_user = ams_user
-ams_collector_pid_dir = config['configurations']['ams-env']['ams_collector_pid_dir']
-ams_monitor_pid_dir = config['configurations']['ams-env']['ams_monitor_pid_dir']
+ams_collector_pid_dir = config['configurations']['ams-env']['metrics_collector_pid_dir']
+ams_monitor_pid_dir = config['configurations']['ams-env']['metrics_monitor_pid_dir']
 
 
-security_enabled = config['configurations']['cluster-env']['security_enabled']
-ams_hbase_conf_dir = format("{hbase_conf_dir}")
-
-kinit_path_local = functions.get_kinit_path(["/usr/bin", "/usr/kerberos/bin", "/usr/sbin"])
-hostname = config['hostname']
-tmp_dir = Script.get_tmp_dir()

+ 1 - 1
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/templates/ams_collector_jaas.conf.j2 → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/ams_collector_jaas.conf.j2

@@ -23,4 +23,4 @@ storeKey=true
 useTicketCache=false
 useTicketCache=false
 keyTab="{{ams_collector_keytab_path}}"
 keyTab="{{ams_collector_keytab_path}}"
 principal="{{ams_collector_jaas_princ}}";
 principal="{{ams_collector_jaas_princ}}";
-};
+};

+ 1 - 1
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/templates/ams_zookeeper_jaas.conf.j2 → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/ams_zookeeper_jaas.conf.j2

@@ -23,4 +23,4 @@ storeKey=true
 useTicketCache=false
 useTicketCache=false
 keyTab="{{ams_zookeeper_keytab}}"
 keyTab="{{ams_zookeeper_keytab}}"
 principal="{{ams_zookeeper_principal_name}}";
 principal="{{ams_zookeeper_principal_name}}";
-};
+};

+ 1 - 1
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/templates/hadoop-metrics2-hbase.properties.j2 → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hadoop-metrics2-hbase.properties.j2

@@ -59,4 +59,4 @@ hbase.sink.timeline.serviceName-prefix=ams
 
 
 # Switch off metrics generation on a per region basis
 # Switch off metrics generation on a per region basis
 *.source.filter.class=org.apache.hadoop.metrics2.filter.GlobFilter
 *.source.filter.class=org.apache.hadoop.metrics2.filter.GlobFilter
-hbase.*.source.filter.exclude=*Regions*
+hbase.*.source.filter.exclude=*Regions*

+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/templates/hbase_client_jaas.conf.j2 → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hbase_client_jaas.conf.j2


+ 1 - 1
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/templates/hbase_grant_permissions.j2 → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hbase_grant_permissions.j2

@@ -36,4 +36,4 @@
 #
 #
 #
 #
 grant '{{smoke_test_user}}', '{{smokeuser_permissions}}'
 grant '{{smoke_test_user}}', '{{smokeuser_permissions}}'
-exit
+exit

+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/templates/hbase_master_jaas.conf.j2 → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hbase_master_jaas.conf.j2


+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/templates/hbase_regionserver_jaas.conf.j2 → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/hbase_regionserver_jaas.conf.j2


+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/templates/metric_groups.conf.j2 → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metric_groups.conf.j2


+ 0 - 0
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/templates/metric_monitor.ini.j2 → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metric_monitor.ini.j2


+ 1 - 1
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/templates/regionservers.j2 → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/regionservers.j2

@@ -17,4 +17,4 @@
 #}
 #}
 
 
 {% for host in rs_hosts %}{{host}}
 {% for host in rs_hosts %}{{host}}
-{% endfor %}
+{% endfor %}

+ 1 - 1
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/templates/smoketest_metrics.json.j2 → ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/smoketest_metrics.json.j2

@@ -1,7 +1,7 @@
 {
 {
   "metrics": [
   "metrics": [
     {
     {
-      "metricname": "AMS.SmokeTest.FakeMetric",
+      "metricname": "AMBARI_METRICS.SmokeTest.FakeMetric",
       "appid": "amssmoketestfake",
       "appid": "amssmoketestfake",
       "hostname": "{{hostname}}",
       "hostname": "{{hostname}}",
       "timestamp": 1419860001000,
       "timestamp": 1419860001000,

+ 0 - 124
ambari-server/src/main/resources/common-services/AMS/0.1.0/package/scripts/metric_collector.py

@@ -1,124 +0,0 @@
-#!/usr/bin/env python
-"""
-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.
-
-"""
-
-from resource_management import *
-from resource_management.libraries.functions.security_commons import build_expectations, \
-  cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties, \
-  FILE_TYPE_XML
-from ams import ams
-from ams_service import ams_service
-from hbase import hbase
-from status import check_service_status
-
-class AmsCollector(Script):
-  def install(self, env):
-    self.install_packages(env)
-    self.configure(env) # for security
-
-
-  def configure(self, env):
-    import params
-    env.set_params(params)
-    hbase('master')
-    hbase('regionserver')
-    ams(name='collector')
-
-  def start(self, env):
-    self.configure(env) # for security
-
-    ams_service( 'collector',
-                   action = 'start'
-    )
-
-  def stop(self, env):
-    import params
-    env.set_params(params)
-
-    ams_service( 'collector', action = 'stop')
-
-  def status(self, env):
-    import status_params
-    env.set_params(status_params)
-    check_service_status(name='collector')
-
-
-  def security_status(self, env):
-    import status_params
-
-    env.set_params(status_params)
-    props_value_check = {"hbase.security.authentication": "kerberos",
-                         "hbase.security.authorization": "true"}
-
-    props_empty_check = ["hbase.zookeeper.property.authProvider.1",
-                         "hbase.master.keytab.file",
-                         "hbase.master.kerberos.principal",
-                         "hbase.regionserver.keytab.file",
-                         "hbase.regionserver.kerberos.principal"
-    ]
-    props_read_check = ['hbase.master.keytab.file', 'hbase.regionserver.keytab.file']
-    ams_hbase_site_expectations = build_expectations('hbase-site', props_value_check,
-                                                     props_empty_check,
-                                                     props_read_check)
-
-    expectations = {}
-    expectations.update(ams_hbase_site_expectations)
-
-    security_params = get_params_from_filesystem(status_params.ams_hbase_conf_dir,
-                                                 {'hbase-site.xml': FILE_TYPE_XML})
-
-    is_hbase_distributed = security_params['hbase-site']['hbase.rootdir'].startswith('hdfs://')
-    # for embedded mode, when HBase is backed by file, security state is SECURED_KERBEROS by definition when cluster is secured
-    if status_params.security_enabled and not is_hbase_distributed:
-      self.put_structured_out({"securityState": "SECURED_KERBEROS"})
-      return
-
-    result_issues = validate_security_config_properties(security_params, expectations)
-
-    if not result_issues:  # If all validations passed successfully
-      try:
-        # Double check the dict before calling execute
-        if ('hbase-site' not in security_params or
-                'hbase.master.keytab.file' not in security_params['hbase-site'] or
-                'hbase.master.kerberos.principal' not in security_params['hbase-site']):
-          self.put_structured_out({"securityState": "UNSECURED"})
-          self.put_structured_out(
-            {"securityIssuesFound": "Keytab file or principal are not set property."})
-          return
-
-        cached_kinit_executor(status_params.kinit_path_local,
-                              status_params.hbase_user,
-                              security_params['hbase-site']['hbase.master.keytab.file'],
-                              security_params['hbase-site']['hbase.master.kerberos.principal'],
-                              status_params.hostname,
-                              status_params.tmp_dir)
-        self.put_structured_out({"securityState": "SECURED_KERBEROS"})
-      except Exception as e:
-        self.put_structured_out({"securityState": "ERROR"})
-        self.put_structured_out({"securityStateErrorInfo": str(e)})
-    else:
-      issues = []
-      for cf in result_issues:
-        issues.append("Configuration file %s did not pass the validation. Reason: %s" % (
-        cf, result_issues[cf]))
-      self.put_structured_out({"securityIssuesFound": ". ".join(issues)})
-      self.put_structured_out({"securityState": "UNSECURED"})
-
-if __name__ == "__main__":
-  AmsCollector().execute()

+ 2 - 2
ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json

@@ -29,8 +29,8 @@
   },
   },
   "_comment" : "Dependencies that are used when GLUSTERFS is not present in cluster",
   "_comment" : "Dependencies that are used when GLUSTERFS is not present in cluster",
   "optional_no_glusterfs": {
   "optional_no_glusterfs": {
-    "METRIC_COLLECTOR-START": ["NAMENODE-START", "DATANODE-START"],
-    "AMS_SERVICE_CHECK-SERVICE_CHECK": ["METRIC_COLLECTOR-START", "HDFS_SERVICE_CHECK-SERVICE_CHECK"],
+    "METRICS_COLLECTOR-START": ["NAMENODE-START", "DATANODE-START"],
+    "AMBARI_METRICS_SERVICE_CHECK-SERVICE_CHECK": ["METRICS_COLLECTOR-START", "HDFS_SERVICE_CHECK-SERVICE_CHECK"],
     "SECONDARY_NAMENODE-START": ["NAMENODE-START"],
     "SECONDARY_NAMENODE-START": ["NAMENODE-START"],
     "RESOURCEMANAGER-START": ["NAMENODE-START", "DATANODE-START"],
     "RESOURCEMANAGER-START": ["NAMENODE-START", "DATANODE-START"],
     "NODEMANAGER-START": ["NAMENODE-START", "DATANODE-START", "RESOURCEMANAGER-START"],
     "NODEMANAGER-START": ["NAMENODE-START", "DATANODE-START", "RESOURCEMANAGER-START"],

+ 27 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/AMBARI_METRICS/metainfo.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+  ~ 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.
+  -->
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>AMBARI_METRICS</name>
+      <extends>common-services/AMBARI_METRICS/0.1.0</extends>
+    </service>
+  </services>
+</metainfo>

+ 9 - 9
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py

@@ -85,7 +85,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
       "MAPREDUCE2": self.recommendMapReduce2Configurations,
       "MAPREDUCE2": self.recommendMapReduce2Configurations,
       "HDFS": self.recommendHDFSConfigurations,
       "HDFS": self.recommendHDFSConfigurations,
       "HBASE": self.recommendHbaseEnvConfigurations,
       "HBASE": self.recommendHbaseEnvConfigurations,
-      "AMS": self.recommendAmsConfigurations
+      "AMBARI_METRICS": self.recommendAmsConfigurations
     }
     }
 
 
   def putProperty(self, config, configType):
   def putProperty(self, config, configType):
@@ -131,14 +131,14 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
     putTimelineServiceProperty = self.putProperty(configurations, "ams-site")
     putTimelineServiceProperty = self.putProperty(configurations, "ams-site")
     putHbaseEnvProperty = self.putProperty(configurations, "ams-hbase-env")
     putHbaseEnvProperty = self.putProperty(configurations, "ams-hbase-env")
 
 
-    amsCollectorHosts = self.getComponentHostNames(services, "AMS", "METRIC_COLLECTOR")
+    amsCollectorHosts = self.getComponentHostNames(services, "AMBARI_METRICS", "METRICS_COLLECTOR")
     putHbaseEnvProperty("hbase_regionserver_heapsize", "1024m")
     putHbaseEnvProperty("hbase_regionserver_heapsize", "1024m")
     putAmsHbaseSiteProperty("hfile.block.cache.size", 0.3)
     putAmsHbaseSiteProperty("hfile.block.cache.size", 0.3)
     putAmsHbaseSiteProperty("hbase.regionserver.global.memstore.upperLimit", 0.5)
     putAmsHbaseSiteProperty("hbase.regionserver.global.memstore.upperLimit", 0.5)
     putAmsHbaseSiteProperty("hbase.regionserver.global.memstore.lowerLimit", 0.4)
     putAmsHbaseSiteProperty("hbase.regionserver.global.memstore.lowerLimit", 0.4)
     putTimelineServiceProperty("timeline.metrics.host.aggregator.ttl", 86400)
     putTimelineServiceProperty("timeline.metrics.host.aggregator.ttl", 86400)
 
 
-    # TODO recommend configuration for multiple AMS collectors
+    # TODO recommend configuration for multiple AMBARI_METRICS collectors
     if len(amsCollectorHosts) > 1:
     if len(amsCollectorHosts) > 1:
       pass
       pass
     else:
     else:
@@ -256,7 +256,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
       "MAPREDUCE2": {"mapred-site": self.validateMapReduce2Configurations},
       "MAPREDUCE2": {"mapred-site": self.validateMapReduce2Configurations},
       "YARN": {"yarn-site": self.validateYARNConfigurations},
       "YARN": {"yarn-site": self.validateYARNConfigurations},
       "HBASE": {"hbase-env": self.validateHbaseEnvConfigurations},
       "HBASE": {"hbase-env": self.validateHbaseEnvConfigurations},
-      "AMS": {"ams-hbase-site": self.validateAmsHbaseSiteConfigurations,
+      "AMBARI_METRICS": {"ams-hbase-site": self.validateAmsHbaseSiteConfigurations,
               "ams-hbase-env": self.validateAmsHbaseEnvConfigurations,
               "ams-hbase-env": self.validateAmsHbaseEnvConfigurations,
               "ams-site": self.validateAmsSiteConfigurations},
               "ams-site": self.validateAmsSiteConfigurations},
     }
     }
@@ -275,11 +275,11 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 
 
   def validateAmsHbaseSiteConfigurations(self, properties, recommendedDefaults, configurations, services, hosts):
   def validateAmsHbaseSiteConfigurations(self, properties, recommendedDefaults, configurations, services, hosts):
 
 
-    amsCollectorHosts = self.getComponentHostNames(services, "AMS", "METRIC_COLLECTOR")
+    amsCollectorHosts = self.getComponentHostNames(services, "AMBARI_METRICS", "METRICS_COLLECTOR")
     ams_site = getSiteProperties(configurations, "ams-site")
     ams_site = getSiteProperties(configurations, "ams-site")
 
 
     recommendedDiskSpace = 10485760
     recommendedDiskSpace = 10485760
-    # TODO validate configuration for multiple AMS collectors
+    # TODO validate configuration for multiple AMBARI_METRICS collectors
     if len(amsCollectorHosts) > 1:
     if len(amsCollectorHosts) > 1:
       pass
       pass
     else:
     else:
@@ -321,17 +321,17 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
     masterItem = self.validatorLessThenDefaultValue(properties, recommendedDefaults, "hbase_master_heapsize")
     masterItem = self.validatorLessThenDefaultValue(properties, recommendedDefaults, "hbase_master_heapsize")
     ams_env = getSiteProperties(configurations, "ams-env")
     ams_env = getSiteProperties(configurations, "ams-env")
     logDirItem = self.validatorEqualsPropertyItem(properties, "hbase_log_dir",
     logDirItem = self.validatorEqualsPropertyItem(properties, "hbase_log_dir",
-                                                  ams_env, "ams_collector_log_dir")
+                                                  ams_env, "metrics_collector_log_dir")
 
 
     if masterItem is None:
     if masterItem is None:
       hbase_master_heapsize = formatXmxSizeToBytes(properties["hbase_master_heapsize"])
       hbase_master_heapsize = formatXmxSizeToBytes(properties["hbase_master_heapsize"])
 
 
-      # TODO Add AMS Collector Xmx property to ams-env
+      # TODO Add AMBARI_METRICS Collector Xmx property to ams-env
       # Collector 512m + HBASE Master heapsize
       # Collector 512m + HBASE Master heapsize
       # For standalone HBase, master's heap memory is used by regionserver as well
       # For standalone HBase, master's heap memory is used by regionserver as well
       requiredMemory = 536870912 + hbase_master_heapsize
       requiredMemory = 536870912 + hbase_master_heapsize
 
 
-      amsCollectorHosts = self.getComponentHostNames(services, "AMS", "METRIC_COLLECTOR")
+      amsCollectorHosts = self.getComponentHostNames(services, "AMBARI_METRICS", "METRICS_COLLECTOR")
       for collectorHostName in amsCollectorHosts:
       for collectorHostName in amsCollectorHosts:
         for host in hosts["items"]:
         for host in hosts["items"]:
           if host["Hosts"]["host_name"] == collectorHostName:
           if host["Hosts"]["host_name"] == collectorHostName:

+ 6 - 6
ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py

@@ -27,7 +27,7 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
       "HBASE": self.recommendHBASEConfigurations,
       "HBASE": self.recommendHBASEConfigurations,
       "MAPREDUCE2": self.recommendMapReduce2Configurations,
       "MAPREDUCE2": self.recommendMapReduce2Configurations,
       "TEZ": self.recommendTezConfigurations,
       "TEZ": self.recommendTezConfigurations,
-      "AMS": self.recommendAmsConfigurations,
+      "AMBARI_METRICS": self.recommendAmsConfigurations,
       "YARN": self.recommendYARNConfigurations
       "YARN": self.recommendYARNConfigurations
     }
     }
     parentRecommendConfDict.update(childRecommendConfDict)
     parentRecommendConfDict.update(childRecommendConfDict)
@@ -349,27 +349,27 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
 
 
   def getMastersWithMultipleInstances(self):
   def getMastersWithMultipleInstances(self):
     result = super(HDP22StackAdvisor, self).getMastersWithMultipleInstances()
     result = super(HDP22StackAdvisor, self).getMastersWithMultipleInstances()
-    result.extend(['METRIC_COLLECTOR'])
+    result.extend(['METRICS_COLLECTOR'])
     return result
     return result
 
 
   def getNotValuableComponents(self):
   def getNotValuableComponents(self):
     result = super(HDP22StackAdvisor, self).getNotValuableComponents()
     result = super(HDP22StackAdvisor, self).getNotValuableComponents()
-    result.extend(['METRIC_MONITOR'])
+    result.extend(['METRICS_MONITOR'])
     return result
     return result
 
 
   def getNotPreferableOnServerComponents(self):
   def getNotPreferableOnServerComponents(self):
     result = super(HDP22StackAdvisor, self).getNotPreferableOnServerComponents()
     result = super(HDP22StackAdvisor, self).getNotPreferableOnServerComponents()
-    result.extend(['METRIC_COLLECTOR'])
+    result.extend(['METRICS_COLLECTOR'])
     return result
     return result
 
 
   def getCardinalitiesDict(self):
   def getCardinalitiesDict(self):
     result = super(HDP22StackAdvisor, self).getCardinalitiesDict()
     result = super(HDP22StackAdvisor, self).getCardinalitiesDict()
-    result['METRIC_COLLECTOR'] = {"min": 1}
+    result['METRICS_COLLECTOR'] = {"min": 1}
     return result
     return result
 
 
   def getComponentLayoutSchemes(self):
   def getComponentLayoutSchemes(self):
     result = super(HDP22StackAdvisor, self).getComponentLayoutSchemes()
     result = super(HDP22StackAdvisor, self).getComponentLayoutSchemes()
-    result['METRIC_COLLECTOR'] = {"else": 2}
+    result['METRICS_COLLECTOR'] = {"else": 2}
     return result
     return result
 
 
 def is_number(s):
 def is_number(s):

+ 0 - 0
ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMS/configuration/ams-env.xml → ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMBARI_METRICS/configuration/ams-env.xml


+ 0 - 0
ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMS/configuration/ams-hbase-env.xml → ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMBARI_METRICS/configuration/ams-hbase-env.xml


+ 2 - 2
ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMS/configuration/ams-hbase-site.xml → ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMBARI_METRICS/configuration/ams-hbase-site.xml

@@ -25,8 +25,8 @@
     <name>hbase.rootdir</name>
     <name>hbase.rootdir</name>
     <value>file:///C:/hadoop/hbase-ams</value>
     <value>file:///C:/hadoop/hbase-ams</value>
     <description>
     <description>
-      AMS service uses HBase as default storage backend. Set the rootdir for
-      HBase to either local filesystem path if using AMS in embedded mode or
+      Ambari Metrics service uses HBase as default storage backend. Set the rootdir for
+      HBase to either local filesystem path if using Ambari Metrics in embedded mode or
       to a HDFS dir, example: hdfs://namenode.example.org:9000/hbase.  By
       to a HDFS dir, example: hdfs://namenode.example.org:9000/hbase.  By
       default HBase writes into /tmp. Change this configuration else all data
       default HBase writes into /tmp. Change this configuration else all data
       will be lost on machine restart.
       will be lost on machine restart.

+ 0 - 0
ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMS/configuration/ams-log4j.xml → ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMBARI_METRICS/configuration/ams-log4j.xml


+ 0 - 0
ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMS/configuration/ams-site.xml → ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMBARI_METRICS/configuration/ams-site.xml


+ 2 - 2
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/AMS/metainfo.xml → ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMBARI_METRICS/metainfo.xml

@@ -19,8 +19,8 @@
   <schemaVersion>2.0</schemaVersion>
   <schemaVersion>2.0</schemaVersion>
   <services>
   <services>
     <service>
     <service>
-      <name>AMS</name>
-      <extends>common-services/AMS/0.1.0</extends>
+      <name>AMBARI_METRICS</name>
+      <extends>common-services/AMBARI_METRICS/0.1.0</extends>
     </service>
     </service>
   </services>
   </services>
 </metainfo>
 </metainfo>

+ 0 - 26
ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/AMS/metainfo.xml

@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-   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.
--->
-<metainfo>
-  <schemaVersion>2.0</schemaVersion>
-  <services>
-    <service>
-      <name>AMS</name>
-      <extends>common-services/AMS/0.1.0</extends>
-    </service>
-  </services>
-</metainfo>

+ 1 - 1
ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/AMS/metainfo.xml → ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/AMBARI_METRICS/metainfo.xml

@@ -19,7 +19,7 @@
   <schemaVersion>2.0</schemaVersion>
   <schemaVersion>2.0</schemaVersion>
   <services>
   <services>
     <service>
     <service>
-      <name>AMS</name>
+      <name>AMBARI_METRICS</name>
       <version>0.1.0</version>
       <version>0.1.0</version>
     </service>
     </service>
   </services>
   </services>

+ 2 - 2
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/MetricsServiceProviderTest.java

@@ -76,7 +76,7 @@ public class MetricsServiceProviderTest {
     Predicate expectedPredicate2 =
     Predicate expectedPredicate2 =
       new PredicateBuilder().property(HOST_COMPONENT_CLUSTER_NAME_PROPERTY_ID)
       new PredicateBuilder().property(HOST_COMPONENT_CLUSTER_NAME_PROPERTY_ID)
         .equals("c1").and().property(HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID)
         .equals("c1").and().property(HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID)
-        .equals("METRIC_COLLECTOR").toPredicate();
+        .equals("METRICS_COLLECTOR").toPredicate();
 
 
     ArgumentCaptor<Request> requestCapture = ArgumentCaptor.forClass(Request.class);
     ArgumentCaptor<Request> requestCapture = ArgumentCaptor.forClass(Request.class);
     ArgumentCaptor<Predicate> predicateCapture = ArgumentCaptor.forClass(Predicate.class);
     ArgumentCaptor<Predicate> predicateCapture = ArgumentCaptor.forClass(Predicate.class);
@@ -111,7 +111,7 @@ public class MetricsServiceProviderTest {
     when(hostComponentResourceProvider.getResources(any(Request.class),
     when(hostComponentResourceProvider.getResources(any(Request.class),
       any(Predicate.class))).thenReturn(hostComponents);
       any(Predicate.class))).thenReturn(hostComponents);
     when(hostComponent.getPropertyValue
     when(hostComponent.getPropertyValue
-      (HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID)).thenReturn("METRIC_COLLECTOR");
+      (HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID)).thenReturn("METRICS_COLLECTOR");
     when(hostComponent.getPropertyValue(HOST_COMPONENT_HOST_NAME_PROPERTY_ID)).thenReturn("h1");
     when(hostComponent.getPropertyValue(HOST_COMPONENT_HOST_NAME_PROPERTY_ID)).thenReturn("h1");
 
 
     service = providerModule.getMetricsServiceType();
     service = providerModule.getMetricsServiceType();

+ 1 - 1
ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java

@@ -348,7 +348,7 @@ public class AMSPropertyProviderTest {
     String propertyId = PropertyHelper.getPropertyId("metrics/hbase/regionserver", "requests");
     String propertyId = PropertyHelper.getPropertyId("metrics/hbase/regionserver", "requests");
     Resource resource = new ResourceImpl(Resource.Type.Component);
     Resource resource = new ResourceImpl(Resource.Type.Component);
     resource.setProperty(HOST_NAME_PROPERTY_ID, "h1");
     resource.setProperty(HOST_NAME_PROPERTY_ID, "h1");
-    resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "METRIC_COLLECTOR");
+    resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "METRICS_COLLECTOR");
     Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
     Map<String, TemporalInfo> temporalInfoMap = new HashMap<String, TemporalInfo>();
     temporalInfoMap.put(propertyId, new TemporalInfoImpl(1421694000L, 1421697600L, 1L));
     temporalInfoMap.put(propertyId, new TemporalInfoImpl(1421694000L, 1421697600L, 1L));
     Request request = PropertyHelper.getReadRequest(
     Request request = PropertyHelper.getReadRequest(

+ 3 - 3
ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py

@@ -651,10 +651,10 @@ class TestHDP22StackAdvisor(TestCase):
     services = {
     services = {
       "services":  [ {
       "services":  [ {
         "StackServices": {
         "StackServices": {
-          "service_name": "AMS"
+          "service_name": "AMBARI_METRICS"
         },"components": [{
         },"components": [{
           "StackServiceComponents": {
           "StackServiceComponents": {
-            "component_name": "METRIC_COLLECTOR",
+            "component_name": "METRICS_COLLECTOR",
             "hostnames": ["host1"]
             "hostnames": ["host1"]
           }
           }
 
 
@@ -830,4 +830,4 @@ class TestHDP22StackAdvisor(TestCase):
                      'level': 'WARN'}]
                      'level': 'WARN'}]
 
 
     res = self.stackAdvisor.validateMapReduce2Configurations(properties, recommendedDefaults, {}, '', '')
     res = self.stackAdvisor.validateMapReduce2Configurations(properties, recommendedDefaults, {}, '', '')
-    self.assertEquals(res, res_expected)
+    self.assertEquals(res, res_expected)

+ 3 - 3
ambari-shell/ambari-groovy-shell/pom.xml

@@ -12,7 +12,7 @@
   <parent>
   <parent>
     <groupId>org.apache.ambari</groupId>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-shell</artifactId>
     <artifactId>ambari-shell</artifactId>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>2.0.0.0</version>
     <relativePath>../../ambari-shell</relativePath>
     <relativePath>../../ambari-shell</relativePath>
   </parent>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <modelVersion>4.0.0</modelVersion>
@@ -20,7 +20,7 @@
   <artifactId>ambari-groovy-shell</artifactId>
   <artifactId>ambari-groovy-shell</artifactId>
   <packaging>jar</packaging>
   <packaging>jar</packaging>
   <name>Ambari Groovy Shell</name>
   <name>Ambari Groovy Shell</name>
-  <version>1.3.0-SNAPSHOT</version>
+  <version>2.0.0.0</version>
   <description>Ambari Groovy Shell</description>
   <description>Ambari Groovy Shell</description>
    <properties>
    <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -51,7 +51,7 @@
     <dependency>
     <dependency>
       <groupId>org.apache.ambari</groupId>
       <groupId>org.apache.ambari</groupId>
       <artifactId>groovy-client</artifactId>
       <artifactId>groovy-client</artifactId>
-      <version>1.3.0-SNAPSHOT</version>
+      <version>2.0.0.0</version>
     </dependency>
     </dependency>
     <dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <groupId>org.mockito</groupId>

+ 2 - 2
ambari-shell/ambari-python-shell/pom.xml

@@ -19,14 +19,14 @@
   <parent>
   <parent>
     <groupId>org.apache.ambari</groupId>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-shell</artifactId>
     <artifactId>ambari-shell</artifactId>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>2.0.0.0</version>
     <relativePath>../../ambari-shell</relativePath>
     <relativePath>../../ambari-shell</relativePath>
   </parent>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.ambari</groupId>
   <groupId>org.apache.ambari</groupId>
   <artifactId>ambari-python-shell</artifactId>
   <artifactId>ambari-python-shell</artifactId>
   <packaging>pom</packaging>
   <packaging>pom</packaging>
-  <version>1.3.0-SNAPSHOT</version>
+  <version>2.0.0.0</version>
   <name>Ambari Python Shell</name>
   <name>Ambari Python Shell</name>
   <description>Ambari Python Shell</description>
   <description>Ambari Python Shell</description>
   <properties>
   <properties>

+ 2 - 2
ambari-shell/pom.xml

@@ -21,14 +21,14 @@
   <parent>
   <parent>
     <groupId>org.apache.ambari</groupId>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-project</artifactId>
     <artifactId>ambari-project</artifactId>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>2.0.0.0</version>
     <relativePath>../ambari-project</relativePath>
     <relativePath>../ambari-project</relativePath>
   </parent>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.ambari</groupId>
   <groupId>org.apache.ambari</groupId>
   <artifactId>ambari-shell</artifactId>
   <artifactId>ambari-shell</artifactId>
   <packaging>pom</packaging>
   <packaging>pom</packaging>
-  <version>1.3.0-SNAPSHOT</version>
+  <version>2.0.0.0</version>
   <name>Ambari Shell</name>
   <name>Ambari Shell</name>
   <description>Ambari Shell</description>
   <description>Ambari Shell</description>
   <modules>
   <modules>

+ 2 - 2
ambari-views/pom.xml

@@ -20,7 +20,7 @@
     <parent>
     <parent>
         <groupId>org.apache.ambari</groupId>
         <groupId>org.apache.ambari</groupId>
         <artifactId>ambari-project</artifactId>
         <artifactId>ambari-project</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>2.0.0.0</version>
         <relativePath>../ambari-project</relativePath>
         <relativePath>../ambari-project</relativePath>
     </parent>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <modelVersion>4.0.0</modelVersion>
@@ -28,7 +28,7 @@
     <artifactId>ambari-views</artifactId>
     <artifactId>ambari-views</artifactId>
     <packaging>jar</packaging>
     <packaging>jar</packaging>
     <name>Ambari Views</name>
     <name>Ambari Views</name>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>2.0.0.0</version>
     <description>Ambari View interfaces.</description>
     <description>Ambari View interfaces.</description>
     <url>http://ambari.apache.org/</url>
     <url>http://ambari.apache.org/</url>
     <scm>
     <scm>

+ 1 - 2
ambari-web/app/controllers/wizard/step4_controller.js

@@ -82,8 +82,7 @@ App.WizardStep4Controller = Em.ArrayController.extend({
    * @method ambariMetricsValidation
    * @method ambariMetricsValidation
    */
    */
   ambariMetricsValidation: function () {
   ambariMetricsValidation: function () {
-    //TODO Change 'AMS' to the actual serviceName after it's changed
-    var ambariMetricsService = this.findProperty('serviceName', 'AMS');
+    var ambariMetricsService = this.findProperty('serviceName', 'AMBARI_METRICS');
     if (ambariMetricsService && !ambariMetricsService.get('isSelected')) {
     if (ambariMetricsService && !ambariMetricsService.get('isSelected')) {
       this.addValidationError({
       this.addValidationError({
         id: 'ambariMetricsCheck',
         id: 'ambariMetricsCheck',

+ 27 - 27
ambari-web/app/data/HDP2/site_properties.js

@@ -4180,7 +4180,7 @@ var hdp2properties = [
     "rowStyleClass": "indent-1",
     "rowStyleClass": "indent-1",
     "filename": "alert_notification"
     "filename": "alert_notification"
   },
   },
-/************************************************AMS******************************************/
+/************************************************AMBARI_METRICS******************************************/
   {
   {
     "id": "site property",
     "id": "site property",
     "name": "timeline.metrics.service.operation.mode",
     "name": "timeline.metrics.service.operation.mode",
@@ -4188,55 +4188,55 @@ var hdp2properties = [
     "description": "\n      Service Operation modes:\n      1) embedded: Metrics stored on local FS, HBase in Standalone mode\n      2) distributed: HBase daemons writing to HDFS\n      3) external: External HBase storage backend\n    ",
     "description": "\n      Service Operation modes:\n      1) embedded: Metrics stored on local FS, HBase in Standalone mode\n      2) distributed: HBase daemons writing to HDFS\n      3) external: External HBase storage backend\n    ",
     "defaultValue": "embedded",
     "defaultValue": "embedded",
     "displayType": "string",
     "displayType": "string",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "General",
     "category": "General",
     "index": 1
     "index": 1
   },
   },
   {
   {
     "id": "site property",
     "id": "site property",
-    "name": "ams_collector_log_dir",
+    "name": "metrics_collector_log_dir",
     "displayName": "Metrics Collector log dir",
     "displayName": "Metrics Collector log dir",
     "description": "\n      Log location for collector logs\n    ",
     "description": "\n      Log location for collector logs\n    ",
     "defaultValue": "embedded",
     "defaultValue": "embedded",
     "displayType": "string",
     "displayType": "string",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-env.xml",
     "filename": "ams-env.xml",
     "category": "General",
     "category": "General",
     "index": 2
     "index": 2
   },
   },
   {
   {
     "id": "site property",
     "id": "site property",
-    "name": "ams_collector_pid_dir",
+    "name": "metrics_collector_pid_dir",
     "displayName": "Metrics Collector pid dir",
     "displayName": "Metrics Collector pid dir",
     "description": "\n      pid location for collector\n    ",
     "description": "\n      pid location for collector\n    ",
     "defaultValue": "embedded",
     "defaultValue": "embedded",
     "displayType": "string",
     "displayType": "string",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-env.xml",
     "filename": "ams-env.xml",
     "category": "General",
     "category": "General",
     "index": 3
     "index": 3
   },
   },
   {
   {
     "id": "site property",
     "id": "site property",
-    "name": "ams_monitor_log_dir",
+    "name": "metrics_monitor_log_dir",
     "displayName": "Metrics Monitor log dir",
     "displayName": "Metrics Monitor log dir",
     "description": "\n      Log location for monitor logs\n    ",
     "description": "\n      Log location for monitor logs\n    ",
     "defaultValue": "embedded",
     "defaultValue": "embedded",
     "displayType": "string",
     "displayType": "string",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-env.xml",
     "filename": "ams-env.xml",
     "category": "General",
     "category": "General",
     "index": 4
     "index": 4
   },
   },
   {
   {
     "id": "site property",
     "id": "site property",
-    "name": "ams_monitor_pid_dir",
+    "name": "metrics_monitor_pid_dir",
     "displayName": "Metrics Monitor pid dir",
     "displayName": "Metrics Monitor pid dir",
     "description": "\n      pid location for monitor\n    ",
     "description": "\n      pid location for monitor\n    ",
     "defaultValue": "embedded",
     "defaultValue": "embedded",
     "displayType": "string",
     "displayType": "string",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-env.xml",
     "filename": "ams-env.xml",
     "category": "General",
     "category": "General",
     "index": 5
     "index": 5
@@ -4248,7 +4248,7 @@ var hdp2properties = [
     "description": "\n      Directory to store aggregator checkpoints\n    ",
     "description": "\n      Directory to store aggregator checkpoints\n    ",
     "defaultValue": "/tmp",
     "defaultValue": "/tmp",
     "displayType": "directory",
     "displayType": "directory",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 17
     "index": 17
@@ -4260,7 +4260,7 @@ var hdp2properties = [
     "description": "\n      Multiplier value * interval = Max allowed checkpoint lag. Effectively\n      if aggregator checkpoint is greater than max allowed checkpoint delay,\n      the checkpoint will be discarded by the aggregator.\n    ",
     "description": "\n      Multiplier value * interval = Max allowed checkpoint lag. Effectively\n      if aggregator checkpoint is greater than max allowed checkpoint delay,\n      the checkpoint will be discarded by the aggregator.\n    ",
     "defaultValue": "2",
     "defaultValue": "2",
     "displayType": "int",
     "displayType": "int",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 16
     "index": 16
@@ -4272,7 +4272,7 @@ var hdp2properties = [
     "description": "\n      Disable cluster based hourly aggregations.\n    ",
     "description": "\n      Disable cluster based hourly aggregations.\n    ",
     "defaultValue": "false",
     "defaultValue": "false",
     "displayType": "string",
     "displayType": "string",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 14
     "index": 14
@@ -4284,7 +4284,7 @@ var hdp2properties = [
     "description": "\n      Time in seconds to sleep for the hourly resolution cluster wide\n      aggregator. Default is 1 hour.\n    ",
     "description": "\n      Time in seconds to sleep for the hourly resolution cluster wide\n      aggregator. Default is 1 hour.\n    ",
     "defaultValue": "3600",
     "defaultValue": "3600",
     "displayType": "int",
     "displayType": "int",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 15
     "index": 15
@@ -4296,7 +4296,7 @@ var hdp2properties = [
     "description": "\n      Multiplier value * interval = Max allowed checkpoint lag. Effectively\n      if aggregator checkpoint is greater than max allowed checkpoint delay,\n      the checkpoint will be discarded by the aggregator.\n    ",
     "description": "\n      Multiplier value * interval = Max allowed checkpoint lag. Effectively\n      if aggregator checkpoint is greater than max allowed checkpoint delay,\n      the checkpoint will be discarded by the aggregator.\n    ",
     "defaultValue": "2",
     "defaultValue": "2",
     "displayType": "int",
     "displayType": "int",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 13
     "index": 13
@@ -4308,7 +4308,7 @@ var hdp2properties = [
     "description": "\n      Disable cluster based minute aggregations.\n    ",
     "description": "\n      Disable cluster based minute aggregations.\n    ",
     "defaultValue": "false",
     "defaultValue": "false",
     "displayType": "string",
     "displayType": "string",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 10
     "index": 10
@@ -4320,7 +4320,7 @@ var hdp2properties = [
     "description": "\n      Time in seconds to sleep for the minute resolution cluster wide\n      aggregator. Default resolution is 2 minutes.\n    ",
     "description": "\n      Time in seconds to sleep for the minute resolution cluster wide\n      aggregator. Default resolution is 2 minutes.\n    ",
     "defaultValue": "120",
     "defaultValue": "120",
     "displayType": "int",
     "displayType": "int",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 11
     "index": 11
@@ -4332,7 +4332,7 @@ var hdp2properties = [
     "description": "\n      Lowest resolution of desired data for cluster level minute aggregates.\n    ",
     "description": "\n      Lowest resolution of desired data for cluster level minute aggregates.\n    ",
     "defaultValue": "15",
     "defaultValue": "15",
     "displayType": "int",
     "displayType": "int",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 12
     "index": 12
@@ -4344,7 +4344,7 @@ var hdp2properties = [
     "description": "\n      Multiplier value * interval = Max allowed checkpoint lag. Effectively\n      if aggregator checkpoint is greater than max allowed checkpoint delay,\n      the checkpoint will be discarded by the aggregator.\n    ",
     "description": "\n      Multiplier value * interval = Max allowed checkpoint lag. Effectively\n      if aggregator checkpoint is greater than max allowed checkpoint delay,\n      the checkpoint will be discarded by the aggregator.\n    ",
     "defaultValue": "2",
     "defaultValue": "2",
     "displayType": "int",
     "displayType": "int",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 9
     "index": 9
@@ -4356,7 +4356,7 @@ var hdp2properties = [
     "description": "\n      Disable host based hourly aggregations\n    ",
     "description": "\n      Disable host based hourly aggregations\n    ",
     "defaultValue": "false",
     "defaultValue": "false",
     "displayType": "string",
     "displayType": "string",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 7
     "index": 7
@@ -4368,7 +4368,7 @@ var hdp2properties = [
     "description": "\n      Time in seconds to sleep for the hourly resolution host based\n      aggregator. Default resolution is 1 hour.\n    ",
     "description": "\n      Time in seconds to sleep for the hourly resolution host based\n      aggregator. Default resolution is 1 hour.\n    ",
     "defaultValue": "3600",
     "defaultValue": "3600",
     "displayType": "int",
     "displayType": "int",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 8
     "index": 8
@@ -4380,7 +4380,7 @@ var hdp2properties = [
     "description": "\n      Multiplier value * interval = Max allowed checkpoint lag. Effectively\n      if aggregator checkpoint is greater than max allowed checkpoint delay,\n      the checkpoint will be discarded by the aggregator.\n    ",
     "description": "\n      Multiplier value * interval = Max allowed checkpoint lag. Effectively\n      if aggregator checkpoint is greater than max allowed checkpoint delay,\n      the checkpoint will be discarded by the aggregator.\n    ",
     "defaultValue": "2",
     "defaultValue": "2",
     "displayType": "int",
     "displayType": "int",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 6
     "index": 6
@@ -4392,7 +4392,7 @@ var hdp2properties = [
     "description": "\n      Disable host based minute aggregations.\n    ",
     "description": "\n      Disable host based minute aggregations.\n    ",
     "defaultValue": "false",
     "defaultValue": "false",
     "displayType": "string",
     "displayType": "string",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 4
     "index": 4
@@ -4404,7 +4404,7 @@ var hdp2properties = [
     "description": "\n      Time in seconds to sleep for the minute resolution host based\n      aggregator. Default resolution is 5 minutes.\n    ",
     "description": "\n      Time in seconds to sleep for the minute resolution host based\n      aggregator. Default resolution is 5 minutes.\n    ",
     "defaultValue": "300",
     "defaultValue": "300",
     "displayType": "int",
     "displayType": "int",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 5
     "index": 5
@@ -4416,7 +4416,7 @@ var hdp2properties = [
     "description": "\n      Time in seconds to sleep on the first run or when the checkpoint is\n      too old.\n    ",
     "description": "\n      Time in seconds to sleep on the first run or when the checkpoint is\n      too old.\n    ",
     "defaultValue": "120",
     "defaultValue": "120",
     "displayType": "int",
     "displayType": "int",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 1
     "index": 1
@@ -4428,7 +4428,7 @@ var hdp2properties = [
     "description": "\n      Max result limit on number of rows returned. Calculated as follows:\n      4 aggregate metrics/min * 60 * 24: Retrieve aggregate data for 1 day.\n    ",
     "description": "\n      Max result limit on number of rows returned. Calculated as follows:\n      4 aggregate metrics/min * 60 * 24: Retrieve aggregate data for 1 day.\n    ",
     "defaultValue": "5760",
     "defaultValue": "5760",
     "displayType": "int",
     "displayType": "int",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 2
     "index": 2
@@ -4440,7 +4440,7 @@ var hdp2properties = [
     "description": "\n      JDBC resultset prefect size for aggregator queries.\n    ",
     "description": "\n      JDBC resultset prefect size for aggregator queries.\n    ",
     "defaultValue": "2000",
     "defaultValue": "2000",
     "displayType": "int",
     "displayType": "int",
-    "serviceName": "AMS",
+    "serviceName": "AMBARI_METRICS",
     "filename": "ams-site.xml",
     "filename": "ams-site.xml",
     "category": "MetricCollector",
     "category": "MetricCollector",
     "index": 3
     "index": 3

+ 1 - 1
ambari-web/app/models/stack_service.js

@@ -319,7 +319,7 @@ App.StackService.configCategories = function () {
         App.ServiceConfigCategory.create({ name: 'General', displayName: 'General'})
         App.ServiceConfigCategory.create({ name: 'General', displayName: 'General'})
       ]);
       ]);
       break;
       break;
-    case 'AMS':
+    case 'AMBARI_METRICS':
       serviceConfigCategories.pushObjects([
       serviceConfigCategories.pushObjects([
         App.ServiceConfigCategory.create({ name: 'General', displayName: 'General'}),
         App.ServiceConfigCategory.create({ name: 'General', displayName: 'General'}),
         App.ServiceConfigCategory.create({ name: 'MetricCollector', displayName: 'Metric Collector'})
         App.ServiceConfigCategory.create({ name: 'MetricCollector', displayName: 'Metric Collector'})

+ 2 - 2
ambari-web/pom.xml

@@ -20,14 +20,14 @@
   <parent>
   <parent>
     <groupId>org.apache.ambari</groupId>
     <groupId>org.apache.ambari</groupId>
     <artifactId>ambari-project</artifactId>
     <artifactId>ambari-project</artifactId>
-    <version>1.3.0-SNAPSHOT</version>
+    <version>2.0.0.0</version>
     <relativePath>../ambari-project</relativePath>
     <relativePath>../ambari-project</relativePath>
   </parent>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>ambari-web</artifactId>
   <artifactId>ambari-web</artifactId>
   <packaging>pom</packaging>
   <packaging>pom</packaging>
   <name>Ambari Web</name>
   <name>Ambari Web</name>
-  <version>1.3.0-SNAPSHOT</version>
+  <version>2.0.0.0</version>
   <description>Ambari Web</description>
   <description>Ambari Web</description>
   <properties>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

+ 13 - 13
ambari-web/test/controllers/wizard/step4_test.js

@@ -25,7 +25,7 @@ describe('App.WizardStep4Controller', function () {
 
 
   var services = [
   var services = [
     'HDFS', 'GANGLIA', 'OOZIE', 'HIVE', 'HBASE', 'PIG', 'SCOOP', 'ZOOKEEPER',
     'HDFS', 'GANGLIA', 'OOZIE', 'HIVE', 'HBASE', 'PIG', 'SCOOP', 'ZOOKEEPER',
-    'YARN', 'MAPREDUCE2', 'FALCON', 'TEZ', 'STORM', 'AMS', 'RANGER'
+    'YARN', 'MAPREDUCE2', 'FALCON', 'TEZ', 'STORM', 'AMBARI_METRICS', 'RANGER'
   ];
   ];
 
 
   var controller = App.WizardStep4Controller.create();
   var controller = App.WizardStep4Controller.create();
@@ -260,35 +260,35 @@ describe('App.WizardStep4Controller', function () {
           errorsExpected: ['ambariMetricsCheck']
           errorsExpected: ['ambariMetricsCheck']
         },
         },
         {
         {
-          services: ['HDFS','ZOOKEEPER', 'AMS'],
+          services: ['HDFS','ZOOKEEPER', 'AMBARI_METRICS'],
           errorsExpected: []
           errorsExpected: []
         },
         },
         {
         {
-          services: ['ZOOKEEPER', 'AMS'],
+          services: ['ZOOKEEPER', 'AMBARI_METRICS'],
           errorsExpected: []
           errorsExpected: []
         },
         },
         {
         {
-          services: ['HDFS', 'AMS'],
+          services: ['HDFS', 'AMBARI_METRICS'],
           errorsExpected: ['serviceCheck_ZOOKEEPER']
           errorsExpected: ['serviceCheck_ZOOKEEPER']
         },
         },
         {
         {
-          services: ['HDFS', 'TEZ', 'ZOOKEEPER', 'AMS'],
+          services: ['HDFS', 'TEZ', 'ZOOKEEPER', 'AMBARI_METRICS'],
           errorsExpected: ['serviceCheck_YARN']
           errorsExpected: ['serviceCheck_YARN']
         },
         },
         {
         {
-          services: ['HDFS', 'ZOOKEEPER', 'FALCON', 'AMS'],
+          services: ['HDFS', 'ZOOKEEPER', 'FALCON', 'AMBARI_METRICS'],
           errorsExpected: ['serviceCheck_OOZIE']
           errorsExpected: ['serviceCheck_OOZIE']
         },
         },
         {
         {
-          services: ['HDFS', 'ZOOKEEPER', 'GANGLIA', 'HIVE', 'AMS'],
+          services: ['HDFS', 'ZOOKEEPER', 'GANGLIA', 'HIVE', 'AMBARI_METRICS'],
           errorsExpected: ['serviceCheck_YARN']
           errorsExpected: ['serviceCheck_YARN']
         },
         },
         {
         {
-          services: ['HDFS', 'GLUSTERFS', 'ZOOKEEPER', 'HIVE', 'AMS'],
+          services: ['HDFS', 'GLUSTERFS', 'ZOOKEEPER', 'HIVE', 'AMBARI_METRICS'],
           errorsExpected: ['serviceCheck_YARN', 'multipleDFS']
           errorsExpected: ['serviceCheck_YARN', 'multipleDFS']
         },
         },
         {
         {
-          services: ['HDFS','ZOOKEEPER', 'GANGLIA', 'AMS'],
+          services: ['HDFS','ZOOKEEPER', 'GANGLIA', 'AMBARI_METRICS'],
           errorsExpected: []
           errorsExpected: []
         },
         },
         {
         {
@@ -530,13 +530,13 @@ describe('App.WizardStep4Controller', function () {
         title: 'Ambari Metrics not available'
         title: 'Ambari Metrics not available'
       },
       },
       {
       {
-        services: ['AMS'],
+        services: ['AMBARI_METRICS'],
         isAmbariMetricsSelected: false,
         isAmbariMetricsSelected: false,
         isAmbariMetricsWarning: true,
         isAmbariMetricsWarning: true,
         title: 'Ambari Metrics not selected'
         title: 'Ambari Metrics not selected'
       },
       },
       {
       {
-        services: ['AMS'],
+        services: ['AMBARI_METRICS'],
         isAmbariMetricsSelected: true,
         isAmbariMetricsSelected: true,
         isAmbariMetricsWarning: false,
         isAmbariMetricsWarning: false,
         title: 'Ambari Metrics selected'
         title: 'Ambari Metrics selected'
@@ -547,8 +547,8 @@ describe('App.WizardStep4Controller', function () {
       it(item.title, function () {
       it(item.title, function () {
         controller.clear();
         controller.clear();
         controller.set('content', generateSelectedServicesContent(item.services));
         controller.set('content', generateSelectedServicesContent(item.services));
-        var ams = controller.findProperty('serviceName', 'AMS');
-        if (item.services.contains('AMS')) {
+        var ams = controller.findProperty('serviceName', 'AMBARI_METRICS');
+        if (item.services.contains('AMBARI_METRICS')) {
           ams.set('isSelected', item.isAmbariMetricsSelected);
           ams.set('isSelected', item.isAmbariMetricsSelected);
         } else {
         } else {
           controller.removeObject(ams);
           controller.removeObject(ams);

+ 3 - 3
ambari-web/test/controllers/wizard/step7_test.js

@@ -1322,7 +1322,7 @@ describe('App.InstallerStep7Controller', function () {
   describe('#setInstalledServiceConfigs', function () {
   describe('#setInstalledServiceConfigs', function () {
 
 
     var controller = App.WizardStep7Controller.create({
     var controller = App.WizardStep7Controller.create({
-        installedServiceNames: ['HBASE', 'AMS']
+        installedServiceNames: ['HBASE', 'AMBARI_METRICS']
       }),
       }),
       serviceConfigTags = [
       serviceConfigTags = [
         {
         {
@@ -1348,7 +1348,7 @@ describe('App.InstallerStep7Controller', function () {
         {
         {
           name: 'hbase.client.scanner.caching',
           name: 'hbase.client.scanner.caching',
           value: '2000',
           value: '2000',
-          serviceName: 'AMS',
+          serviceName: 'AMBARI_METRICS',
           filename: 'ams-hbase-site.xml'
           filename: 'ams-hbase-site.xml'
         }
         }
       ],
       ],
@@ -1372,7 +1372,7 @@ describe('App.InstallerStep7Controller', function () {
           tag: 'version1'
           tag: 'version1'
         }
         }
       ],
       ],
-      installedServiceNames = ['HBASE', 'AMS'];
+      installedServiceNames = ['HBASE', 'AMBARI_METRICS'];
 
 
     it('should handle properties with the same name', function () {
     it('should handle properties with the same name', function () {
       controller.setInstalledServiceConfigs(serviceConfigTags, configs, configsByTags, installedServiceNames);
       controller.setInstalledServiceConfigs(serviceConfigTags, configs, configsByTags, installedServiceNames);

+ 1 - 1
ambari-web/test/mock_data_setup/configs_mock_data.js

@@ -213,7 +213,7 @@ module.exports = {
       {
       {
         "name": "hbase_log_dir",
         "name": "hbase_log_dir",
         "value": "/hadoop/ams-hbase",
         "value": "/hadoop/ams-hbase",
-        "serviceName": "AMS",
+        "serviceName": "AMBARI_METRICS",
         "filename": "ams-hbase-env.xml"
         "filename": "ams-hbase-env.xml"
       }
       }
     ];
     ];

+ 1 - 1
ambari-web/test/utils/config_test.js

@@ -254,7 +254,7 @@ describe('App.config', function () {
       expect(properties).to.have.length(2);
       expect(properties).to.have.length(2);
       expect(hbaseProperty.serviceName).to.equal('HBASE');
       expect(hbaseProperty.serviceName).to.equal('HBASE');
       expect(hbaseProperty.value).to.equal('/hadoop/hbase');
       expect(hbaseProperty.value).to.equal('/hadoop/hbase');
-      expect(amsProperty.serviceName).to.equal('AMS');
+      expect(amsProperty.serviceName).to.equal('AMBARI_METRICS');
       expect(amsProperty.value).to.equal('/hadoop/ams-hbase');
       expect(amsProperty.value).to.equal('/hadoop/ams-hbase');
     });
     });
   });
   });

+ 1 - 1
contrib/views/pom.xml

@@ -142,7 +142,7 @@
       <dependency>
       <dependency>
         <groupId>org.apache.ambari</groupId>
         <groupId>org.apache.ambari</groupId>
         <artifactId>ambari-views</artifactId>
         <artifactId>ambari-views</artifactId>
-        <version>[${ambari.version},)</version>
+        <version>2.0.0.0</version>
       </dependency>
       </dependency>
     </dependencies>
     </dependencies>
   </dependencyManagement>
   </dependencyManagement>

+ 2 - 2
contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java

@@ -263,8 +263,8 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController {
             }
             }
             if (cluster.getDesiredConfigs().containsKey("ams-site")) {
             if (cluster.getDesiredConfigs().containsKey("ams-site")) {
               Map<String, String> amsConfigs = ambariClient.getConfiguration(cluster, "ams-site", cluster.getDesiredConfigs().get("ams-site"));
               Map<String, String> amsConfigs = ambariClient.getConfiguration(cluster, "ams-site", cluster.getDesiredConfigs().get("ams-site"));
-              AmbariService amsService = ambariClient.getService(cluster, "AMS");
-              List<AmbariHostComponent> hostsList = amsService.getComponentsToHostComponentsMap().get("METRIC_COLLECTOR");
+              AmbariService amsService = ambariClient.getService(cluster, "AMBARI_METRICS");
+              List<AmbariHostComponent> hostsList = amsService.getComponentsToHostComponentsMap().get("METRICS_COLLECTOR");
               if (hostsList != null && hostsList.size() > 0) {
               if (hostsList != null && hostsList.size() > 0) {
                 String collectorHostName = hostsList.get(0).getHostName();
                 String collectorHostName = hostsList.get(0).getHostName();
                 newHadoopConfigs.put(PROPERTY_METRICS_SERVER_HOSTNAME, collectorHostName);
                 newHadoopConfigs.put(PROPERTY_METRICS_SERVER_HOSTNAME, collectorHostName);

+ 2 - 2
contrib/views/slider/src/main/resources/ui/app/initialize.js

@@ -103,13 +103,13 @@ App.initializer({
       viewErrors: [],
       viewErrors: [],
 
 
       /**
       /**
-       * Host with Metrics Server (AMS)
+       * Host with Metrics Server (AMBARI_METRICS)
        * @type {string|null}
        * @type {string|null}
        */
        */
       metricsHost: null,
       metricsHost: null,
 
 
       /**
       /**
-       * Port of Metrics Server (AMS port)
+       * Port of Metrics Server (AMBARI_METRICS port)
        * @type {array|null}
        * @type {array|null}
        */
        */
       metricsPort: null,
       metricsPort: null,

+ 1 - 1
pom.xml

@@ -21,7 +21,7 @@
   <artifactId>ambari</artifactId>
   <artifactId>ambari</artifactId>
   <packaging>pom</packaging>
   <packaging>pom</packaging>
   <name>Ambari Main</name>
   <name>Ambari Main</name>
-  <version>1.3.0-SNAPSHOT</version>
+  <version>2.0.0.0</version>
   <description>Ambari</description>
   <description>Ambari</description>
   <properties>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>