You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Ahmed Hussein (JIRA)" <ji...@apache.org> on 2019/02/05 20:40:00 UTC

[jira] [Commented] (YARN-7171) RM UI should sort memory / cores numerically

    [ https://issues.apache.org/jira/browse/YARN-7171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16761189#comment-16761189 ] 

Ahmed Hussein commented on YARN-7171:
-------------------------------------

Hadoop web-site uses a library called [datatables|http://example.com] to render the tables.
The library detects the type of the cells content and uses the relevant sorting method for the data.
However, because hadoop reports "N/A", the entire column is treated as a string instead of numeric.

This issue should affect all columns of similar nature.

 

The following are different approaches to solve this issue:

*1- Possible quick fix*

This solution needs to be propagated for any other column affected by the same issue.
 * Define a new data type that ignores string in numeric columns in "getAppsTableColumnDefs" located in "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/WebPageUtils.java".
 * Define a sorting JS method for that type in "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/webapps/static/yarn.dt.plugins.js".

*2-Writing a custom Render function***

This solution consists of avoiding setting strings as numeric data. For example, leave  "-1" instead of "N/A". Then write a custom rendered that replaces "-1" by "N/A" during the table ' rendering.


This solution is problematic in deciding which numeric value should be replaced by "N/A" in case some content have -1 within a valid range.

*3-Better design and long term solution*

DataTables has four built-in data operations which are completely independent: 
 # display - Display data
 # sort - Data used for ordering
 # filter - Data used for searching
 # type - Type detection data

This solution consists of using `Orthogonal-data` to separate between rendering, display, and sorting. This would be the best way to solve this problem for all the columns.
This separates sorting values from data representation. In that way, changing the format of the column won't affect the sorting.
In each `td` element there should be data-order attribute.

For more details about orthogonal data, see [that link|https://datatables.net/manual/data/orthogonal-data]

> RM UI should sort memory / cores numerically
> --------------------------------------------
>
>                 Key: YARN-7171
>                 URL: https://issues.apache.org/jira/browse/YARN-7171
>             Project: Hadoop YARN
>          Issue Type: Improvement
>    Affects Versions: 2.7.1
>            Reporter: Eric Maynard
>            Assignee: Ahmed Hussein
>            Priority: Major
>
> Currently, the RM web UI sorts allocated memory and cores in lexicographic order which can be quite obtuse. When there are a large number of running jobs, it can be opaque to find the job which is allocating the most amount of memory or view jobs with similar allocation. Sorting these values numerically would improve usability.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org