YARN-4849. [YARN-3368] cleanup code base, integrate web UI related build to mvn, and fix licenses. (wangda)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/69848086 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/69848086 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/69848086 Branch: refs/heads/YARN-3368 Commit: 69848086afac10d55d2617ab7369538c443093a1 Parents: f3d0954 Author: Wangda Tan <[email protected]> Authored: Mon Mar 21 14:03:13 2016 -0700 Committer: Wangda Tan <[email protected]> Committed: Mon May 9 11:00:24 2016 -0700 ---------------------------------------------------------------------- .gitignore | 13 + BUILDING.txt | 4 +- LICENSE.txt | 80 +++++ dev-support/create-release.sh | 144 +++++++++ dev-support/docker/Dockerfile | 5 + .../src/site/markdown/YarnUI2.md | 43 +++ .../hadoop-yarn/hadoop-yarn-ui/.bowerrc | 4 - .../hadoop-yarn/hadoop-yarn-ui/.editorconfig | 34 --- .../hadoop-yarn/hadoop-yarn-ui/.ember-cli | 11 - .../hadoop-yarn/hadoop-yarn-ui/.gitignore | 17 -- .../hadoop-yarn/hadoop-yarn-ui/.jshintrc | 32 -- .../hadoop-yarn/hadoop-yarn-ui/.travis.yml | 23 -- .../hadoop-yarn/hadoop-yarn-ui/.watchmanconfig | 3 - .../hadoop-yarn/hadoop-yarn-ui/README.md | 24 -- .../hadoop-yarn-ui/app/adapters/cluster-info.js | 20 -- .../app/adapters/cluster-metric.js | 20 -- .../app/adapters/yarn-app-attempt.js | 32 -- .../hadoop-yarn-ui/app/adapters/yarn-app.js | 26 -- .../app/adapters/yarn-container-log.js | 74 ----- .../app/adapters/yarn-container.js | 43 --- .../app/adapters/yarn-node-app.js | 63 ---- .../app/adapters/yarn-node-container.js | 64 ---- .../hadoop-yarn-ui/app/adapters/yarn-node.js | 40 --- .../hadoop-yarn-ui/app/adapters/yarn-queue.js | 20 -- .../hadoop-yarn-ui/app/adapters/yarn-rm-node.js | 45 --- .../hadoop-yarn/hadoop-yarn-ui/app/app.js | 20 -- .../hadoop-yarn-ui/app/components/.gitkeep | 0 .../app/components/app-attempt-table.js | 4 - .../hadoop-yarn-ui/app/components/app-table.js | 4 - .../hadoop-yarn-ui/app/components/bar-chart.js | 104 ------- .../app/components/base-chart-component.js | 109 ------- .../app/components/container-table.js | 4 - .../app/components/donut-chart.js | 148 ---------- .../app/components/item-selector.js | 21 -- .../app/components/queue-configuration-table.js | 4 - .../app/components/queue-navigator.js | 4 - .../hadoop-yarn-ui/app/components/queue-view.js | 272 ----------------- .../app/components/simple-table.js | 58 ---- .../app/components/timeline-view.js | 250 ---------------- .../app/components/tree-selector.js | 257 ---------------- .../hadoop-yarn/hadoop-yarn-ui/app/config.js | 27 -- .../hadoop-yarn/hadoop-yarn-ui/app/constants.js | 24 -- .../hadoop-yarn-ui/app/controllers/.gitkeep | 0 .../app/controllers/application.js | 55 ---- .../app/controllers/cluster-overview.js | 5 - .../hadoop-yarn-ui/app/controllers/yarn-apps.js | 4 - .../app/controllers/yarn-queue.js | 6 - .../hadoop-yarn-ui/app/helpers/.gitkeep | 0 .../hadoop-yarn-ui/app/helpers/divide.js | 31 -- .../app/helpers/log-files-comma.js | 48 --- .../hadoop-yarn-ui/app/helpers/node-link.js | 37 --- .../hadoop-yarn-ui/app/helpers/node-menu.js | 66 ----- .../hadoop-yarn/hadoop-yarn-ui/app/index.html | 25 -- .../hadoop-yarn-ui/app/models/.gitkeep | 0 .../hadoop-yarn-ui/app/models/cluster-info.js | 13 - .../hadoop-yarn-ui/app/models/cluster-metric.js | 115 -------- .../app/models/yarn-app-attempt.js | 44 --- .../hadoop-yarn-ui/app/models/yarn-app.js | 65 ----- .../app/models/yarn-container-log.js | 25 -- .../hadoop-yarn-ui/app/models/yarn-container.js | 39 --- .../hadoop-yarn-ui/app/models/yarn-node-app.js | 44 --- .../app/models/yarn-node-container.js | 57 ---- .../hadoop-yarn-ui/app/models/yarn-node.js | 33 --- .../hadoop-yarn-ui/app/models/yarn-queue.js | 76 ----- .../hadoop-yarn-ui/app/models/yarn-rm-node.js | 92 ------ .../hadoop-yarn-ui/app/models/yarn-user.js | 8 - .../hadoop-yarn/hadoop-yarn-ui/app/router.js | 29 -- .../hadoop-yarn-ui/app/routes/.gitkeep | 0 .../hadoop-yarn-ui/app/routes/application.js | 38 --- .../app/routes/cluster-overview.js | 11 - .../hadoop-yarn-ui/app/routes/index.js | 29 -- .../app/routes/yarn-app-attempt.js | 21 -- .../hadoop-yarn-ui/app/routes/yarn-app.js | 10 - .../hadoop-yarn-ui/app/routes/yarn-apps.js | 8 - .../app/routes/yarn-container-log.js | 55 ---- .../hadoop-yarn-ui/app/routes/yarn-node-app.js | 29 -- .../hadoop-yarn-ui/app/routes/yarn-node-apps.js | 29 -- .../app/routes/yarn-node-container.js | 30 -- .../app/routes/yarn-node-containers.js | 28 -- .../hadoop-yarn-ui/app/routes/yarn-node.js | 29 -- .../hadoop-yarn-ui/app/routes/yarn-nodes.js | 25 -- .../hadoop-yarn-ui/app/routes/yarn-queue.js | 20 -- .../app/routes/yarn-queues/index.js | 5 - .../app/routes/yarn-queues/queues-selector.js | 7 - .../app/serializers/cluster-info.js | 29 -- .../app/serializers/cluster-metric.js | 29 -- .../app/serializers/yarn-app-attempt.js | 49 ---- .../hadoop-yarn-ui/app/serializers/yarn-app.js | 66 ----- .../app/serializers/yarn-container-log.js | 39 --- .../app/serializers/yarn-container.js | 54 ---- .../app/serializers/yarn-node-app.js | 86 ------ .../app/serializers/yarn-node-container.js | 74 ----- .../hadoop-yarn-ui/app/serializers/yarn-node.js | 56 ---- .../app/serializers/yarn-queue.js | 127 -------- .../app/serializers/yarn-rm-node.js | 77 ----- .../hadoop-yarn-ui/app/styles/app.css | 141 --------- .../app/templates/application.hbs | 23 -- .../app/templates/cluster-overview.hbs | 56 ---- .../app/templates/components/.gitkeep | 0 .../templates/components/app-attempt-table.hbs | 28 -- .../app/templates/components/app-table.hbs | 62 ---- .../templates/components/container-table.hbs | 36 --- .../components/queue-configuration-table.hbs | 40 --- .../templates/components/queue-navigator.hbs | 18 -- .../app/templates/components/timeline-view.hbs | 35 --- .../hadoop-yarn-ui/app/templates/error.hbs | 19 -- .../hadoop-yarn-ui/app/templates/notfound.hbs | 20 -- .../app/templates/yarn-app-attempt.hbs | 12 - .../hadoop-yarn-ui/app/templates/yarn-app.hbs | 145 ---------- .../hadoop-yarn-ui/app/templates/yarn-apps.hbs | 3 - .../app/templates/yarn-container-log.hbs | 36 --- .../app/templates/yarn-node-app.hbs | 60 ---- .../app/templates/yarn-node-apps.hbs | 51 ---- .../app/templates/yarn-node-container.hbs | 70 ----- .../app/templates/yarn-node-containers.hbs | 58 ---- .../hadoop-yarn-ui/app/templates/yarn-node.hbs | 94 ------ .../hadoop-yarn-ui/app/templates/yarn-nodes.hbs | 65 ----- .../hadoop-yarn-ui/app/templates/yarn-queue.hbs | 48 --- .../hadoop-yarn-ui/app/utils/converter.js | 91 ------ .../hadoop-yarn-ui/app/utils/sorter.js | 55 ---- .../hadoop-yarn/hadoop-yarn-ui/bower.json | 22 -- .../hadoop-yarn-ui/config/environment.js | 46 --- .../hadoop-yarn-ui/ember-cli-build.js | 29 -- .../hadoop-yarn/hadoop-yarn-ui/jsconfig.json | 6 - .../hadoop-yarn/hadoop-yarn-ui/package.json | 44 --- .../hadoop-yarn/hadoop-yarn-ui/pom.xml | 207 +++++++++++++ .../hadoop-yarn-ui/public/robots.txt | 3 - .../src/main/webapp/WEB-INF/web.xml | 25 ++ .../main/webapp/app/adapters/cluster-info.js | 38 +++ .../main/webapp/app/adapters/cluster-metric.js | 38 +++ .../webapp/app/adapters/yarn-app-attempt.js | 50 ++++ .../src/main/webapp/app/adapters/yarn-app.js | 44 +++ .../webapp/app/adapters/yarn-container-log.js | 74 +++++ .../main/webapp/app/adapters/yarn-container.js | 61 ++++ .../main/webapp/app/adapters/yarn-node-app.js | 63 ++++ .../webapp/app/adapters/yarn-node-container.js | 64 ++++ .../src/main/webapp/app/adapters/yarn-node.js | 40 +++ .../src/main/webapp/app/adapters/yarn-queue.js | 38 +++ .../main/webapp/app/adapters/yarn-rm-node.js | 45 +++ .../hadoop-yarn-ui/src/main/webapp/app/app.js | 38 +++ .../webapp/app/components/app-attempt-table.js | 22 ++ .../src/main/webapp/app/components/app-table.js | 22 ++ .../src/main/webapp/app/components/bar-chart.js | 122 ++++++++ .../app/components/base-chart-component.js | 127 ++++++++ .../webapp/app/components/container-table.js | 22 ++ .../main/webapp/app/components/donut-chart.js | 166 +++++++++++ .../main/webapp/app/components/item-selector.js | 39 +++ .../app/components/queue-configuration-table.js | 22 ++ .../webapp/app/components/queue-navigator.js | 22 ++ .../main/webapp/app/components/queue-view.js | 290 +++++++++++++++++++ .../main/webapp/app/components/simple-table.js | 76 +++++ .../main/webapp/app/components/timeline-view.js | 268 +++++++++++++++++ .../main/webapp/app/components/tree-selector.js | 275 ++++++++++++++++++ .../src/main/webapp/app/config.js | 27 ++ .../src/main/webapp/app/constants.js | 24 ++ .../main/webapp/app/controllers/application.js | 55 ++++ .../webapp/app/controllers/cluster-overview.js | 23 ++ .../main/webapp/app/controllers/yarn-apps.js | 22 ++ .../main/webapp/app/controllers/yarn-queue.js | 24 ++ .../src/main/webapp/app/helpers/divide.js | 31 ++ .../main/webapp/app/helpers/log-files-comma.js | 48 +++ .../src/main/webapp/app/helpers/node-link.js | 37 +++ .../src/main/webapp/app/helpers/node-menu.js | 66 +++++ .../src/main/webapp/app/index.html | 43 +++ .../src/main/webapp/app/models/cluster-info.js | 31 ++ .../main/webapp/app/models/cluster-metric.js | 133 +++++++++ .../main/webapp/app/models/yarn-app-attempt.js | 62 ++++ .../src/main/webapp/app/models/yarn-app.js | 83 ++++++ .../webapp/app/models/yarn-container-log.js | 25 ++ .../main/webapp/app/models/yarn-container.js | 57 ++++ .../src/main/webapp/app/models/yarn-node-app.js | 44 +++ .../webapp/app/models/yarn-node-container.js | 57 ++++ .../src/main/webapp/app/models/yarn-node.js | 33 +++ .../src/main/webapp/app/models/yarn-queue.js | 94 ++++++ .../src/main/webapp/app/models/yarn-rm-node.js | 92 ++++++ .../src/main/webapp/app/models/yarn-user.js | 26 ++ .../src/main/webapp/app/router.js | 47 +++ .../src/main/webapp/app/routes/application.js | 38 +++ .../main/webapp/app/routes/cluster-overview.js | 29 ++ .../src/main/webapp/app/routes/index.js | 29 ++ .../main/webapp/app/routes/yarn-app-attempt.js | 39 +++ .../src/main/webapp/app/routes/yarn-app.js | 28 ++ .../src/main/webapp/app/routes/yarn-apps.js | 26 ++ .../webapp/app/routes/yarn-container-log.js | 55 ++++ .../src/main/webapp/app/routes/yarn-node-app.js | 29 ++ .../main/webapp/app/routes/yarn-node-apps.js | 29 ++ .../webapp/app/routes/yarn-node-container.js | 30 ++ .../webapp/app/routes/yarn-node-containers.js | 28 ++ .../src/main/webapp/app/routes/yarn-node.js | 29 ++ .../src/main/webapp/app/routes/yarn-nodes.js | 25 ++ .../src/main/webapp/app/routes/yarn-queue.js | 38 +++ .../main/webapp/app/routes/yarn-queues/index.js | 23 ++ .../app/routes/yarn-queues/queues-selector.js | 25 ++ .../main/webapp/app/serializers/cluster-info.js | 47 +++ .../webapp/app/serializers/cluster-metric.js | 47 +++ .../webapp/app/serializers/yarn-app-attempt.js | 67 +++++ .../src/main/webapp/app/serializers/yarn-app.js | 84 ++++++ .../app/serializers/yarn-container-log.js | 39 +++ .../webapp/app/serializers/yarn-container.js | 72 +++++ .../webapp/app/serializers/yarn-node-app.js | 86 ++++++ .../app/serializers/yarn-node-container.js | 74 +++++ .../main/webapp/app/serializers/yarn-node.js | 56 ++++ .../main/webapp/app/serializers/yarn-queue.js | 145 ++++++++++ .../main/webapp/app/serializers/yarn-rm-node.js | 77 +++++ .../src/main/webapp/app/styles/app.css | 159 ++++++++++ .../main/webapp/app/templates/application.hbs | 41 +++ .../webapp/app/templates/cluster-overview.hbs | 74 +++++ .../templates/components/app-attempt-table.hbs | 46 +++ .../app/templates/components/app-table.hbs | 80 +++++ .../templates/components/container-table.hbs | 54 ++++ .../components/queue-configuration-table.hbs | 58 ++++ .../templates/components/queue-navigator.hbs | 36 +++ .../app/templates/components/timeline-view.hbs | 53 ++++ .../src/main/webapp/app/templates/error.hbs | 19 ++ .../src/main/webapp/app/templates/notfound.hbs | 20 ++ .../webapp/app/templates/yarn-app-attempt.hbs | 30 ++ .../src/main/webapp/app/templates/yarn-app.hbs | 163 +++++++++++ .../src/main/webapp/app/templates/yarn-apps.hbs | 21 ++ .../webapp/app/templates/yarn-container-log.hbs | 36 +++ .../main/webapp/app/templates/yarn-node-app.hbs | 60 ++++ .../webapp/app/templates/yarn-node-apps.hbs | 51 ++++ .../app/templates/yarn-node-container.hbs | 70 +++++ .../app/templates/yarn-node-containers.hbs | 58 ++++ .../src/main/webapp/app/templates/yarn-node.hbs | 94 ++++++ .../main/webapp/app/templates/yarn-nodes.hbs | 65 +++++ .../main/webapp/app/templates/yarn-queue.hbs | 66 +++++ .../src/main/webapp/app/utils/converter.js | 109 +++++++ .../src/main/webapp/app/utils/sorter.js | 73 +++++ .../hadoop-yarn-ui/src/main/webapp/bower.json | 22 ++ .../src/main/webapp/config/environment.js | 65 +++++ .../src/main/webapp/ember-cli-build.js | 47 +++ .../src/main/webapp/jsconfig.json | 6 + .../hadoop-yarn-ui/src/main/webapp/package.json | 44 +++ .../assets/images/datatables/Sorting icons.psd | Bin 0 -> 27490 bytes .../public/assets/images/datatables/favicon.ico | Bin 0 -> 894 bytes .../assets/images/datatables/sort_asc.png | Bin 0 -> 160 bytes .../images/datatables/sort_asc_disabled.png | Bin 0 -> 148 bytes .../assets/images/datatables/sort_both.png | Bin 0 -> 201 bytes .../assets/images/datatables/sort_desc.png | Bin 0 -> 158 bytes .../images/datatables/sort_desc_disabled.png | Bin 0 -> 146 bytes .../src/main/webapp/public/crossdomain.xml | 34 +++ .../hadoop-yarn-ui/src/main/webapp/testem.json | 12 + .../src/main/webapp/tests/helpers/resolver.js | 29 ++ .../src/main/webapp/tests/helpers/start-app.js | 36 +++ .../src/main/webapp/tests/index.html | 51 ++++ .../src/main/webapp/tests/test-helper.js | 24 ++ .../webapp/tests/unit/adapters/yarn-app-test.js | 30 ++ .../unit/adapters/yarn-container-log-test.js | 73 +++++ .../tests/unit/adapters/yarn-node-app-test.js | 93 ++++++ .../unit/adapters/yarn-node-container-test.js | 93 ++++++ .../tests/unit/adapters/yarn-node-test.js | 42 +++ .../tests/unit/adapters/yarn-rm-node-test.js | 44 +++ .../tests/unit/controllers/yarn-apps-test.js | 30 ++ .../tests/unit/controllers/yarn-queues-test.js | 30 ++ .../webapp/tests/unit/mixins/charts-test.js | 30 ++ .../webapp/tests/unit/models/yarn-app-test.js | 30 ++ .../unit/models/yarn-container-log-test.js | 48 +++ .../tests/unit/models/yarn-node-app-test.js | 65 +++++ .../unit/models/yarn-node-container-test.js | 78 +++++ .../webapp/tests/unit/models/yarn-node-test.js | 58 ++++ .../tests/unit/models/yarn-rm-node-test.js | 95 ++++++ .../webapp/tests/unit/routes/yarn-apps-test.js | 29 ++ .../unit/routes/yarn-container-log-test.js | 120 ++++++++ .../tests/unit/routes/yarn-node-app-test.js | 56 ++++ .../tests/unit/routes/yarn-node-apps-test.js | 60 ++++ .../unit/routes/yarn-node-container-test.js | 61 ++++ .../unit/routes/yarn-node-containers-test.js | 68 +++++ .../webapp/tests/unit/routes/yarn-node-test.js | 84 ++++++ .../webapp/tests/unit/routes/yarn-nodes-test.js | 74 +++++ .../tests/unit/serializers/yarn-app-test.js | 33 +++ .../unit/serializers/yarn-container-log-test.js | 49 ++++ .../unit/serializers/yarn-node-app-test.js | 102 +++++++ .../serializers/yarn-node-container-test.js | 128 ++++++++ .../tests/unit/serializers/yarn-node-test.js | 69 +++++ .../tests/unit/serializers/yarn-rm-node-test.js | 153 ++++++++++ .../webapp/tests/unit/utils/converter-test.js | 52 ++++ .../main/webapp/tests/unit/utils/sorter-test.js | 26 ++ .../hadoop-yarn/hadoop-yarn-ui/testem.json | 12 - .../hadoop-yarn/hadoop-yarn-ui/tests/.jshintrc | 52 ---- .../hadoop-yarn-ui/tests/helpers/resolver.js | 11 - .../hadoop-yarn-ui/tests/helpers/start-app.js | 18 -- .../hadoop-yarn/hadoop-yarn-ui/tests/index.html | 33 --- .../hadoop-yarn-ui/tests/test-helper.js | 6 - .../hadoop-yarn-ui/tests/unit/.gitkeep | 0 .../tests/unit/adapters/yarn-app-test.js | 12 - .../unit/adapters/yarn-container-log-test.js | 73 ----- .../tests/unit/adapters/yarn-node-app-test.js | 93 ------ .../unit/adapters/yarn-node-container-test.js | 93 ------ .../tests/unit/adapters/yarn-node-test.js | 42 --- .../tests/unit/adapters/yarn-rm-node-test.js | 44 --- .../tests/unit/controllers/yarn-apps-test.js | 12 - .../tests/unit/controllers/yarn-queues-test.js | 12 - .../tests/unit/mixins/charts-test.js | 12 - .../tests/unit/models/yarn-app-test.js | 12 - .../unit/models/yarn-container-log-test.js | 48 --- .../tests/unit/models/yarn-node-app-test.js | 65 ----- .../unit/models/yarn-node-container-test.js | 78 ----- .../tests/unit/models/yarn-node-test.js | 58 ---- .../tests/unit/models/yarn-rm-node-test.js | 95 ------ .../tests/unit/routes/yarn-apps-test.js | 11 - .../unit/routes/yarn-container-log-test.js | 120 -------- .../tests/unit/routes/yarn-node-app-test.js | 56 ---- .../tests/unit/routes/yarn-node-apps-test.js | 60 ---- .../unit/routes/yarn-node-container-test.js | 61 ---- .../unit/routes/yarn-node-containers-test.js | 68 ----- .../tests/unit/routes/yarn-node-test.js | 84 ------ .../tests/unit/routes/yarn-nodes-test.js | 74 ----- .../tests/unit/serializers/yarn-app-test.js | 15 - .../unit/serializers/yarn-container-log-test.js | 49 ---- .../unit/serializers/yarn-node-app-test.js | 102 ------- .../serializers/yarn-node-container-test.js | 128 -------- .../tests/unit/serializers/yarn-node-test.js | 69 ----- .../tests/unit/serializers/yarn-rm-node-test.js | 153 ---------- .../tests/unit/utils/converter-test.js | 52 ---- .../tests/unit/utils/sorter-test.js | 26 -- .../hadoop-yarn/hadoop-yarn-ui/vendor/.gitkeep | 0 hadoop-yarn-project/hadoop-yarn/pom.xml | 1 + 317 files changed, 8974 insertions(+), 7308 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 998287d..94ab48d 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,19 @@ hadoop-hdfs-project/hadoop-hdfs-httpfs/downloads hadoop-common-project/hadoop-common/src/test/resources/contract-test-options.xml hadoop-tools/hadoop-openstack/src/test/resources/contract-test-options.xml hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/tla/yarnregistry.toolbox +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/dist +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tmp +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/node +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/node_modules +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/bower_components +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.sass-cache +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/connect.lock +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/coverage/* +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/libpeerconnection.log +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webappnpm-debug.log +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapptestem.log +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/dist +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tmp yarnregistry.pdf hadoop-tools/hadoop-aws/src/test/resources/auth-keys.xml hadoop-tools/hadoop-aws/src/test/resources/contract-test-options.xml http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/BUILDING.txt ---------------------------------------------------------------------- diff --git a/BUILDING.txt b/BUILDING.txt index c7a91da..f9a1c6c 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -15,6 +15,7 @@ Requirements: * Internet connection for first build (to fetch all Maven and Hadoop dependencies) * python (for releasedocs) * bats (for shell code testing) +* Node.js / bower / Ember-cli (for YARN UI v2 building) ---------------------------------------------------------------------------------- The easiest way to get an environment with all the appropriate tools is by means @@ -119,7 +120,7 @@ Maven build goals: * Run clover : mvn test -Pclover [-DcloverLicenseLocation=${user.name}/.clover.license] * Run Rat : mvn apache-rat:check * Build javadocs : mvn javadoc:javadoc - * Build distribution : mvn package [-Pdist][-Pdocs][-Psrc][-Pnative][-Dtar][-Preleasedocs] + * Build distribution : mvn package [-Pdist][-Pdocs][-Psrc][-Pnative][-Dtar][-Preleasedocs][-Pyarn-ui] * Change Hadoop version : mvn versions:set -DnewVersion=NEWVERSION Build options: @@ -129,6 +130,7 @@ Maven build goals: * Use -Psrc to create a project source TAR.GZ * Use -Dtar to create a TAR with the distribution (using -Pdist) * Use -Preleasedocs to include the changelog and release docs (requires Internet connectivity) + * Use -Pyarn-ui to build YARN UI v2. (Requires Internet connectivity, and it is for dev use only) Snappy build options: http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/LICENSE.txt ---------------------------------------------------------------------- diff --git a/LICENSE.txt b/LICENSE.txt index 929e2a8..5d32df4 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -648,3 +648,83 @@ hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3.v3.js D3 is available under a 3-clause BSD license. For details, see: hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3-LICENSE + +For Apache Hadoop YARN Web UI component: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/ +--------------------------------------------------------------------- +The Apache Hadoop YARN Web UI component bundles the following files under the MIT License: + + - ember v2.2.0 (http://emberjs.com/) - Copyright (c) 2014 Yehuda Katz, Tom Dale and Ember.js contributors + - ember-data v2.1.0 (https://github.com/emberjs/data) - Copyright (C) 2011-2014 Tilde, Inc. and contributors, Portions Copyright (C) 2011 LivingSocial Inc. + - ember-resolver v2.0.3 (https://github.com/ember-cli/ember-resolver) - Copyright (c) 2013 Stefan Penner and Ember App Kit Contributors + - bootstrap v3.3.6 (http://getbootstrap.com) - Copyright (c) 2011-2014 Twitter, Inc + - jquery v2.1.4 (http://jquery.org) - Copyright 2005, 2014 jQuery Foundation and other contributors + - jquery-ui v1.11.4 (http://jqueryui.com/) - Copyright 2014 jQuery Foundation and other contributors + - datatables v1.10.8 (https://datatables.net/) + - moment v2.10.6 (http://momentjs.com/) - Copyright (c) 2011-2015 Tim Wood, Iskren Chernev, Moment.js contributors + - em-helpers v0.5.8 (https://github.com/sreenaths/em-helpers) + - ember-cli-app-version v0.5.8 (https://github.com/EmberSherpa/ember-cli-app-version) - Authored by Taras Mankovski <[email protected]> + - ember-cli-babel v5.1.6 (https://github.com/babel/ember-cli-babel) - Authored by Stefan Penner <[email protected]> + - ember-cli-content-security-policy v0.4.0 (https://github.com/rwjblue/ember-cli-content-security-policy) + - ember-cli-dependency-checker v1.2.0 (https://github.com/quaertym/ember-cli-dependency-checker) - Authored by Emre Unal + - ember-cli-htmlbars v1.0.2 (https://github.com/ember-cli/ember-cli-htmlbars) - Authored by Robert Jackson <[email protected]> + - ember-cli-htmlbars-inline-precompile v0.3.1 (https://github.com/pangratz/ember-cli-htmlbars-inline-precompile) - Authored by Clemens Müller <[email protected]> + - ember-cli-ic-ajax v0.2.1 (https://github.com/rwjblue/ember-cli-ic-ajax) - Authored by Robert Jackson <[email protected]> + - ember-cli-inject-live-reload v1.4.0 (https://github.com/rwjblue/ember-cli-inject-live-reload) - Authored by Robert Jackson <[email protected]> + - ember-cli-qunit v1.2.1 (https://github.com/ember-cli/ember-cli-qunit) - Authored by Robert Jackson <[email protected]> + - ember-cli-release v0.2.8 (https://github.com/lytics/ember-cli-release) - Authored by Robert Jackson <[email protected]> + - ember-cli-sri v1.2.1 (https://github.com/jonathanKingston/ember-cli-sri) - Authored by Jonathan Kingston + - ember-cli-uglify v1.2.0 (github.com/ember-cli/ember-cli-uglify) - Authored by Robert Jackson <[email protected]> + - ember-d3 v0.1.0 (https://github.com/brzpegasus/ember-d3) - Authored by Estelle DeBlois + - select2 v4.0.0 (https://select2.github.io/) + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and assocated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +---- +The Apache Hadoop YARN Web UI component bundles the following files under the BSD License: + +(3-clause BSD license) + - D3 v3.5.6 (http://d3js.org/) - Copyright (c) 2010-2014, Michael Bostock + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list + of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/dev-support/create-release.sh ---------------------------------------------------------------------- diff --git a/dev-support/create-release.sh b/dev-support/create-release.sh new file mode 100755 index 0000000..792a805 --- /dev/null +++ b/dev-support/create-release.sh @@ -0,0 +1,144 @@ +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Function to probe the exit code of the script commands, +# and stop in the case of failure with an contextual error +# message. +run() { + echo "\$ ${@}" + "${@}" + exitCode=$? + if [[ $exitCode != 0 ]]; then + echo + echo "Failed! running ${@} in `pwd`" + echo + exit $exitCode + fi +} + +doMD5() { + MD5CMD="md5sum" + which $MD5CMD + if [[ $? != 0 ]]; then + MD5CMD="md5" + fi + run $MD5CMD ${1} > ${1}.md5 +} + +# If provided, the created release artifacts will be tagged with it +# (use RC#, i.e: RC0). Do not use a label to create the final release +# artifact. +RC_LABEL=$1 + +# Extract Hadoop version from POM +HADOOP_VERSION=`cat pom.xml | grep "<version>" | head -1 | sed 's|^ *<version>||' | sed 's|</version>.*$||'` + +# Setup git +GIT=${GIT:-git} + +echo +echo "*****************************************************************" +echo +echo "Hadoop version to create release artifacts: ${HADOOP_VERSION}" +echo +echo "Release Candidate Label: ${RC_LABEL}" +echo +echo "*****************************************************************" +echo + +if [[ ! -z ${RC_LABEL} ]]; then + RC_LABEL="-${RC_LABEL}" +fi + +# Get Maven command +if [ -z "$MAVEN_HOME" ]; then + MVN=mvn +else + MVN=$MAVEN_HOME/bin/mvn +fi + +ARTIFACTS_DIR="target/artifacts" + +# git clean to clear any remnants from previous build +run ${GIT} clean -xdf + +# mvn clean for sanity +run ${MVN} clean + +# Create staging dir for release artifacts +run mkdir -p ${ARTIFACTS_DIR} + +# Create RAT report +run ${MVN} apache-rat:check + +# Create SRC and BIN tarballs for release, +# Using 'installâ goal instead of 'package' so artifacts are available +# in the Maven local cache for the site generation +run ${MVN} install -Pdist,src,native,yarn-ui -DskipTests -Dtar + +# Create site for release +run ${MVN} site site:stage -Pdist -Psrc +run mkdir -p target/staging/hadoop-project/hadoop-project-dist/hadoop-yarn +run mkdir -p target/staging/hadoop-project/hadoop-project-dist/hadoop-mapreduce +run cp ./hadoop-common-project/hadoop-common/src/main/docs/releasenotes.html target/staging/hadoop-project/hadoop-project-dist/hadoop-common/ +run cp ./hadoop-common-project/hadoop-common/CHANGES.txt target/staging/hadoop-project/hadoop-project-dist/hadoop-common/ +run cp ./hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt target/staging/hadoop-project/hadoop-project-dist/hadoop-hdfs/ +run cp ./hadoop-yarn-project/CHANGES.txt target/staging/hadoop-project/hadoop-project-dist/hadoop-yarn/ +run cp ./hadoop-mapreduce-project/CHANGES.txt target/staging/hadoop-project/hadoop-project-dist/hadoop-mapreduce/ +run mv target/staging/hadoop-project target/r${HADOOP_VERSION}/ +run cd target/ +run tar czf hadoop-site-${HADOOP_VERSION}.tar.gz r${HADOOP_VERSION}/* +run cd .. + +# Stage RAT report +find . -name rat.txt | xargs -I% cat % > ${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}-rat.txt + +# Stage CHANGES.txt files +run cp ./hadoop-common-project/hadoop-common/CHANGES.txt ${ARTIFACTS_DIR}/CHANGES-COMMON-${HADOOP_VERSION}${RC_LABEL}.txt +run cp ./hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ${ARTIFACTS_DIR}/CHANGES-HDFS-${HADOOP_VERSION}${RC_LABEL}.txt +run cp ./hadoop-mapreduce-project/CHANGES.txt ${ARTIFACTS_DIR}/CHANGES-MAPREDUCE-${HADOOP_VERSION}${RC_LABEL}.txt +run cp ./hadoop-yarn-project/CHANGES.txt ${ARTIFACTS_DIR}/CHANGES-YARN-${HADOOP_VERSION}${RC_LABEL}.txt + +# Prepare and stage BIN tarball +run cd hadoop-dist/target/ +run tar -xzf hadoop-${HADOOP_VERSION}.tar.gz +run cp -r ../../target/r${HADOOP_VERSION}/* hadoop-${HADOOP_VERSION}/share/doc/hadoop/ +run tar -czf hadoop-${HADOOP_VERSION}.tar.gz hadoop-${HADOOP_VERSION} +run cd ../.. +run mv hadoop-dist/target/hadoop-${HADOOP_VERSION}.tar.gz ${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}.tar.gz + +# Stage SRC tarball +run mv hadoop-dist/target/hadoop-${HADOOP_VERSION}-src.tar.gz ${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}-src.tar.gz + +# Stage SITE tarball +run mv target/hadoop-site-${HADOOP_VERSION}.tar.gz ${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}-site.tar.gz + +# MD5 SRC and BIN tarballs +doMD5 ${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}.tar.gz +doMD5 ${ARTIFACTS_DIR}/hadoop-${HADOOP_VERSION}${RC_LABEL}-src.tar.gz + +run cd ${ARTIFACTS_DIR} +ARTIFACTS_DIR=`pwd` +echo +echo "Congratulations, you have successfully built the release" +echo "artifacts for Apache Hadoop ${HADOOP_VERSION}${RC_LABEL}" +echo +echo "The artifacts for this run are available at ${ARTIFACTS_DIR}:" +run ls -1 ${ARTIFACTS_DIR} +echo +echo "Remember to sign them before staging them on the open" +echo http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/dev-support/docker/Dockerfile ---------------------------------------------------------------------- diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile index eba7df7..0469ce3 100644 --- a/dev-support/docker/Dockerfile +++ b/dev-support/docker/Dockerfile @@ -133,6 +133,11 @@ RUN pip install pylint ENV MAVEN_OPTS -Xms256m -Xmx512m ### +# Install node js tools for web UI frameowkr +### +RUN apt-get -y install nodejs && ln -s /usr/bin/nodejs /usr/bin/node && apt-get -y install npm && npm install -g bower + +### # Everything past this point is either not needed for testing or breaks Yetus. # So tell Yetus not to read the rest of the file: # YETUS CUT HERE http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/YarnUI2.md ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/YarnUI2.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/YarnUI2.md new file mode 100644 index 0000000..575ebc7 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/YarnUI2.md @@ -0,0 +1,43 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +Hadoop: YARN-UI V2 +================= +*This is a WIP project, nobody should use it in production.* + +Prerequisites +------------- + +You will need the following things properly installed on your computer. + +* Install Node.js with NPM: https://nodejs.org/download/ +* After Node.js installed, install bower: `npm install -g bower`. +* Install Ember-cli: `npm install -g ember-cli` + +BUILD +---- +* Please refer to BUILDING.txt in the top directory and pass -Pyarn-ui to build UI-related code +* Execute `mvn test -Pyarn-ui` to run unit tests + +Try it +------ + +* Packaging and deploying Hadoop in this branch +* In `hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js`, change `timelineWebUrl` and `rmWebUrl` to your YARN RM/Timeline server web address. +* If you are running YARN RM in your localhost, you should update `localBaseUrl` to `localhost:1337/`, install `npm install -g corsproxy` and run `corsproxy` to avoid CORS errors. More details: `https://www.npmjs.com/package/corsproxy`. +* Run `ember serve` under `hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/` +* Visit your app at [http://localhost:4200](http://localhost:4200). http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.bowerrc ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.bowerrc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.bowerrc deleted file mode 100644 index 959e169..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.bowerrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "directory": "bower_components", - "analytics": false -} http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.editorconfig ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.editorconfig b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.editorconfig deleted file mode 100644 index 47c5438..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.editorconfig +++ /dev/null @@ -1,34 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# editorconfig.org - -root = true - - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = space -indent_size = 2 - -[*.js] -indent_style = space -indent_size = 2 - -[*.hbs] -insert_final_newline = false -indent_style = space -indent_size = 2 - -[*.css] -indent_style = space -indent_size = 2 - -[*.html] -indent_style = space -indent_size = 2 - -[*.{diff,md}] -trim_trailing_whitespace = false http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.ember-cli ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.ember-cli b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.ember-cli deleted file mode 100644 index 96bd287..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.ember-cli +++ /dev/null @@ -1,11 +0,0 @@ -{ - /** - Ember CLI sends analytics information by default. The data is completely - anonymous, but there are times when you might want to disable this behavior. - - Setting `disableAnalytics` to true will prevent any data from being sent. - */ - "disableAnalytics": false, - "liveReload": true, - "watcher": "polling" -} http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.gitignore ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.gitignore b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.gitignore deleted file mode 100644 index 86fceae..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist -/tmp - -# dependencies -/node_modules -/bower_components - -# misc -/.sass-cache -/connect.lock -/coverage/* -/libpeerconnection.log -npm-debug.log -testem.log http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.jshintrc ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.jshintrc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.jshintrc deleted file mode 100644 index 08096ef..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.jshintrc +++ /dev/null @@ -1,32 +0,0 @@ -{ - "predef": [ - "document", - "window", - "-Promise" - ], - "browser": true, - "boss": true, - "curly": true, - "debug": false, - "devel": true, - "eqeqeq": true, - "evil": true, - "forin": false, - "immed": false, - "laxbreak": false, - "newcap": true, - "noarg": true, - "noempty": false, - "nonew": false, - "nomen": false, - "onevar": false, - "plusplus": false, - "regexp": false, - "undef": true, - "sub": true, - "strict": false, - "white": false, - "eqnull": true, - "esnext": true, - "unused": true -} http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.travis.yml ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.travis.yml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.travis.yml deleted file mode 100644 index 66dd107..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -language: node_js -node_js: - - "0.12" - -sudo: false - -cache: - directories: - - node_modules - -before_install: - - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH - - "npm config set spin false" - - "npm install -g npm@^2" - -install: - - npm install -g bower - - npm install - - bower install - -script: - - npm test http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.watchmanconfig ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.watchmanconfig b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.watchmanconfig deleted file mode 100644 index 5e9462c..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.watchmanconfig +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ignore_dirs": ["tmp"] -} http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md deleted file mode 100644 index d5cba6e..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Yarn-ui -*This is a WIP project, nobody should use it in production.* - -## Prerequisites - -You will need the following things properly installed on your computer. - -* Install Node.js with NPM: https://nodejs.org/download/ -* After Node.js installed, install bower: `npm install -g bower`. -* Install Ember-cli: `npm install -g ember-cli` - -## Installation - -* Goto root directory of yarn-ui project: `hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui` -* `npm install && bower install`, it will take a while to finish. - -## Try it - -* Packaging and deploying Hadoop in this branch (You can use latest trunk after YARN-4417 committed to trunk) -* Modify `app/adapters/yarn-app.js`, change `host` to your YARN RM web address -* If you running YARN RM in your localhost, you should install `npm install -g corsproxy` and run `corsproxy` to avoid CORS errors. More details: `https://www.npmjs.com/package/corsproxy`. And the `host` of `app/adapters/yarn-app.js` should start with `localhost:1337`. -* Run `ember server` -* Visit your app at [http://localhost:4200](http://localhost:4200). - http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js deleted file mode 100644 index 5a0d2d3..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js +++ /dev/null @@ -1,20 +0,0 @@ -import DS from 'ember-data'; -import Config from 'yarn-ui/config'; - -export default DS.JSONAPIAdapter.extend({ - headers: { - Accept: 'application/json' - }, - host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable - namespace: 'ws/v1/cluster', // common const - pathForType(modelName) { - return ''; // move to some common place, return path by modelname. - }, - ajax(url, method, hash) { - hash = hash || {}; - hash.crossDomain = true; - hash.xhrFields = {withCredentials: true}; - hash.targetServer = "RM"; - return this._super(url, method, hash); - } -}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js deleted file mode 100644 index d392c9b..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js +++ /dev/null @@ -1,20 +0,0 @@ -import DS from 'ember-data'; -import Config from 'yarn-ui/config'; - -export default DS.JSONAPIAdapter.extend({ - headers: { - Accept: 'application/json' - }, - host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable - namespace: 'ws/v1/cluster/metrics', // common const - pathForType(modelName) { - return ''; // move to some common place, return path by modelname. - }, - ajax(url, method, hash) { - hash = hash || {}; - hash.crossDomain = true; - hash.xhrFields = {withCredentials: true}; - hash.targetServer = "RM"; - return this._super(url, method, hash); - } -}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js deleted file mode 100644 index 4e40744..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js +++ /dev/null @@ -1,32 +0,0 @@ -import DS from 'ember-data'; -import Converter from 'yarn-ui/utils/converter'; -import Config from 'yarn-ui/config'; - -export default DS.JSONAPIAdapter.extend({ - headers: { - Accept: 'application/json' - }, - host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable - namespace: 'ws/v1/cluster', // common const - - urlForQuery(query, modelName) { - var url = this._buildURL(); - return url + '/apps/' + query.appId + "/appattempts"; - }, - - urlForFindRecord(id, modelName, snapshot) { - var url = this._buildURL(); - var url = url + '/apps/' + - Converter.attemptIdToAppId(id) + "/appattempts/" + id; - console.log(url); - return url; - }, - - ajax(url, method, hash) { - hash = {}; - hash.crossDomain = true; - hash.xhrFields = {withCredentials: true}; - hash.targetServer = "RM"; - return this._super(url, method, hash); - } -}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js deleted file mode 100644 index faff3e7..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js +++ /dev/null @@ -1,26 +0,0 @@ -import DS from 'ember-data'; -import Config from 'yarn-ui/config'; - -export default DS.JSONAPIAdapter.extend({ - headers: { - Accept: 'application/json' - }, - host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable - namespace: 'ws/v1/cluster', // common const - pathForType(modelName) { - return 'apps'; // move to some common place, return path by modelname. - }, - /* - urlForQuery(query, modelName) { - var url = this._buildURL(); - return url + '/apps/' + query.appId + "/appattempts"; - }, - */ - ajax(url, method, hash) { - hash = hash || {}; - hash.crossDomain = true; - hash.xhrFields = {withCredentials: true}; - hash.targetServer = "RM"; - return this._super(url, method, hash); - } -}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container-log.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container-log.js deleted file mode 100644 index 7838c98..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container-log.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import DS from 'ember-data'; -import Ember from 'ember'; -import Converter from 'yarn-ui/utils/converter'; - -/** - * REST URL's response when fetching container logs will be - * in plain text format and not JSON. - */ -export default DS.RESTAdapter.extend({ - headers: { - Accept: 'text/plain' - }, - host: 'http://localhost:1337/', - namespace: 'ws/v1/node', - - urlForFindRecord(id, modelName, snapshot) { - var splits = Converter.splitForContainerLogs(id); - var nodeHttpAddr = splits[0]; - var containerId = splits[1]; - var filename = splits[2]; - this.host = this.host + nodeHttpAddr; - var url = this._buildURL(); - url = url + "/containerlogs/" + containerId + "/" + filename; - return url; - }, - - ajax(url, method, hash) { - hash = hash || {}; - hash.crossDomain = true; - hash.xhrFields = {withCredentials: true}; - hash.targetServer = "NM"; - return this._super(url, method, hash); - }, - - /** - * Override options so that result is not expected to be JSON - */ - ajaxOptions: function (url, type, options) { - var hash = options || {}; - hash.url = url; - hash.type = type; - // Make sure jQuery does not try to convert response to JSON. - hash.dataType = 'text'; - hash.context = this; - - var headers = Ember.get(this, 'headers'); - if (headers != undefined) { - hash.beforeSend = function (xhr) { - Object.keys(headers).forEach(function (key) { - return xhr.setRequestHeader(key, headers[key]); - }); - }; - } - return hash; - }, -}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js deleted file mode 100644 index d941c38..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js +++ /dev/null @@ -1,43 +0,0 @@ -import DS from 'ember-data'; -import Converter from 'yarn-ui/utils/converter'; -import Config from 'yarn-ui/config'; - -export default DS.JSONAPIAdapter.extend({ - headers: { - Accept: 'application/json' - }, - rmHost: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, - tsHost: 'http://localhost:1337/' + Config.TS_HOST + ':' + Config.TS_PORT, - host: function() { - return undefined - }.property(), - rmNamespace: 'ws/v1/cluster', - tsNamespace: 'ws/v1/applicationhistory', - namespace: function() { - return undefined - }.property(), - - urlForQuery(query, modelName) { - if (query.is_rm) { - this.set("host", this.rmHost); - this.set("namespace", this.rmNamespace); - } else { - this.set("host", this.tsHost); - this.set("namespace", this.tsNamespace); - } - - var url = this._buildURL(); - url = url + '/apps/' + Converter.attemptIdToAppId(query.app_attempt_id) - + "/appattempts/" + query.app_attempt_id + "/containers"; - console.log(url); - return url; - }, - - ajax(url, method, hash) { - hash = {}; - hash.crossDomain = true; - hash.xhrFields = {withCredentials: true}; - hash.targetServer = "RM"; - return this._super(url, method, hash); - } -}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-app.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-app.js deleted file mode 100644 index 0c60d1f..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-app.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import DS from 'ember-data'; - -export default DS.JSONAPIAdapter.extend({ - headers: { - Accept: 'application/json' - }, - host: 'http://localhost:1337/', - namespace: 'ws/v1/node', - - urlForQuery(query) { - this.host = this.host + query.nodeAddr; - var url = this._buildURL(); - url = url + "/apps"; - return url; - }, - - urlForQueryRecord: function (query) { - this.host = this.host + query.nodeAddr; - var url = this._buildURL(); - url = url + "/apps/" + query.appId; - return url; - }, - - query: function (store, type, query) { - var url = this.urlForQuery(query); - // Query params not required. - query = null; - return this.ajax(url, 'GET', { data: query }); - }, - - queryRecord: function (store, type, query) { - var url = this.urlForQueryRecord(query); - // Query params not required. - query = null; - return this.ajax(url, 'GET', { data: query }); - }, - - ajax(url, method, hash) { - hash = hash || {}; - hash.crossDomain = true; - hash.xhrFields = {withCredentials: true}; - hash.targetServer = "NM"; - return this._super(url, method, hash); - } -}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-container.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-container.js deleted file mode 100644 index e8bf7b7..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-container.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import DS from 'ember-data'; - -export default DS.JSONAPIAdapter.extend({ - headers: { - Accept: 'application/json' - }, - host: 'http://localhost:1337/', - namespace: 'ws/v1/node', - - urlForQuery(query) { - this.host = this.host + query.nodeHttpAddr; - var url = this._buildURL(); - url = url + "/containers"; - return url; - }, - - urlForQueryRecord(query) { - this.host = this.host + query.nodeHttpAddr; - var url = this._buildURL(); - url = url + "/containers/" + query.containerId; - return url; - }, - - query: function (store, type, query) { - var url = this.urlForQuery(query); - // Query params not required. - query = null; - return this.ajax(url, 'GET', { data: query }); - }, - - queryRecord: function (store, type, query) { - var url = this.urlForQueryRecord(query); - // Query params not required. - query = null; - console.log(url); - return this.ajax(url, 'GET', { data: query }); - }, - - ajax(url, method, hash) { - hash = hash || {}; - hash.crossDomain = true; - hash.xhrFields = {withCredentials: true}; - hash.targetServer = "NM"; - return this._super(url, method, hash); - } -}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node.js deleted file mode 100644 index 64f524a..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import DS from 'ember-data'; - -export default DS.JSONAPIAdapter.extend({ - headers: { - Accept: 'application/json' - }, - host: 'http://localhost:1337/', - namespace: 'ws/v1/node', - - urlForFindRecord(id, modelName, snapshot) { - this.host = this.host + id; - var url = this._buildURL(); - return url; - }, - ajax(url, method, hash) { - hash = hash || {}; - hash.crossDomain = true; - hash.xhrFields = {withCredentials: true}; - hash.targetServer = "NM"; - return this._super(url, method, hash); - } -}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js deleted file mode 100644 index 0f6eb65..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js +++ /dev/null @@ -1,20 +0,0 @@ -import DS from 'ember-data'; -import Config from 'yarn-ui/config'; - -export default DS.JSONAPIAdapter.extend({ - headers: { - Accept: 'application/json' - }, - host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable - namespace: 'ws/v1/cluster', // common const - pathForType(modelName) { - return 'scheduler'; // move to some common place, return path by modelname. - }, - ajax(url, method, hash) { - hash = hash || {}; - hash.crossDomain = true; - hash.xhrFields = {withCredentials: true}; - hash.targetServer = "RM"; - return this._super(url, method, hash); - } -}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-rm-node.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-rm-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-rm-node.js deleted file mode 100644 index c6ad6f3..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-rm-node.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import DS from 'ember-data'; -import Config from 'yarn-ui/config'; - -export default DS.JSONAPIAdapter.extend({ - headers: { - Accept: 'application/json' - }, - host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, - namespace: 'ws/v1/cluster', - pathForType(modelName) { - return 'nodes'; - }, - - urlForFindRecord(id, modelName, snapshot) { - var url = this._buildURL(); - url = url + "/nodes/" + id; - return url; - }, - - ajax(url, method, hash) { - hash = hash || {}; - hash.crossDomain = true; - hash.xhrFields = {withCredentials: true}; - hash.targetServer = "RM"; - return this._super(url, method, hash); - } -}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/app.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/app.js deleted file mode 100644 index ff28ecf..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/app.js +++ /dev/null @@ -1,20 +0,0 @@ -import Ember from 'ember'; -import Resolver from 'ember/resolver'; -import loadInitializers from 'ember/load-initializers'; -import config from './config/environment'; -import Sorter from 'yarn-ui/utils/sorter'; - -var App; - -Ember.MODEL_FACTORY_INJECTIONS = true; - -App = Ember.Application.extend({ - modulePrefix: config.modulePrefix, - podModulePrefix: config.podModulePrefix, - Resolver: Resolver -}); - -loadInitializers(App, config.modulePrefix); -Sorter.initDataTableSorter(); - -export default App; http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/.gitkeep ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/.gitkeep deleted file mode 100644 index e69de29..0000000 http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-attempt-table.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-attempt-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-attempt-table.js deleted file mode 100644 index aff0493..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-attempt-table.js +++ /dev/null @@ -1,4 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-table.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-table.js deleted file mode 100644 index aff0493..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-table.js +++ /dev/null @@ -1,4 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/bar-chart.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/bar-chart.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/bar-chart.js deleted file mode 100644 index f24e947..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/bar-chart.js +++ /dev/null @@ -1,104 +0,0 @@ -import Ember from 'ember'; -import BaseChartComponent from 'yarn-ui/components/base-chart-component'; - -export default BaseChartComponent.extend({ - // data: - // [{label=label1, value=value1}, ...] - // ... - renderBarChart: function(data, title, textWidth = 50) { - var g = this.chart.g; - var layout = this.getLayout(); - this.renderTitleAndBG(g, title, layout); - - var maxValue = -1; - for (var i = 0; i < data.length; i++) { - if (data[i] instanceof Array) { - if (data[i][0].value > maxValue) { - maxValue = data[i][0].value; - } - } else { - if (data[i].value > maxValue) { - maxValue = data[i].value; - } - } - } - - var singleBarHeight = 30; - - // 50 is for text - var maxBarWidth = layout.x2 - layout.x1 - 2 * layout.margin - textWidth - 50; - - // 30 is for title - var maxBarsHeight = layout.y2 - layout.y1 - 2 * layout.margin - 30; - var gap = (maxBarsHeight - data.length * singleBarHeight) / (data.length - - 1); - - var xScaler = d3.scale.linear() - .domain([0, maxValue]) - .range([0, maxBarWidth]); - - // show bar text - for (var i = 0; i < data.length; i++) { - g.append("text") - .text( - function() { - return data[i].label; - }) - .attr("y", function() { - return layout.y1 + singleBarHeight / 2 + layout.margin + (gap + - singleBarHeight) * i + 30; - }) - .attr("x", layout.x1 + layout.margin); - } - - // show bar - var bar = g.selectAll("bars") - .data(data) - .enter() - .append("rect") - .attr("y", function(d, i) { - return layout.y1 + 30 + layout.margin + (gap + singleBarHeight) * i; - }) - .attr("x", layout.x1 + layout.margin + textWidth) - .attr("height", singleBarHeight) - .attr("fill", function(d, i) { - return this.colors[i]; - }.bind(this)) - .attr("width", 0); - - this.bindTooltip(bar); - - bar.transition() - .duration(500) - .attr("width", function(d) { - var w; - w = xScaler(d.value); - // At least each item has 3 px - w = Math.max(w, 3); - return w; - }); - - // show bar value - for (var i = 0; i < data.length; i++) { - g.append("text") - .text( - function() { - return data[i].value; - }) - .attr("y", function() { - return layout.y1 + singleBarHeight / 2 + layout.margin + (gap + - singleBarHeight) * i + 30; - }) - .attr("x", layout.x1 + layout.margin + textWidth + 15 + xScaler(data[i].value)); - } - }, - - draw: function() { - this.initChart(); - this.renderBarChart(this.get("data"), this.get("title"), this.get("textWidth")); - }, - - didInsertElement: function() { - this.draw(); - }, -}) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/base-chart-component.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/base-chart-component.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/base-chart-component.js deleted file mode 100644 index acf2b5f..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/base-chart-component.js +++ /dev/null @@ -1,109 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ - chart: undefined, - tooltip : undefined, - colors: d3.scale.category10().range(), - - initChart: function() { - this.chart = { - svg: undefined, - g: undefined, - h: 0, - w: 0, - tooltip: undefined - }; - - // Init tooltip if it is not initialized - this.tooltip = d3.select("#chart-tooltip"); - if (!this.tooltip) { - this.tooltip = d3.select("body") - .append("div") - .attr("class", "tooltip") - .attr("id", "chart-tooltip") - .style("opacity", 0); - } - - // Init svg - var svg = this.chart.svg; - if (svg) { - svg.remove(); - } - - var parentId = this.get("parentId"); - var parent = d3.select("#" + parentId); - var bbox = parent.node().getBoundingClientRect(); - this.chart.w = bbox.width - 30; - - var ratio = 0.75; // 4:3 by default - if (this.get("ratio")) { - ratio = this.get("ratio"); - } - this.chart.h = bbox.width * ratio; - - if (this.get("maxHeight")) { - this.chart.h = Math.min(this.get("maxHeight"), this.chart.h); - } - - this.chart.svg = parent.append("svg") - .attr("width", this.chart.w) - .attr("height", this.chart.h); - - this.chart.g = this.chart.svg.append("g"); - }, - - renderTitleAndBG: function(g, title, layout) { - var bg = g.append("g"); - bg.append("text") - .text(title) - .attr("x", (layout.x1 + layout.x2) / 2) - .attr("y", layout.y1 + layout.margin + 20) - .attr("class", "chart-title"); - - bg.append("rect") - .attr("x", layout.x1) - .attr("y", layout.y1) - .attr("width", layout.x2 - layout.x1) - .attr("height", layout.y2 - layout.y1) - .attr("class", "chart-frame"); - }, - - bindTooltip: function(d) { - d.on("mouseover", function(d) { - this.tooltip - .style("left", (d3.event.pageX) + "px") - .style("top", (d3.event.pageY - 28) + "px"); - }.bind(this)) - .on("mousemove", function(d) { - // Handle pie chart case - var data = d; - if (d.data) { - data = d.data; - } - - this.tooltip.style("opacity", .9); - this.tooltip.html(data.label + " = " + data.value) - .style("left", (d3.event.pageX) + "px") - .style("top", (d3.event.pageY - 28) + "px"); - }.bind(this)) - .on("mouseout", function(d) { - this.tooltip.style("opacity", 0); - }.bind(this)); - }, - - getLayout: function() { - var x1 = 0; - var y1 = 0; - var x2 = this.chart.w; - var y2 = this.chart.h; - - var layout = { - x1: x1, - y1: y1, - x2: x2 - 10, - y2: y2 - 10, - margin: 10 - }; - return layout; - }, -}); http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/container-table.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/container-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/container-table.js deleted file mode 100644 index aff0493..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/container-table.js +++ /dev/null @@ -1,4 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/donut-chart.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/donut-chart.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/donut-chart.js deleted file mode 100644 index 608b0c1..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/donut-chart.js +++ /dev/null @@ -1,148 +0,0 @@ -import Ember from 'ember'; -import BaseChartComponent from 'yarn-ui/components/base-chart-component'; - -export default BaseChartComponent.extend({ - /* - * data = [{label="xx", value=},{...}] - */ - renderDonutChart: function(data, title, showLabels = false, - middleLabel = "Total", middleValue = undefined) { - var g = this.chart.g; - var layout = this.getLayout(); - this.renderTitleAndBG(g, title, layout); - - var total = 0; - var allZero = true; - for (var i = 0; i < data.length; i++) { - total += data[i].value; - if (data[i].value > 1e-6) { - allZero = false; - } - } - - if (!middleValue) { - middleValue = total; - } - - //Width and height - var h = layout.y2 - layout.y1; - - // 50 is for title - var outerRadius = (h - 50 - 2 * layout.margin) / 2; - var innerRadius = outerRadius * 0.618; - var arc = d3.svg.arc() - .innerRadius(innerRadius) - .outerRadius(outerRadius); - - var cx; - var cy = layout.y1 + 50 + layout.margin + outerRadius; - if (showLabels) { - cx = layout.x1 + layout.margin + outerRadius; - } else { - cx = (layout.x1 + layout.x2) / 2; - } - - var pie = d3.layout.pie(); - pie.sort(null); - pie.value(function(d) { - var v = d.value; - // make sure it > 0 - v = Math.max(v, 1e-6); - return v; - }); - - //Set up groups - var arcs = g - .selectAll("g.arc") - .data(pie(data)) - .enter() - .append("g") - .attr("class", "arc") - .attr("transform", "translate(" + cx + "," + cy + ")"); - - function tweenPie(finish) { - var start = { - startAngle: 0, - endAngle: 0 - }; - var i = d3.interpolate(start, finish); - return function(d) { - return arc(i(d)); - }; - } - - //Draw arc paths - var path = arcs.append("path") - .attr("fill", function(d, i) { - if (d.value > 1e-6) { - return this.colors[i]; - } else { - return "white"; - } - }.bind(this)) - .attr("d", arc) - .attr("stroke", function(d, i) { - if (allZero) { - return this.colors[i]; - } - }.bind(this)) - .attr("stroke-dasharray", function(d, i) { - if (d.value <= 1e-6) { - return "10,10"; - } - }.bind(this)); - this.bindTooltip(path); - - // Show labels - if (showLabels) { - var lx = layout.x1 + layout.margin + outerRadius * 2 + 30; - var squareW = 15; - var margin = 10; - - var select = g.selectAll(".rect") - .data(data) - .enter(); - select.append("rect") - .attr("fill", function(d, i) { - return this.colors[i]; - }.bind(this)) - .attr("x", lx) - .attr("y", function(d, i) { - return layout.y1 + 50 + (squareW + margin) * i + layout.margin; - }) - .attr("width", squareW) - .attr("height", squareW); - select.append("text") - .attr("x", lx + squareW + margin) - .attr("y", function(d, i) { - return layout.y1 + 50 + (squareW + margin) * i + layout.margin + squareW / 2; - }) - .text(function(d) { - return d.label + ' = ' + d.value; - }); - } - - if (middleLabel) { - var highLightColor = this.colors[0]; - g.append("text").text(middleLabel).attr("x", cx).attr("y", cy - 10). - attr("class", "donut-highlight-text").attr("fill", highLightColor); - g.append("text").text(middleValue).attr("x", cx).attr("y", cy + 20). - attr("class", "donut-highlight-text").attr("fill", highLightColor). - style("font-size", "30px"); - } - - path.transition() - .duration(500) - .attrTween('d', tweenPie); - }, - - draw: function() { - this.initChart(); - this.renderDonutChart(this.get("data"), this.get("title"), this.get("showLabels"), - this.get("middleLabel"), this.get("middleValue")); - }, - - didInsertElement: function() { - this.draw(); - }, -}) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/item-selector.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/item-selector.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/item-selector.js deleted file mode 100644 index a18ccae..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/item-selector.js +++ /dev/null @@ -1,21 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ - didInsertElement: function() { - $(".js-example-basic-single").select2( - { - width: '100%', - placeholder: "Select a queue" - }); - var elementId = this.get("element-id"); - var prefix = this.get("prefix"); - - var element = d3.select("#" + elementId); - - if (element) { - this.get("model").forEach(function(o) { - element.append("option").attr("value", o.get("name")).text(prefix + o.get("name")); - }); - } - } -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-configuration-table.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-configuration-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-configuration-table.js deleted file mode 100644 index aff0493..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-configuration-table.js +++ /dev/null @@ -1,4 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-navigator.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-navigator.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-navigator.js deleted file mode 100644 index aff0493..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-navigator.js +++ /dev/null @@ -1,4 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ -}); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/69848086/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-view.js ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-view.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-view.js deleted file mode 100644 index c1fd8ff..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-view.js +++ /dev/null @@ -1,272 +0,0 @@ -import Ember from 'ember'; -import ChartUtilsMixin from 'yarn-ui/mixins/charts-utils'; - -export default Ember.Component.extend(ChartUtilsMixin, { - queues: { - data: undefined, - foldedQueues: {}, - selectedQueueCircle: undefined, - maxDepth: -1, - }, - - queueColors: d3.scale.category20().range(), - - renderQueue: function(now, depth, sequence) { - if (depth > this.queues.maxDepth) { - this.queues.maxDepth = depth; - } - - var cx = 20 + depth * 30; - var cy = 20 + sequence * 30; - var name = now.get("name"); - - var g = this.queues.dataGroup.append("g") - .attr("id", "queue-" + name + "-g"); - - var folded = this.queues.foldedQueues[name]; - var isParentQueue = false; - - // render its children - var children = []; - var childrenNames = now.get("children"); - if (childrenNames) { - childrenNames.forEach(function(name) { - isParentQueue = true; - var child = this.queues.data[name]; - if (child) { - children.push(child); - } - }.bind(this)); - } - if (folded) { - children = []; - } - var linefunction = d3.svg.line() - .interpolate("basis") - .x(function(d) { - return d.x; - }) - .y(function(d) { - return d.y; - }); - - for (var i = 0; i < children.length; i++) { - sequence = sequence + 1; - // Get center of children queue - var cc = this.renderQueue(children[i], - depth + 1, sequence); - g.append("path") - .attr("class", "queue") - .attr("d", linefunction([{ - x: cx, - y: cy - }, { - x: cc.x - 20, - y: cc.y - }, cc])); - } - - var circle = g.append("circle") - .attr("cx", cx) - .attr("cy", cy) - .attr("class", "queue"); - - circle.on('mouseover', function() { - circle.style("fill", this.queueColors[1]); - }.bind(this)); - circle.on('mouseout', function() { - if (circle != this.queues.selectedQueueCircle) { - circle.style("fill", this.queueColors[0]); - } - }.bind(this)); - circle.on('click', function() { - circle.style("fill", this.queueColors[2]); - var pre = this.queues.selectedQueueCircle; - this.queues.selectedQueueCircle = circle; - if (pre) { - pre.on('mouseout')(); - } - this.renderCharts(name); - }.bind(this)); - circle.on('dblclick', function() { - if (!isParentQueue) { - return; - } - - if (this.queues.foldedQueues[name]) { - delete this.queues.foldedQueues[name]; - } else { - this.queues.foldedQueues[name] = now; - } - this.renderQueues(); - }.bind(this)); - - var text = name; - if (folded) { - text = name + " (+)"; - } - - // print queue's name - g.append("text") - .attr("x", cx + 30) - .attr("y", cy + 5) - .text(text) - .attr("class", "queue"); - - return { - x: cx, - y: cy - }; - }, - - renderQueues: function() { - if (this.queues.dataGroup) { - this.queues.dataGroup.remove(); - } - // render queues - this.queues.dataGroup = this.canvas.svg.append("g") - .attr("id", "queues-g"); - var rootQueue = undefined; - - if (this.queues.data) { - this.renderQueue(this.queues.data['root'], 0, 0); - - } - }, - - draw: function() { - this.queues.data = {}; - this.get("model") - .forEach(function(o) { - this.queues.data[o.id] = o; - }.bind(this)); - - // get w/h of the svg - var bbox = d3.select("#main-container") - .node() - .getBoundingClientRect(); - this.canvas.w = bbox.width; - this.canvas.h = Math.max(Object.keys(this.queues.data) - .length * 35, 1500); - - this.canvas.svg = d3.select("#main-container") - .append("svg") - .attr("width", this.canvas.w) - .attr("height", this.canvas.h) - .attr("id", "main-svg"); - - this.renderBackground(); - - this.renderQueues(); - this.renderCharts("root"); - }, - - didInsertElement: function() { - this.draw(); - }, - - /* - * data = [{label="xx", value=},{...}] - */ - renderTable: function(data, title, layout) { - d3.select("#main-svg") - .append('table') - .selectAll('tr') - .data(data) - .enter() - .append('tr') - .selectAll('td') - .data(function(d) { - return d; - }) - .enter() - .append('td') - .text(function(d) { - return d; - }); - }, - - renderQueueCapacities: function(queue, layout) { - // Render bar chart - this.renderBarChart(this.charts.g, [{ - label: "Cap", - value: queue.get("capacity") - }, { - label: "MaxCap", - value: queue.get("maxCapacity") - }, { - label: "UsedCap", - value: queue.get("usedCapacity") - }], "Queue Capacities", layout, 60); - }, - - renderChildrenCapacities: function(queue, layout) { - var data = []; - var children = queue.get("children"); - if (children) { - for (var i = 0; i < children.length; i++) { - var child = this.queues.data[children[i]]; - data.push({ - label: child.get("name"), - value: child.get("capacity") - }); - } - } - - this.renderDonutChart(this.charts.g, data, "Children Capacities", layout, true); - }, - - renderChildrenUsedCapacities: function(queue, layout) { - var data = []; - var children = queue.get("children"); - if (children) { - for (var i = 0; i < children.length; i++) { - var child = this.queues.data[children[i]]; - data.push({ - label: child.get("name"), - value: child.get("usedCapacity") - }); - } - } - - this.renderDonutChart(this.charts.g, data, "Children Used Capacities", layout, true); - }, - - renderLeafQueueUsedCapacities: function(layout) { - var leafQueueUsedCaps = []; - for (var queueName in this.queues.data) { - var q = this.queues.data[queueName]; - if ((!q.get("children")) || q.get("children") - .length == 0) { - // it's a leafqueue - leafQueueUsedCaps.push({ - label: q.get("name"), - value: q.get("usedCapacity") - }); - } - } - - this.renderDonutChart(this.charts.g, leafQueueUsedCaps, "LeafQueues Used Capacities", - layout, true); - }, - - renderCharts: function(queueName) { - this.charts.leftBannerLen = this.queues.maxDepth * 30 + 100; - this.initCharts(); - - var queue = this.queues.data[queueName]; - var idx = 0; - - if (queue.get("name") == "root") { - this.renderLeafQueueUsedCapacities(this.getLayout(idx++)); - } - if (queue.get("name") != "root") { - this.renderQueueCapacities(queue, this.getLayout(idx++)); - } - if (queue.get("children") && queue.get("children") - .length > 0) { - this.renderChildrenCapacities(queue, this.getLayout(idx++)); - this.renderChildrenUsedCapacities(queue, this.getLayout(idx++)); - } - }, -}); \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
