ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbhowm...@apache.org
Subject ambari git commit: AMBARI-18913. Hive view service check fails first time after server restart. (Ashwin Rajeev via dipayanb)
Date Thu, 17 Nov 2016 19:15:20 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 6c727311f -> c97d785bf


AMBARI-18913. Hive view service check fails first time after server restart. (Ashwin Rajeev
via dipayanb)


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

Branch: refs/heads/trunk
Commit: c97d785bfdb8f2c835a93fcea278429596ef407b
Parents: 6c72731
Author: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Authored: Fri Nov 18 00:42:26 2016 +0530
Committer: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Committed: Fri Nov 18 00:45:08 2016 +0530

----------------------------------------------------------------------
 .../resources/ui/hive-web/app/routes/splash.js  | 56 +++++++++++---------
 1 file changed, 30 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c97d785b/contrib/views/hive-next/src/main/resources/ui/hive-web/app/routes/splash.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive-next/src/main/resources/ui/hive-web/app/routes/splash.js b/contrib/views/hive-next/src/main/resources/ui/hive-web/app/routes/splash.js
index e2601f9..179a912 100644
--- a/contrib/views/hive-next/src/main/resources/ui/hive-web/app/routes/splash.js
+++ b/contrib/views/hive-next/src/main/resources/ui/hive-web/app/routes/splash.js
@@ -44,56 +44,60 @@ export default Ember.Route.extend({
     var self = this;
 
     function loadView(){
-          controller.startTests().then(function() {
+      if (model.get("hiveserverTest")
+        && model.get("hdfsTest")
+        && model.get("atsTest")
+        && model.get("userhomeTest")) {
+        Ember.run.later(this, function() {
+          self.send('transition');
+        }, 2000);
+      }
+
+    }
 
-            if (model.get("hiveserverTest")
-                && model.get("hdfsTest")
-                && model.get("atsTest")
-                && model.get("userhomeTest")) {
-              Ember.run.later(this, function() {
-                self.send('transition');
-              }, 2000);
-            }
-          });
-        }
 
-    controller.checkConnection().then(function(){
-      var percent = model.get('percent');
-      model.set("hiveserverTest",true);
-      model.set("hiveserver" + 'TestDone', true);
-      model.set('percent', percent + 25);
-      loadView();
-    },function(){
-        if(model.get('ldapFailure')) {
+    function checkHive() {
+      controller.checkConnection().then(function () {
+        var percent = model.get('percent');
+        model.set("hiveserverTest", true);
+        model.set("hiveserver" + 'TestDone', true);
+        model.set('percent', percent + 25);
+        loadView();
+      }, function () {
+        if (model.get('ldapFailure')) {
           var percent = model.get('percent');
-          controller.requestLdapPassword(function(){
+          controller.requestLdapPassword(function () {
             // check the connection again
-            controller.checkConnection().then(function(){
-              model.set("hiveserverTest",true);
+            controller.checkConnection().then(function () {
+              model.set("hiveserverTest", true);
               model.set("hiveserver" + 'TestDone', true);
               model.set('percent', percent + 25);
               loadView();
-            },function(){
+            }, function () {
               var percent = model.get('percent');
               var checkFailedMessage = "Hive authentication failed";
               var errors = controller.get("errors");
               errors += checkFailedMessage;
               errors += '<br>';
               controller.set("errors", errors);
-              model.get("hiveserverTest",false);
+              model.get("hiveserverTest", false);
               model.set("hiveserver" + 'TestDone', true);
               model.set('percent', percent + 25);
               loadView();
             });
           });
         } else {
-          model.get("hiveserverTest",false);
+          model.get("hiveserverTest", false);
           model.set("hiveserver" + 'TestDone', true);
           model.set('percent', model.get('percent') + 25);
           loadView();
         }
-    });
+      });
+    }
 
+    controller.startTests().then(function() {
+      checkHive();
+    });
 
   },
 


Mime
View raw message