Skip to content

Commit fada3f0

Browse files
remove redundent column headers in pit segments response (#9615) (#9698)
(cherry picked from commit 2fb4694) Signed-off-by: panguixin <panguixin@bytedance.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 14673de commit fada3f0

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

server/src/main/java/org/opensearch/rest/action/cat/RestPitSegmentsAction.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,23 +120,7 @@ private Table buildTable(final RestRequest request, Map<String, IndexSegments> i
120120
Table table = getTableWithHeader(request);
121121

122122
DiscoveryNodes nodes = this.nodesInCluster.get();
123-
table.startRow();
124-
table.addCell("index", "default:true;alias:i,idx;desc:index name");
125-
table.addCell("shard", "default:true;alias:s,sh;desc:shard name");
126-
table.addCell("prirep", "alias:p,pr,primaryOrReplica;default:true;desc:primary or replica");
127-
table.addCell("ip", "default:true;desc:ip of node where it lives");
128-
table.addCell("id", "default:false;desc:unique id of node where it lives");
129-
table.addCell("segment", "default:true;alias:seg;desc:segment name");
130-
table.addCell("generation", "default:true;alias:g,gen;text-align:right;desc:segment generation");
131-
table.addCell("docs.count", "default:true;alias:dc,docsCount;text-align:right;desc:number of docs in segment");
132-
table.addCell("docs.deleted", "default:true;alias:dd,docsDeleted;text-align:right;desc:number of deleted docs in segment");
133-
table.addCell("size", "default:true;alias:si;text-align:right;desc:segment size in bytes");
134-
table.addCell("size.memory", "default:true;alias:sm,sizeMemory;text-align:right;desc:segment memory in bytes");
135-
table.addCell("committed", "default:true;alias:ic,isCommitted;desc:is segment committed");
136-
table.addCell("searchable", "default:true;alias:is,isSearchable;desc:is segment searched");
137-
table.addCell("version", "default:true;alias:v,ver;desc:version");
138-
table.addCell("compound", "default:true;alias:ico,isCompound;desc:is segment compound");
139-
table.endRow();
123+
140124
for (IndexSegments indexSegments : indicesSegments.values()) {
141125
Map<Integer, IndexShardSegments> shards = indexSegments.getShards();
142126
for (IndexShardSegments indexShardSegments : shards.values()) {

0 commit comments

Comments
 (0)