Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 72030200B2D for ; Thu, 16 Jun 2016 13:19:58 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 70A9D160A52; Thu, 16 Jun 2016 11:19:58 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1B3D8160A51 for ; Thu, 16 Jun 2016 13:19:56 +0200 (CEST) Received: (qmail 6275 invoked by uid 500); 16 Jun 2016 11:19:56 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 6265 invoked by uid 99); 16 Jun 2016 11:19:56 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2016 11:19:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E6723DFDEF; Thu, 16 Jun 2016 11:19:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dbhowmick@apache.org To: commits@ambari.apache.org Message-Id: <558c19563d82479fb008ba3c63dcb876@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-17113. Add user home directory verification as part of Service Check. (dipayanb) Date: Thu, 16 Jun 2016 11:19:55 +0000 (UTC) archived-at: Thu, 16 Jun 2016 11:19:58 -0000 Repository: ambari Updated Branches: refs/heads/branch-2.4 0942cc0bb -> de5fd97f3 AMBARI-17113. Add user home directory verification as part of Service Check. (dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/de5fd97f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/de5fd97f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/de5fd97f Branch: refs/heads/branch-2.4 Commit: de5fd97f35e28b9193ff8a3c507ac1dffb5844ae Parents: 0942cc0 Author: Dipayan Bhowmick Authored: Thu Jun 16 16:49:25 2016 +0530 Committer: Dipayan Bhowmick Committed: Thu Jun 16 16:49:25 2016 +0530 ---------------------------------------------------------------------- .../main/resources/ui/app/templates/splash.hbs | 3 +-- contrib/views/hive-next/pom.xml | 5 +++++ .../apache/ambari/view/hive2/HelpService.java | 13 +++++++++++ .../view/hive2/resources/files/FileService.java | 16 ++++++++++++++ .../ui/hive-web/app/controllers/splash.js | 19 ++++++++++------ .../resources/ui/hive-web/app/routes/splash.js | 12 +++++----- .../ui/hive-web/app/templates/splash.hbs | 23 ++++++++++++++++---- contrib/views/hive/pom.xml | 5 +++++ .../apache/ambari/view/hive/HelpService.java | 12 ++++++++++ .../view/hive/resources/files/FileService.java | 16 ++++++++++++++ .../ui/hive-web/app/controllers/splash.js | 19 ++++++++++------ .../resources/ui/hive-web/app/routes/splash.js | 4 +++- .../ui/hive-web/app/templates/splash.hbs | 23 ++++++++++++++++---- contrib/views/pig/pom.xml | 5 +++++ .../view/pig/resources/files/FileService.java | 18 +++++++++++++++ .../ambari/view/pig/services/HelpService.java | 14 ++++++++++++ .../ui/pig-web/app/controllers/splash.js | 8 +++---- .../resources/ui/pig-web/app/routes/splash.js | 4 +++- .../ui/pig-web/app/templates/splash.hbs | 17 +++++++++++++-- .../resources/ui/pig-web/app/translations.js | 3 ++- 20 files changed, 201 insertions(+), 38 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/files/src/main/resources/ui/app/templates/splash.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/files/src/main/resources/ui/app/templates/splash.hbs b/contrib/views/files/src/main/resources/ui/app/templates/splash.hbs index 4a45366..26dbff0 100644 --- a/contrib/views/files/src/main/resources/ui/app/templates/splash.hbs +++ b/contrib/views/files/src/main/resources/ui/app/templates/splash.hbs @@ -18,7 +18,6 @@
-

Welcome to the File Browser View

{{#if allTestsCompleted }}

Service checks completed.

{{else}} @@ -49,7 +48,7 @@ {{/if}} - hdfs service test + HDFS test http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/hive-next/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/hive-next/pom.xml b/contrib/views/hive-next/pom.xml index c571352..befcd57 100644 --- a/contrib/views/hive-next/pom.xml +++ b/contrib/views/hive-next/pom.xml @@ -231,6 +231,11 @@ akka-actor_2.11 2.3.15 + + org.apache.ambari.contrib.views + ambari-views-commons + 2.4.0.0.0 + http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/HelpService.java ---------------------------------------------------------------------- diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/HelpService.java b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/HelpService.java index b0316ab..95aa3f5 100644 --- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/HelpService.java +++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/HelpService.java @@ -78,6 +78,19 @@ public class HelpService extends BaseService { } /** + * HomeDirectory Status + * @return status + */ + @GET + @Path("/userhomeStatus") + @Produces(MediaType.APPLICATION_JSON) + public Response userhomeStatus (){ + FileService.userhomeSmokeTest(context); + return getOKResponse(); + } + + + /** * ATS Status * @return status */ http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/files/FileService.java ---------------------------------------------------------------------- diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/files/FileService.java b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/files/FileService.java index db63364..654bfcc 100644 --- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/files/FileService.java +++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/files/FileService.java @@ -21,6 +21,7 @@ package org.apache.ambari.view.hive2.resources.files; import com.jayway.jsonpath.JsonPath; import org.apache.ambari.view.ViewContext; import org.apache.ambari.view.ViewResourceHandler; +import org.apache.ambari.view.commons.hdfs.UserService; import org.apache.ambari.view.hive2.BaseService; import org.apache.ambari.view.hive2.utils.*; import org.apache.ambari.view.utils.hdfs.HdfsApi; @@ -235,6 +236,21 @@ public class FileService extends BaseService { } /** + * Checks connection to User HomeDirectory + * @param context View Context + */ + public static void userhomeSmokeTest(ViewContext context) { + try { + UserService userservice = new UserService(context); + userservice.homeDir(); + } catch (WebApplicationException ex) { + throw ex; + } catch (Exception ex) { + throw new ServiceFormattedException(ex.getMessage(), ex); + } + } + + /** * Wrapper object for json mapping */ public static class FileResourceRequest { http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/hive-next/src/main/resources/ui/hive-web/app/controllers/splash.js ---------------------------------------------------------------------- diff --git a/contrib/views/hive-next/src/main/resources/ui/hive-web/app/controllers/splash.js b/contrib/views/hive-next/src/main/resources/ui/hive-web/app/controllers/splash.js index 5db93f7..6f495ed 100644 --- a/contrib/views/hive-next/src/main/resources/ui/hive-web/app/controllers/splash.js +++ b/contrib/views/hive-next/src/main/resources/ui/hive-web/app/controllers/splash.js @@ -60,12 +60,11 @@ export default Ember.Controller.extend({ } model.set(name + 'TestDone', true); - var percent = model.get('percent'); - model.set('percent', percent + 33.33); + model.set('percent', percent + 25); }; - var promises = ['hdfs', 'hiveserver', 'ats'].map(function(name) { + var promises = ['hdfs', 'hiveserver', 'ats', 'userhome'].map(function(name) { var finalurl = ((name == 'hiveserver') ? self.get('databaseService.baseUrl') : (url + name + 'Status')) || '' ; @@ -88,13 +87,17 @@ export default Ember.Controller.extend({ }.property("model.percent"), allTestsCompleted: function(){ - return this.get('modelhdfsTestDone') && this.get('modelhiveserverTestDone') && this.get('modelatsTestDone'); - }.property('modelhdfsTestDone', 'modelhiveserverTestDone', 'modelatsTestDone'), + return this.get('modelhdfsTestDone') && this.get('modelhiveserverTestDone') && this.get('modelatsTestDone') && this.get('modeluserhomeTestDone'); + }.property('modelhdfsTestDone', 'modelhiveserverTestDone', 'modelatsTestDone', 'modeluserhomeTestDone'), modelhdfsTestDone: function() { return this.get('model.hdfsTestDone'); }.property('model.hdfsTestDone' ), + modeluserhomeTestDone: function() { + return this.get('model.userhomeTestDone'); + }.property('model.userhomeTestDone' ), + modelhiveserverTestDone: function() { return this.get('model.hiveserverTestDone'); }.property('model.hiveserverTestDone' ), @@ -107,6 +110,10 @@ export default Ember.Controller.extend({ return this.get('model.hdfsTest'); }.property('model.hdfsTest' ), + modeluserhomeTest: function() { + return this.get('model.userhomeTest'); + }.property('model.userhomeTest' ), + modelhiveserverTest: function() { return this.get('model.hiveserverTest'); }.property('model.hiveserverTest' ), @@ -122,5 +129,3 @@ export default Ember.Controller.extend({ } } }); - - http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/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 05bcbcf..b851bf1 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 @@ -28,6 +28,8 @@ export default Ember.Route.extend({ hiveserverTestDone: null, atsTest: null, atsTestDone: null, + userhomeTest: null, + userhomeTestDone: null, percent: 0 }); }, @@ -42,11 +44,11 @@ export default Ember.Route.extend({ var self = this; controller.startTests().then(function() { - if (model.get("hiveserverTest") && model.get("hdfsTest") && model.get("atsTest")) { - 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); + } }); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/hive-next/src/main/resources/ui/hive-web/app/templates/splash.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/hive-next/src/main/resources/ui/hive-web/app/templates/splash.hbs b/contrib/views/hive-next/src/main/resources/ui/hive-web/app/templates/splash.hbs index 84c7a71..5612542 100644 --- a/contrib/views/hive-next/src/main/resources/ui/hive-web/app/templates/splash.hbs +++ b/contrib/views/hive-next/src/main/resources/ui/hive-web/app/templates/splash.hbs @@ -18,7 +18,6 @@
-

Welcome to the Hive View

{{#if allTestsCompleted }}

Service checks completed.

{{else}} @@ -49,7 +48,7 @@ {{/if}} - hdfs service test + HDFS test @@ -63,7 +62,7 @@ {{/if}} - hiveserver service test + HiveServer test @@ -77,8 +76,24 @@ {{/if}} - ats service test + ATS test + + + + {{#if modeluserhomeTestDone}} + {{#if modeluserhomeTest}} + + {{else}} + + {{/if}} + {{else}} + + {{/if}} + + User Home Directory test + + {{#if errors}} http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/hive/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/hive/pom.xml b/contrib/views/hive/pom.xml index 6c931ae..3a453bc 100644 --- a/contrib/views/hive/pom.xml +++ b/contrib/views/hive/pom.xml @@ -226,6 +226,11 @@ commons-csv 1.1 + + org.apache.ambari.contrib.views + ambari-views-commons + 2.4.0.0.0 + http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/HelpService.java ---------------------------------------------------------------------- diff --git a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/HelpService.java b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/HelpService.java index 3a7f823..f18a422 100644 --- a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/HelpService.java +++ b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/HelpService.java @@ -79,6 +79,18 @@ public class HelpService extends BaseService { } /** + * HomeDirectory Status + * @return status + */ + @GET + @Path("/userhomeStatus") + @Produces(MediaType.APPLICATION_JSON) + public Response userhomeStatus (){ + FileService.userhomeSmokeTest(context); + return getOKResponse(); + } + + /** * ATS Status * @return status */ http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/files/FileService.java ---------------------------------------------------------------------- diff --git a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/files/FileService.java b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/files/FileService.java index ab2b933..4e1d24f 100644 --- a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/files/FileService.java +++ b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/files/FileService.java @@ -45,6 +45,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.HashMap; +import org.apache.ambari.view.commons.hdfs.UserService; /** * File access resource @@ -235,6 +236,21 @@ public class FileService extends BaseService { } /** + * Checks connection to User HomeDirectory + * @param context View Context + */ + public static void userhomeSmokeTest(ViewContext context) { + try { + UserService userservice = new UserService(context); + userservice.homeDir(); + } catch (WebApplicationException ex) { + throw ex; + } catch (Exception ex) { + throw new ServiceFormattedException(ex.getMessage(), ex); + } + } + + /** * Wrapper object for json mapping */ public static class FileResourceRequest { http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/splash.js ---------------------------------------------------------------------- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/splash.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/splash.js index 5db93f7..6f495ed 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/splash.js +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/splash.js @@ -60,12 +60,11 @@ export default Ember.Controller.extend({ } model.set(name + 'TestDone', true); - var percent = model.get('percent'); - model.set('percent', percent + 33.33); + model.set('percent', percent + 25); }; - var promises = ['hdfs', 'hiveserver', 'ats'].map(function(name) { + var promises = ['hdfs', 'hiveserver', 'ats', 'userhome'].map(function(name) { var finalurl = ((name == 'hiveserver') ? self.get('databaseService.baseUrl') : (url + name + 'Status')) || '' ; @@ -88,13 +87,17 @@ export default Ember.Controller.extend({ }.property("model.percent"), allTestsCompleted: function(){ - return this.get('modelhdfsTestDone') && this.get('modelhiveserverTestDone') && this.get('modelatsTestDone'); - }.property('modelhdfsTestDone', 'modelhiveserverTestDone', 'modelatsTestDone'), + return this.get('modelhdfsTestDone') && this.get('modelhiveserverTestDone') && this.get('modelatsTestDone') && this.get('modeluserhomeTestDone'); + }.property('modelhdfsTestDone', 'modelhiveserverTestDone', 'modelatsTestDone', 'modeluserhomeTestDone'), modelhdfsTestDone: function() { return this.get('model.hdfsTestDone'); }.property('model.hdfsTestDone' ), + modeluserhomeTestDone: function() { + return this.get('model.userhomeTestDone'); + }.property('model.userhomeTestDone' ), + modelhiveserverTestDone: function() { return this.get('model.hiveserverTestDone'); }.property('model.hiveserverTestDone' ), @@ -107,6 +110,10 @@ export default Ember.Controller.extend({ return this.get('model.hdfsTest'); }.property('model.hdfsTest' ), + modeluserhomeTest: function() { + return this.get('model.userhomeTest'); + }.property('model.userhomeTest' ), + modelhiveserverTest: function() { return this.get('model.hiveserverTest'); }.property('model.hiveserverTest' ), @@ -122,5 +129,3 @@ export default Ember.Controller.extend({ } } }); - - http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/hive/src/main/resources/ui/hive-web/app/routes/splash.js ---------------------------------------------------------------------- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/routes/splash.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/routes/splash.js index 05bcbcf..463a1c6 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/routes/splash.js +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/routes/splash.js @@ -28,6 +28,8 @@ export default Ember.Route.extend({ hiveserverTestDone: null, atsTest: null, atsTestDone: null, + userhomeTest: null, + userhomeTestDone: null, percent: 0 }); }, @@ -42,7 +44,7 @@ export default Ember.Route.extend({ var self = this; controller.startTests().then(function() { - if (model.get("hiveserverTest") && model.get("hdfsTest") && model.get("atsTest")) { + if (model.get("hiveserverTest") && model.get("hdfsTest") && model.get("atsTest") && model.get("userhomeTest")) { Ember.run.later(this, function() { self.send('transition'); }, 2000); http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/splash.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/splash.hbs b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/splash.hbs index 84c7a71..5612542 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/splash.hbs +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/templates/splash.hbs @@ -18,7 +18,6 @@
-

Welcome to the Hive View

{{#if allTestsCompleted }}

Service checks completed.

{{else}} @@ -49,7 +48,7 @@ {{/if}} - hdfs service test + HDFS test @@ -63,7 +62,7 @@ {{/if}} - hiveserver service test + HiveServer test @@ -77,8 +76,24 @@ {{/if}} - ats service test + ATS test + + + + {{#if modeluserhomeTestDone}} + {{#if modeluserhomeTest}} + + {{else}} + + {{/if}} + {{else}} + + {{/if}} + + User Home Directory test + + {{#if errors}} http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/pig/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/pig/pom.xml b/contrib/views/pig/pom.xml index ae87f84..4082cc0 100644 --- a/contrib/views/pig/pom.xml +++ b/contrib/views/pig/pom.xml @@ -140,6 +140,11 @@ ambari-views-utils 2.4.0.0.0 + + org.apache.ambari.contrib.views + ambari-views-commons + 2.4.0.0.0 + http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/pig/src/main/java/org/apache/ambari/view/pig/resources/files/FileService.java ---------------------------------------------------------------------- diff --git a/contrib/views/pig/src/main/java/org/apache/ambari/view/pig/resources/files/FileService.java b/contrib/views/pig/src/main/java/org/apache/ambari/view/pig/resources/files/FileService.java index 40bc9a7..4791103 100644 --- a/contrib/views/pig/src/main/java/org/apache/ambari/view/pig/resources/files/FileService.java +++ b/contrib/views/pig/src/main/java/org/apache/ambari/view/pig/resources/files/FileService.java @@ -25,6 +25,7 @@ import org.apache.ambari.view.pig.services.BaseService; import org.apache.ambari.view.pig.utils.*; import org.apache.ambari.view.utils.hdfs.HdfsApi; import org.apache.ambari.view.utils.hdfs.HdfsUtil; +import org.apache.ambari.view.commons.hdfs.UserService; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileAlreadyExistsException; import org.apache.hadoop.fs.FileStatus; @@ -40,6 +41,7 @@ import java.io.IOException; import java.util.LinkedList; import java.util.List; + /** * File access resource * API: @@ -196,6 +198,22 @@ public class FileService extends BaseService { } } + + /** + * Checks connection to User HomeDirectory + * @param context View Context + */ + public static void userhomeSmokeTest(ViewContext context) { + try { + UserService userservice = new UserService(context); + userservice.homeDir(); + } catch (WebApplicationException ex) { + throw ex; + } catch (Exception ex) { + throw new ServiceFormattedException(ex.getMessage(), ex); + } + } + /** * Wrapper object for json mapping */ http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/pig/src/main/java/org/apache/ambari/view/pig/services/HelpService.java ---------------------------------------------------------------------- diff --git a/contrib/views/pig/src/main/java/org/apache/ambari/view/pig/services/HelpService.java b/contrib/views/pig/src/main/java/org/apache/ambari/view/pig/services/HelpService.java index eb363a0..a67bfc5 100644 --- a/contrib/views/pig/src/main/java/org/apache/ambari/view/pig/services/HelpService.java +++ b/contrib/views/pig/src/main/java/org/apache/ambari/view/pig/services/HelpService.java @@ -92,6 +92,20 @@ public class HelpService extends BaseService { return getOKResponse(); } + + /** + * HomeDirectory Status + * @return status + */ + @GET + @Path("/userhomeStatus") + @Produces(MediaType.APPLICATION_JSON) + public Response userhomeStatus (){ + FileService.userhomeSmokeTest(context); + return getOKResponse(); + } + + /** * WebHCat Status * @return status http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/pig/src/main/resources/ui/pig-web/app/controllers/splash.js ---------------------------------------------------------------------- diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/controllers/splash.js b/contrib/views/pig/src/main/resources/ui/pig-web/app/controllers/splash.js index f58d437..d1b571d 100644 --- a/contrib/views/pig/src/main/resources/ui/pig-web/app/controllers/splash.js +++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/controllers/splash.js @@ -57,9 +57,9 @@ App.SplashController = Ember.ObjectController.extend({ } model.set(name + 'TestDone', true); var percent = model.get('percent'); - model.set('percent', percent + 33.33); + model.set('percent', percent + 25); }; - var promises = ['storage', 'webhcat', 'hdfs'].map(function(name) { + var promises = ['storage', 'webhcat', 'hdfs', 'userhome'].map(function(name) { return Ember.$.getJSON('/' + url + name + 'Status') .then( function(data) { @@ -78,7 +78,7 @@ App.SplashController = Ember.ObjectController.extend({ }.property("model.percent"), allTestsCompleted: function(){ - return this.get("model").get("hdfsTestDone") && this.get("model").get("webhcatTestDone") && this.get("model").get("storageTestDone"); - }.property('model.hdfsTestDone', 'model.webhcatTestDone', 'model.storageTestDone') + return this.get("model").get("hdfsTestDone") && this.get("model").get("webhcatTestDone") && this.get("model").get("storageTestDone") && this.get("model").get("userhomeTestDone"); + }.property('model.hdfsTestDone', 'model.webhcatTestDone', 'model.storageTestDone', 'model.userhomeTestDone') }); http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/pig/src/main/resources/ui/pig-web/app/routes/splash.js ---------------------------------------------------------------------- diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/routes/splash.js b/contrib/views/pig/src/main/resources/ui/pig-web/app/routes/splash.js index 1d848e3..b30552d 100644 --- a/contrib/views/pig/src/main/resources/ui/pig-web/app/routes/splash.js +++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/routes/splash.js @@ -27,6 +27,8 @@ App.SplashRoute = Em.Route.extend({ webhcatTestDone: null, hdfsTest: null, hdfsTestDone: null, + userhomeTest: null, + userhomeTestDone: null, percent: 0 }); }, @@ -37,7 +39,7 @@ App.SplashRoute = Em.Route.extend({ controller.set('model', model); var self = this; controller.startTests(model).then(function() { - if (model.get("storageTest") && model.get("webhcatTest") && model.get("hdfsTest")) { + if (model.get("storageTest") && model.get("webhcatTest") && model.get("hdfsTest") && model.get("userhomeTest")) { Ember.run.later(this, function() { previousTransition = App.get('previousTransition'); if (previousTransition) { http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/splash.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/splash.hbs b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/splash.hbs index d635a91..c97d724 100644 --- a/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/splash.hbs +++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/templates/splash.hbs @@ -17,8 +17,6 @@ }}
-

{{t 'splash.welcome'}}

- {{#if allTestsCompleted }}

Service checks completed.

{{else}} @@ -82,6 +80,21 @@ {{t 'splash.webhcat_test'}} + + + {{#if userhomeTestDone}} + {{#if userhomeTest}} + + {{else}} + + {{/if}} + {{else}} + + {{/if}} + + {{t 'splash.userhome_test'}} + + http://git-wip-us.apache.org/repos/asf/ambari/blob/de5fd97f/contrib/views/pig/src/main/resources/ui/pig-web/app/translations.js ---------------------------------------------------------------------- diff --git a/contrib/views/pig/src/main/resources/ui/pig-web/app/translations.js b/contrib/views/pig/src/main/resources/ui/pig-web/app/translations.js index 072b5c7..151c88c 100644 --- a/contrib/views/pig/src/main/resources/ui/pig-web/app/translations.js +++ b/contrib/views/pig/src/main/resources/ui/pig-web/app/translations.js @@ -173,6 +173,7 @@ Ember.I18n.translations = { 'please_wait':'Testing connection to services...please wait.', 'storage_test':'Storage test', 'hdfs_test':'HDFS test', - 'webhcat_test':'WebHCat test' + 'webhcat_test':'WebHCat test', + 'userhome_test':'User Home Directory test' } };