ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject ambari git commit: AMBARI-9668. RU: Review +clean messages for manual steps to be more specific (ncole)
Date Tue, 17 Feb 2015 12:40:21 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 0a49dc918 -> ef8750d83


AMBARI-9668. RU: Review +clean messages for manual steps to be more specific (ncole)


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

Branch: refs/heads/trunk
Commit: ef8750d83ebf12608be0cb5b1f5361695fca3323
Parents: 0a49dc9
Author: Nate Cole <ncole@hortonworks.com>
Authored: Mon Feb 16 13:31:59 2015 -0500
Committer: Nate Cole <ncole@hortonworks.com>
Committed: Tue Feb 17 07:18:57 2015 -0500

----------------------------------------------------------------------
 .../state/stack/upgrade/ServiceCheckGrouping.java | 12 ++++++++----
 .../stacks/HDP/2.2/upgrades/upgrade-2.2.xml       | 18 +++++++++---------
 .../ambari/server/state/UpgradeHelperTest.java    | 16 +++++++++++++++-
 3 files changed, 32 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ef8750d8/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServiceCheckGrouping.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServiceCheckGrouping.java
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServiceCheckGrouping.java
index a9732d2..e40706c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServiceCheckGrouping.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServiceCheckGrouping.java
@@ -86,7 +86,7 @@ public class ServiceCheckGrouping extends Grouping {
 
       // create stages for the priorities
       for (String service : ServiceCheckGrouping.this.priorityServices) {
-        if (checkServiceValidity(service, serviceMap)) {
+        if (checkServiceValidity(ctx, service, serviceMap)) {
           StageWrapper wrapper = new StageWrapper(
               StageWrapper.Type.SERVICE_CHECK,
               "Service Check " + ctx.getServiceDisplay(service),
@@ -100,7 +100,7 @@ public class ServiceCheckGrouping extends Grouping {
 
       // create stages for everything else
       for (String service : clusterServices) {
-        if (checkServiceValidity(service, serviceMap)) {
+        if (checkServiceValidity(ctx, service, serviceMap)) {
           StageWrapper wrapper = new StageWrapper(
               StageWrapper.Type.SERVICE_CHECK,
               "Service Check " + ctx.getServiceDisplay(service),
@@ -114,12 +114,12 @@ public class ServiceCheckGrouping extends Grouping {
 
     /**
      * Checks if the service is valid for a service check
-     *
+     * @param ctx             the upgrade context to set the display name
      * @param service         the name of the service to check
      * @param clusterServices the map of available services for a cluster
      * @return {@code true} if the service is valid and can execute a service check
      */
-    private boolean checkServiceValidity(String service, Map<String, Service> clusterServices)
{
+    private boolean checkServiceValidity(UpgradeContext ctx, String service, Map<String,
Service> clusterServices) {
       if (!clusterServices.containsKey(service)) {
         return false;
       } else {
@@ -134,6 +134,9 @@ public class ServiceCheckGrouping extends Grouping {
             try {
               ServiceInfo si = m_metaInfo.getService(stackId.getStackName(),
                   stackId.getStackVersion(), service);
+
+              ctx.setServiceDisplay(service, si.getDisplayName());
+
               if (null == si.getCommandScript()) {
                 return false;
               }
@@ -146,6 +149,7 @@ public class ServiceCheckGrouping extends Grouping {
 
       return true;
     }
+
   }
 
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ef8750d8/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml
index 5305b1f..cbc2619 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml
@@ -40,13 +40,13 @@
 
       <execute-stage service="HIVE" component="HIVE_METASTORE" title="Pre Upgrade Hive">
         <task xsi:type="manual">
-          <message>Backup the Hive Metastore database located on the following host(s):
{{hosts.all}}.  During the upgrade process, you will be instructed when it is time to upgrade
the Hive Metastore database.  To prepare, review the README documentation at /usr/hdp/{{version}}/hive/scripts/metastore/upgrade
for when you are asked to perform this manual step (during the Hive stage of upgrade).  Do
not upgrade the database at this time.  You will be prompted when to perform the database
upgrade.</message>
+          <message>Before continuing, please backup the Hive Metastore database located
on the following host(s): {{hosts.all}}.  During the upgrade process, you will be instructed
when it is time to upgrade the Hive Metastore database.  To prepare, review the README documentation
at /usr/hdp/{{version}}/hive/scripts/metastore/upgrade for when you are asked to perform this
manual step (during the Hive stage of upgrade).  Do not upgrade the database at this time.
 You will be prompted when to perform the database upgrade.</message>
         </task>
       </execute-stage>
 
       <execute-stage service="OOZIE" component="OOZIE_SERVER" title="Pre Upgrade Oozie">
         <task xsi:type="manual">
-          <message>Backup the Oozie Server database on {{oozie-env/oozie_hostname}}</message>
+          <message>Before continuing, please backup the Oozie Server database on {{oozie-env/oozie_hostname}}.</message>
         </task>
       </execute-stage>
 
@@ -115,7 +115,7 @@
       <batch>
         <percent>33</percent>
         <summary>Verification Required</summary>
-        <message>Core Services have been {{direction.past}}. You are advised to perform
tests against your cluster to ensure proper operation before proceeding with {{direction.text}}
of remaining services.</message>
+        <message>Core Services have been {{direction.past}}. You are advised to perform
cluster/workload-specific tests against your cluster to ensure proper operation before proceeding
with {{direction.text}} of the remaining services.</message>
       </batch>
     </group>
     
@@ -288,7 +288,7 @@
       <component name="RANGER_ADMIN">
         <pre-upgrade>
           <task xsi:type="manual">
-            <message>Backup the Ranger Admin database and Ranger Audit database</message>
+            <message>Before continuing, please backup the Ranger Admin database and
Ranger Audit database</message>
           </task>
         </pre-upgrade>
         <upgrade>
@@ -416,7 +416,7 @@
       <component name="HIVE_METASTORE">
         <pre-upgrade>
           <task xsi:type="manual">
-            <message>Consult the README documentation at /usr/hdp/{{version}}/hive/scripts/metastore/upgrade
to correctly upgrade the Hive Metastore database. This database upgrade should be performed
on the following host(s): {{hosts.all}}</message>
+            <message>The Hive Metastore database schema must be upgraded before proceeding.
 Please consult the README documentation at /usr/hdp/{{version}}/hive/scripts/metastore/upgrade
to correctly upgrade the Hive Metastore database. This database upgrade should be performed
on the following host(s): {{hosts.all}}.</message>
           </task>
         </pre-upgrade>
         <pre-downgrade />
@@ -429,7 +429,7 @@
         <pre-upgrade>
           <task xsi:type="manual">
             <summary>HiveServer Port Availability</summary>
-            <message>The HiveServer port will now change to 10010 if hive is using
a binary transfer mode or 10011 if hive is using an http transport mode. You can use "netstat
-anp | grep 1001[01]" to determine if the port is available on each of following HiveServer
host(s): {{hosts.all}}. If the port is not available, the process using it must be terminated.</message>
+            <message>Please note that the HiveServer port will now change to 10010
if hive is using a binary transfer mode or 10011 if hive is using an http transport mode.
You can use "netstat -anp | grep 1001[01]" to determine if the port is available on each of
following HiveServer host(s): {{hosts.all}}. If the port is not available, the process using
it must be terminated.</message>
           </task>
 
           <task xsi:type="configure">
@@ -449,7 +449,7 @@
         <pre-downgrade>
           <task xsi:type="manual">
             <summary>HiveServer Port Availability</summary>
-            <message>The HiveServer port will now change to 10000 if hive is using
a binary transfer mode or 10001 if hive is using an http transport mode. You can use "netstat
-anp | grep 1000[01]" to determine if the port is available on each of following HiveServer
host(s): {{hosts.all}}. If the port is not available, the process using it must be terminated.</message>
+            <message>Please note that the HiveServer port will now change to 10000
if hive is using a binary transfer mode or 10001 if hive is using an http transport mode.
You can use "netstat -anp | grep 1000[01]" to determine if the port is available on each of
following HiveServer host(s): {{hosts.all}}. If the port is not available, the process using
it must be terminated.</message>
           </task>
 
           <task xsi:type="configure">
@@ -544,7 +544,7 @@
       <component name="NIMBUS">
         <pre-upgrade>
           <task xsi:type="manual">
-            <message>Deactivate and kill your currently running topology.</message>
+            <message>Before continuing, please deactivate and kill any currently running
topologies.</message>
           </task>
         </pre-upgrade>
         <upgrade>
@@ -572,7 +572,7 @@
         </upgrade>
         <post-upgrade>
           <task xsi:type="manual">
-            <message>Rebuild your topology and resubmit the topology using the new
jar.</message>
+            <message>Please rebuild your topology using the new Storm version dependencies
and resubmit it using the newly created jar.</message>
           </task>
         </post-upgrade>
       </component>

http://git-wip-us.apache.org/repos/asf/ambari/blob/ef8750d8/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
index a708dac..7e6047b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
@@ -415,7 +415,10 @@ public class UpgradeHelperTest {
     UpgradePack upgrade = upgrades.get("upgrade_test_checks");
     assertNotNull(upgrade);
 
-    makeCluster();
+    Cluster c = makeCluster();
+    c.addService("HBASE");
+
+
 
     UpgradeContext context = new UpgradeContext(m_masterHostResolver,
         UPGRADE_VERSION, Direction.UPGRADE);
@@ -424,6 +427,17 @@ public class UpgradeHelperTest {
 
     assertEquals(7, groups.size());
 
+    UpgradeGroupHolder holder = groups.get(3);
+    assertEquals(holder.name, "SERVICE_CHECK_1");
+    assertEquals(5, holder.items.size());
+    boolean found = false;
+    for (StageWrapper sw : holder.items) {
+      if (sw.getText().contains("HBase")) {
+        found = true;
+      }
+    }
+    assertTrue("Expected string 'HBase' in text", found);
+
     // grab the manual task out of ZK which has placeholder text
     UpgradeGroupHolder zookeeperGroup = groups.get(1);
     assertEquals("ZOOKEEPER", zookeeperGroup.name);


Mime
View raw message