BiteTheDDDDt commented on a change in pull request #6247:
URL: https://github.com/apache/incubator-doris/pull/6247#discussion_r670375510



##########
File path: fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
##########
@@ -1690,6 +1698,46 @@ private void handleShowRoles() {
         List<List<String>> infos = 
Catalog.getCurrentCatalog().getAuth().getRoleInfo();
         resultSet = new ShowResultSet(showStmt.getMetaData(), infos);
     }
+    
+    private void handleShowTrash() {
+        ShowTrashStmt showStmt = (ShowTrashStmt) stmt;
+        List<List<String>> results = Lists.newArrayList();
+
+        for (Backend backend : showStmt.getBackends()) {
+            BackendService.Client client = null;
+            TNetworkAddress address = null;
+            Long trashUsedCapacityB = null;
+            boolean ok = false;
+            try {
+                long start = System.currentTimeMillis();
+                address = new TNetworkAddress(backend.getHost(), 
backend.getBePort());
+                client = ClientPool.backendPool.borrowObject(address);
+                trashUsedCapacityB = client.getTrashUsedCapacity();
+                LOG.debug("get trash used capacity from backend: {}, 
trashUsedCapacity: {}, cost {}", backend.getId(),
+                trashUsedCapacityB, System.currentTimeMillis() - start);
+                ok = true;
+            } catch (Exception e) {
+                LOG.warn("task exec error. backend[{}]", backend.getId(), e);

Review comment:
       > 
   > 
   > Just a log without further processing?
   
   now will display null when program throw error




-- 
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

Reply via email to