[fix](proc) Fix show proc '/current_query_stmts' error due to wrong index for execTime (#10488)

Co-authored-by: caiconghui1 <caiconghui1@jd.com>
This commit is contained in:
caiconghui
2022-06-29 17:41:47 +08:00
committed by GitHub
parent b9223d1657
commit c695ccb827
2 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ public class CurrentQueryStatementsProcNode implements ProcNodeInterface {
.add("QueryId").add("ConnectionId").add("Database").add("User")
.add("ExecTime").add("SqlHash").add("Statement").build();
private static final int EXEC_TIME_INDEX = 5;
private static final int EXEC_TIME_INDEX = 4;
@Override
public ProcResult fetchResult() throws AnalysisException {

View File

@ -92,9 +92,9 @@ public class TrashProcDir implements ProcDirInterface {
}
}
List<String> backendInfo = new ArrayList<String>();
List<String> backendInfo = new ArrayList<>();
backendInfo.add(String.valueOf(backend.getId()));
backendInfo.add(backend.getHost() + ":" + String.valueOf(backend.getHeartbeatPort()));
backendInfo.add(backend.getHost() + ":" + backend.getHeartbeatPort());
if (trashUsedCapacityB != null) {
Pair<Double, String> trashUsedCapacity = DebugUtil.getByteUint(trashUsedCapacityB);
backendInfo.add(DebugUtil.DECIMAL_FORMAT_SCALE_3.format(trashUsedCapacity.first) + " "