You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aa...@apache.org on 2021/06/24 04:12:56 UTC
[hadoop] branch branch-3.2 updated: YARN-10020. Fix build
instruction of hadoop-yarn-ui. (#1750)
This is an automated email from the ASF dual-hosted git repository.
aajisaka pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 3a224b7 YARN-10020. Fix build instruction of hadoop-yarn-ui. (#1750)
3a224b7 is described below
commit 3a224b7a93ff66a88f03924570385c11e09fc386
Author: Masatake Iwasaki <iw...@apache.org>
AuthorDate: Wed Dec 18 13:34:12 2019 +0900
YARN-10020. Fix build instruction of hadoop-yarn-ui. (#1750)
(cherry picked from commit 92c8962f98857c7c442160561cf53d354167d6de)
---
.../hadoop-yarn/hadoop-yarn-ui/README.md | 29 ++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md
index e4135ec..bc4a829 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md
@@ -21,7 +21,13 @@ The YARN UI is an Ember based web-app that provides visualization of the applica
## Configurations
-* You can point the UI to custom locations by setting the environment variables in `src/main/webapp/config/configs.env`
+You can point the UI to custom locations by setting the environment variables in `src/main/webapp/config/configs.env`.
+
+In order to make the UI running on Ember server (started by `yarn start`)
+work with independently running ResouceManager,
+you need to enable CORS by setting `hadoop.http.cross-origin.enabled` to true
+and adding `org.apache.hadoop.security.HttpCrossOriginFilterInitializer`
+to `hadoop.http.filter.initializers` in core-site.xml of the ResourceManager.
## Development
@@ -32,7 +38,7 @@ All the following commands must be run inside `src/main/webapp`.
You will need the following things properly installed on your computer.
* Install [Yarn](https://yarnpkg.com) v0.21.3
-* Install [Bower](http://bower.io/) v1.7.7
+* Install [Bower](http://bower.io/) v1.8.8
* Install all dependencies by running `yarn install` & `bower install`
### Running UI
@@ -62,3 +68,22 @@ YARN UI has replaced NPM with Yarn package manager. And hence Yarn would be used
### Adding new routes (pages), controllers, components etc.
* Use ember-cli blueprint generator - [Ember CLI](http://ember-cli.com/extending/#generators-and-blueprints)
+
+### Building with Maven
+
+[YARN-6278](https://issues.apache.org/jira/browse/YARN-6278)
+added `yarn-ui` profile to pom.xml leveraging
+[frontend-maven-plugin](https://github.com/eirslett/frontend-maven-plugin) which
+automatically installs Node.js and Yarn locally under target/webapp directory.
+After building yarn-ui by `mvn package -Pyarn-ui`, you can reuse
+the locally installed Node.js and Yarn instead of manually installing them.
+
+```
+$ mvn package -Pyarn-ui
+$ export PATH=$PWD/target/webapp/node:$PATH
+$ export YARNJS=$PWD/target/webapp/node/yarn/dist/bin/yarn.js
+$ cd src/main/webapp/
+$ node $YARNJS install
+$ node node_modules/.bin/bower install
+$ node $YARNJS start
+```
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org