Skip to content

Commit 0d3b706

Browse files
Add new changes for the Capacity distribution UI
1 parent 687f14c commit 0d3b706

File tree

7 files changed

+408
-240
lines changed

7 files changed

+408
-240
lines changed

hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/db.json

Lines changed: 130 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -6869,86 +6869,143 @@
68696869
},
68706870
"utilization": {
68716871
"globalStorage": {
6872-
"totalUsedSpace": 1632526336,
6873-
"totalFreeSpace": 596013527040,
6874-
"totalCapacity": 746331226935
6872+
"totalUsedSpace": 30679040,
6873+
"totalFreeSpace": 539776978944,
6874+
"totalCapacity": 879519597390
68756875
},
68766876
"globalNamespace": {
6877-
"totalUsedSpace": 0,
6878-
"totalKeys": 0
6877+
"totalUsedSpace": 12349932,
6878+
"totalKeys": 1576
68796879
},
68806880
"usedSpaceBreakdown": {
6881-
"openKeysBytes": 10000,
6882-
"committedBytes": 250100,
6883-
"containerPreAllocated": 1073725932,
6884-
"deletionPendingBytes": {
6885-
"total": 3765706484,
6886-
"byStage": {
6887-
"DN": {
6888-
"pendingBytes": 3758096384
6889-
},
6890-
"SCM": {
6891-
"pendingBytes": 3145600
6892-
},
6893-
"OM": {
6894-
"pendingKeyBytes": 1254500,
6895-
"totalBytes": 4464500,
6896-
"pendingDirectoryBytes": 3210000
6897-
}
6898-
}
6899-
}
6881+
"openKeyBytes": 19255266,
6882+
"committedKeyBytes": 1249923,
6883+
"preAllocatedContainerBytes": 1022024
69006884
},
69016885
"dataNodeUsage": [
6886+
{
6887+
"datanodeUuid": "1bf314dc-3eba-4774-9dbc-6d957cc7670b",
6888+
"hostName": "ozone-datanode-7.ozone_default",
6889+
"capacity": 125645656770,
6890+
"used": 4382720,
6891+
"remaining": 77110996992,
6892+
"committed": 0,
6893+
"minimumFreeSpace": 104857600,
6894+
"reserved": 12565822
6895+
},
6896+
{
6897+
"datanodeUuid": "8adead67-85a6-4ba9-942f-cd313f1472f9",
6898+
"hostName": "ozone-datanode-6.ozone_default",
6899+
"capacity": 125645656770,
6900+
"used": 4382720,
6901+
"remaining": 77110996992,
6902+
"committed": 0,
6903+
"minimumFreeSpace": 104857600,
6904+
"reserved": 12565822
6905+
},
6906+
{
6907+
"datanodeUuid": "953b91f4-c03a-45d8-9fbe-142887531cb1",
6908+
"hostName": "ozone-datanode-5.ozone_default",
6909+
"capacity": 125645656770,
6910+
"used": 4382720,
6911+
"remaining": 77110996992,
6912+
"committed": 0,
6913+
"minimumFreeSpace": 104857600,
6914+
"reserved": 12565822
6915+
},
6916+
{
6917+
"datanodeUuid": "44617070-a300-48af-a0e3-117167b008b6",
6918+
"hostName": "ozone-datanode-2.ozone_default",
6919+
"capacity": 125645656770,
6920+
"used": 4382720,
6921+
"remaining": 77110996992,
6922+
"committed": 0,
6923+
"minimumFreeSpace": 104857600,
6924+
"reserved": 12565822
6925+
},
6926+
{
6927+
"datanodeUuid": "d3ade292-6ec1-47b2-bd9e-045c1acc2c29",
6928+
"hostName": "ozone-datanode-1.ozone_default",
6929+
"capacity": 125645656770,
6930+
"used": 4382720,
6931+
"remaining": 77110996992,
6932+
"committed": 0,
6933+
"minimumFreeSpace": 104857600,
6934+
"reserved": 12565822
6935+
},
6936+
{
6937+
"datanodeUuid": "149a1640-e600-4e98-b62d-397804059f0e",
6938+
"hostName": "ozone-datanode-3.ozone_default",
6939+
"capacity": 125645656770,
6940+
"used": 4382720,
6941+
"remaining": 77110996992,
6942+
"committed": 0,
6943+
"minimumFreeSpace": 104857600,
6944+
"reserved": 12565822
6945+
},
6946+
{
6947+
"datanodeUuid": "17e2562a-dae8-416f-a749-7d4e8a0a781e",
6948+
"hostName": "ozone-datanode-4.ozone_default",
6949+
"capacity": 125645656770,
6950+
"used": 4382720,
6951+
"remaining": 77110996992,
6952+
"committed": 0,
6953+
"minimumFreeSpace": 104857600,
6954+
"reserved": 12565822
6955+
}
6956+
]
6957+
},
6958+
"pendingDeletionDN": {
6959+
"status": "FINISHED",
6960+
"totalPendingDeletionSize": 12203,
6961+
"pendingDeletionPerDataNode": [
6962+
{
6963+
"hostName": "ozone-datanode-5.ozone_default",
6964+
"datanodeUuid": "953b91f4-c03a-45d8-9fbe-142887531cb1",
6965+
"pendingBlockSize": 1200
6966+
},
6967+
{
6968+
"hostName": "ozone-datanode-3.ozone_default",
6969+
"datanodeUuid": "149a1640-e600-4e98-b62d-397804059f0e",
6970+
"pendingBlockSize": 803
6971+
},
6972+
{
6973+
"hostName": "ozone-datanode-4.ozone_default",
6974+
"datanodeUuid": "17e2562a-dae8-416f-a749-7d4e8a0a781e",
6975+
"pendingBlockSize": 1240
6976+
},
6977+
{
6978+
"hostName": "ozone-datanode-7.ozone_default",
6979+
"datanodeUuid": "1bf314dc-3eba-4774-9dbc-6d957cc7670b",
6980+
"pendingBlockSize": 2200
6981+
},
69026982
{
6903-
"datanodeUuid": "ec4d37e4-04d7-4d1b-b0bb-aafa05d86b3c",
6904-
"hostName": "ozone-datanode-2.ozone_default",
6905-
"capacity": 125645656770,
6906-
"used": 4382720,
6907-
"remaining": 104675287040,
6908-
"committed": 0,
6909-
"pendingDeletion": 0,
6910-
"minimumFreeSpace": 125645664
6911-
},
6912-
{
6913-
"datanodeUuid": "ed34b38a-88b0-4dde-8ef6-6d158339064e",
6914-
"hostName": "ozone-datanode-4.ozone_default",
6915-
"capacity": 125645656770,
6916-
"used": 4382720,
6917-
"remaining": 104675291136,
6918-
"committed": 0,
6919-
"pendingDeletion": 0,
6920-
"minimumFreeSpace": 125645664
6921-
},
6922-
{
6923-
"datanodeUuid": "49d5a41b-ffb4-426f-bd46-93d9263296ef",
6924-
"hostName": "ozone-datanode-5.ozone_default",
6925-
"capacity": 125645656770,
6926-
"used": 4382720,
6927-
"remaining": 104675291136,
6928-
"committed": 0,
6929-
"pendingDeletion": 0,
6930-
"minimumFreeSpace": 125645664
6931-
},
6932-
{
6933-
"datanodeUuid": "08b69287-6fd0-42e0-b944-f5d527607ac9",
6934-
"hostName": "ozone-datanode-1.ozone_default",
6935-
"capacity": 125645656770,
6936-
"used": 4382720,
6937-
"remaining": 104675282944,
6938-
"committed": 0,
6939-
"pendingDeletion": 0,
6940-
"minimumFreeSpace": 125645664
6941-
},
6942-
{
6943-
"datanodeUuid": "3be0d2dc-b068-46c9-a6df-ff086e94fec5",
6944-
"hostName": "ozone-datanode-3.ozone_default",
6945-
"capacity": 125645656770,
6946-
"used": 4382720,
6947-
"remaining": 104675282944,
6948-
"committed": 0,
6949-
"pendingDeletion": 0,
6950-
"minimumFreeSpace": 125645664
6983+
"hostName": "ozone-datanode-1.ozone_default",
6984+
"datanodeUuid": "d3ade292-6ec1-47b2-bd9e-045c1acc2c29",
6985+
"pendingBlockSize": 3730
6986+
},
6987+
{
6988+
"hostName": "ozone-datanode-2.ozone_default",
6989+
"datanodeUuid": "44617070-a300-48af-a0e3-117167b008b6",
6990+
"pendingBlockSize": 300
6991+
},
6992+
{
6993+
"hostName": "ozone-datanode-6.ozone_default",
6994+
"datanodeUuid": "8adead67-85a6-4ba9-942f-cd313f1472f9",
6995+
"pendingBlockSize": 2730
69516996
}
6952-
]
6997+
],
6998+
"totalNodesQueried": 7,
6999+
"totalNodeQueriesFailed": 2
7000+
},
7001+
"pendingDeletionOM": {
7002+
"totalSize": 240430,
7003+
"pendingDirectorySize": 120040,
7004+
"pendingKeySize": 120390
7005+
},
7006+
"pendingDeletionSCM": {
7007+
"totalBlocksize": 24030,
7008+
"totalReplicatedBlockSize": 120040,
7009+
"totalBlocksCount": 120390
69537010
}
69547011
}

hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/routes.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,8 @@
5555
"/datanodes/decommission/info/datanode?uuid=*": "/DatanodesDecommissionInfo",
5656
"/datanodes/remove": "/datanodesRemove",
5757

58-
"/storageDistribution": "/utilization"
58+
"/storageDistribution": "/utilization",
59+
"/pendingDeletion?component=dn": "/pendingDeletionDN",
60+
"/pendingDeletion?component=om": "/pendingDeletionOM",
61+
"/pendingDeletion?component=scm": "/pendingDeletionSCM"
5962
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
import { UtilizationResponse, SCMPendingDeletion, OMPendingDeletion, DNPendingDeletion } from "@/v2/types/capacity.types";
20+
21+
export const DEFAULT_CAPACITY_UTILIZATION: UtilizationResponse = {
22+
globalStorage: {
23+
totalUsedSpace: 0,
24+
totalFreeSpace: 0,
25+
totalCapacity: 0
26+
},
27+
globalNamespace: {
28+
totalUsedSpace: 0,
29+
totalKeys: 0
30+
},
31+
usedSpaceBreakdown: {
32+
openKeyBytes: 0,
33+
committedKeyBytes: 0,
34+
preAllocatedContainerBytes: 0
35+
},
36+
dataNodeUsage: []
37+
};
38+
39+
export const DEFAULT_SCM_PENDING_DELETION: SCMPendingDeletion = {
40+
totalBlocksize: 0,
41+
totalReplicatedBlockSize: 0,
42+
totalBlocksCount: 0
43+
};
44+
45+
export const DEFAULT_OM_PENDING_DELETION: OMPendingDeletion = {
46+
totalSize: 0,
47+
pendingDirectorySize: 0,
48+
pendingKeySize: 0
49+
};
50+
51+
export const DEFAULT_DN_PENDING_DELETION: DNPendingDeletion = {
52+
status: "NOT_STARTED",
53+
totalPendingDeletionSize: 0,
54+
pendingDeletionPerDataNode: [{
55+
hostName: 'unknown-host',
56+
datanodeUuid: 'unknown-uuid',
57+
pendingBlockSize: 0
58+
}],
59+
totalNodesQueried: 0,
60+
totalNodeQueriesFailed: 0
61+
};

hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/capacity/capacity.less

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
flex-direction: column;
4141
gap: 16px;
4242
margin: 16px 0px auto 0px;
43-
height: 15em;
43+
height: 11em;
4444
}
4545

4646
.cluster-card-data-container {
@@ -63,16 +63,24 @@
6363
flex-direction: column;
6464
justify-content: flex-start;
6565
align-items: stretch;
66-
padding: 16px;
6766
border-radius: 3px;
6867

6968
.data-detail-breakdown-container {
7069
justify-content: flex-end;
7170
flex-wrap: wrap;
72-
.data-detail-breakdown-statistic {
73-
flex: 0 0 50%;
74-
max-width: 25%;
75-
text-align: right;
71+
.data-detail-breakdown-item {
72+
margin-left: 20px;
73+
.data-detail-breakdown-label {
74+
font-size: 12px;
75+
color: #5a656d;
76+
margin-right: 4px;
77+
}
78+
79+
.data-detail-breakdown-value {
80+
font-size: 14px;
81+
font-weight: 500;
82+
}
83+
7684
}
7785
}
7886
}

0 commit comments

Comments
 (0)