hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui
dependabot[bot] dae33cf935
YARN-11065. Bump follow-redirects from 1.13.3 to 1.14.7 in hadoop-yarn-ui (#3890)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.3 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.13.3...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
2022-01-20 21:44:10 +09:00
..
src/main/webapp YARN-11065. Bump follow-redirects from 1.13.3 to 1.14.7 in hadoop-yarn-ui (#3890) 2022-01-20 21:44:10 +09:00
pom.xml YARN-10826. [UI2] Upgrade Node.js to v12.22.1. (#3128) 2021-06-23 19:33:03 +09:00
README.md YARN-10037. Upgrade build tools for YARN Web UI v2. 2019-12-19 19:27:31 +09:00

YARN UI

The YARN UI is an Ember based web-app that provides visualization of the applications running on the Apache Hadoop YARN framework.

Configurations

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

All the following commands must be run inside src/main/webapp.

Prerequisites

You will need the following things properly installed on your computer.

  • Install Yarn v1.21.1
  • Install Bower v1.8.8
  • Install all dependencies by running yarn install & bower install

Running UI

Building

  • yarn run build (production)
  • Files would be stored in "dist/"

Adding new dependencies

Warning: Do not edit the package.json or bower.json files manually. This could make them out-of-sync with the respective lock or shrinkwrap files.

YARN UI has replaced NPM with Yarn package manager. And hence Yarn would be used to manage dependencies defined in package.json.

  • Please use the Yarn and Bower command-line tools to add new dependencies. And the tool version must be same as those defined in Prerequisites section.
  • Once any dependency is added:
    • If it's in package.json. Make sure that the respective, and only those changes are reflected in yarn.lock file.
    • If it's in bower.json. Make sure that the respective, and only those changes are reflected in bower-shrinkwrap.json file.
  • Commands to add using CLI tools:
    • Yarn: yarn add [package-name]
    • Bower: bower install --save [package-name]

Adding new routes (pages), controllers, components etc.

  • Use ember-cli blueprint generator - Ember CLI

Building with Maven

YARN-6278 added yarn-ui profile to pom.xml leveraging 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