You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2017/07/12 17:13:25 UTC

[1/3] ambari git commit: AMBARI-21437 Allow user to execute force_remove_packages custom action from UI, second patch. (atkach)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 88d93b924 -> 621f38019


AMBARI-21437 Allow user to execute force_remove_packages custom action from UI, second patch. (atkach)


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

Branch: refs/heads/branch-2.5
Commit: e69b35f6bb1cadb2c7d7843f4cb341398a3f830c
Parents: 40cd87d
Author: Andrii Tkach <at...@apache.org>
Authored: Wed Jul 12 13:23:49 2017 +0300
Committer: Andrii Tkach <at...@apache.org>
Committed: Wed Jul 12 13:23:49 2017 +0300

----------------------------------------------------------------------
 ambari-web/app/messages.js                            |  2 ++
 ambari-web/app/utils/ajax/ajax.js                     |  2 +-
 .../views/main/admin/stack_upgrade/versions_view.js   | 14 ++++++++++++++
 .../main/admin/stack_upgrade/version_view_test.js     |  4 ++++
 4 files changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e69b35f6/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 7a6482f..a51f896 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1710,6 +1710,8 @@ Em.I18n.translations = {
   'admin.stackVersions.version.notInstalled': "Not Installed",
   'admin.stackVersions.version.hostsInfoTooltip': "There are {0} hosts that do not need packages installed:<li>{1} Maintenance Mode</li><li>{2} Not Required</li>",
   'admin.stackVersions.removeIopSelect': "Remove IOP select",
+  'admin.stackVersions.removeIopSelect.done': "IOP select successfully removed.",
+  'admin.stackVersions.removeIopSelect.fail': "IOP select remove failed",
   'admin.stackVersions.manageVersions': "Manage Versions",
   'admin.stackVersions.manageVersions.popup.body': 'You are about to leave the <b>Cluster Management</b> interface' +
     ' and go to the <b>Ambari Administration</b> interface. You can return to cluster management by using the' +

http://git-wip-us.apache.org/repos/asf/ambari/blob/e69b35f6/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index 6dce323..47fd5f9 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -1838,7 +1838,7 @@ var urls = {
   },
 
   'admin.stack_versions.removeIopSelect': {
-    'real': '/requests',
+    'real': '/clusters/{clusterName}/requests',
     'mock': '',
     'type': 'POST',
     'format': function (data) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e69b35f6/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js
index f3c7b2f..2b57e04 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js
@@ -257,6 +257,20 @@ App.MainAdminStackVersionsView = Em.View.extend({
         data: {
           hosts: App.get('allHostNames').join(',')
         }
+      }).always(function(xhr, status) {
+        if (status === 'success') {
+          App.showAlertPopup(Em.I18n.t('admin.stackVersions.removeIopSelect'), Em.I18n.t('admin.stackVersions.removeIopSelect.done'));
+        } else if (status === 'error') {
+          App.ModalPopup.show({
+            header: Em.I18n.t('admin.stackVersions.removeIopSelect.fail'),
+            secondary: false,
+            bodyClass: App.AjaxDefaultErrorPopupBodyView.extend({
+              type: 'POST',
+              status: xhr.status,
+              message: xhr.responseText
+            })
+          });
+        }
       });
     });
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/e69b35f6/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js b/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js
index 8c8d5c7..6da0a19 100644
--- a/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js
+++ b/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js
@@ -516,9 +516,13 @@ describe('App.mainAdminStackVersionsView', function () {
   describe('#removeIopSelect', function() {
     beforeEach(function() {
       sinon.stub(App, 'showConfirmationPopup', Em.clb);
+      sinon.stub(App, 'showAlertPopup');
+      sinon.stub(App.ModalPopup, 'show');
     });
     afterEach(function() {
       App.showConfirmationPopup.restore();
+      App.showAlertPopup.restore();
+      App.ModalPopup.show.restore();
     });
 
     it('App.ajax.send should be called', function() {


[3/3] ambari git commit: Merge branch 'branch-feature-AMBARI-21348' into branch-2.5

Posted by sw...@apache.org.
Merge branch 'branch-feature-AMBARI-21348' into branch-2.5


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

Branch: refs/heads/branch-2.5
Commit: 621f38019a81c4183b0e001efe00e89c6583d85a
Parents: 88d93b9 cb86bf0
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Wed Jul 12 10:11:56 2017 -0700
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Wed Jul 12 10:11:56 2017 -0700

----------------------------------------------------------------------
 .../0.96.0.2.0/package/scripts/hbase_service.py    | 17 +++++++++++++++++
 .../0.96.0.2.0/package/scripts/params_linux.py     |  9 +++++++++
 .../BigInsights/4.2.5/upgrades/config-upgrade.xml  | 11 +++++++++++
 .../upgrades/nonrolling-upgrade-to-hdp-2.6.xml     |  5 +++++
 .../BigInsights/4.2/upgrades/config-upgrade.xml    | 11 +++++++++++
 .../4.2/upgrades/nonrolling-upgrade-to-hdp-2.6.xml |  7 ++++++-
 ambari-web/app/messages.js                         |  2 ++
 ambari-web/app/utils/ajax/ajax.js                  |  2 +-
 .../main/admin/stack_upgrade/versions_view.js      | 14 ++++++++++++++
 .../main/admin/stack_upgrade/version_view_test.js  |  4 ++++
 10 files changed, 80 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/621f3801/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/621f3801/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------


[2/3] ambari git commit: AMBARI-21420 HBase master crashed during/post EU on an IOP4.2.5/HDP2.6 migrated cluster (dili)

Posted by sw...@apache.org.
AMBARI-21420 HBase master crashed during/post EU on an IOP4.2.5/HDP2.6 migrated cluster (dili)


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

Branch: refs/heads/branch-2.5
Commit: cb86bf06f878efeccdb38ec87eb160eac2e6ed57
Parents: e69b35f
Author: Di Li <di...@apache.org>
Authored: Wed Jul 12 11:33:00 2017 -0400
Committer: Di Li <di...@apache.org>
Committed: Wed Jul 12 11:33:00 2017 -0400

----------------------------------------------------------------------
 .../0.96.0.2.0/package/scripts/hbase_service.py    | 17 +++++++++++++++++
 .../0.96.0.2.0/package/scripts/params_linux.py     |  9 +++++++++
 .../BigInsights/4.2.5/upgrades/config-upgrade.xml  | 11 +++++++++++
 .../upgrades/nonrolling-upgrade-to-hdp-2.6.xml     |  5 +++++
 .../BigInsights/4.2/upgrades/config-upgrade.xml    | 11 +++++++++++
 .../4.2/upgrades/nonrolling-upgrade-to-hdp-2.6.xml |  7 ++++++-
 6 files changed, 59 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cb86bf06/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
index a1003dc..2e2fa10 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_service.py
@@ -19,6 +19,7 @@ limitations under the License.
 """
 
 from resource_management import *
+from resource_management.core.logger import Logger
 
 def hbase_service(
   name,
@@ -32,6 +33,22 @@ def hbase_service(
     pid_expression = as_sudo(["cat", pid_file])
     no_op_test = as_sudo(["test", "-f", pid_file]) + format(" && ps -p `{pid_expression}` >/dev/null 2>&1")
     
+    # delete wal log if HBase version has moved down
+    if params.to_backup_wal_dir:
+      wal_directory = params.wal_directory
+      timestamp = datetime.datetime.now()
+      format = '%Y%m%d%H%M%S'
+      wal_directory_backup = '%s_%s' % (wal_directory, timestamp.strftime(format))
+
+      rm_cmd = format("hadoop fs -mv {wal_directory} {wal_directory_backup}")
+      try:
+        Execute ( rm_cmd,
+          user = params.hbase_user
+        )
+      except Exception, e:
+        #Should still allow HBase Start/Stop to proceed
+        Logger.error("Failed to backup HBase WAL directory, command: {0} . Exception: {1}".format(rm_cmd, e.message))
+
     if action == 'start':
       daemon_cmd = format("{cmd} start {role}")
       

http://git-wip-us.apache.org/repos/asf/ambari/blob/cb86bf06/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index 43c6036..23066ee 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -42,6 +42,7 @@ from resource_management.libraries.script.script import Script
 from resource_management.libraries.functions.expect import expect
 from ambari_commons.ambari_metrics_helper import select_metric_collector_hosts_from_hostnames
 from resource_management.libraries.functions.setup_ranger_plugin_xml import get_audit_configs, generate_ranger_service_config
+from resource_management.libraries.functions.constants import Direction
 
 # server configurations
 config = Script.get_config()
@@ -437,3 +438,11 @@ if has_atlas:
   atlas_with_managed_hbase = len(zk_hosts_matches) > 0
 else:
   atlas_with_managed_hbase = False
+
+wal_directory = "/apps/hbase/data/MasterProcWALs"
+
+backup_wal_dir = default('/configurations/hbase-env/backup_wal_dir', False)
+
+#Need to make sure not to keep removing WAL logs once EU is finalized.
+upgrade_direction = default("/commandParams/upgrade_direction", None)
+to_backup_wal_dir = upgrade_direction is not None and upgrade_direction == Direction.UPGRADE and backup_wal_dir

http://git-wip-us.apache.org/repos/asf/ambari/blob/cb86bf06/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
index 42999b2..b51a744 100644
--- a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/config-upgrade.xml
@@ -52,6 +52,17 @@
       </component>
     </service>
     
+    <service name="HBASE">
+      <component name="HBASE_MASTER">
+        <changes>
+          <definition xsi:type="configure" id="biginsights_4_2_hbase_env_config" summary="Update HBase configurations">
+            <type>hbase-env</type>
+            <set key="backup_wal_dir" value="true"/>
+          </definition>
+        </changes>
+      </component>
+    </service>
+
     <service name="HIVE">
       <component name="HIVE_SERVER">
         <changes>

http://git-wip-us.apache.org/repos/asf/ambari/blob/cb86bf06/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
index a96ede9..f3c73a0 100644
--- a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
@@ -182,6 +182,11 @@
         <task xsi:type="configure" id="biginsights_4_2_mapreduce_application_framework_patch" />
       </execute-stage>
       
+      <!-- HBASE -->
+      <execute-stage service="HBASE" component="HBASE_MASTER" title="Apply config changes for HBase">
+        <task xsi:type="configure" id="biginsights_4_2_hbase_env_config" />
+      </execute-stage>
+
       <!-- HIVE -->
       <execute-stage service="HIVE" component="HIVE_SERVER" title="Apply config changes for Hive Server">
         <task xsi:type="configure" id="biginsights_4_2_0_0_hive_env_configure"/>

http://git-wip-us.apache.org/repos/asf/ambari/blob/cb86bf06/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/config-upgrade.xml
index f9e3e15..b46f476 100644
--- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/config-upgrade.xml
@@ -52,6 +52,17 @@
       </component>
     </service>
     
+    <service name="HBASE">
+      <component name="HBASE_MASTER">
+        <changes>
+          <definition xsi:type="configure" id="biginsights_4_2_hbase_env_config" summary="Update HBase configurations">
+            <type>hbase-env</type>
+            <set key="backup_wal_dir" value="true"/>
+          </definition>
+        </changes>
+      </component>
+    </service>
+
     <service name="HIVE">
       <component name="HIVE_SERVER">
         <changes>

http://git-wip-us.apache.org/repos/asf/ambari/blob/cb86bf06/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/nonrolling-upgrade-to-hdp-2.6.xml b/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
index a96ede9..4867626 100644
--- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/nonrolling-upgrade-to-hdp-2.6.xml
@@ -181,7 +181,12 @@
       <execute-stage service="MAPREDUCE2" component="HISTORYSERVER" title="Apply config changes for HistoryServer">
         <task xsi:type="configure" id="biginsights_4_2_mapreduce_application_framework_patch" />
       </execute-stage>
-      
+
+      <!-- HBASE -->
+      <execute-stage service="HBASE" component="HBASE_MASTER" title="Apply config changes for HBase">
+        <task xsi:type="configure" id="biginsights_4_2_hbase_env_config" />
+      </execute-stage>
+
       <!-- HIVE -->
       <execute-stage service="HIVE" component="HIVE_SERVER" title="Apply config changes for Hive Server">
         <task xsi:type="configure" id="biginsights_4_2_0_0_hive_env_configure"/>