yongjinhou commented on code in PR #24229: URL: https://github.com/apache/doris/pull/24229#discussion_r1325535911
########## fe/fe-core/src/main/java/org/apache/doris/common/proc/BackendsProcDir.java: ########## @@ -184,6 +204,80 @@ public static List<List<String>> getBackendInfos() { return backendInfos; } + /** + * get backends disk info + * + * @return + */ + public static List<List<String>> getBackendsDiskInfos() { + final SystemInfoService systemInfoService = Env.getCurrentSystemInfo(); + List<List<String>> backendsDiskInfos = new LinkedList<>(); + List<Long> backendIds = systemInfoService.getAllBackendIds(false); + if (backendIds == null) { + return backendsDiskInfos; + } + + List<List<Comparable>> comparableBackendsDiskInfos = new LinkedList<>(); + for (long backendId : backendIds) { + Backend backend = systemInfoService.getBackend(backendId); + if (backend == null) { + continue; + } + + ImmutableMap<String, DiskInfo> disksRef = backend.getDisks(); + for (DiskInfo disk : disksRef.values()) { + if (disk.getState() == DiskState.ONLINE) { Review Comment: ok -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org