tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbalamo...@apache.org
Subject tez git commit: TEZ-1817. Add configuration and build details to README (Sreenath Somarajapuram via Rajesh Balamohan)
Date Fri, 05 Dec 2014 05:03:48 GMT
Repository: tez
Updated Branches:
  refs/heads/TEZ-8 9e2a3dc03 -> 7f443597c


TEZ-1817. Add configuration and build details to README (Sreenath Somarajapuram via Rajesh
Balamohan)


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

Branch: refs/heads/TEZ-8
Commit: 7f443597c5a4f3ffb541fe789421accd224d086a
Parents: 9e2a3dc
Author: Rajesh Balamohan <rbalamohan@hortonworks.com>
Authored: Fri Dec 5 10:33:37 2014 +0530
Committer: Rajesh Balamohan <rbalamohan@hortonworks.com>
Committed: Fri Dec 5 10:33:37 2014 +0530

----------------------------------------------------------------------
 tez-ui/README.TXT                               | 29 ++++++++++++++------
 tez-ui/src/main/webapp/app/scripts/configs.js   | 27 ++++++++++--------
 .../main/webapp/app/scripts/helpers/dialogs.js  | 11 ++++++--
 .../app/scripts/mixins/column-selector-mixin.js | 27 ++++++++++++++----
 tez-ui/src/main/webapp/app/styles/main.less     |  6 ++++
 5 files changed, 74 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/7f443597/tez-ui/README.TXT
----------------------------------------------------------------------
diff --git a/tez-ui/README.TXT b/tez-ui/README.TXT
index 889df81..b2ab7a3 100644
--- a/tez-ui/README.TXT
+++ b/tez-ui/README.TXT
@@ -38,20 +38,33 @@ In yarn-site.xml
 In configs.js
   * Both timeline and RM base URLs can be customized in app/scripts/configs.js. By default
their
     values are http://localhost:8188 and http://localhost:8088 respectively.
-  * More counter columns can be added to all tables through the file. More information regarding
-    the same can be found in configs.js.
+  * Visibility of table columns can be controlled using the column selector. Also an optional
set
+    of file system counters can be made visible as columns for most of the tables. For adding
more
+    counters refer configs.js.
 
 Building
 ---------
-  On building tez-ui two files will be created in the target directory, a tarball and a war
file.
-Both packages the tez-ui distribution files, and can be found inside tez-ui-x.x.x-SNAPSHOT
directory.
-To fire a test less build in the tez-ui run 'mvn clean package -DskipTests'. Tez ui build
is part of
-tez build, and hence building tez would build tez-ui also. Refer BUILDING.txt in tez for
more info.
+  * To build UI without running test cases, run 'mvn clean package -DskipTests' in tez-ui
directory.
+  * The build will create two files inside tez-ui/target.
+    1. A tarball of the distribution files.
+    2. A war of the distribution files.
+  * UI build is part of tez build, refer BUILDING.txt in tez for more info.
+
+Using the war
+-------------
+Remotely:
+  Use webfront tomcat manager to upload & deploy your war remotely.
+Manually:
+  The war can be added to any tomcat instance.
+  1. Remove any old deployments in $TOMCAT_HOME/webapps
+  2. Copy the war to $TOMCAT_HOME/webapps
+  3. Restart tomcat and the war will get deployed. The content of the war would be available
in
+     $TOMCAT_HOME/webapps/tez-ui-x.x.x-SNAPSHOT.
 
 Dev setup instructions
 ----------------------
-Install the development dependencies nodejs, npm, grunt and bower
-from webapp directory run the following commands
+Install the development dependencies nodejs, npm, grunt and bower.
+From src/main/webapp directory run the following commands.
   * npm install
   * bower install
 

http://git-wip-us.apache.org/repos/asf/tez/blob/7f443597/tez-ui/src/main/webapp/app/scripts/configs.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/configs.js b/tez-ui/src/main/webapp/app/scripts/configs.js
index a1a2053..d07965d 100644
--- a/tez-ui/src/main/webapp/app/scripts/configs.js
+++ b/tez-ui/src/main/webapp/app/scripts/configs.js
@@ -34,23 +34,28 @@ $.extend(true, App.Configs, {
   },
 
   /*
-   * By default TEZ UI displays 10 file system counters in all tables. 'tables' object
-   * gives you the option to configure more columns. Latest release(0.6.0) only supports
addition
-   * of counter columns.
-   * Counters must be added as configuration objects into the respective array(sharedColumns,
entity.dag,
-   * entity.vertex etc). Configuration object must be of the following format.
-   *     {
-   *       counterId: '<Counter ID>',
-   *       groupId: '<Group ID>',
-   *       headerText: '<Display text>'
-   *     },
+   * Visibility of table columns can be controlled using the column selector. Also an optional
set of
+   * file system counters can be enabled as columns for most of the tables. For adding more
counters
+   * as columns edit the following 'tables' object. Counters must be added as configuration
objects
+   * of the following format.
+   *    {
+   *      counterId: '<Counter ID>',
+   *      groupId: '<Group ID>',
+   *      headerText: '<Display text>'
+   *    }
    */
   tables: {
     /*
      * Entity specific columns must be added into the respective array.
      */
     entity: {
-      dag: [],
+      dag: [
+        // { // Following is a sample configuration object.
+        //   counterId: 'FILE_BYTES_READ',
+        //   groupId: 'org.apache.tez.common.counters.FileSystemCounter',
+        //   headerText: 'File Bytes Read'
+        // }
+      ],
       vertex: [],
       task: [],
       taskAttempt: [],

http://git-wip-us.apache.org/repos/asf/tez/blob/7f443597/tez-ui/src/main/webapp/app/scripts/helpers/dialogs.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/helpers/dialogs.js b/tez-ui/src/main/webapp/app/scripts/helpers/dialogs.js
index 2e713a1..253c8ab 100644
--- a/tez-ui/src/main/webapp/app/scripts/helpers/dialogs.js
+++ b/tez-ui/src/main/webapp/app/scripts/helpers/dialogs.js
@@ -25,7 +25,7 @@ App.Dialogs = Em.Namespace.create({
    * @param keyHash Defines the key that helper must use to get value from item.
    * @return Returns a promoise that would be fulfilled when Ok is pressed
    */
-  displayMultiSelect: function (listItems, selectedItems, keyHash) {
+  displayMultiSelect: function (title, listItems, selectedItems, keyHash) {
     /*
      * Looks in an object for properties.
      */
@@ -54,10 +54,17 @@ App.Dialogs = Em.Namespace.create({
     return new Em.RSVP.Promise(function (resolve, reject) {
       container.dialog({
         modal: true,
-        title: "Select Items",
+        title: title,
         width: 350,
         height: 500,
         resizable: false,
+        open: function() {
+          $(this).closest(".ui-dialog")
+          .find(".ui-dialog-titlebar-close")
+          .append('<span\
+              class="ui-button-icon-primary ui-icon ui-icon-closethick align-close-button">\
+              </span>');
+        },
         buttons: {
           Ok: function() {
             var visibleColumnIds = {};

http://git-wip-us.apache.org/repos/asf/tez/blob/7f443597/tez-ui/src/main/webapp/app/scripts/mixins/column-selector-mixin.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/mixins/column-selector-mixin.js b/tez-ui/src/main/webapp/app/scripts/mixins/column-selector-mixin.js
index 5a190ab..b90d75e 100644
--- a/tez-ui/src/main/webapp/app/scripts/mixins/column-selector-mixin.js
+++ b/tez-ui/src/main/webapp/app/scripts/mixins/column-selector-mixin.js
@@ -16,6 +16,21 @@
  * limitations under the License.
  */
 
+function isObjectsDifferent(obj1, obj2) {
+  var property;
+  for(property in obj1) {
+    if(obj1[property] !== obj2[property]) {
+      return true;
+    }
+  }
+  for(property in obj2) {
+    if(obj1[property] !== obj2[property]) {
+      return true;
+    }
+  }
+  return false;
+}
+
 App.ColumnSelectorMixin = Em.Mixin.create({
 
   name: 'PaginatedContentMixin',
@@ -55,13 +70,15 @@ App.ColumnSelectorMixin = Em.Mixin.create({
     selectColumns: function () {
       var that = this;
 
-      App.Dialogs.displayMultiSelect(this.get('columnConfigs'), this.visibleColumnIds, {
+      App.Dialogs.displayMultiSelect('Column Selector', this.get('columnConfigs'), this.visibleColumnIds,
{
         displayText: 'headerCellName'
       }).then(function (data) {
-        try {
-          localStorage.setItem(that._storeKey , JSON.stringify(data));
-        }catch(e){}
-        that.set('visibleColumnIds', data);
+        if(isObjectsDifferent(data, that.visibleColumnIds)) {
+          try {
+            localStorage.setItem(that._storeKey , JSON.stringify(data));
+          }catch(e){}
+          that.set('visibleColumnIds', data);
+        }
       });
     }
   }

http://git-wip-us.apache.org/repos/asf/tez/blob/7f443597/tez-ui/src/main/webapp/app/styles/main.less
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/styles/main.less b/tez-ui/src/main/webapp/app/styles/main.less
index 6ffdceb..1bbf28c 100644
--- a/tez-ui/src/main/webapp/app/styles/main.less
+++ b/tez-ui/src/main/webapp/app/styles/main.less
@@ -434,3 +434,9 @@ div.indent {
 .input-dirty {
   background-color: yellow;
 }
+
+/* --- Close button fix */
+.align-close-button {
+  margin-left: -1px;
+  margin-top: -1px;
+}
\ No newline at end of file


Mime
View raw message