You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by si...@apache.org on 2022/11/17 20:56:28 UTC

[ozone] branch master updated: HDDS-4402. Recon dashboard page does not load until missing containers API returns data. (#3968)

This is an automated email from the ASF dual-hosted git repository.

siyao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 559ad868ef HDDS-4402. Recon dashboard page does not load until missing containers API returns data. (#3968)
559ad868ef is described below

commit 559ad868ef14154ad97aaefdd862a2df3d4fc6f3
Author: smitajoshi12 <11...@users.noreply.github.com>
AuthorDate: Fri Nov 18 02:26:23 2022 +0530

    HDDS-4402. Recon dashboard page does not load until missing containers API returns data. (#3968)
---
 .../main/resources/webapps/recon/ozone-recon-web/api/db.json   | 10 +++++-----
 .../resources/webapps/recon/ozone-recon-web/api/routes.json    |  1 -
 .../recon/ozone-recon-web/src/views/overview/overview.tsx      | 10 ++++------
 3 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/db.json b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/db.json
index bb127dfda5..0206f6db78 100644
--- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/db.json
+++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/db.json
@@ -1,15 +1,15 @@
 {
   "clusterState": {
+    "pipelines": 32,
     "totalDatanodes": 24,
     "healthyDatanodes": 24,
-    "pipelines": 32,
     "storageReport": {
-      "capacity": 32985348833280,
-      "used": 15942918602752,
-      "remaining": 12094627905536
+      "capacity": 202114732032,
+      "used": 16384,
+      "remaining": 182447632384
     },
     "containers": 3230,
-    "openContainers": 3210,
+    "missingContainers": 1002,
     "volumes": 5,
     "buckets": 156,
     "keys": 253000
diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/routes.json b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/routes.json
index 9de3093314..e92e7c6dcc 100644
--- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/routes.json
+++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/routes.json
@@ -23,6 +23,5 @@
   "/namespace/summary?path=*": "/metadata",
   "/namespace/quota?path=*": "/quota",
   "/task/status": "/taskStatus",
-  "/containers/missing": "/missingContainers",
   "/containers/unhealthy": "/unhealthyContainers"
 }
\ No newline at end of file
diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.tsx
index 86dcb3d8e0..c583e17b86 100644
--- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.tsx
+++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.tsx
@@ -21,7 +21,6 @@ import {Row, Col, Icon, Tooltip} from 'antd';
 import OverviewCard from 'components/overviewCard/overviewCard';
 import axios from 'axios';
 import {IStorageReport} from 'types/datanode.types';
-import {IMissingContainersResponse} from '../missingContainers/missingContainers';
 import moment from 'moment';
 import AutoReloadPanel from 'components/autoReloadPanel/autoReloadPanel';
 import {showDataFetchError} from 'utils/common';
@@ -32,6 +31,7 @@ import './overview.less';
 const size = filesize.partial({round: 1});
 
 interface IClusterStateResponse {
+  missingContainers: number;
   totalDatanodes: number;
   healthyDatanodes: number;
   pipelines: number;
@@ -90,14 +90,12 @@ export class Overview extends React.Component<Record<string, object>, IOverviewS
     });
     axios.all([
       axios.get('/api/v1/clusterState'),
-      axios.get('/api/v1/containers/missing'),
       axios.get('/api/v1/task/status')
-    ]).then(axios.spread((clusterStateResponse, missingContainersResponse,taskstatusResponse) => {
+    ]).then(axios.spread((clusterStateResponse, taskstatusResponse) => {
       
       const clusterState: IClusterStateResponse = clusterStateResponse.data;
-      const missingContainers: IMissingContainersResponse = missingContainersResponse.data;     
       const taskStatus = taskstatusResponse.data;
-      const missingContainersCount = missingContainers.totalCount;
+      const missingContainersCount = clusterState.missingContainers;
       const omDBDeltaObject = taskStatus && taskStatus.find((item:any) => item.taskName === 'OmDeltaRequest');
       const omDBFullObject = taskStatus && taskStatus.find((item:any) => item.taskName === 'OmSnapshotRequest');
     
@@ -146,7 +144,7 @@ export class Overview extends React.Component<Record<string, object>, IOverviewS
     const duLink = '/DiskUsage';
     const containersElement = missingContainersCount > 0 ? (
       <span>
-        <Tooltip placement='bottom' title={`${missingContainersCount} ${containersTooltip}`}>
+        <Tooltip placement='bottom' title={missingContainersCount > 1000 ? `1000+ Containers are missing. For more information, go to the Containers page.` : `${missingContainersCount} ${containersTooltip}`}>
           <Icon type='exclamation-circle' theme='filled' className='icon-failure icon-small'/>
         </Tooltip>
         <span className='padded-text'>{containers - missingContainersCount}/{containers}</span>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org