[ https://issues.apache.org/jira/browse/YARN-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14483429#comment-14483429 ]
Allen Wittenauer commented on YARN-3348: ---------------------------------------- {code} + doNotSetCols=0 + doNotSetRows=0 + for i in "$@"; do + if [[ $i == "-cols" ]]; then + doNotSetCols=1 + fi + if [[ $i == "-rows" ]]; then + doNotSetRows=1 + fi + done + if [[ $doNotSetCols == 0 ]]; then + cols=`tput cols` + args=( $@ ) + args=("${args[@]}" "-cols" "$cols") + set -- "${args[@]}" + fi + if [[ $doNotSetRows == 0 ]]; then + rows=`tput lines` + args=( $@ ) + args=("${args[@]}" "-rows" "$rows") + set -- "${args[@]}" + fi {code} * Why are we doing this manipulation here and not in the Java code? * backticks are antiquated in modern bash. Use {{$()}} construction * What happens if tput gives you zero or an error because you are on a non-addressable terminal? (You can generally simulate this by unset TERM or equivalent env var) > Add a 'yarn top' tool to help understand cluster usage > ------------------------------------------------------ > > Key: YARN-3348 > URL: https://issues.apache.org/jira/browse/YARN-3348 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager > Reporter: Varun Vasudev > Assignee: Varun Vasudev > Attachments: apache-yarn-3348.0.patch, apache-yarn-3348.1.patch > > > It would be helpful to have a 'yarn top' tool that would allow administrators > to understand which apps are consuming resources. > Ideally the tool would allow you to filter by queue, user, maybe labels, etc > and show you statistics on container allocation across the cluster to find > out which apps are consuming the most resources on the cluster. -- This message was sent by Atlassian JIRA (v6.3.4#6332)