Skip to content

Commit 35c30a5

Browse files
committed
YARN-11506.The formatted yarn queue list is displayed on CLI
1 parent 7cc31c7 commit 35c30a5

File tree

1 file changed

+16
-16
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/util

1 file changed

+16
-16
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/util/FormattingCLIUtils.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,19 @@ private void buildTitle() {
136136
private void buildTable() {
137137
this.buildTitle();
138138
for (int i = 0, len = this.tableRows.size(); i < len; i++) {
139-
List<String> datas = this.tableRows.get(i).datas;
139+
List<String> data = this.tableRows.get(i).data;
140140
switch (this.tableRows.get(i).tableRowType) {
141141
case HEADER:
142142
if (this.lastTableRowType != TableRowType.HEADER) {
143-
this.buildRowBorder(datas);
143+
this.buildRowBorder(data);
144144
}
145-
this.buildRowLine(datas);
146-
this.buildRowBorder(datas);
145+
this.buildRowLine(data);
146+
this.buildRowBorder(data);
147147
break;
148148
case LINE:
149-
this.buildRowLine(datas);
149+
this.buildRowLine(data);
150150
if (i == len - 1) {
151-
this.buildRowBorder(datas);
151+
this.buildRowBorder(data);
152152
}
153153
break;
154154
default:
@@ -159,11 +159,11 @@ private void buildTable() {
159159

160160
/**
161161
* Method to build a border row.
162-
* @param datas dataLine
162+
* @param data dataLine
163163
*/
164-
private void buildRowBorder(List<String> datas) {
164+
private void buildRowBorder(List<String> data) {
165165
this.join.append("+");
166-
for (int i = 0, len = datas.size(); i < len; i++) {
166+
for (int i = 0, len = data.size(); i < len; i++) {
167167
for (int j = 0; j < this.maxColMap.get(i) + 2; j++) {
168168
this.join.append("-");
169169
}
@@ -174,12 +174,12 @@ private void buildRowBorder(List<String> datas) {
174174

175175
/**
176176
* A way to build rows of data.
177-
* @param datas dataLine
177+
* @param data dataLine
178178
*/
179-
private void buildRowLine(List<String> datas) {
179+
private void buildRowLine(List<String> data) {
180180
this.join.append("|");
181-
for (int i = 0, len = datas.size(); i < len; i++) {
182-
this.join.append(StrUtils.center(datas.get(i), this.maxColMap.get(i) + 2, ' '))
181+
for (int i = 0, len = data.size(); i < len; i++) {
182+
this.join.append(StrUtils.center(data.get(i), this.maxColMap.get(i) + 2, ' '))
183183
.append("|");
184184
}
185185
this.join.append("\n");
@@ -199,10 +199,10 @@ public String render() {
199199
*/
200200
private static class TableRow {
201201
private TableRowType tableRowType;
202-
private List<String> datas;
203-
TableRow(TableRowType tableRowType, List<String> datas) {
202+
private List<String> data;
203+
TableRow(TableRowType tableRowType, List<String> data) {
204204
this.tableRowType = tableRowType;
205-
this.datas = datas;
205+
this.data = data;
206206
}
207207
}
208208

0 commit comments

Comments
 (0)