You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/02/24 14:19:17 UTC

[10/50] ambari git commit: AMBARI-20092. Hive View 2.0: User should be shown with appropriate error message when compute statistics action fails. (dipayanb)

AMBARI-20092. Hive View 2.0: User should be shown with appropriate error message when compute statistics action fails. (dipayanb)


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

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 4e7bf34a7435148a8ab96fb9e46059189355edf8
Parents: 3e76e47
Author: Dipayan Bhowmick <di...@gmail.com>
Authored: Wed Feb 22 12:42:34 2017 +0530
Committer: Dipayan Bhowmick <di...@gmail.com>
Committed: Wed Feb 22 12:43:08 2017 +0530

----------------------------------------------------------------------
 .../src/main/resources/ui/app/components/table-statistics.js    | 5 ++++-
 .../resources/ui/app/routes/databases/database/tables/table.js  | 2 ++
 .../ui/app/routes/databases/database/tables/table/edit.js       | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4e7bf34a/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js b/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
index 1623e0e..0310cbc 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/table-statistics.js
@@ -17,8 +17,9 @@
  */
 
 import Ember from 'ember';
+import UILoggerMixin from '../mixins/ui-logger';
 
-export default Ember.Component.extend({
+export default Ember.Component.extend(UILoggerMixin, {
   statsService: Ember.inject.service(),
 
   analyseWithStatistics: false,
@@ -76,6 +77,7 @@ export default Ember.Component.extend({
       Ember.run.later(() => this.closeAndRefresh(), 2 * 1000);
     }).catch((err) => {
       this.set('analyseMessage', 'Job failed for analysing statistics of table');
+      this.get('logger').danger(`Job failed for analysing statistics of table '${tableName}'`, this.extractError(err));
       Ember.run.later(() => this.closeAndRefresh(), 2 * 1000);
     });
   },
@@ -96,6 +98,7 @@ export default Ember.Component.extend({
     }).catch((err) => {
       column.set('isFetchingStats', false);
       column.set('statsError', true);
+      this.get('logger').danger(`Job failed for fetching column statistics for column '${column.name}' of table '${tableName}'`, this.extractError(err));
     });
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4e7bf34a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table.js
index 6ee8100..53055cf 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table.js
@@ -38,6 +38,8 @@ export default Ember.Route.extend(UILoggerMixin, {
     console.log(model.get('detailedInfo.tableType').toLowerCase());
     if (model.get('detailedInfo.tableType').toLowerCase().indexOf('view') === -1) {
       newTabs = newTabs.rejectBy('name', 'viewInfo');
+    } else {
+      newTabs = newTabs.rejectBy('name', 'statistics');
     }
     controller.set('tabs', newTabs);
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/4e7bf34a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/edit.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/edit.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/edit.js
index d9f80e1..2fa61b4 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/edit.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/table/edit.js
@@ -57,7 +57,7 @@ export default TableMetaRouter.extend(UILoggerMixin, {
         this._transitionToTables();
       }).catch((err) => {
         this._modalStatus(false, 'Failed to edit table');
-        this.get('logger').danger(`Failed to  altered table '${settings.table}'`, this.extractError(err));
+        this.get('logger').danger(`Failed to alter table '${settings.table}'`, this.extractError(err));
       });
     }