From 46350dc64b0e998d732250ff70ce11096d680aa8 Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Tue, 20 Jun 2023 18:01:21 +0530 Subject: [PATCH 01/15] Recon UI:OM DB Insights Changes --- .../webapps/recon/ozone-recon-web/api/db.json | 2954 ++++++++++++++++- .../recon/ozone-recon-web/api/routes.json | 32 +- .../src/components/navBar/navBar.less | 8 + .../src/components/navBar/navBar.tsx | 22 +- .../src/constants/breadcrumbs.constants.tsx | 3 +- .../recon/ozone-recon-web/src/routes.tsx | 6 + .../src/views/insights/om/om.less | 11 + .../src/views/insights/om/om.tsx | 941 ++++++ 8 files changed, 3855 insertions(+), 122 deletions(-) create mode 100644 hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.less create mode 100644 hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx 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 7d73479a3524..15c5510e1d85 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 @@ -983,6 +983,234 @@ "keys": { "totalCount": 534, "keys": [ + { + "Volume": "vol-0-20448", + "Bucket": "bucket-0-12811", + "Key": "key-0-77505", + "DataSize": 10240, + "Versions": [ + 0 + ], + "Blocks": { + "0": [ + { + "containerID": 1, + "localID": 103206297511460860 + } + ] + }, + "CreationTime": "2019-11-26T21:18:43.688Z", + "ModificationTime": "2019-11-26T21:18:46.062Z" + }, + { + "Volume": "vol-0-20448", + "Bucket": "bucket-0-12811", + "Key": "key-21-64511", + "DataSize": 5692407, + "Versions": [ + 0 + ], + "Blocks": { + "0": [ + { + "containerID": 1, + "localID": 103206299949795380 + } + ] + }, + "CreationTime": "2019-11-26T21:19:20.855Z", + "ModificationTime": "2019-11-26T21:19:20.991Z" + }, + { + "Volume": "vol-0-20448", + "Bucket": "bucket-0-12811", + "Key": "key-22-69104", + "DataSize": 189407, + "Versions": [ + 0 + ], + "Blocks": { + "0": [ + { + "containerID": 1, + "localID": 103206300033091740 + } + ] + }, + "CreationTime": "2019-11-26T21:19:22.126Z", + "ModificationTime": "2019-11-26T21:19:22.251Z" + }, + { + "Volume": "vol-0-20448", + "Bucket": "bucket-0-12811", + "Key": "key-0-77505", + "DataSize": 10240, + "Versions": [ + 0 + ], + "Blocks": { + "0": [ + { + "containerID": 1, + "localID": 103206297511460860 + } + ] + }, + "CreationTime": "2019-11-26T21:18:43.688Z", + "ModificationTime": "2019-11-26T21:18:46.062Z" + }, + { + "Volume": "vol-0-20448", + "Bucket": "bucket-0-12811", + "Key": "key-21-64511", + "DataSize": 5692407, + "Versions": [ + 0 + ], + "Blocks": { + "0": [ + { + "containerID": 1, + "localID": 103206299949795380 + } + ] + }, + "CreationTime": "2019-11-26T21:19:20.855Z", + "ModificationTime": "2019-11-26T21:19:20.991Z" + }, + { + "Volume": "vol-0-20448", + "Bucket": "bucket-0-12811", + "Key": "key-22-69104", + "DataSize": 189407, + "Versions": [ + 0 + ], + "Blocks": { + "0": [ + { + "containerID": 1, + "localID": 103206300033091740 + } + ] + }, + "CreationTime": "2019-11-26T21:19:22.126Z", + "ModificationTime": "2019-11-26T21:19:22.251Z" + }, + { + "Volume": "vol-0-20448", + "Bucket": "bucket-0-12811", + "Key": "key-0-77505", + "DataSize": 10240, + "Versions": [ + 0 + ], + "Blocks": { + "0": [ + { + "containerID": 1, + "localID": 103206297511460860 + } + ] + }, + "CreationTime": "2019-11-26T21:18:43.688Z", + "ModificationTime": "2019-11-26T21:18:46.062Z" + }, + { + "Volume": "vol-0-20448", + "Bucket": "bucket-0-12811", + "Key": "key-21-64511", + "DataSize": 5692407, + "Versions": [ + 0 + ], + "Blocks": { + "0": [ + { + "containerID": 1, + "localID": 103206299949795380 + } + ] + }, + "CreationTime": "2019-11-26T21:19:20.855Z", + "ModificationTime": "2019-11-26T21:19:20.991Z" + }, + { + "Volume": "vol-0-20448", + "Bucket": "bucket-0-12811", + "Key": "key-22-69104", + "DataSize": 189407, + "Versions": [ + 0 + ], + "Blocks": { + "0": [ + { + "containerID": 1, + "localID": 103206300033091740 + } + ] + }, + "CreationTime": "2019-11-26T21:19:22.126Z", + "ModificationTime": "2019-11-26T21:19:22.251Z" + }, + { + "Volume": "vol-0-20448", + "Bucket": "bucket-0-12811", + "Key": "key-0-77505", + "DataSize": 10240, + "Versions": [ + 0 + ], + "Blocks": { + "0": [ + { + "containerID": 1, + "localID": 103206297511460860 + } + ] + }, + "CreationTime": "2019-11-26T21:18:43.688Z", + "ModificationTime": "2019-11-26T21:18:46.062Z" + }, + { + "Volume": "vol-0-20448", + "Bucket": "bucket-0-12811", + "Key": "key-21-64511", + "DataSize": 5692407, + "Versions": [ + 0 + ], + "Blocks": { + "0": [ + { + "containerID": 1, + "localID": 103206299949795380 + } + ] + }, + "CreationTime": "2019-11-26T21:19:20.855Z", + "ModificationTime": "2019-11-26T21:19:20.991Z" + }, + { + "Volume": "vol-0-20448", + "Bucket": "bucket-0-12811", + "Key": "key-22-69104", + "DataSize": 189407, + "Versions": [ + 0 + ], + "Blocks": { + "0": [ + { + "containerID": 1, + "localID": 103206300033091740 + } + ] + }, + "CreationTime": "2019-11-26T21:19:22.126Z", + "ModificationTime": "2019-11-26T21:19:22.251Z" + }, { "Volume": "vol-0-20448", "Bucket": "bucket-0-12811", @@ -1285,95 +1513,47 @@ "sizeDirectKey": 0 }, "metadata": { - "path": "", - "type": "DUMMY_TYPE", - "countStats": { - "numVolume": 100, - "numBucket": 200, - "numDir": 400, - "numKey": 80 - }, - "objectInfo": { - "versioningEnabled": false, - "metadata": { - + "path": "", + "type": "DUMMY_TYPE", + "countStats": { + "numVolume": 100, + "numBucket": 200, + "numDir": 400, + "numKey": 80 }, - "name": "fso-bucket", - "fileName": "file1", - "file": false, - "quotaInBytes": 1000000000, - "quotaInNamespace": 2000000000, - "usedNamespace": 10, - "creationTime": 1673415921920, - "modificationTime": 1673415921920, - "acls": [ - { - "type": "USER", - "name": "hadoop", - "aclScope": "ACCESS", - "aclList": [ - "ALL" - ] - }, - { - "type": "GROUP", - "name": "hadoop", - "aclScope": "ACCESS", - "aclList": [ - "ALL" - ] - } - ], - "keyLocationVersions": [ - { - "version": 0, - "locationList": [ - { - "blockID": { - "containerBlockID": { - "containerID": 1, - "localID": 111677748019200007 - }, - "blockCommitSequenceId": 18, - "containerID": 1, - "localID": 111677748019200007 - }, - "length": 3879, - "offset": 0, - "token": null, - "createVersion": 0, - "pipeline": null, - "partNumber": 0, - "containerID": 1, - "localID": 111677748019200007, - "blockCommitSequenceId": 18 - } - ], - "multipartKey": false, - "blocksLatestVersionOnly": [ - { - "blockID": { - "containerBlockID": { - "containerID": 1, - "localID": 111677748019200007 - }, - "blockCommitSequenceId": 18, - "containerID": 1, - "localID": 111677748019200007 - }, - "length": 3879, - "offset": 0, - "token": null, - "createVersion": 0, - "pipeline": null, - "partNumber": 0, - "containerID": 1, - "localID": 111677748019200007, - "blockCommitSequenceId": 18 - } - ], - "locationLists": [ - [ + "objectInfo": { + "versioningEnabled": false, + "metadata": {}, + "name": "fso-bucket", + "fileName": "file1", + "file": false, + "quotaInBytes": 1000000000, + "quotaInNamespace": 2000000000, + "usedNamespace": 10, + "creationTime": 1673415921920, + "modificationTime": 1673415921920, + "acls": [ + { + "type": "USER", + "name": "hadoop", + "aclScope": "ACCESS", + "aclList": [ + "ALL" + ] + }, + { + "type": "GROUP", + "name": "hadoop", + "aclScope": "ACCESS", + "aclList": [ + "ALL" + ] + } + ], + "keyLocationVersions": [ + { + "version": 0, + "locationList": [ { "blockID": { "containerBlockID": { @@ -1394,32 +1574,78 @@ "localID": 111677748019200007, "blockCommitSequenceId": 18 } - ] - ], - "locationListCount": 1 - } - ], - "volumeName": "volume1", - "bucketName": "fso-bucket", - "keyName": "file1", - "dataSize": 18513, - "storageType": "DISK", - "versioning": false, - "usedBytes": null, - "encryptionInfo": null, - "replicationConfig": { - "replicationFactor": "THREE", - "requiredNodes": 3, - "replicationType": "RATIS" + ], + "multipartKey": false, + "blocksLatestVersionOnly": [ + { + "blockID": { + "containerBlockID": { + "containerID": 1, + "localID": 111677748019200007 + }, + "blockCommitSequenceId": 18, + "containerID": 1, + "localID": 111677748019200007 + }, + "length": 3879, + "offset": 0, + "token": null, + "createVersion": 0, + "pipeline": null, + "partNumber": 0, + "containerID": 1, + "localID": 111677748019200007, + "blockCommitSequenceId": 18 + } + ], + "locationLists": [ + [ + { + "blockID": { + "containerBlockID": { + "containerID": 1, + "localID": 111677748019200007 + }, + "blockCommitSequenceId": 18, + "containerID": 1, + "localID": 111677748019200007 + }, + "length": 3879, + "offset": 0, + "token": null, + "createVersion": 0, + "pipeline": null, + "partNumber": 0, + "containerID": 1, + "localID": 111677748019200007, + "blockCommitSequenceId": 18 + } + ] + ], + "locationListCount": 1 + } + ], + "volumeName": "volume1", + "bucketName": "fso-bucket", + "keyName": "file1", + "dataSize": 18513, + "storageType": "DISK", + "versioning": false, + "usedBytes": null, + "encryptionInfo": null, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "encInfo": null, + "sourceVolume": null, + "sourceBucket": null, + "bucketLayout": "FILE_SYSTEM_OPTIMIZED", + "owner": "hadoop", + "volume": "vol1" }, - "encInfo": null, - "sourceVolume": null, - "sourceBucket": null, - "bucketLayout": "FILE_SYSTEM_OPTIMIZED", - "owner": "hadoop", - "volume": "vol1" - }, - "status": "OK" + "status": "OK" }, "quota": { "allowed": 1000000000, @@ -1603,7 +1829,7 @@ "lastUpdatedSeqNumber": 0 } ], - "unhealthyContainers":{ + "unhealthyContainers": { "missingCount": 3, "underReplicatedCount": 2, "overReplicatedCount": 2, @@ -2413,7 +2639,7 @@ "minAccessCount": 1, "maxAccessCount": 39202 }, - "keyHeatmap": { + "keyHeatmap": { "label": "root", "children": [ { @@ -3182,5 +3408,2503 @@ }, "disabledFeatures": [ "FLAG1" + ], + "omMismatch":{ + "lastKey":11, + "containerDiscrepancyInfo": [ + { + "containerId": 1, + "numberOfKeys": 1, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + }, + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-613724nn" + }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + + ], + "existsAt": "SCM" + }, + { + "containerId": 2, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 3, + "numberOfKeys": 3, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 4, + "numberOfKeys": 4, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 5, + "numberOfKeys": 5, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 6, + "numberOfKeys": 6, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 7, + "numberOfKeys": 7, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 8, + "numberOfKeys": 8, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 9, + "numberOfKeys": 9, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 10, + "numberOfKeys": 10, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 11, + "numberOfKeys": 11, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 12, + "numberOfKeys": 12, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + } + ] + }, + "omMismatch1":{ + "lastKey":21, + "containerDiscrepancyInfo": [ + { + "containerId": 11, + "numberOfKeys": 1, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + }, + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-613724nn" + }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + + ], + "existsAt": "SCM" + }, + { + "containerId": 12, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 13, + "numberOfKeys": 3, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 14, + "numberOfKeys": 4, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 15, + "numberOfKeys": 5, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 16, + "numberOfKeys": 6, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 17, + "numberOfKeys": 7, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 18, + "numberOfKeys": 8, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 19, + "numberOfKeys": 9, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 20, + "numberOfKeys": 10, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 21, + "numberOfKeys": 11, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 22, + "numberOfKeys": 12, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + } + ] + }, + "omMismatch2":{ + "lastKey": null, + "containerDiscrepancyInfo": [] + }, + "scmMismatch":{ + "lastKey":11, + "containerDiscrepancyInfo": [ + { + "containerId": 1, + "numberOfKeys": 1, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + }, + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-613724nn" + }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + + ], + "existsAt": "OM" + }, + { + "containerId": 2, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 3, + "numberOfKeys": 3, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 4, + "numberOfKeys": 4, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 5, + "numberOfKeys": 5, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 6, + "numberOfKeys": 6, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 7, + "numberOfKeys": 7, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 8, + "numberOfKeys": 8, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 9, + "numberOfKeys": 9, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 10, + "numberOfKeys": 10, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 11, + "numberOfKeys": 11, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 12, + "numberOfKeys": 12, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + } ] + }, + "scmMismatch1":{ + "lastKey":21, + "containerDiscrepancyInfo": [ + { + "containerId": 11, + "numberOfKeys": 1, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + }, + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-613724nn" + }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + + ], + "existsAt": "OM" + }, + { + "containerId": 12, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 13, + "numberOfKeys": 3, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 14, + "numberOfKeys": 4, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 15, + "numberOfKeys": 5, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 16, + "numberOfKeys": 6, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 17, + "numberOfKeys": 7, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 18, + "numberOfKeys": 8, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 19, + "numberOfKeys": 9, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 20, + "numberOfKeys": 10, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + } + ] + }, + "scmMismatch2":{ + "lastKey": null, + "containerDiscrepancyInfo": [] + }, + "nonFSO": { + "lastKey": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2411/1105696238501917", + "nonFSO": [ + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/01/110569623850191713", + "path": "nonfso 1", + "inStateSince": 1686156886632, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2439/110569623850191713", + "path": "nonfso 2", + "inStateSince": 1686156886632, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + } + ], + "status": "OK" + }, + "nonFSO1": { + "lastKey": "1/-9223372036854775552/-9223372036854775040/-9223372036852420095/2421/1105696238501917", + "nonFSO": [ + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2440/110569623850191713", + "path": "nonfso 11", + "inStateSince": 1686156886632, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2441/110569623850191713", + "path": "nonfso 12", + "inStateSince": 1686156886632, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + } + ], + "status": "OK" + }, + "nonFSO2": { + "lastKey": "", + "nonFSO": [] + }, + "fso": { + "lastKey": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2411/110569623850191713", + "fso": [ + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2401/110569623850191713", + "path": "1", + "inStateSince": 1686156886632, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2402/110569623850191713", + "path": "2", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + + }, + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2403/110569623850191713", + "path": "2", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + + }, + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2404/110569623850191713", + "path": "2", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2405/110569623850191713", + "path": "2", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + + }, + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2406/110569623850191713", + "path": "2", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + + }, + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2407/110569623850191713", + "path": "2", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + + }, + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2408/110569623850191713", + "path": "2", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + + }, + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2409/110569623850191713", + "path": "2", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + + }, + { + "key": "fso 10", + "path": "2", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + + }, + { + "key": "fso 11", + "path": "2", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + + }, + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2412/110569623850191713", + "path": "2", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + + } + ], + "status": "OK" + }, + "fso1": { + "lastKey": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2421/110569623850191713", + "fso": [ + { + "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2411/110569623850191713", + "path": "11", + "inStateSince": 1686156886632, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 12", + "path": "12", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 13", + "path": "13", + "inStateSince": 1686156886632, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 14", + "path": "14", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 15", + "path": "15", + "inStateSince": 1686156886632, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 16 key", + "path": "16", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 17 key", + "path": "17", + "inStateSince": 1686156886632, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 18 key", + "path": "18", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 19 key", + "path": "19", + "inStateSince": 1686156886632, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 20 key", + "path": "20", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 21", + "path": "21", + "inStateSince": 1686156886632, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 22", + "path": "22", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 23", + "path": "23", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 24", + "path": "24", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 25", + "path": "25", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 26", + "path": "26", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 27", + "path": "27", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 28", + "path": "28", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 29", + "path": "29", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 30", + "path": "30", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 31", + "path": "31", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 32", + "path": "32", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + }, + { + "key": "fso 33", + "path": "33", + "inStateSince": 1686156887186, + "size": 268435456, + "replicatedSize": 268435456, + "replicationInfo": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + } + } + ], + "status": "OK" + }, + "fso2": { + "lastKey": "", + "fso": [] + }, + "keydeletePending":{ + "keysSummary": { + + }, + "lastKey": "/volume/bucket1/rcmeevblsf/106/-9223372036843950335", + "replicatedDataSize": 300000000, + "unreplicatedDataSize": 100000000, + "deletedKeyInfo": [ + { + "omKeyInfoList": [ + { + "metadata": { + + }, + "objectID": -9223372036844470271, + "updateID": 40429, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "rcmeevblsf/0", + "dataSize": 10000000, + "creationTime": 1687189663661, + "modificationTime": 1687189672598, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "0", + "file": false, + "path": "-9223372036844472575/0", + "hsync": false, + "replicatedSize": 30000000, + "fileEncryptionInfo": null, + "objectInfo": "OMKeyInfo{volume='volume', bucket='bucket1', key='rcmeevblsf/0', dataSize='10000000', creationTime='1687189663661', objectID='-9223372036844470271', parentID='-9223372036844472575', replication='RATIS/THREE', fileChecksum='null}", + "updateIDset": true + } + ] + }, + { + "omKeyInfoList": [ + { + "metadata": { + + }, + "objectID": -9223372036844470015, + "updateID": 40407, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "rcmeevblsf/1", + "dataSize": 10000000, + "creationTime": 1687189663664, + "modificationTime": 1687189671884, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "1", + "file": false, + "path": "-9223372036844472575/1", + "hsync": false, + "replicatedSize": 30000000, + "fileEncryptionInfo": null, + "objectInfo": "OMKeyInfo{volume='volume', bucket='bucket1', key='rcmeevblsf/1', dataSize='10000000', creationTime='1687189663664', objectID='-9223372036844470015', parentID='-9223372036844472575', replication='RATIS/THREE', fileChecksum='null}", + "updateIDset": true + } + ] + }, + { + "omKeyInfoList": [ + { + "metadata": { + + }, + "objectID": -9223372036844432639, + "updateID": 40601, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "rcmeevblsf/10", + "dataSize": 10000000, + "creationTime": 1687189671823, + "modificationTime": 1687189676084, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "10", + "file": false, + "path": "-9223372036844472575/10", + "hsync": false, + "replicatedSize": 30000000 + } + ] + }, + { + "omKeyInfoList": [ + { + "metadata": { + + }, + "objectID": -9223372036843970815, + "updateID": 42403, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "rcmeevblsf/100", + "dataSize": 10000000, + "creationTime": 1687189713476, + "modificationTime": 1687189717756, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "100", + "file": false, + "path": "-9223372036844472575/100" + } + ] + }, + { + "omKeyInfoList": [ + { + "metadata": { + + }, + "objectID": -9223372036843964159, + "updateID": 42443, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "rcmeevblsf/101", + "dataSize": 10000000, + "creationTime": 1687189714437, + "modificationTime": 1687189719458, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "101", + "file": false, + "path": "-9223372036844472575/101" + } + ] + }, + { + "omKeyInfoList": [ + { + "metadata": { + + }, + "objectID": -9223372036843961087, + "updateID": 42450, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "rcmeevblsf/102", + "dataSize": 10000000, + "creationTime": 1687189714558, + "modificationTime": 1687189719533, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "102", + "file": false, + "path": "-9223372036844472575/102", + "hsync": false, + "replicatedSize": 30000000, + "fileEncryptionInfo": null, + "objectInfo": "OMKeyInfo{volume='volume', bucket='bucket1', key='rcmeevblsf/102', dataSize='10000000', creationTime='1687189714558', objectID='-9223372036843961087', parentID='-9223372036844472575', replication='RATIS/THREE', fileChecksum='null}", + "updateIDset": true + } + ] + }, + { + "omKeyInfoList": [ + { + "metadata": { + + }, + "objectID": -9223372036843959807, + "updateID": 42449, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "rcmeevblsf/103", + "dataSize": 10000000, + "creationTime": 1687189714594, + "modificationTime": 1687189719533, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "103", + "file": false, + "path": "-9223372036844472575/103", + "hsync": false, + "replicatedSize": 30000000, + "fileEncryptionInfo": null, + "objectInfo": "OMKeyInfo{volume='volume', bucket='bucket1', key='rcmeevblsf/103', dataSize='10000000', creationTime='1687189714594', objectID='-9223372036843959807', parentID='-9223372036844472575', replication='RATIS/THREE', fileChecksum='null}", + "updateIDset": true + } + ] + }, + { + "omKeyInfoList": [ + { + "metadata": { + + }, + "objectID": -9223372036843953919, + "updateID": 42467, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "rcmeevblsf/104", + "dataSize": 10000000, + "creationTime": 1687189715040, + "modificationTime": 1687189720085, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "104", + "file": false, + "path": "-9223372036844472575/104", + "hsync": false, + "replicatedSize": 30000000, + "fileEncryptionInfo": null, + "objectInfo": "OMKeyInfo{volume='volume', bucket='bucket1', key='rcmeevblsf/104', dataSize='10000000', creationTime='1687189715040', objectID='-9223372036843953919', parentID='-9223372036844472575', replication='RATIS/THREE', fileChecksum='null}", + "updateIDset": true + } + ] + }, + { + "omKeyInfoList": [ + { + "metadata": { + + }, + "objectID": -9223372036843951359, + "updateID": 42483, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "rcmeevblsf/105", + "dataSize": 10000000, + "creationTime": 1687189715391, + "modificationTime": 1687189720373, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "105", + "file": false, + "path": "-9223372036844472575/105", + "hsync": false, + "replicatedSize": 30000000, + "fileEncryptionInfo": null, + "objectInfo": "OMKeyInfo{volume='volume', bucket='bucket1', key='rcmeevblsf/105', dataSize='10000000', creationTime='1687189715391', objectID='-9223372036843951359', parentID='-9223372036844472575', replication='RATIS/THREE', fileChecksum='null}", + "updateIDset": true + } + ] + }, + { + "omKeyInfoList": [ + { + "metadata": { + + }, + "objectID": -9223372036843950335, + "updateID": 42478, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "rcmeevblsf/106", + "dataSize": 10000000, + "creationTime": 1687189715413, + "modificationTime": 1687189720247, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "106", + "file": false, + "path": "-9223372036844472575/106", + "hsync": false, + "replicatedSize": 30000000, + "fileEncryptionInfo": null, + "objectInfo": "OMKeyInfo{volume='volume', bucket='bucket1', key='rcmeevblsf/106', dataSize='10000000', creationTime='1687189715413', objectID='-9223372036843950335', parentID='-9223372036844472575', replication='RATIS/THREE', fileChecksum='null}", + "updateIDset": true + } + ] + } + ], + "status": "OK" + }, + "keydeletePending1": { + "lastKey":"/-9223372036854775552/-9223372036854775040/-9223372036852420095/2421/110569623850191", + "replicatedTotal": -1530804718628866300, + "unreplicatedTotal": -1530804718628866300, + "deletedKeyInfo": [ + { + "omKeyInfoList": [ + { + "metadata": {}, + "objectID": 0, + "updateID": 0, + "parentObjectID": 0, + "volumeName": "sampleVol", + "bucketName": "bucketOne", + "keyName": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2411/110569623850191", + "dataSize": -1530804718628866300, + "keyLocationVersions": [], + "creationTime": 0, + "modificationTime": 0, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "STANDALONE" + }, + "fileChecksum": null, + "fileName": "key_22", + "acls": [], + "path": "0/key_one", + "file": false, + "latestVersionLocations": null, + "replicatedSize": -1530804718628866300, + "fileEncryptionInfo": null, + "updateIDset": false + }, + { + "metadata": {}, + "objectID": 0, + "updateID": 0, + "parentObjectID": 0, + "volumeName": "sampleVol", + "bucketName": "bucketOne", + "keyName": "key_22", + "dataSize": -1530804718628866300, + "keyLocationVersions": [], + "creationTime": 0, + "modificationTime": 0, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "STANDALONE" + }, + "fileChecksum": null, + "fileName": "key_two", + "acls": [], + "path": "0/key_two", + "file": false, + "latestVersionLocations": null, + "replicatedSize": -1530804718628866300, + "fileEncryptionInfo": null, + "updateIDset": false + } + ] + } + ], + "status": "OK" + }, + "keydeletePending2": { + "lastKey":"31", + "replicatedTotal": -1530804718628866300, + "unreplicatedTotal": -1530804718628866300, + "deletedKeyInfo": [ + { + "omKeyInfoList": [ + { + "metadata": {}, + "objectID": 0, + "updateID": 0, + "parentObjectID": 0, + "volumeName": "sampleVol", + "bucketName": "bucketOne", + "keyName": "key_31", + "dataSize": -1530804718628866300, + "keyLocationVersions": [], + "creationTime": 0, + "modificationTime": 0, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "STANDALONE" + }, + "fileChecksum": null, + "fileName": "key_one", + "acls": [], + "path": "0/key_one", + "file": false, + "latestVersionLocations": null, + "replicatedSize": -1530804718628866300, + "fileEncryptionInfo": null, + "updateIDset": false + }, + { + "metadata": {}, + "objectID": 0, + "updateID": 0, + "parentObjectID": 0, + "volumeName": "sampleVol", + "bucketName": "bucketOne", + "keyName": "key_32", + "dataSize": -1530804718628866300, + "keyLocationVersions": [], + "creationTime": 0, + "modificationTime": 0, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "STANDALONE" + }, + "fileChecksum": null, + "fileName": "key_two", + "acls": [], + "path": "0/key_two", + "file": false, + "latestVersionLocations": null, + "replicatedSize": -1530804718628866300, + "fileEncryptionInfo": null, + "updateIDset": false + }, + { + "metadata": {}, + "objectID": 0, + "updateID": 0, + "parentObjectID": 0, + "volumeName": "sampleVol", + "bucketName": "bucketOne", + "keyName": "key_33", + "dataSize": -1530804718628866300, + "keyLocationVersions": [], + "creationTime": 0, + "modificationTime": 0, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "STANDALONE" + }, + "fileChecksum": null, + "fileName": "key_one", + "acls": [], + "path": "0/key_one", + "file": false, + "latestVersionLocations": null, + "replicatedSize": -1530804718628866300, + "fileEncryptionInfo": null, + "updateIDset": false + }, + { + "metadata": {}, + "objectID": 0, + "updateID": 0, + "parentObjectID": 0, + "volumeName": "sampleVol", + "bucketName": "bucketOne", + "keyName": "key_34", + "dataSize": -1530804718628866300, + "keyLocationVersions": [], + "creationTime": 0, + "modificationTime": 0, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "STANDALONE" + }, + "fileChecksum": null, + "fileName": "key_two", + "acls": [], + "path": "0/key_two", + "file": false, + "latestVersionLocations": null, + "replicatedSize": -1530804718628866300, + "fileEncryptionInfo": null, + "updateIDset": false + } + ] + } + ], + "status": "OK" + }, + "keydeletePending3": { + "lastKey":"", + "deletedKeyInfo": [] + }, + "deleted": { + "lastKey": "11", + "containers": [ + { + "containerId": 1, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 2, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 3, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 4, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 5, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 6, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 7, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 8, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 9, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 10, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + } + ] + }, + "deleted1": { + "lastKey": "21", + "containers": [ + { + "containerId": 11, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 12, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 13, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 14, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 15, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 16, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 17, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 18, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 19, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 20, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + } + ] + }, + "deleted2": { + "lastKey": "31", + "containers": [ + { + "containerId": 21, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 22, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 23, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 24, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 25, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 26, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 27, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 28, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 29, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 30, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + } + ] + }, + "deleted3": { + "lastKey": "41", + "containers": [ + { + "containerId": 31, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + }, + { + "containerId": 32, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ] + } + ] + }, + "deleted4": { + "lastKey": null, + "containers": [] + } } \ No newline at end of file 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 cc2a1b66cfea..c8f4f2928e52 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 @@ -28,5 +28,35 @@ "/heatmap/readaccess?startDate=*&path=*&entityType=bucket": "/bucketHeatmap", "/heatmap/readaccess?startDate=*&path=*&entityType=key": "/keyHeatmap", "/heatmap/readaccess?startDate=*&path=*&entityType=volume": "/heatmap", - "/features/disabledFeatures": "/disabledFeatures" + "/features/disabledFeatures": "/disabledFeatures", + + "/containers/mismatch?limit=*&prevKey=11&missingIn=OM" : "/omMismatch1", + "/containers/mismatch?limit=*&prevKey=21&missingIn=OM" : "/omMismatch2", + "/containers/mismatch?limit=*&prevKey=*&missingIn=OM" : "/omMismatch", + + "/containers/mismatch?limit=*&prevKey=11&missingIn=SCM" : "/scmMismatch1", + "/containers/mismatch?limit=*&prevKey=21&missingIn=SCM" : "/scmMismatch2", + "/containers/mismatch?limit=*&prevKey=*&missingIn=SCM" : "/scmMismatch", + + "/keys/open?includeFso=false&includeNonFso=true&limit=*&prevKey": "/nonFSO", + "/keys/open?includeFso=false&includeNonFso=true&limit=*&prevKey=/-9223372036854775552/-9223372036854775040/-9223372036852420095/2411/1105696238501917": "/nonFSO1", + "/keys/open?includeFso=false&includeNonFso=true&limit=*&prevKey=21": "/nonFSO2", + "/keys/open?includeFso=false&includeNonFso=true&limit=*&prevKey=31": "/nonFSO3", + + + "/keys/open?includeFso=true&includeNonFso=false&limit=*&prevKey": "/fso", + "/keys/open?includeFso=true&includeNonFso=false&limit=*&prevKey=/-9223372036854775552/-9223372036854775040/-9223372036852420095/2411/110569623850191713": "/fso1", + "/keys/open?includeFso=true&includeNonFso=false&limit=*&prevKey=/-9223372036854775552/-9223372036854775040/-9223372036852420095/2421/110569623850191713": "/fso2", + "/keys/open?includeFso=true&includeNonFso=false&limit=*&prevKey=/-9223372036854775552/-9223372036854775040/-9223372036852420095/2431/110569623850191713": "/fso3", + + "/keys/deletePending?limit=*&prevKey" : "/keydeletePending", + "/keys/deletePending?limit=*&prevKey=/volume/bucket1/rcmeevblsf/106/-9223372036843950335" : "/keydeletePending1", + "/keys/deletePending?limit=*&prevKey=/-9223372036854775552/-9223372036854775040/-9223372036852420095/2421/110569623850191" : "/keydeletePending2", + "/keys/deletePending?limit=*&prevKey=31" : "/keydeletePending3", + + "/containers/mismatch/deleted?limit=*&prevKey": "/deleted", + "/containers/mismatch/deleted?limit=*&prevKey=11": "/deleted1", + "/containers/mismatch/deleted?limit=*&prevKey=21": "/deleted2", + "/containers/mismatch/deleted?limit=*&prevKey=31": "/deleted3", + "/containers/mismatch/deleted?limit=*&prevKey=41": "/deleted4" } \ No newline at end of file diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.less b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.less index b1570b63eaec..28978baaf97e 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.less +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.less @@ -48,6 +48,14 @@ border-right: 5px solid #1DA57A; } } + .ant-menu-sub{ + background-color: #0a2542; + color: #FFF; + &::after { + border-right: 5px solid #1DA57A; + color: #FFF; + } + } } } } diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.tsx index d51afb60a471..777355dce023 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.tsx @@ -117,11 +117,23 @@ class NavBar extends React.Component { Containers - - - Insights - - + + Insights + + }> + + + Insights + + + + + OM DB Insights + + + Disk Usage diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/constants/breadcrumbs.constants.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/constants/breadcrumbs.constants.tsx index 7f6d6fd03c81..a7633fb52148 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/constants/breadcrumbs.constants.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/constants/breadcrumbs.constants.tsx @@ -27,5 +27,6 @@ export const breadcrumbNameMap: IBreadcrumbNameMap = { '/MissingContainers': 'Missing Containers', '/Insights': 'Insights', '/DiskUsage': 'Disk Usage', - '/Heatmap': 'Heatmap' + '/Heatmap': 'Heatmap', + '/Om':'Om', }; diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/routes.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/routes.tsx index fa53d24775b6..fe991e052a8a 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/routes.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/routes.tsx @@ -23,6 +23,8 @@ import {NotFound} from './views/notFound/notFound'; import {IRoute} from './types/routes.types'; import {MissingContainers} from './views/missingContainers/missingContainers'; import {Insights} from './views/insights/insights'; +import {Om} from './views/insights/om/om'; + import {DiskUsage} from './views/diskUsage/diskUsage'; import {Heatmap} from './views/heatMap/heatmap'; @@ -43,6 +45,10 @@ export const routes: IRoute[] = [ path: '/Insights', component: Insights }, + { + path: '/Om', + component: Om + }, { path: '/MissingContainers', component: MissingContainers diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.less b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.less new file mode 100644 index 000000000000..129e3619a7c6 --- /dev/null +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.less @@ -0,0 +1,11 @@ +.ant-pagination-disabled a, .ant-pagination-disabled:hover a, .ant-pagination-disabled:focus a, .ant-pagination-disabled .ant-pagination-item-link, .ant-pagination-disabled:hover .ant-pagination-item-link, .ant-pagination-disabled:focus .ant-pagination-item-link { + color: rgba(0, 0, 0, 0.65); + //border-color: #d9d9d9; + cursor: pointer !important; + } + + .ant-pagination-disabled, .ant-pagination-disabled:hover, .ant-pagination-disabled:focus { + color: rgba(0, 0, 0, 0.65); + //border-color: #d9d9d9; + cursor: pointer !important; + } \ No newline at end of file diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx new file mode 100644 index 000000000000..f4814962ac5b --- /dev/null +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -0,0 +1,941 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import axios from 'axios'; +import { Table, Tabs, Menu, Dropdown, Icon, Tooltip } from 'antd'; +import { PaginationConfig } from 'antd/lib/pagination'; +import filesize from 'filesize'; +import moment from 'moment'; +import { showDataFetchError } from 'utils/common'; +import './om.less'; +import { ColumnSearch } from 'utils/columnSearch'; +import { Link } from 'react-router-dom'; + + +const size = filesize.partial({ standard: 'iec' }); +const { TabPane } = Tabs; +interface IContainerResponse { + containerId: number; + containerState: string; + OMContainerState: string; + SCMContainerState: string; + existsAt: string; + pipelines: string[]; + numberOfKeys: number; +} + +interface IKeyLevelResponse { + path: string; + keyState: string; + inStateSince: number; + size: number; + replicatedSize: number; + unreplicatedSize: number; + replicationType: string; +} + +interface IDeleteKeyResponse { + objectID: number; + updateID: number; + parentObjectID: number; + volumeName: string; + bucketName: string; + keyName: string; + dataSize: number; + path: string; + replicatedTotal: number; + unreplicatedTotal: number; + omKeyInfoList: IDeleteKeyResponse[]; +} + +interface IContainersResponse { + containers: IContainerResponse[]; +} + +interface IKeysResponse { + entities: IKeyLevelResponse[]; +} +interface IDeleteKeysResponse { + deletedkeyinfo: IDeleteKeyResponse[]; +} + +interface IKeyResponse { + Volume: string; + Bucket: string; + Key: string; + DataSize: number; + Versions: number[]; + Blocks: object; + CreationTime: string; + ModificationTime: string; +} + +interface IContainerKeysResponse { + totalCount: number; + keys: IKeyResponse[]; +} + +const KEY_TABLE_COLUMNS = [ + { + title: 'Volume', + dataIndex: 'Volume', + key: 'Volume' + }, + { + title: 'Bucket', + dataIndex: 'Bucket', + key: 'Bucket' + }, + { + title: 'Key', + dataIndex: 'Key', + key: 'Key' + }, + { + title: 'Size', + dataIndex: 'DataSize', + key: 'DataSize', + render: (dataSize: number) =>
{size(dataSize)}
+ }, + { + title: 'Date Created', + dataIndex: 'CreationTime', + key: 'CreationTime', + render: (date: string) => moment(date).format('lll') + }, + { + title: 'Date Modified', + dataIndex: 'ModificationTime', + key: 'ModificationTime', + render: (date: string) => moment(date).format('lll') + } +]; + +const CONTAINER_TAB_COLUMNS = [ + { + title: 'Container ID', + dataIndex: 'containerId', + key: 'containerId', + width: '20%', + isSearchable: true, + + }, + { + title: 'Keys', + dataIndex: 'numberOfKeys', + key: 'numberOfKeys', + sorter: (a: IContainerResponse, b: IContainerResponse) => a.numberOfKeys - b.numberOfKeys + }, + { + title: 'Pipelines', + dataIndex: 'pipelines', + key: 'pipelines', + render: (pipelines: any) => ( +
+ {pipelines && pipelines.map(pipeline => ( +
+ {pipeline.id.id} +
+ ))} +
+ ) + } +]; + +const OPEN_KEY_COLUMNS = [ + { + title: 'Path', + dataIndex: 'path', + key: 'path', + isSearchable: true, + }, + { + title: 'Amount of data', + dataIndex: 'size', + key: 'size', + }, + { + title: 'Key', + dataIndex: 'key', + key: 'key', + width: '270px' + }, + { + title: 'In state since', + dataIndex: 'inStateSince', + key: 'inStateSince', + render: (inStateSince: number) => { + return inStateSince > 0 ? moment(inStateSince).format('ll LTS') : 'NA'; + } + }, + { + title: 'Replication Factor', + dataIndex: 'replicationInfo', + key: 'replicationfactor', + render: (replicationInfo: any) => ( +
+ { +
+ {Object.values(replicationInfo)[0]} +
+ } +
+ ) + }, + { + title: 'Required Nodes', + dataIndex: 'replicationInfo', + key: 'replicationInfo', + render: (replicationInfo: any) => ( +
+ { +
+ {Object.values(replicationInfo)[1]} +
+ } +
+ ) + }, + { + title: 'Replication Type', + dataIndex: 'replicationInfo', + key: 'replicationtype', + render: (replicationInfo: any) => ( +
+ { +
+ {Object.values(replicationInfo)[2]} +
+ } +
+ ) + } + +]; + +const PENDING_TAB_COLUMNS = [ + { + title: 'Key Name', + dataIndex: 'keyName', + key: 'keyName' + }, + { + title: 'Path', + dataIndex: 'path', + key: 'path', + isSearchable: true, + }, + { + title: 'Amount of data', + dataIndex: 'dataSize', + key: 'dataSize', + } +]; + +const DELETED_TAB_COLUMNS = [ + { + title: 'Container ID', + dataIndex: 'containerId', + key: 'containerId', + width: '20%', + isSearchable: true + }, + { + title: 'Keys', + dataIndex: 'numberOfKeys', + key: 'numberOfKeys', + sorter: (a: IContainerResponse, b: IContainerResponse) => a.numberOfKeys - b.numberOfKeys + }, + { + title: 'Pipelines', + dataIndex: 'pipelines', + key: 'pipelines', + render: (pipelines: any) => ( +
+ {pipelines && pipelines.map(pipeline => ( +
+ {pipeline.id.id} +
+ ))} +
+ ) + } +]; + +interface IExpandedRow { + [key: number]: IExpandedRowState; +} + +interface IExpandedRowState { + containerId: number; + loading: boolean; + dataSource: IKeyResponse[]; + totalCount: number; +} + +interface IOmdbInsightsState { + loading: boolean; + mismatchDataSource: IContainerResponse[]; + openKeysDataSource: IKeyLevelResponse[]; + pendingDeleteKeyDataSource: any[]; + expandedRowData: IExpandedRow; + scmKeyDataSource: []; + prevKeyMismatch: number; + containerState: any; + prevKeyOpen: string; + prevKeyDeleted: number; + prevKeyDeletePending: string; + activeTab: string; + currentPage: number; + DEFAULT_LIMIT: number, + clickable: boolean; + includeFso: boolean; + includeNonFso: boolean; +} + +export class Om extends React.Component, IOmdbInsightsState> { + + constructor(props = {}) { + super(props); + this.addStateColumn(); + this.addOpenKeyColumn(); + this.state = { + loading: false, + mismatchDataSource: [], + openKeysDataSource: [], + pendingDeleteKeyDataSource: [], + scmKeyDataSource: [], + prevKeyMismatch: 0, + containerState: 'SCM', + prevKeyOpen: "", + prevKeyDeletePending: "", + prevKeyDeleted: 0, + expandedRowData: {}, + activeTab: '', + currentPage: 1, + DEFAULT_LIMIT: 10, + clickable: true, + includeFso: true, + includeNonFso: false, + }; + } + + addStateColumn = () => { + // Inside the class component to access the React internal state + const existsAtColumn = { + title: + + + , + dataIndex: 'existsAt', + key: 'existsAt', + isVisible: true, + render: (existsAt: any) => { + return ( +
+ {existsAt} +
+ + ); + } + } + if (CONTAINER_TAB_COLUMNS.length > 0 && CONTAINER_TAB_COLUMNS[CONTAINER_TAB_COLUMNS.length - 1].key !== 'existsAt') { + CONTAINER_TAB_COLUMNS.push(existsAtColumn); + } + }; + + stateMenu = () => ( + this.handleStateMenuChange(e)} + > + + OM + + + SCM + + + ); + + handleStateMenuChange = (e: any) => { + if (e.key === 'OM') { + this.setState(() => ({ + containerState: 'SCM', + prevKeyMismatch: 0, + prevKeyOpen: "", + prevKeyDeletePending: "", + prevKeyDeleted: 0, + }), () => { + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState) + }) + } + else { + //start + this.setState(() => ({ + containerState: 'OM', + prevKeyMismatch: 0, + prevKeyOpen: "", + prevKeyDeletePending: "", + prevKeyDeleted: 0, + }), () => { + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState) + }) + } + }; + + addOpenKeyColumn = () => { + // Inside the class component to access the React internal state + const typeColumn = { + title: + + + , + dataIndex: 'type', + key: 'type', + isVisible: true, + + render: (type: any) => { + return ( +
+ {type} +
+ ); + } + } + if (OPEN_KEY_COLUMNS.length > 0 && OPEN_KEY_COLUMNS[OPEN_KEY_COLUMNS.length - 1].key !== 'type') { + OPEN_KEY_COLUMNS.push(typeColumn); + } + }; + + typeMenu = () => ( + this.handleFsoNonFsoMenuChange(e)} + > + + FSO + + + Non FSO + + + ); + + handleFsoNonFsoMenuChange = (e: any) => { + if (e.key === 'fso') { + this.setState(() => ({ + includeFso: true, + includeNonFso: false, + prevKeyOpen: "", + prevKeyMismatch: 0, + prevKeyDeletePending: "", + prevKeyDeleted: 0, + }), () => { + this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); + }) + } + else { + //start + this.setState(() => ({ + includeFso: false, + includeNonFso: true, + prevKeyOpen: "", + prevKeyMismatch: 0, + prevKeyDeletePending: "", + prevKeyDeleted: 0, + }), () => { + this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen) + }) + } + }; + + componentDidMount(): void { + // Fetch mismatch containers on component mount + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState); + }; + + fetchMismatchContainers = (limit: number, prevKeyMismatch: number, containerState: any) => { + this.setState({ + loading: true, + prevKeyOpen: "", + prevKeyDeletePending: "", + prevKeyDeleted: 0, + clickable: true + }); + const mismatchEndpoint = `/api/v1/containers/mismatch?limit=${limit}&prevKey=${prevKeyMismatch}&missingIn=${containerState}` + axios.get(mismatchEndpoint).then(mismatchContainersResponse => { + const mismatchContainers: IContainerResponse[] = mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.containerDiscrepancyInfo; + + if (mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.lastKey === null) { + this.setState({ + loading: false, + clickable: false, + }) + } + else { + this.setState({ + loading: false, + prevKeyMismatch: mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.lastKey, + mismatchDataSource: mismatchContainers, + }); + } + }).catch(error => { + this.setState({ + loading: false, + }); + }); + }; + + fetchOpenKeys = (includeFso: boolean, includeNonFso: boolean, limit: number, prevKeyOpen: string) => { + this.setState({ + loading: true, + prevKeyMismatch: 0, + prevKeyDeletePending: "", + prevKeyDeleted: 0, + clickable: true + }); + + let openKeysEndpoint; + if (prevKeyOpen === "") { + openKeysEndpoint = `/api/v1/keys/open?includeFso=${includeFso}&includeNonFso=${includeNonFso}&limit=${limit}&prevKey`; + } + else { + openKeysEndpoint = `/api/v1/keys/open?includeFso=${includeFso}&includeNonFso=${includeNonFso}&limit=${limit}&prevKey=${prevKeyOpen}`; + } + + axios.get(openKeysEndpoint).then(openKeysResponse => { + const openKeys = openKeysResponse && openKeysResponse.data; + //&& (openKeysResponse.data.fso || openKeysResponse.data.nonFSO); + let allopenKeysResponse: any[] = []; + for (let key in openKeys) { + if (Array.isArray(openKeys[key])) { + openKeys[key] && openKeys[key].map((item: any) => (allopenKeysResponse.push({ ...item, type: key }))); + } + } + if (openKeysResponse && openKeysResponse.data && openKeysResponse.data.lastKey === "") { + this.setState({ + loading: false, + clickable: false, + }) + } + else { + this.setState({ + loading: false, + prevKeyOpen: openKeysResponse && openKeysResponse.data && openKeysResponse.data.lastKey, + openKeysDataSource: allopenKeysResponse, + }) + }; + }).catch(error => { + this.setState({ + loading: false, + clickable: false, + }); + }); + + }; + + fetchDeletePendingKeys = (limit: number, prevKeyDeletePending: string) => { + this.setState({ + loading: true, + prevKeyOpen: "", + prevKeyMismatch: 0, + prevKeyDeleted: 0, + clickable: true + }); + let deletePendingKeysEndpoint + if (prevKeyDeletePending === "") { + deletePendingKeysEndpoint = `/api/v1/keys/deletePending?limit=${limit}&prevKey` + } + else { + deletePendingKeysEndpoint = `/api/v1/keys/deletePending?limit=${limit}&prevKey=${prevKeyDeletePending}` + } + axios.get(deletePendingKeysEndpoint).then(deletePendingKeysResponse => { + const deletePendingKeys = deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.deletedKeyInfo; + // const deletePendingKey = deletePendingKeys && deletePendingKeys.map(item => item.omKeyInfoList); + const data = deletePendingKeys.flatMap((info) => + info.omKeyInfoList.map((item) => ({ + dataSize: item.dataSize, + keyName: item.keyName, + path: item.path + }))) + if (deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.lastKey === "") { + this.setState({ + loading: false, + clickable: false, + }) + } + else { + this.setState({ + loading: false, + prevKeyDeletePending: deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.lastKey, + pendingDeleteKeyDataSource: data + }); + } + }).catch(error => { + this.setState({ + loading: false, + clickable: false, + }); + //showDataFetchError(error.toString()); + }); + }; + + fetchDeletedSCMKeys = (limit: number, prevKeyDeleted: number) => { + this.setState({ + loading: true, + prevKeyOpen: "", + prevKeyDeletePending: "", + prevKeyMismatch: 0, + clickable: true + }); + const deletedSCMKeysEndpoint = `/api/v1/containers/mismatch/deleted?limit=${limit}&prevKey=${prevKeyDeleted}` + axios.get(deletedSCMKeysEndpoint).then(deletedSCMKeysResponse => { + const deletedSCMKeys = deletedSCMKeysResponse && deletedSCMKeysResponse.data && deletedSCMKeysResponse.data.containers; + if (deletedSCMKeysResponse && deletedSCMKeysResponse.data && deletedSCMKeysResponse.data.lastKey === null) { + this.setState({ + loading: false, + clickable: false, + }) + } + else { + this.setState({ + loading: false, + prevKeyDeleted: deletedSCMKeysResponse && deletedSCMKeysResponse.data && deletedSCMKeysResponse.data.lastKey, + scmKeyDataSource: deletedSCMKeys + + }) + }; + }).catch(error => { + //alert("No More Further Records."); + this.setState({ + loading: false, + clickable: false, + }); + //showDataFetchError(error.toString()); + }); + }; + + changeTab = (activeKey: any) => { + this.setState({ + activeTab: activeKey, + currentPage: 1, + }, () => { + if (activeKey === '2') { + this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); + } else if (activeKey === '3') { + this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeletePending); + } else if (activeKey === '4') { + this.fetchDeletedSCMKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); + } + else { + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState); + } + }) + }; + + fetchPreviousRecords = () => { + // To Call API for Page Level for each page + if (this.state.activeTab === '2') { + this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); + } else if (this.state.activeTab === '3') { + this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeletePending); + } else if (this.state.activeTab === '4') { + this.fetchDeletedSCMKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); + } + else { + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.nextKeyMismatch, this.state.containerState); + } + }; + + fetchNextRecords = () => { + // To Call API for Next Records to fetch + if (this.state.activeTab === '2') { + this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); + } else if (this.state.activeTab === '3') { + this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeletePending); + } else if (this.state.activeTab === '4') { + this.fetchDeletedSCMKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); + } + else { + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState); + } + }; + + itemRender = (_: any, type: string, originalElement: any) => { + if (type === 'prev') { + return
{ Prev}
; + } + if (type === 'next') { + return
{this.state.clickable ? {'>>'} : No More Further Records}
; + } + return originalElement; + }; + + onShowSizeChange = (current: number, pageSize: number) => { + // To Call API for Page Level for each page + let new2 = 0; + new2 = ((pageSize * current) - pageSize) + 1; + if (this.state.activeTab === '2') { + + this.setState({ + DEFAULT_LIMIT: pageSize, + currentPage: current, + }, () => { + this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, new2 === 1 ? 0 : new2); + }); + } + else if (this.state.activeTab === '3') { + this.setState({ + DEFAULT_LIMIT: pageSize, + currentPage: current + }, () => { + this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, new2 === 1 ? 0 : new2); + }) + } + else if (this.state.activeTab === '4') { + this.setState({ + DEFAULT_LIMIT: pageSize, + currentPage: current, + }, () => { + this.fetchDeletedSCMKeys(this.state.DEFAULT_LIMIT, new2 === 1 ? 0 : new2); + }) + } + else { + this.setState({ + DEFAULT_LIMIT: pageSize, + currentPage: current, + }, () => { + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, new2 === 1 ? 0 : new2, this.state.containerState); + }); + } + //current=1; + }; + + onRowExpandClick = (expanded: boolean, record: IContainerResponse) => { + if (expanded) { + this.setState(({ expandedRowData }) => { + const expandedRowState: IExpandedRowState = expandedRowData[record.containerId] ? + Object.assign({}, expandedRowData[record.containerId], { loading: true }) : + { containerId: record.containerId, loading: true, dataSource: [], totalCount: 0 }; + return { + expandedRowData: Object.assign({}, expandedRowData, { [record.containerId]: expandedRowState }) + }; + }); + axios.get(`/api/v1/containers/${record.containerId}/keys`).then(response => { + const containerKeysResponse: IContainerKeysResponse = response.data; + this.setState(({ expandedRowData }) => { + const expandedRowState: IExpandedRowState = + Object.assign({}, expandedRowData[record.containerId], + { loading: false, dataSource: containerKeysResponse.keys, totalCount: containerKeysResponse.totalCount }); + return { + expandedRowData: Object.assign({}, expandedRowData, { [record.containerId]: expandedRowState }) + }; + }); + }).catch(error => { + this.setState(({ expandedRowData }) => { + const expandedRowState: IExpandedRowState = + Object.assign({}, expandedRowData[record.containerId], + { loading: false }); + return { + expandedRowData: Object.assign({}, expandedRowData, { [record.containerId]: expandedRowState }) + }; + }); + showDataFetchError(error.toString()); + }); + } + }; + + expandedRowRender = (record: IContainerResponse) => { + const { expandedRowData } = this.state; + const containerId = record.containerId; + if (expandedRowData[containerId]) { + const containerKeys: IExpandedRowState = expandedRowData[containerId]; + const dataSource = containerKeys && containerKeys.dataSource && containerKeys.dataSource.map(record => ( + { ...record, uid: `${record.Volume}/${record.Bucket}/${record.Key}` } + )); + const paginationConfig: PaginationConfig = { + showTotal: (total: number, range) => `${range[0]}-${range[1]} of ${total} keys` + }; + return ( + + ); + } + + return
Loading...
; + }; + + searchColumn = () => { + return CONTAINER_TAB_COLUMNS.reduce((filtered, column) => { + if (column.isSearchable) { + const newColumn = { + ...column, + ...new ColumnSearch(column).getColumnSearchProps(column.dataIndex) + }; + filtered.push(newColumn); + } else { + filtered.push(column); + } + return filtered; + }, []) + }; + + searchKeyColumn = () => { + return OPEN_KEY_COLUMNS.reduce((filtered, column) => { + if (column.isSearchable) { + const newColumn = { + ...column, + ...new ColumnSearch(column).getColumnSearchProps(column.dataIndex) + }; + filtered.push(newColumn); + } else { + filtered.push(column); + } + + return filtered; + }, []) + }; + + searchPendingColumn = () => { + return PENDING_TAB_COLUMNS.reduce((filtered, column) => { + if (column.isSearchable) { + const newColumn = { + ...column, + ...new ColumnSearch(column).getColumnSearchProps(column.dataIndex) + }; + filtered.push(newColumn); + } else { + filtered.push(column); + } + + return filtered; + }, []) + }; + + searchscmKeyColumn = () => { + return DELETED_TAB_COLUMNS.reduce((filtered, column) => { + if (column.isSearchable) { + const newColumn = { + ...column, + ...new ColumnSearch(column).getColumnSearchProps(column.dataIndex) + }; + filtered.push(newColumn); + } else { + filtered.push(column); + } + + return filtered; + }, []) + }; + + render() { + const { mismatchDataSource, loading, openKeysDataSource, pendingDeleteKeyDataSource, scmKeyDataSource } = this.state; + + const paginationConfig: PaginationConfig = { + //showTotal: (total: number, range) => `${range[0]}-${range[1]} of ${total} containers`, + defaultPageSize: this.state.DEFAULT_LIMIT, + pageSizeOptions: ['10', '20', '30', '50'], + showQuickJumper: true, + showSizeChanger: true, + onShowSizeChange: this.onShowSizeChange, + //current:this.state.currentPage, + //onChange: this.onChangePagination, + itemRender: this.itemRender + }; + + const generateTable = (dataSource: any) => { + return
+ } + + const generateKeyTable = (dataSource: any) => { + return
+ } + + const generatePendingTable = (dataSource: any) => { + + return
+ } + + const generateDeletedTable = (dataSource: any) => { + return
+ } + + return ( +
+
+ OM DB Insights +
+
+ + 0) ? ` (${mismatchDataSource.length})` : ''}`}> + {generateTable(mismatchDataSource)} + + 0) ? ` (${openKeysDataSource.length})` : ''}`}> + {generateKeyTable(openKeysDataSource)} + + Keys Pending for Deletion{(pendingDeleteKeyDataSource && pendingDeleteKeyDataSource.length > 0) ? ` (${pendingDeleteKeyDataSource.length})` : ''} + + + + + }> + {generatePendingTable(pendingDeleteKeyDataSource)} + + Deleted Container Keys {(scmKeyDataSource && scmKeyDataSource.length > 0) ? ` (${scmKeyDataSource.length})` : ''} + + + + + }> + {generateDeletedTable(scmKeyDataSource)} + + +
+
+ ); + } +} \ No newline at end of file From 6f7e7f6396435f949f1a9ce76deee7215d0c9823 Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Wed, 21 Jun 2023 15:11:41 +0530 Subject: [PATCH 02/15] Recon UI:OM DB Insights Changes --- .../src/components/navBar/navBar.tsx | 22 +-- .../src/views/insights/om/om.tsx | 155 +++++++++--------- 2 files changed, 89 insertions(+), 88 deletions(-) diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.tsx index 777355dce023..afa52df7acc2 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/components/navBar/navBar.tsx @@ -117,22 +117,22 @@ class NavBar extends React.Component { Containers - Insights }> - - - Insights - - - - - OM DB Insights - - + + + Insights + + + + + OM DB Insights + + diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index f4814962ac5b..256fcb07947e 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -127,7 +127,7 @@ const KEY_TABLE_COLUMNS = [ } ]; -const CONTAINER_TAB_COLUMNS = [ +const MISMATCH_TAB_COLUMNS = [ { title: 'Container ID', dataIndex: 'containerId', @@ -137,7 +137,7 @@ const CONTAINER_TAB_COLUMNS = [ }, { - title: 'Keys', + title: 'Count Of Keys', dataIndex: 'numberOfKeys', key: 'numberOfKeys', sorter: (a: IContainerResponse, b: IContainerResponse) => a.numberOfKeys - b.numberOfKeys @@ -158,7 +158,7 @@ const CONTAINER_TAB_COLUMNS = [ } ]; -const OPEN_KEY_COLUMNS = [ +const OPEN_KEY_TAB_COLUMNS = [ { title: 'Path', dataIndex: 'path', @@ -257,7 +257,7 @@ const DELETED_TAB_COLUMNS = [ isSearchable: true }, { - title: 'Keys', + title: 'Count Of Keys', dataIndex: 'numberOfKeys', key: 'numberOfKeys', sorter: (a: IContainerResponse, b: IContainerResponse) => a.numberOfKeys - b.numberOfKeys @@ -295,7 +295,7 @@ interface IOmdbInsightsState { openKeysDataSource: IKeyLevelResponse[]; pendingDeleteKeyDataSource: any[]; expandedRowData: IExpandedRow; - scmKeyDataSource: []; + deletedContainerKeysDataSource: []; prevKeyMismatch: number; containerState: any; prevKeyOpen: string; @@ -313,21 +313,21 @@ export class Om extends React.Component, IOmdbInsightsSta constructor(props = {}) { super(props); - this.addStateColumn(); - this.addOpenKeyColumn(); + this.addexistAtColumn(); + this.addfsoNonfsoKeyColumn(); this.state = { loading: false, mismatchDataSource: [], openKeysDataSource: [], pendingDeleteKeyDataSource: [], - scmKeyDataSource: [], + deletedContainerKeysDataSource: [], prevKeyMismatch: 0, containerState: 'SCM', prevKeyOpen: "", prevKeyDeletePending: "", prevKeyDeleted: 0, expandedRowData: {}, - activeTab: '', + activeTab: '1', currentPage: 1, DEFAULT_LIMIT: 10, clickable: true, @@ -336,11 +336,11 @@ export class Om extends React.Component, IOmdbInsightsSta }; } - addStateColumn = () => { + addexistAtColumn = () => { // Inside the class component to access the React internal state const existsAtColumn = { title: - + @@ -357,16 +357,15 @@ export class Om extends React.Component, IOmdbInsightsSta ); } } - if (CONTAINER_TAB_COLUMNS.length > 0 && CONTAINER_TAB_COLUMNS[CONTAINER_TAB_COLUMNS.length - 1].key !== 'existsAt') { - CONTAINER_TAB_COLUMNS.push(existsAtColumn); + if (MISMATCH_TAB_COLUMNS.length > 0 && MISMATCH_TAB_COLUMNS[MISMATCH_TAB_COLUMNS.length - 1].key !== 'existsAt') { + MISMATCH_TAB_COLUMNS.push(existsAtColumn); } }; - stateMenu = () => ( + existAtScmOmMenu = () => ( this.handleStateMenuChange(e)} - > + onClick={e => this.handleExistsAtChange(e)}> OM @@ -376,7 +375,7 @@ export class Om extends React.Component, IOmdbInsightsSta ); - handleStateMenuChange = (e: any) => { + handleExistsAtChange = (e: any) => { if (e.key === 'OM') { this.setState(() => ({ containerState: 'SCM', @@ -385,11 +384,11 @@ export class Om extends React.Component, IOmdbInsightsSta prevKeyDeletePending: "", prevKeyDeleted: 0, }), () => { + console.log("before If fetchMismatchContainers OM",this.state); this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState) }) } else { - //start this.setState(() => ({ containerState: 'OM', prevKeyMismatch: 0, @@ -397,16 +396,17 @@ export class Om extends React.Component, IOmdbInsightsSta prevKeyDeletePending: "", prevKeyDeleted: 0, }), () => { + console.log("before Else fetchMismatchContainers OM",this.state); this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState) }) } }; - addOpenKeyColumn = () => { + addfsoNonfsoKeyColumn = () => { // Inside the class component to access the React internal state - const typeColumn = { + const fsoNonfsoColumn = { title: - + @@ -423,16 +423,15 @@ export class Om extends React.Component, IOmdbInsightsSta ); } } - if (OPEN_KEY_COLUMNS.length > 0 && OPEN_KEY_COLUMNS[OPEN_KEY_COLUMNS.length - 1].key !== 'type') { - OPEN_KEY_COLUMNS.push(typeColumn); + if (OPEN_KEY_TAB_COLUMNS.length > 0 && OPEN_KEY_TAB_COLUMNS[OPEN_KEY_TAB_COLUMNS.length - 1].key !== 'type') { + OPEN_KEY_TAB_COLUMNS.push(fsoNonfsoColumn); } }; - typeMenu = () => ( + fsoNonfsoMenu = () => ( this.handleFsoNonFsoMenuChange(e)} - > + onClick={e => this.handlefsoNonfsoMenuChange(e)}> FSO @@ -442,7 +441,7 @@ export class Om extends React.Component, IOmdbInsightsSta ); - handleFsoNonFsoMenuChange = (e: any) => { + handlefsoNonfsoMenuChange = (e: any) => { if (e.key === 'fso') { this.setState(() => ({ includeFso: true, @@ -452,11 +451,11 @@ export class Om extends React.Component, IOmdbInsightsSta prevKeyDeletePending: "", prevKeyDeleted: 0, }), () => { + console.log("If handlefsoNonfsoMenuChang fso",this.state); this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); }) } else { - //start this.setState(() => ({ includeFso: false, includeNonFso: true, @@ -465,6 +464,7 @@ export class Om extends React.Component, IOmdbInsightsSta prevKeyDeletePending: "", prevKeyDeleted: 0, }), () => { + console.log("else handlefsoNonfsoMenuChang nonfso",this.state); this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen) }) } @@ -486,11 +486,12 @@ export class Om extends React.Component, IOmdbInsightsSta const mismatchEndpoint = `/api/v1/containers/mismatch?limit=${limit}&prevKey=${prevKeyMismatch}&missingIn=${containerState}` axios.get(mismatchEndpoint).then(mismatchContainersResponse => { const mismatchContainers: IContainerResponse[] = mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.containerDiscrepancyInfo; - + console.log("fetchMismatchContainers", mismatchContainersResponse.data); if (mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.lastKey === null) { this.setState({ loading: false, clickable: false, + mismatchDataSource: mismatchContainers, }) } else { @@ -504,6 +505,7 @@ export class Om extends React.Component, IOmdbInsightsSta this.setState({ loading: false, }); + showDataFetchError(error.toString()); }); }; @@ -526,7 +528,6 @@ export class Om extends React.Component, IOmdbInsightsSta axios.get(openKeysEndpoint).then(openKeysResponse => { const openKeys = openKeysResponse && openKeysResponse.data; - //&& (openKeysResponse.data.fso || openKeysResponse.data.nonFSO); let allopenKeysResponse: any[] = []; for (let key in openKeys) { if (Array.isArray(openKeys[key])) { @@ -537,6 +538,7 @@ export class Om extends React.Component, IOmdbInsightsSta this.setState({ loading: false, clickable: false, + openKeysDataSource: allopenKeysResponse }) } else { @@ -548,9 +550,9 @@ export class Om extends React.Component, IOmdbInsightsSta }; }).catch(error => { this.setState({ - loading: false, - clickable: false, + loading: false }); + showDataFetchError(error.toString()); }); }; @@ -573,8 +575,8 @@ export class Om extends React.Component, IOmdbInsightsSta axios.get(deletePendingKeysEndpoint).then(deletePendingKeysResponse => { const deletePendingKeys = deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.deletedKeyInfo; // const deletePendingKey = deletePendingKeys && deletePendingKeys.map(item => item.omKeyInfoList); - const data = deletePendingKeys.flatMap((info) => - info.omKeyInfoList.map((item) => ({ + const data = deletePendingKeys && deletePendingKeys.flatMap((info) => + info.omKeyInfoList.map((item:any) => ({ dataSize: item.dataSize, keyName: item.keyName, path: item.path @@ -595,13 +597,12 @@ export class Om extends React.Component, IOmdbInsightsSta }).catch(error => { this.setState({ loading: false, - clickable: false, }); - //showDataFetchError(error.toString()); + showDataFetchError(error.toString()); }); }; - fetchDeletedSCMKeys = (limit: number, prevKeyDeleted: number) => { + fetchDeletedKeys = (limit: number, prevKeyDeleted: number) => { this.setState({ loading: true, prevKeyOpen: "", @@ -609,30 +610,31 @@ export class Om extends React.Component, IOmdbInsightsSta prevKeyMismatch: 0, clickable: true }); - const deletedSCMKeysEndpoint = `/api/v1/containers/mismatch/deleted?limit=${limit}&prevKey=${prevKeyDeleted}` - axios.get(deletedSCMKeysEndpoint).then(deletedSCMKeysResponse => { - const deletedSCMKeys = deletedSCMKeysResponse && deletedSCMKeysResponse.data && deletedSCMKeysResponse.data.containers; - if (deletedSCMKeysResponse && deletedSCMKeysResponse.data && deletedSCMKeysResponse.data.lastKey === null) { + const deletedKeysEndpoint = `/api/v1/containers/mismatch/deleted?limit=${limit}&prevKey=${prevKeyDeleted}` + axios.get(deletedKeysEndpoint).then(deletedKeysResponse => { + + const deletedContainerKeys = deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.containers; + + if (deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.lastKey === null) { this.setState({ loading: false, clickable: false, + deletedContainerKeysDataSource: deletedContainerKeys }) } else { this.setState({ loading: false, - prevKeyDeleted: deletedSCMKeysResponse && deletedSCMKeysResponse.data && deletedSCMKeysResponse.data.lastKey, - scmKeyDataSource: deletedSCMKeys + prevKeyDeleted: deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.lastKey, + deletedContainerKeysDataSource: deletedContainerKeys }) }; }).catch(error => { - //alert("No More Further Records."); this.setState({ - loading: false, - clickable: false, + loading: false }); - //showDataFetchError(error.toString()); + showDataFetchError(error.toString()); }); }; @@ -646,7 +648,7 @@ export class Om extends React.Component, IOmdbInsightsSta } else if (activeKey === '3') { this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeletePending); } else if (activeKey === '4') { - this.fetchDeletedSCMKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); + this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); } else { this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState); @@ -661,7 +663,7 @@ export class Om extends React.Component, IOmdbInsightsSta } else if (this.state.activeTab === '3') { this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeletePending); } else if (this.state.activeTab === '4') { - this.fetchDeletedSCMKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); + this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); } else { this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.nextKeyMismatch, this.state.containerState); @@ -669,13 +671,14 @@ export class Om extends React.Component, IOmdbInsightsSta }; fetchNextRecords = () => { - // To Call API for Next Records to fetch + // To Call API for Page Level for each page + console.log("fetchnextrecord", this.state.DEFAULT_LIMIT, "Last Key--", this.state.prevKeyDeletePending); if (this.state.activeTab === '2') { this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); } else if (this.state.activeTab === '3') { this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeletePending); } else if (this.state.activeTab === '4') { - this.fetchDeletedSCMKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); + this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); } else { this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState); @@ -697,7 +700,6 @@ export class Om extends React.Component, IOmdbInsightsSta let new2 = 0; new2 = ((pageSize * current) - pageSize) + 1; if (this.state.activeTab === '2') { - this.setState({ DEFAULT_LIMIT: pageSize, currentPage: current, @@ -718,7 +720,7 @@ export class Om extends React.Component, IOmdbInsightsSta DEFAULT_LIMIT: pageSize, currentPage: current, }, () => { - this.fetchDeletedSCMKeys(this.state.DEFAULT_LIMIT, new2 === 1 ? 0 : new2); + this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, new2 === 1 ? 0 : new2); }) } else { @@ -788,8 +790,8 @@ export class Om extends React.Component, IOmdbInsightsSta return
Loading...
; }; - searchColumn = () => { - return CONTAINER_TAB_COLUMNS.reduce((filtered, column) => { + searchMismatchColumn = () => { + return MISMATCH_TAB_COLUMNS.reduce((filtered, column) => { if (column.isSearchable) { const newColumn = { ...column, @@ -803,8 +805,8 @@ export class Om extends React.Component, IOmdbInsightsSta }, []) }; - searchKeyColumn = () => { - return OPEN_KEY_COLUMNS.reduce((filtered, column) => { + searchOpenKeyColumn = () => { + return OPEN_KEY_TAB_COLUMNS.reduce((filtered, column) => { if (column.isSearchable) { const newColumn = { ...column, @@ -819,7 +821,7 @@ export class Om extends React.Component, IOmdbInsightsSta }, []) }; - searchPendingColumn = () => { + searchKeysPendingColumn = () => { return PENDING_TAB_COLUMNS.reduce((filtered, column) => { if (column.isSearchable) { const newColumn = { @@ -835,7 +837,7 @@ export class Om extends React.Component, IOmdbInsightsSta }, []) }; - searchscmKeyColumn = () => { + searchDeletedKeyColumn = () => { return DELETED_TAB_COLUMNS.reduce((filtered, column) => { if (column.isSearchable) { const newColumn = { @@ -852,7 +854,7 @@ export class Om extends React.Component, IOmdbInsightsSta }; render() { - const { mismatchDataSource, loading, openKeysDataSource, pendingDeleteKeyDataSource, scmKeyDataSource } = this.state; + const { mismatchDataSource, loading, openKeysDataSource, pendingDeleteKeyDataSource, deletedContainerKeysDataSource } = this.state; const paginationConfig: PaginationConfig = { //showTotal: (total: number, range) => `${range[0]}-${range[1]} of ${total} containers`, @@ -866,36 +868,35 @@ export class Om extends React.Component, IOmdbInsightsSta itemRender: this.itemRender }; - const generateTable = (dataSource: any) => { + const generateMismatchTable = (dataSource: any) => { return
} - const generateKeyTable = (dataSource: any) => { + const generateOpenKeyTable = (dataSource: any) => { return
} - const generatePendingTable = (dataSource: any) => { - + const generateKeysPendingTable = (dataSource: any) => { return
} - const generateDeletedTable = (dataSource: any) => { + const generateDeletedKeysTable = (dataSource: any) => { return
, IOmdbInsightsSta
0) ? ` (${mismatchDataSource.length})` : ''}`}> - {generateTable(mismatchDataSource)} + {generateMismatchTable(mismatchDataSource)} 0) ? ` (${openKeysDataSource.length})` : ''}`}> - {generateKeyTable(openKeysDataSource)} + {generateOpenKeyTable(openKeysDataSource)} Keys Pending for Deletion{(pendingDeleteKeyDataSource && pendingDeleteKeyDataSource.length > 0) ? ` (${pendingDeleteKeyDataSource.length})` : ''} - + tab={ }> - {generatePendingTable(pendingDeleteKeyDataSource)} + {generateKeysPendingTable(pendingDeleteKeyDataSource)} Deleted Container Keys {(scmKeyDataSource && scmKeyDataSource.length > 0) ? ` (${scmKeyDataSource.length})` : ''} - + tab={ }> - {generateDeletedTable(scmKeyDataSource)} + {generateDeletedKeysTable(deletedContainerKeysDataSource)}
From 96b22f5f8b84bb052895f122fbc8c05c0ea20982 Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Thu, 22 Jun 2023 19:53:18 +0530 Subject: [PATCH 03/15] Recon UI:OM DB Insights Changes Review Comments --- .../webapps/recon/ozone-recon-web/api/db.json | 184 +++++++++--------- .../src/views/insights/om/om.tsx | 109 ++++++----- 2 files changed, 152 insertions(+), 141 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 15c5510e1d85..3868e1c8367a 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 @@ -3605,42 +3605,6 @@ } ], "existsAt": "SCM" - }, - { - "containerId": 11, - "numberOfKeys": 11, - "pipelines": [ - { - "id": { - "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" - }, - "replicationConfig": { - "replicationFactor": "ONE", - "requiredNodes": 1, - "replicationType": "RATIS" - }, - "healthy": true - } - ], - "existsAt": "SCM" - }, - { - "containerId": 12, - "numberOfKeys": 12, - "pipelines": [ - { - "id": { - "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" - }, - "replicationConfig": { - "replicationFactor": "ONE", - "requiredNodes": 1, - "replicationType": "RATIS" - }, - "healthy": true - } - ], - "existsAt": "SCM" } ] }, @@ -4832,9 +4796,6 @@ "fso": [] }, "keydeletePending":{ - "keysSummary": { - - }, "lastKey": "/volume/bucket1/rcmeevblsf/106/-9223372036843950335", "replicatedDataSize": 300000000, "unreplicatedDataSize": 100000000, @@ -4842,15 +4803,12 @@ { "omKeyInfoList": [ { - "metadata": { - - }, "objectID": -9223372036844470271, "updateID": 40429, "parentObjectID": -9223372036844472575, "volumeName": "volume", "bucketName": "bucket1", - "keyName": "rcmeevblsf/0", + "keyName": "List1key1", "dataSize": 10000000, "creationTime": 1687189663661, "modificationTime": 1687189672598, @@ -4860,7 +4818,57 @@ "replicationType": "RATIS" }, "fileChecksum": null, - "fileName": "0", + "fileName": "List1File1", + "file": false, + "path": "-9223372036844472575/0", + "hsync": false, + "replicatedSize": 30000000, + "fileEncryptionInfo": null, + "objectInfo": "OMKeyInfo{volume='volume', bucket='bucket1', key='rcmeevblsf/0', dataSize='10000000', creationTime='1687189663661', objectID='-9223372036844470271', parentID='-9223372036844472575', replication='RATIS/THREE', fileChecksum='null}", + "updateIDset": true + }, + { + "objectID": -9223372036844470271, + "updateID": 40429, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "List1key1", + "dataSize": 20000000, + "creationTime": 1687189663661, + "modificationTime": 1687189672598, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "List1File1", + "file": false, + "path": "-9223372036844472575/0", + "hsync": false, + "replicatedSize": 30000000, + "fileEncryptionInfo": null, + "objectInfo": "OMKeyInfo{volume='volume', bucket='bucket1', key='rcmeevblsf/0', dataSize='10000000', creationTime='1687189663661', objectID='-9223372036844470271', parentID='-9223372036844472575', replication='RATIS/THREE', fileChecksum='null}", + "updateIDset": true + }, + { + "objectID": -9223372036844470271, + "updateID": 40429, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "List1key1", + "dataSize": 30000000, + "creationTime": 1687189663661, + "modificationTime": 1687189672598, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "List1File1", "file": false, "path": "-9223372036844472575/0", "hsync": false, @@ -4874,15 +4882,13 @@ { "omKeyInfoList": [ { - "metadata": { - - }, + "objectID": -9223372036844470015, "updateID": 40407, "parentObjectID": -9223372036844472575, "volumeName": "volume", "bucketName": "bucket1", - "keyName": "rcmeevblsf/1", + "keyName": "List2Key1", "dataSize": 10000000, "creationTime": 1687189663664, "modificationTime": 1687189671884, @@ -4892,7 +4898,7 @@ "replicationType": "RATIS" }, "fileChecksum": null, - "fileName": "1", + "fileName": "List2File2", "file": false, "path": "-9223372036844472575/1", "hsync": false, @@ -4906,15 +4912,12 @@ { "omKeyInfoList": [ { - "metadata": { - - }, "objectID": -9223372036844432639, "updateID": 40601, "parentObjectID": -9223372036844472575, "volumeName": "volume", "bucketName": "bucket1", - "keyName": "rcmeevblsf/10", + "keyName": "List3Key1", "dataSize": 10000000, "creationTime": 1687189671823, "modificationTime": 1687189676084, @@ -4924,7 +4927,29 @@ "replicationType": "RATIS" }, "fileChecksum": null, - "fileName": "10", + "fileName": "List3File1", + "file": false, + "path": "-9223372036844472575/10", + "hsync": false, + "replicatedSize": 30000000 + }, + { + "objectID": -9223372036844432639, + "updateID": 40601, + "parentObjectID": -9223372036844472575, + "volumeName": "volume", + "bucketName": "bucket1", + "keyName": "List3Key1", + "dataSize": 20000000, + "creationTime": 1687189671823, + "modificationTime": 1687189676084, + "replicationConfig": { + "replicationFactor": "THREE", + "requiredNodes": 3, + "replicationType": "RATIS" + }, + "fileChecksum": null, + "fileName": "List3File1", "file": false, "path": "-9223372036844472575/10", "hsync": false, @@ -4935,15 +4960,12 @@ { "omKeyInfoList": [ { - "metadata": { - - }, "objectID": -9223372036843970815, "updateID": 42403, "parentObjectID": -9223372036844472575, "volumeName": "volume", "bucketName": "bucket1", - "keyName": "rcmeevblsf/100", + "keyName": "List4Key1", "dataSize": 10000000, "creationTime": 1687189713476, "modificationTime": 1687189717756, @@ -4953,7 +4975,7 @@ "replicationType": "RATIS" }, "fileChecksum": null, - "fileName": "100", + "fileName": "List4File3", "file": false, "path": "-9223372036844472575/100" } @@ -4962,15 +4984,12 @@ { "omKeyInfoList": [ { - "metadata": { - - }, "objectID": -9223372036843964159, "updateID": 42443, "parentObjectID": -9223372036844472575, "volumeName": "volume", "bucketName": "bucket1", - "keyName": "rcmeevblsf/101", + "keyName": "List5Key1", "dataSize": 10000000, "creationTime": 1687189714437, "modificationTime": 1687189719458, @@ -4980,7 +4999,7 @@ "replicationType": "RATIS" }, "fileChecksum": null, - "fileName": "101", + "fileName": "List5File1", "file": false, "path": "-9223372036844472575/101" } @@ -4989,15 +5008,12 @@ { "omKeyInfoList": [ { - "metadata": { - - }, "objectID": -9223372036843961087, "updateID": 42450, "parentObjectID": -9223372036844472575, "volumeName": "volume", "bucketName": "bucket1", - "keyName": "rcmeevblsf/102", + "keyName": "List6Key1", "dataSize": 10000000, "creationTime": 1687189714558, "modificationTime": 1687189719533, @@ -5007,7 +5023,7 @@ "replicationType": "RATIS" }, "fileChecksum": null, - "fileName": "102", + "fileName": "List6File1", "file": false, "path": "-9223372036844472575/102", "hsync": false, @@ -5021,15 +5037,12 @@ { "omKeyInfoList": [ { - "metadata": { - - }, "objectID": -9223372036843959807, "updateID": 42449, "parentObjectID": -9223372036844472575, "volumeName": "volume", "bucketName": "bucket1", - "keyName": "rcmeevblsf/103", + "keyName": "List7Key1", "dataSize": 10000000, "creationTime": 1687189714594, "modificationTime": 1687189719533, @@ -5039,7 +5052,7 @@ "replicationType": "RATIS" }, "fileChecksum": null, - "fileName": "103", + "fileName": "List7File1", "file": false, "path": "-9223372036844472575/103", "hsync": false, @@ -5053,15 +5066,12 @@ { "omKeyInfoList": [ { - "metadata": { - - }, "objectID": -9223372036843953919, "updateID": 42467, "parentObjectID": -9223372036844472575, "volumeName": "volume", "bucketName": "bucket1", - "keyName": "rcmeevblsf/104", + "keyName": "List8Key1", "dataSize": 10000000, "creationTime": 1687189715040, "modificationTime": 1687189720085, @@ -5071,7 +5081,7 @@ "replicationType": "RATIS" }, "fileChecksum": null, - "fileName": "104", + "fileName": "List8File1", "file": false, "path": "-9223372036844472575/104", "hsync": false, @@ -5085,15 +5095,12 @@ { "omKeyInfoList": [ { - "metadata": { - - }, "objectID": -9223372036843951359, "updateID": 42483, "parentObjectID": -9223372036844472575, "volumeName": "volume", "bucketName": "bucket1", - "keyName": "rcmeevblsf/105", + "keyName": "List9Key1", "dataSize": 10000000, "creationTime": 1687189715391, "modificationTime": 1687189720373, @@ -5103,7 +5110,7 @@ "replicationType": "RATIS" }, "fileChecksum": null, - "fileName": "105", + "fileName": "List9File9", "file": false, "path": "-9223372036844472575/105", "hsync": false, @@ -5117,15 +5124,12 @@ { "omKeyInfoList": [ { - "metadata": { - - }, "objectID": -9223372036843950335, "updateID": 42478, "parentObjectID": -9223372036844472575, "volumeName": "volume", "bucketName": "bucket1", - "keyName": "rcmeevblsf/106", + "keyName": "List10Key1", "dataSize": 10000000, "creationTime": 1687189715413, "modificationTime": 1687189720247, @@ -5135,7 +5139,7 @@ "replicationType": "RATIS" }, "fileChecksum": null, - "fileName": "106", + "fileName": "List10File1", "file": false, "path": "-9223372036844472575/106", "hsync": false, @@ -5149,6 +5153,7 @@ ], "status": "OK" }, + "keydeletePending1": { "lastKey":"/-9223372036854775552/-9223372036854775040/-9223372036852420095/2421/110569623850191", "replicatedTotal": -1530804718628866300, @@ -5157,7 +5162,6 @@ { "omKeyInfoList": [ { - "metadata": {}, "objectID": 0, "updateID": 0, "parentObjectID": 0, diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index 256fcb07947e..36518c4f8789 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -198,20 +198,6 @@ const OPEN_KEY_TAB_COLUMNS = [ ) }, - { - title: 'Required Nodes', - dataIndex: 'replicationInfo', - key: 'replicationInfo', - render: (replicationInfo: any) => ( -
- { -
- {Object.values(replicationInfo)[1]} -
- } -
- ) - }, { title: 'Replication Type', dataIndex: 'replicationInfo', @@ -232,19 +218,24 @@ const OPEN_KEY_TAB_COLUMNS = [ const PENDING_TAB_COLUMNS = [ { title: 'Key Name', - dataIndex: 'keyName', - key: 'keyName' + dataIndex: 'fileName', + key: 'fileName' }, { title: 'Path', - dataIndex: 'path', - key: 'path', + dataIndex: 'keyName', + key: 'keyName', isSearchable: true, }, { - title: 'Amount of data', + title: 'Total data size', dataIndex: 'dataSize', key: 'dataSize', + }, + { + title: 'Total Key Count', + dataIndex: 'keyCount', + key: 'keyCount', } ]; @@ -377,28 +368,30 @@ export class Om extends React.Component, IOmdbInsightsSta handleExistsAtChange = (e: any) => { if (e.key === 'OM') { - this.setState(() => ({ + console.log("OM before setstate handleExistsAtChange if", this.state); + this.setState({ containerState: 'SCM', prevKeyMismatch: 0, prevKeyOpen: "", prevKeyDeletePending: "", prevKeyDeleted: 0, - }), () => { + },() => { console.log("before If fetchMismatchContainers OM",this.state); - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState) - }) + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState); + }); } else { - this.setState(() => ({ + console.log("before else setstate else SCM", this.state); + this.setState({ containerState: 'OM', prevKeyMismatch: 0, prevKeyOpen: "", prevKeyDeletePending: "", prevKeyDeleted: 0, - }), () => { - console.log("before Else fetchMismatchContainers OM",this.state); - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState) - }) + },() => { + console.log("before fetchMismatchContainers SCM",this.state); + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState); + }); } }; @@ -442,31 +435,34 @@ export class Om extends React.Component, IOmdbInsightsSta ); handlefsoNonfsoMenuChange = (e: any) => { + console.log("E.keyhandlefsoNonfsoMenuChange", e.key); if (e.key === 'fso') { - this.setState(() => ({ + console.log("if handlefsoNonfsoMenuChange--",this.state); + this.setState({ includeFso: true, includeNonFso: false, prevKeyOpen: "", prevKeyMismatch: 0, prevKeyDeletePending: "", prevKeyDeleted: 0, - }), () => { + },() => { console.log("If handlefsoNonfsoMenuChang fso",this.state); this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); - }) + }); } else { - this.setState(() => ({ + console.log("else handlefsoNonfsoMenuChange nonfso",this.state); + this.setState({ includeFso: false, includeNonFso: true, prevKeyOpen: "", prevKeyMismatch: 0, prevKeyDeletePending: "", prevKeyDeleted: 0, - }), () => { - console.log("else handlefsoNonfsoMenuChang nonfso",this.state); - this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen) - }) + },() => { + console.log("else handlefsoNonfsoMenuChang nonfso before fetchOpenkeys--",this.state); + this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); + }); } }; @@ -574,17 +570,29 @@ export class Om extends React.Component, IOmdbInsightsSta } axios.get(deletePendingKeysEndpoint).then(deletePendingKeysResponse => { const deletePendingKeys = deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.deletedKeyInfo; - // const deletePendingKey = deletePendingKeys && deletePendingKeys.map(item => item.omKeyInfoList); - const data = deletePendingKeys && deletePendingKeys.flatMap((info) => - info.omKeyInfoList.map((item:any) => ({ - dataSize: item.dataSize, - keyName: item.keyName, - path: item.path - }))) + //const deletePendingKey = deletePendingKeys && deletePendingKeys.map(item => item.omKeyInfoList); + + const data = deletePendingKeys && deletePendingKeys + .flatMap((info: any) => info.omKeyInfoList) + .reduce((deletePending, item) => { + + const existingKey = deletePending.find((key) => key.keyName === item.keyName && key.fileName === item.fileName); + if (existingKey) { + existingKey.dataSize += item.dataSize; + // keyCount+=keyCount + existingKey.keyCount++; + } + else { + deletePending.push({ ...item, keyCount:1 }); + } + return deletePending; + }, []); + if (deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.lastKey === "") { this.setState({ loading: false, clickable: false, + pendingDeleteKeyDataSource: data }) } else { @@ -627,7 +635,6 @@ export class Om extends React.Component, IOmdbInsightsSta loading: false, prevKeyDeleted: deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.lastKey, deletedContainerKeysDataSource: deletedContainerKeys - }) }; }).catch(error => { @@ -860,7 +867,7 @@ export class Om extends React.Component, IOmdbInsightsSta //showTotal: (total: number, range) => `${range[0]}-${range[1]} of ${total} containers`, defaultPageSize: this.state.DEFAULT_LIMIT, pageSizeOptions: ['10', '20', '30', '50'], - showQuickJumper: true, + //showQuickJumper: true, showSizeChanger: true, onShowSizeChange: this.onShowSizeChange, //current:this.state.currentPage, @@ -910,15 +917,15 @@ export class Om extends React.Component, IOmdbInsightsSta
- 0) ? ` (${mismatchDataSource.length})` : ''}`}> + {generateMismatchTable(mismatchDataSource)} - 0) ? ` (${openKeysDataSource.length})` : ''}`}> + {generateOpenKeyTable(openKeysDataSource)} Keys Pending for Deletion {(pendingDeleteKeyDataSource && pendingDeleteKeyDataSource.length > 0) ? ` (${pendingDeleteKeyDataSource.length})` : ''} -    + tab={ @@ -926,8 +933,8 @@ export class Om extends React.Component, IOmdbInsightsSta {generateKeysPendingTable(pendingDeleteKeyDataSource)} Deleted Container Keys {(deletedContainerKeysDataSource && deletedContainerKeysDataSource.length > 0) ? ` (${deletedContainerKeysDataSource.length})` : ''} -    + tab={ From fecafbc363715bf0d6ccccb6cd6d7f526082f556 Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Fri, 23 Jun 2023 08:00:23 +0530 Subject: [PATCH 04/15] Recon UI:OM DB Insights Changes Review Changes for Summation Logic --- .../webapps/recon/ozone-recon-web/api/db.json | 62 ----------- .../src/views/insights/om/om.tsx | 105 +++++++++++------- 2 files changed, 63 insertions(+), 104 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 3868e1c8367a..1c6c22504086 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 @@ -4043,42 +4043,6 @@ } ], "existsAt": "OM" - }, - { - "containerId": 11, - "numberOfKeys": 11, - "pipelines": [ - { - "id": { - "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" - }, - "replicationConfig": { - "replicationFactor": "ONE", - "requiredNodes": 1, - "replicationType": "RATIS" - }, - "healthy": true - } - ], - "existsAt": "OM" - }, - { - "containerId": 12, - "numberOfKeys": 12, - "pipelines": [ - { - "id": { - "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" - }, - "replicationConfig": { - "replicationFactor": "ONE", - "requiredNodes": 1, - "replicationType": "RATIS" - }, - "healthy": true - } - ], - "existsAt": "OM" } ] }, @@ -4479,32 +4443,6 @@ "replicationType": "RATIS" } - }, - { - "key": "fso 11", - "path": "2", - "inStateSince": 1686156887186, - "size": 268435456, - "replicatedSize": 268435456, - "replicationInfo": { - "replicationFactor": "ONE", - "requiredNodes": 1, - "replicationType": "RATIS" - } - - }, - { - "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2412/110569623850191713", - "path": "2", - "inStateSince": 1686156887186, - "size": 268435456, - "replicatedSize": 268435456, - "replicationInfo": { - "replicationFactor": "ONE", - "requiredNodes": 1, - "replicationType": "RATIS" - } - } ], "status": "OK" diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index 36518c4f8789..8b01136c2ac5 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -166,7 +166,7 @@ const OPEN_KEY_TAB_COLUMNS = [ isSearchable: true, }, { - title: 'Amount of data', + title: 'Amount of data (KB)', dataIndex: 'size', key: 'size', }, @@ -228,7 +228,7 @@ const PENDING_TAB_COLUMNS = [ isSearchable: true, }, { - title: 'Total data size', + title: 'Total data size (KB)', dataIndex: 'dataSize', key: 'dataSize', }, @@ -483,6 +483,7 @@ export class Om extends React.Component, IOmdbInsightsSta axios.get(mismatchEndpoint).then(mismatchContainersResponse => { const mismatchContainers: IContainerResponse[] = mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.containerDiscrepancyInfo; console.log("fetchMismatchContainers", mismatchContainersResponse.data); + localStorage.setItem('prevKeyMismatch', prevKeyMismatch.toString()); if (mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.lastKey === null) { this.setState({ loading: false, @@ -530,6 +531,9 @@ export class Om extends React.Component, IOmdbInsightsSta openKeys[key] && openKeys[key].map((item: any) => (allopenKeysResponse.push({ ...item, type: key }))); } } + + localStorage.setItem('prevKeyOpen', prevKeyOpen); + if (openKeysResponse && openKeysResponse.data && openKeysResponse.data.lastKey === "") { this.setState({ loading: false, @@ -561,45 +565,51 @@ export class Om extends React.Component, IOmdbInsightsSta prevKeyDeleted: 0, clickable: true }); - let deletePendingKeysEndpoint + let deletePendingKeysEndpoint; if (prevKeyDeletePending === "") { - deletePendingKeysEndpoint = `/api/v1/keys/deletePending?limit=${limit}&prevKey` + deletePendingKeysEndpoint = `/api/v1/keys/deletePending?limit=${limit}&prevKey`; } else { - deletePendingKeysEndpoint = `/api/v1/keys/deletePending?limit=${limit}&prevKey=${prevKeyDeletePending}` + deletePendingKeysEndpoint = `/api/v1/keys/deletePending?limit=${limit}&prevKey=${prevKeyDeletePending}`; } axios.get(deletePendingKeysEndpoint).then(deletePendingKeysResponse => { const deletePendingKeys = deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.deletedKeyInfo; - //const deletePendingKey = deletePendingKeys && deletePendingKeys.map(item => item.omKeyInfoList); - - const data = deletePendingKeys && deletePendingKeys - .flatMap((info: any) => info.omKeyInfoList) - .reduce((deletePending, item) => { - - const existingKey = deletePending.find((key) => key.keyName === item.keyName && key.fileName === item.fileName); - if (existingKey) { - existingKey.dataSize += item.dataSize; - // keyCount+=keyCount - existingKey.keyCount++; - } - else { - deletePending.push({ ...item, keyCount:1 }); - } - return deletePending; - }, []); + //Use Summation Logic iterate through all object and find sum of all datasize + const deletedKeyInfoData = deletePendingKeys && deletePendingKeys.flatMap((infoObject:any) => { + const { omKeyInfoList } = infoObject; + console.log("omKeyInfoList", omKeyInfoList); + let count = 0; + let item = omKeyInfoList && omKeyInfoList.reduce((obj:any, item:any) => { + const { dataSize } = item; + item.dataSize = obj.dataSize + dataSize; + count = count + 1; + return item; + }, { "dataSize": 0 }); + + return { + "dataSize": item.dataSize, + "fileName":item.fileName, + "keyName": item.keyName, + "path": item.path, + "keyCount": count + } + }); + //end + console.log("eletedKeyInfoData",deletedKeyInfoData); + localStorage.setItem('prevKeyDeletePending', prevKeyDeletePending); if (deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.lastKey === "") { this.setState({ loading: false, clickable: false, - pendingDeleteKeyDataSource: data + pendingDeleteKeyDataSource: deletedKeyInfoData }) } else { this.setState({ loading: false, prevKeyDeletePending: deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.lastKey, - pendingDeleteKeyDataSource: data + pendingDeleteKeyDataSource: deletedKeyInfoData }); } }).catch(error => { @@ -618,10 +628,11 @@ export class Om extends React.Component, IOmdbInsightsSta prevKeyMismatch: 0, clickable: true }); - const deletedKeysEndpoint = `/api/v1/containers/mismatch/deleted?limit=${limit}&prevKey=${prevKeyDeleted}` + const deletedKeysEndpoint = `/api/v1/containers/mismatch/deleted?limit=${limit}&prevKey=${prevKeyDeleted}`; + axios.get(deletedKeysEndpoint).then(deletedKeysResponse => { - const deletedContainerKeys = deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.containers; + localStorage.setItem('prevKeyDeleted', prevKeyDeleted.toString()); if (deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.lastKey === null) { this.setState({ @@ -664,7 +675,9 @@ export class Om extends React.Component, IOmdbInsightsSta }; fetchPreviousRecords = () => { - // To Call API for Page Level for each page + // To call API get key from local storage + console.log("previous Records", this.state); + if (this.state.activeTab === '2') { this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); } else if (this.state.activeTab === '3') { @@ -673,7 +686,7 @@ export class Om extends React.Component, IOmdbInsightsSta this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); } else { - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.nextKeyMismatch, this.state.containerState); + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT,this.state.prevKeyMismatch, this.state.containerState); } }; @@ -703,42 +716,44 @@ export class Om extends React.Component, IOmdbInsightsSta }; onShowSizeChange = (current: number, pageSize: number) => { - // To Call API for Page Level for each page - let new2 = 0; - new2 = ((pageSize * current) - pageSize) + 1; + console.log("onShowSizeChange", current, pageSize, this.state); + //On Size Change Call respective API with current previous page key if (this.state.activeTab === '2') { this.setState({ DEFAULT_LIMIT: pageSize, - currentPage: current, + prevKeyOpen:localStorage.getItem('prevKeyOpen') }, () => { - this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, new2 === 1 ? 0 : new2); + this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT,this.state.prevKeyOpen); }); } else if (this.state.activeTab === '3') { + //keys pending for deletiontion this.setState({ DEFAULT_LIMIT: pageSize, - currentPage: current + prevKeyDeletePending: localStorage.getItem('prevKeyDeletePending') }, () => { - this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, new2 === 1 ? 0 : new2); + this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeletePending); }) } else if (this.state.activeTab === '4') { + //deleted container keys this.setState({ DEFAULT_LIMIT: pageSize, - currentPage: current, + prevKeyDeleted:parseInt(localStorage.getItem('prevKeyDeleted')) }, () => { - this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, new2 === 1 ? 0 : new2); + this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); }) } else { + // active tab 1 for mismatch + console.log(parseInt(localStorage.getItem('prevKeyMismatch')) ); this.setState({ DEFAULT_LIMIT: pageSize, - currentPage: current, + prevKeyMismatch:parseInt(localStorage.getItem('prevKeyMismatch')) }, () => { - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, new2 === 1 ? 0 : new2, this.state.containerState); + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT,this.state.prevKeyMismatch, this.state.containerState); }); } - //current=1; }; onRowExpandClick = (expanded: boolean, record: IContainerResponse) => { @@ -860,6 +875,14 @@ export class Om extends React.Component, IOmdbInsightsSta }, []) }; + localStorageSetItem = (item:any) => { + localStorage.setItem(item, JSON.stringify(item)); + }; + + localStorageGetItem = (item:any) => { + localStorage.getItem(item); + } + render() { const { mismatchDataSource, loading, openKeysDataSource, pendingDeleteKeyDataSource, deletedContainerKeysDataSource } = this.state; @@ -867,10 +890,8 @@ export class Om extends React.Component, IOmdbInsightsSta //showTotal: (total: number, range) => `${range[0]}-${range[1]} of ${total} containers`, defaultPageSize: this.state.DEFAULT_LIMIT, pageSizeOptions: ['10', '20', '30', '50'], - //showQuickJumper: true, showSizeChanger: true, onShowSizeChange: this.onShowSizeChange, - //current:this.state.currentPage, //onChange: this.onChangePagination, itemRender: this.itemRender }; From 985d4b4c29dcfafb941bfd6cc81f5c2207d78fec Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Fri, 23 Jun 2023 10:03:56 +0530 Subject: [PATCH 05/15] HDDS-8415. Recon UI:OM DB Insights Changes Byte Changes --- .../recon/ozone-recon-web/src/views/insights/om/om.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index 8b01136c2ac5..6cca4c0ef08e 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -22,7 +22,7 @@ import { Table, Tabs, Menu, Dropdown, Icon, Tooltip } from 'antd'; import { PaginationConfig } from 'antd/lib/pagination'; import filesize from 'filesize'; import moment from 'moment'; -import { showDataFetchError } from 'utils/common'; +import { showDataFetchError, byteToSize } from 'utils/common'; import './om.less'; import { ColumnSearch } from 'utils/columnSearch'; import { Link } from 'react-router-dom'; @@ -166,9 +166,10 @@ const OPEN_KEY_TAB_COLUMNS = [ isSearchable: true, }, { - title: 'Amount of data (KB)', + title: 'Amount of data', dataIndex: 'size', key: 'size', + render: (size :any) => size = byteToSize(size,1) }, { title: 'Key', @@ -231,6 +232,7 @@ const PENDING_TAB_COLUMNS = [ title: 'Total data size (KB)', dataIndex: 'dataSize', key: 'dataSize', + render: (dataSize :any) => dataSize = byteToSize(dataSize,1) }, { title: 'Total Key Count', From d06710ab07355ce374ee924b7fde26d9adf567d3 Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Fri, 23 Jun 2023 11:51:59 +0530 Subject: [PATCH 06/15] HDDS-8415. Recon UI:OM DB Insights Changes Code Formatting --- .../src/views/insights/om/om.tsx | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index 6cca4c0ef08e..185b8c97470f 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -229,7 +229,7 @@ const PENDING_TAB_COLUMNS = [ isSearchable: true, }, { - title: 'Total data size (KB)', + title: 'Total Data Size', dataIndex: 'dataSize', key: 'dataSize', render: (dataSize :any) => dataSize = byteToSize(dataSize,1) @@ -437,7 +437,7 @@ export class Om extends React.Component, IOmdbInsightsSta ); handlefsoNonfsoMenuChange = (e: any) => { - console.log("E.keyhandlefsoNonfsoMenuChange", e.key); + console.log("keyhandlefsoNonfsoMenuChange", e.key); if (e.key === 'fso') { console.log("if handlefsoNonfsoMenuChange--",this.state); this.setState({ @@ -448,7 +448,7 @@ export class Om extends React.Component, IOmdbInsightsSta prevKeyDeletePending: "", prevKeyDeleted: 0, },() => { - console.log("If handlefsoNonfsoMenuChang fso",this.state); + console.log("If handlefsoNonfsoMenuChang before fetchOpenkeys",this.state); this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); }); } @@ -579,7 +579,6 @@ export class Om extends React.Component, IOmdbInsightsSta //Use Summation Logic iterate through all object and find sum of all datasize const deletedKeyInfoData = deletePendingKeys && deletePendingKeys.flatMap((infoObject:any) => { const { omKeyInfoList } = infoObject; - console.log("omKeyInfoList", omKeyInfoList); let count = 0; let item = omKeyInfoList && omKeyInfoList.reduce((obj:any, item:any) => { const { dataSize } = item; @@ -596,8 +595,6 @@ export class Om extends React.Component, IOmdbInsightsSta "keyCount": count } }); - //end - console.log("eletedKeyInfoData",deletedKeyInfoData); localStorage.setItem('prevKeyDeletePending', prevKeyDeletePending); if (deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.lastKey === "") { @@ -635,7 +632,6 @@ export class Om extends React.Component, IOmdbInsightsSta axios.get(deletedKeysEndpoint).then(deletedKeysResponse => { const deletedContainerKeys = deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.containers; localStorage.setItem('prevKeyDeleted', prevKeyDeleted.toString()); - if (deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.lastKey === null) { this.setState({ loading: false, @@ -718,7 +714,7 @@ export class Om extends React.Component, IOmdbInsightsSta }; onShowSizeChange = (current: number, pageSize: number) => { - console.log("onShowSizeChange", current, pageSize, this.state); + console.log("onShowSizeChange",pageSize, this.state); //On Size Change Call respective API with current previous page key if (this.state.activeTab === '2') { this.setState({ @@ -877,14 +873,6 @@ export class Om extends React.Component, IOmdbInsightsSta }, []) }; - localStorageSetItem = (item:any) => { - localStorage.setItem(item, JSON.stringify(item)); - }; - - localStorageGetItem = (item:any) => { - localStorage.getItem(item); - } - render() { const { mismatchDataSource, loading, openKeysDataSource, pendingDeleteKeyDataSource, deletedContainerKeysDataSource } = this.state; From 50ed146df02c76e536fff0de5115b2b38a861b4f Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Fri, 23 Jun 2023 15:56:29 +0530 Subject: [PATCH 07/15] HDDS-8415. Recon UI:OM DB Insights Changes Container state name change --- .../src/views/insights/om/om.tsx | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index 185b8c97470f..d9f4902493f7 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -32,7 +32,7 @@ const size = filesize.partial({ standard: 'iec' }); const { TabPane } = Tabs; interface IContainerResponse { containerId: number; - containerState: string; + mismatchMissingState: string; OMContainerState: string; SCMContainerState: string; existsAt: string; @@ -290,7 +290,7 @@ interface IOmdbInsightsState { expandedRowData: IExpandedRow; deletedContainerKeysDataSource: []; prevKeyMismatch: number; - containerState: any; + mismatchMissingState: any; prevKeyOpen: string; prevKeyDeleted: number; prevKeyDeletePending: string; @@ -315,7 +315,7 @@ export class Om extends React.Component, IOmdbInsightsSta pendingDeleteKeyDataSource: [], deletedContainerKeysDataSource: [], prevKeyMismatch: 0, - containerState: 'SCM', + mismatchMissingState: 'SCM', prevKeyOpen: "", prevKeyDeletePending: "", prevKeyDeleted: 0, @@ -357,7 +357,7 @@ export class Om extends React.Component, IOmdbInsightsSta existAtScmOmMenu = () => ( this.handleExistsAtChange(e)}> OM @@ -372,27 +372,27 @@ export class Om extends React.Component, IOmdbInsightsSta if (e.key === 'OM') { console.log("OM before setstate handleExistsAtChange if", this.state); this.setState({ - containerState: 'SCM', + mismatchMissingState: 'SCM', prevKeyMismatch: 0, prevKeyOpen: "", prevKeyDeletePending: "", prevKeyDeleted: 0, },() => { console.log("before If fetchMismatchContainers OM",this.state); - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState); + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); }); } else { console.log("before else setstate else SCM", this.state); this.setState({ - containerState: 'OM', + mismatchMissingState: 'OM', prevKeyMismatch: 0, prevKeyOpen: "", prevKeyDeletePending: "", prevKeyDeleted: 0, },() => { console.log("before fetchMismatchContainers SCM",this.state); - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState); + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); }); } }; @@ -470,10 +470,10 @@ export class Om extends React.Component, IOmdbInsightsSta componentDidMount(): void { // Fetch mismatch containers on component mount - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState); + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); }; - fetchMismatchContainers = (limit: number, prevKeyMismatch: number, containerState: any) => { + fetchMismatchContainers = (limit: number, prevKeyMismatch: number, mismatchMissingState: any) => { this.setState({ loading: true, prevKeyOpen: "", @@ -481,12 +481,13 @@ export class Om extends React.Component, IOmdbInsightsSta prevKeyDeleted: 0, clickable: true }); - const mismatchEndpoint = `/api/v1/containers/mismatch?limit=${limit}&prevKey=${prevKeyMismatch}&missingIn=${containerState}` + const mismatchEndpoint = `/api/v1/containers/mismatch?limit=${limit}&prevKey=${prevKeyMismatch}&missingIn=${mismatchMissingState}` axios.get(mismatchEndpoint).then(mismatchContainersResponse => { const mismatchContainers: IContainerResponse[] = mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.containerDiscrepancyInfo; console.log("fetchMismatchContainers", mismatchContainersResponse.data); localStorage.setItem('prevKeyMismatch', prevKeyMismatch.toString()); if (mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.lastKey === null) { + //No Further Records may be last record this.setState({ loading: false, clickable: false, @@ -667,7 +668,7 @@ export class Om extends React.Component, IOmdbInsightsSta this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); } else { - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState); + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); } }) }; @@ -684,7 +685,7 @@ export class Om extends React.Component, IOmdbInsightsSta this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); } else { - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT,this.state.prevKeyMismatch, this.state.containerState); + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT,this.state.prevKeyMismatch, this.state.mismatchMissingState); } }; @@ -699,7 +700,7 @@ export class Om extends React.Component, IOmdbInsightsSta this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); } else { - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.containerState); + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); } }; @@ -749,7 +750,7 @@ export class Om extends React.Component, IOmdbInsightsSta DEFAULT_LIMIT: pageSize, prevKeyMismatch:parseInt(localStorage.getItem('prevKeyMismatch')) }, () => { - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT,this.state.prevKeyMismatch, this.state.containerState); + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT,this.state.prevKeyMismatch, this.state.mismatchMissingState); }); } }; From 2e65638c631eb55e0ab84a275d8b780a87f52935 Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Sun, 25 Jun 2023 15:39:59 +0530 Subject: [PATCH 08/15] Recon UI:OM DB Insights Changes Summary Page Information --- .../webapps/recon/ozone-recon-web/api/db.json | 755 ++++++++++++++++-- .../recon/ozone-recon-web/api/routes.json | 10 + .../src/views/insights/om/om.tsx | 176 ++-- .../src/views/overview/overview.tsx | 63 +- 4 files changed, 876 insertions(+), 128 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 1c6c22504086..bf4e735d4aee 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 @@ -3409,6 +3409,48 @@ "disabledFeatures": [ "FLAG1" ], + + "keysOpenSummary": { + "keysSummary": { + "totalUnreplicatedDataSize": 1000, + "totalReplicatedDataSize": 30000000, + "totalOpenKeys": 10 + }, + "lastKey": "", + "replicatedDataSize": 0, + "unreplicatedDataSize": 0, + "status": "OK" + }, + "keysdeletePendingSummary":{ + "keysSummary": { + "totalUnreplicatedDataSize": 29291, + "totalReplicatedDataSize": 87873, + "totalDeletedKeys": 3 + }, + "lastKey": "/s3v/fso-bucket/dira/dira13/key3/-9223372036854762239", + "replicatedDataSize": 87873, + "unreplicatedDataSize": 29291, + "status": "OK" + }, + "blocksdeletePendingSummary": { + "totalCount": 1000, + "containerStateBlockInfoListMap": { + "OPEN": [ + { + "containerId": 100, + "localIDList": [ + 1, + 2, + 3, + 4 + ], + "localIDCount": 4, + "txID": 1 + } + ] + } + }, + "omMismatch":{ "lastKey":11, "containerDiscrepancyInfo": [ @@ -3608,7 +3650,445 @@ } ] }, - "omMismatch1":{ + "omMismatch1":{ + "lastKey":21, + "containerDiscrepancyInfo": [ + { + "containerId": 11, + "numberOfKeys": 1, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + }, + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-613724nn" + }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + + ], + "existsAt": "SCM" + }, + { + "containerId": 12, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 13, + "numberOfKeys": 3, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 14, + "numberOfKeys": 4, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 15, + "numberOfKeys": 5, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 16, + "numberOfKeys": 6, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 17, + "numberOfKeys": 7, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 18, + "numberOfKeys": 8, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 19, + "numberOfKeys": 9, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 20, + "numberOfKeys": 10, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 21, + "numberOfKeys": 11, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + }, + { + "containerId": 22, + "numberOfKeys": 12, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "SCM" + } + ] + }, + "omMismatch2":{ + "lastKey": null, + "containerDiscrepancyInfo": [] + }, + "scmMismatch":{ + "lastKey":11, + "containerDiscrepancyInfo": [ + { + "containerId": 1, + "numberOfKeys": 1, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + }, + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-613724nn" + }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + + ], + "existsAt": "OM" + }, + { + "containerId": 2, + "numberOfKeys": 2, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 3, + "numberOfKeys": 3, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 4, + "numberOfKeys": 4, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 5, + "numberOfKeys": 5, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 6, + "numberOfKeys": 6, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 7, + "numberOfKeys": 7, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 8, + "numberOfKeys": 8, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 9, + "numberOfKeys": 9, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 10, + "numberOfKeys": 10, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + } + ] + }, + "scmMismatch1":{ "lastKey":21, "containerDiscrepancyInfo": [ { @@ -3641,7 +4121,7 @@ } ], - "existsAt": "SCM" + "existsAt": "OM" }, { "containerId": 12, @@ -3659,7 +4139,7 @@ "healthy": true } ], - "existsAt": "SCM" + "existsAt": "OM" }, { "containerId": 13, @@ -3677,7 +4157,7 @@ "healthy": true } ], - "existsAt": "SCM" + "existsAt": "OM" }, { "containerId": 14, @@ -3695,7 +4175,7 @@ "healthy": true } ], - "existsAt": "SCM" + "existsAt": "OM" }, { "containerId": 15, @@ -3713,7 +4193,7 @@ "healthy": true } ], - "existsAt": "SCM" + "existsAt": "OM" }, { "containerId": 16, @@ -3731,7 +4211,7 @@ "healthy": true } ], - "existsAt": "SCM" + "existsAt": "OM" }, { "containerId": 17, @@ -3749,7 +4229,7 @@ "healthy": true } ], - "existsAt": "SCM" + "existsAt": "OM" }, { "containerId": 18, @@ -3767,7 +4247,7 @@ "healthy": true } ], - "existsAt": "SCM" + "existsAt": "OM" }, { "containerId": 19, @@ -3785,7 +4265,7 @@ "healthy": true } ], - "existsAt": "SCM" + "existsAt": "OM" }, { "containerId": 20, @@ -3803,16 +4283,34 @@ "healthy": true } ], - "existsAt": "SCM" - }, + "existsAt": "OM" + } + ] + }, + "scmMismatch2":{ + "lastKey":31, + "containerDiscrepancyInfo": [ { "containerId": 21, - "numberOfKeys": 11, + "numberOfKeys": 1, "pipelines": [ { "id": { "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" }, + + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + }, + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-613724nn" + }, + "replicationConfig": { "replicationFactor": "ONE", "requiredNodes": 1, @@ -3820,12 +4318,13 @@ }, "healthy": true } + ], - "existsAt": "SCM" + "existsAt": "OM" }, { "containerId": 22, - "numberOfKeys": 12, + "numberOfKeys": 2, "pipelines": [ { "id": { @@ -3839,19 +4338,159 @@ "healthy": true } ], - "existsAt": "SCM" + "existsAt": "OM" + }, + { + "containerId": 23, + "numberOfKeys": 3, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 24, + "numberOfKeys": 4, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 25, + "numberOfKeys": 5, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 26, + "numberOfKeys": 6, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 27, + "numberOfKeys": 7, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 28, + "numberOfKeys": 8, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 29, + "numberOfKeys": 9, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" + }, + { + "containerId": 30, + "numberOfKeys": 10, + "pipelines": [ + { + "id": { + "id": "1202e6bb-b7c1-4a85-8067-61374b069adb" + }, + "replicationConfig": { + "replicationFactor": "ONE", + "requiredNodes": 1, + "replicationType": "RATIS" + }, + "healthy": true + } + ], + "existsAt": "OM" } ] }, - "omMismatch2":{ - "lastKey": null, - "containerDiscrepancyInfo": [] - }, - "scmMismatch":{ - "lastKey":11, + "scmMismatch3":{ + "lastKey":41, "containerDiscrepancyInfo": [ { - "containerId": 1, + "containerId": 31, "numberOfKeys": 1, "pipelines": [ { @@ -3883,7 +4522,7 @@ "existsAt": "OM" }, { - "containerId": 2, + "containerId": 32, "numberOfKeys": 2, "pipelines": [ { @@ -3901,7 +4540,7 @@ "existsAt": "OM" }, { - "containerId": 3, + "containerId": 33, "numberOfKeys": 3, "pipelines": [ { @@ -3919,7 +4558,7 @@ "existsAt": "OM" }, { - "containerId": 4, + "containerId": 34, "numberOfKeys": 4, "pipelines": [ { @@ -3937,7 +4576,7 @@ "existsAt": "OM" }, { - "containerId": 5, + "containerId": 35, "numberOfKeys": 5, "pipelines": [ { @@ -3955,7 +4594,7 @@ "existsAt": "OM" }, { - "containerId": 6, + "containerId": 36, "numberOfKeys": 6, "pipelines": [ { @@ -3973,7 +4612,7 @@ "existsAt": "OM" }, { - "containerId": 7, + "containerId": 37, "numberOfKeys": 7, "pipelines": [ { @@ -3991,7 +4630,7 @@ "existsAt": "OM" }, { - "containerId": 8, + "containerId": 38, "numberOfKeys": 8, "pipelines": [ { @@ -4009,7 +4648,7 @@ "existsAt": "OM" }, { - "containerId": 9, + "containerId": 39, "numberOfKeys": 9, "pipelines": [ { @@ -4027,7 +4666,7 @@ "existsAt": "OM" }, { - "containerId": 10, + "containerId": 40, "numberOfKeys": 10, "pipelines": [ { @@ -4046,11 +4685,11 @@ } ] }, - "scmMismatch1":{ - "lastKey":21, + "scmMismatch4":{ + "lastKey":51, "containerDiscrepancyInfo": [ { - "containerId": 11, + "containerId": 41, "numberOfKeys": 1, "pipelines": [ { @@ -4082,7 +4721,7 @@ "existsAt": "OM" }, { - "containerId": 12, + "containerId": 42, "numberOfKeys": 2, "pipelines": [ { @@ -4100,7 +4739,7 @@ "existsAt": "OM" }, { - "containerId": 13, + "containerId": 43, "numberOfKeys": 3, "pipelines": [ { @@ -4118,7 +4757,7 @@ "existsAt": "OM" }, { - "containerId": 14, + "containerId": 44, "numberOfKeys": 4, "pipelines": [ { @@ -4136,7 +4775,7 @@ "existsAt": "OM" }, { - "containerId": 15, + "containerId": 45, "numberOfKeys": 5, "pipelines": [ { @@ -4154,7 +4793,7 @@ "existsAt": "OM" }, { - "containerId": 16, + "containerId": 46, "numberOfKeys": 6, "pipelines": [ { @@ -4172,7 +4811,7 @@ "existsAt": "OM" }, { - "containerId": 17, + "containerId": 47, "numberOfKeys": 7, "pipelines": [ { @@ -4190,7 +4829,7 @@ "existsAt": "OM" }, { - "containerId": 18, + "containerId": 48, "numberOfKeys": 8, "pipelines": [ { @@ -4208,7 +4847,7 @@ "existsAt": "OM" }, { - "containerId": 19, + "containerId": 49, "numberOfKeys": 9, "pipelines": [ { @@ -4226,7 +4865,7 @@ "existsAt": "OM" }, { - "containerId": 20, + "containerId": 50, "numberOfKeys": 10, "pipelines": [ { @@ -4245,12 +4884,17 @@ } ] }, - "scmMismatch2":{ + "scmMismatch5":{ "lastKey": null, "containerDiscrepancyInfo": [] }, "nonFSO": { "lastKey": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2411/1105696238501917", + "keysSummary": { + "totalUnreplicatedDataSize": 1000, + "totalReplicatedDataSize": 3000, + "totalOpenKeys": 0 + }, "nonFSO": [ { "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/01/110569623850191713", @@ -4343,7 +4987,7 @@ }, { "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2403/110569623850191713", - "path": "2", + "path": "3", "inStateSince": 1686156887186, "size": 268435456, "replicatedSize": 268435456, @@ -4356,7 +5000,7 @@ }, { "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2404/110569623850191713", - "path": "2", + "path": "4", "inStateSince": 1686156887186, "size": 268435456, "replicatedSize": 268435456, @@ -4368,7 +5012,7 @@ }, { "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2405/110569623850191713", - "path": "2", + "path": "5", "inStateSince": 1686156887186, "size": 268435456, "replicatedSize": 268435456, @@ -4381,7 +5025,7 @@ }, { "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2406/110569623850191713", - "path": "2", + "path": "6", "inStateSince": 1686156887186, "size": 268435456, "replicatedSize": 268435456, @@ -4394,7 +5038,7 @@ }, { "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2407/110569623850191713", - "path": "2", + "path": "7", "inStateSince": 1686156887186, "size": 268435456, "replicatedSize": 268435456, @@ -4407,7 +5051,7 @@ }, { "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2408/110569623850191713", - "path": "2", + "path": "8", "inStateSince": 1686156887186, "size": 268435456, "replicatedSize": 268435456, @@ -4420,7 +5064,7 @@ }, { "key": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2409/110569623850191713", - "path": "2", + "path": "9", "inStateSince": 1686156887186, "size": 268435456, "replicatedSize": 268435456, @@ -4433,7 +5077,7 @@ }, { "key": "fso 10", - "path": "2", + "path": "10", "inStateSince": 1686156887186, "size": 268435456, "replicatedSize": 268435456, @@ -4735,6 +5379,11 @@ }, "keydeletePending":{ "lastKey": "/volume/bucket1/rcmeevblsf/106/-9223372036843950335", + "keysSummary": { + "totalUnreplicatedDataSize": 29291, + "totalReplicatedDataSize": 87873, + "totalDeletedKeys": 3 + }, "replicatedDataSize": 300000000, "unreplicatedDataSize": 100000000, "deletedKeyInfo": [ 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 c8f4f2928e52..edef68cda29f 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 @@ -29,13 +29,23 @@ "/heatmap/readaccess?startDate=*&path=*&entityType=key": "/keyHeatmap", "/heatmap/readaccess?startDate=*&path=*&entityType=volume": "/heatmap", "/features/disabledFeatures": "/disabledFeatures", + "/keys/open?limit=0": "/keysOpenSummary", + "/keys/deletePending?limit=0": "/keysdeletePendingSummary", + "/blocks/deletePending?limit=0": "/blocksdeletePendingSummary", "/containers/mismatch?limit=*&prevKey=11&missingIn=OM" : "/omMismatch1", "/containers/mismatch?limit=*&prevKey=21&missingIn=OM" : "/omMismatch2", + "/containers/mismatch?limit=*&prevKey=31&missingIn=OM" : "/omMismatch3", + "/containers/mismatch?limit=*&prevKey=41&missingIn=OM" : "/omMismatch4", + "/containers/mismatch?limit=*&prevKey=*&missingIn=OM" : "/omMismatch", "/containers/mismatch?limit=*&prevKey=11&missingIn=SCM" : "/scmMismatch1", "/containers/mismatch?limit=*&prevKey=21&missingIn=SCM" : "/scmMismatch2", + "/containers/mismatch?limit=*&prevKey=31&missingIn=SCM" : "/scmMismatch3", + "/containers/mismatch?limit=*&prevKey=41&missingIn=SCM" : "/scmMismatch4", + "/containers/mismatch?limit=*&prevKey=51&missingIn=SCM" : "/scmMismatch5", + "/containers/mismatch?limit=*&prevKey=*&missingIn=SCM" : "/scmMismatch", "/keys/open?includeFso=false&includeNonFso=true&limit=*&prevKey": "/nonFSO", diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index d9f4902493f7..31043423292b 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -30,6 +30,11 @@ import { Link } from 'react-router-dom'; const size = filesize.partial({ standard: 'iec' }); const { TabPane } = Tabs; +//Previous Key Need to store respective Lastkey of each API +let mismatchPrevKeyList = [0]; +let openPrevKeyList =[""]; +let keysPendingPrevList =[""]; +let deletedKeysPrevList =[0]; interface IContainerResponse { containerId: number; mismatchMissingState: string; @@ -261,7 +266,7 @@ const DELETED_TAB_COLUMNS = [ key: 'pipelines', render: (pipelines: any) => (
- {pipelines && pipelines.map(pipeline => ( + {pipelines && pipelines.map((pipeline:any) => (
{pipeline.id.id}
@@ -295,11 +300,11 @@ interface IOmdbInsightsState { prevKeyDeleted: number; prevKeyDeletePending: string; activeTab: string; - currentPage: number; DEFAULT_LIMIT: number, clickable: boolean; includeFso: boolean; includeNonFso: boolean; + prevClickable :boolean } export class Om extends React.Component, IOmdbInsightsState> { @@ -321,11 +326,11 @@ export class Om extends React.Component, IOmdbInsightsSta prevKeyDeleted: 0, expandedRowData: {}, activeTab: '1', - currentPage: 1, DEFAULT_LIMIT: 10, clickable: true, includeFso: true, includeNonFso: false, + prevClickable:false }; } @@ -370,27 +375,23 @@ export class Om extends React.Component, IOmdbInsightsSta handleExistsAtChange = (e: any) => { if (e.key === 'OM') { - console.log("OM before setstate handleExistsAtChange if", this.state); this.setState({ mismatchMissingState: 'SCM', prevKeyMismatch: 0, - prevKeyOpen: "", - prevKeyDeletePending: "", - prevKeyDeleted: 0, + expandedRowData:{} },() => { + mismatchPrevKeyList=[0]; console.log("before If fetchMismatchContainers OM",this.state); this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); }); } else { - console.log("before else setstate else SCM", this.state); this.setState({ mismatchMissingState: 'OM', prevKeyMismatch: 0, - prevKeyOpen: "", - prevKeyDeletePending: "", - prevKeyDeleted: 0, + expandedRowData:{} },() => { + mismatchPrevKeyList=[0]; console.log("before fetchMismatchContainers SCM",this.state); this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); }); @@ -437,31 +438,24 @@ export class Om extends React.Component, IOmdbInsightsSta ); handlefsoNonfsoMenuChange = (e: any) => { - console.log("keyhandlefsoNonfsoMenuChange", e.key); if (e.key === 'fso') { - console.log("if handlefsoNonfsoMenuChange--",this.state); this.setState({ includeFso: true, includeNonFso: false, prevKeyOpen: "", - prevKeyMismatch: 0, - prevKeyDeletePending: "", - prevKeyDeleted: 0, },() => { + openPrevKeyList =[""]; console.log("If handlefsoNonfsoMenuChang before fetchOpenkeys",this.state); this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); }); } else { - console.log("else handlefsoNonfsoMenuChange nonfso",this.state); this.setState({ includeFso: false, includeNonFso: true, prevKeyOpen: "", - prevKeyMismatch: 0, - prevKeyDeletePending: "", - prevKeyDeleted: 0, },() => { + openPrevKeyList =[""]; console.log("else handlefsoNonfsoMenuChang nonfso before fetchOpenkeys--",this.state); this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); }); @@ -474,27 +468,33 @@ export class Om extends React.Component, IOmdbInsightsSta }; fetchMismatchContainers = (limit: number, prevKeyMismatch: number, mismatchMissingState: any) => { + console.log("before setstate in fetchMismatchContainers", this.state); this.setState({ loading: true, - prevKeyOpen: "", - prevKeyDeletePending: "", - prevKeyDeleted: 0, - clickable: true + clickable: true, + prevClickable: true }); const mismatchEndpoint = `/api/v1/containers/mismatch?limit=${limit}&prevKey=${prevKeyMismatch}&missingIn=${mismatchMissingState}` axios.get(mismatchEndpoint).then(mismatchContainersResponse => { const mismatchContainers: IContainerResponse[] = mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.containerDiscrepancyInfo; - console.log("fetchMismatchContainers", mismatchContainersResponse.data); - localStorage.setItem('prevKeyMismatch', prevKeyMismatch.toString()); if (mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.lastKey === null) { //No Further Records may be last record this.setState({ loading: false, clickable: false, mismatchDataSource: mismatchContainers, + expandedRowData: {}, }) } else { + if (this.state.prevKeyMismatch === 0 ){ + this.setState({ + prevClickable: false + }) + } + if (mismatchPrevKeyList.includes(mismatchContainersResponse.data.lastKey) === false) { + mismatchPrevKeyList.push(mismatchContainersResponse.data.lastKey); + } this.setState({ loading: false, prevKeyMismatch: mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.lastKey, @@ -512,10 +512,8 @@ export class Om extends React.Component, IOmdbInsightsSta fetchOpenKeys = (includeFso: boolean, includeNonFso: boolean, limit: number, prevKeyOpen: string) => { this.setState({ loading: true, - prevKeyMismatch: 0, - prevKeyDeletePending: "", - prevKeyDeleted: 0, - clickable: true + clickable: true, + prevClickable:true }); let openKeysEndpoint; @@ -535,8 +533,6 @@ export class Om extends React.Component, IOmdbInsightsSta } } - localStorage.setItem('prevKeyOpen', prevKeyOpen); - if (openKeysResponse && openKeysResponse.data && openKeysResponse.data.lastKey === "") { this.setState({ loading: false, @@ -545,6 +541,14 @@ export class Om extends React.Component, IOmdbInsightsSta }) } else { + if (this.state.prevKeyOpen === "" ){ + this.setState({ + prevClickable: false + }) + } + if (openPrevKeyList.includes(openKeysResponse.data.lastKey) === false) { + openPrevKeyList.push(openKeysResponse.data.lastKey); + } this.setState({ loading: false, prevKeyOpen: openKeysResponse && openKeysResponse.data && openKeysResponse.data.lastKey, @@ -563,10 +567,8 @@ export class Om extends React.Component, IOmdbInsightsSta fetchDeletePendingKeys = (limit: number, prevKeyDeletePending: string) => { this.setState({ loading: true, - prevKeyOpen: "", - prevKeyMismatch: 0, - prevKeyDeleted: 0, - clickable: true + clickable: true, + prevClickable :true }); let deletePendingKeysEndpoint; if (prevKeyDeletePending === "") { @@ -578,7 +580,8 @@ export class Om extends React.Component, IOmdbInsightsSta axios.get(deletePendingKeysEndpoint).then(deletePendingKeysResponse => { const deletePendingKeys = deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.deletedKeyInfo; //Use Summation Logic iterate through all object and find sum of all datasize - const deletedKeyInfoData = deletePendingKeys && deletePendingKeys.flatMap((infoObject:any) => { + let deletedKeyInfoData = []; + deletedKeyInfoData = deletePendingKeys && deletePendingKeys.flatMap((infoObject:any) => { const { omKeyInfoList } = infoObject; let count = 0; let item = omKeyInfoList && omKeyInfoList.reduce((obj:any, item:any) => { @@ -597,7 +600,6 @@ export class Om extends React.Component, IOmdbInsightsSta } }); - localStorage.setItem('prevKeyDeletePending', prevKeyDeletePending); if (deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.lastKey === "") { this.setState({ loading: false, @@ -606,6 +608,14 @@ export class Om extends React.Component, IOmdbInsightsSta }) } else { + if (this.state.prevKeyDeletePending === "" ){ + this.setState({ + prevClickable: false + }) + } + if (keysPendingPrevList.includes(deletePendingKeysResponse.data.lastKey) === false) { + keysPendingPrevList.push(deletePendingKeysResponse.data.lastKey); + } this.setState({ loading: false, prevKeyDeletePending: deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.lastKey, @@ -623,24 +633,30 @@ export class Om extends React.Component, IOmdbInsightsSta fetchDeletedKeys = (limit: number, prevKeyDeleted: number) => { this.setState({ loading: true, - prevKeyOpen: "", - prevKeyDeletePending: "", - prevKeyMismatch: 0, - clickable: true + clickable: true, + prevClickable: true }); const deletedKeysEndpoint = `/api/v1/containers/mismatch/deleted?limit=${limit}&prevKey=${prevKeyDeleted}`; - axios.get(deletedKeysEndpoint).then(deletedKeysResponse => { - const deletedContainerKeys = deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.containers; - localStorage.setItem('prevKeyDeleted', prevKeyDeleted.toString()); + let deletedContainerKeys = []; + deletedContainerKeys = deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.containers; if (deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.lastKey === null) { this.setState({ loading: false, clickable: false, - deletedContainerKeysDataSource: deletedContainerKeys + deletedContainerKeysDataSource: deletedContainerKeys, + expandedRowData: {}, }) } else { + if (this.state.prevKeyDeleted === 0 ){ + this.setState({ + prevClickable: false + }) + } + if (deletedKeysPrevList.includes(deletedKeysResponse.data.lastKey) === false) { + deletedKeysPrevList.push(deletedKeysResponse.data.lastKey); + } this.setState({ loading: false, prevKeyDeleted: deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.lastKey, @@ -656,9 +672,24 @@ export class Om extends React.Component, IOmdbInsightsSta }; changeTab = (activeKey: any) => { + //when changing tab make empty all datasets and prevkey and deafult filtering to intial values + console.log("ChangeTab", this.state); this.setState({ activeTab: activeKey, - currentPage: 1, + mismatchDataSource: [], + openKeysDataSource: [], + pendingDeleteKeyDataSource: [], + deletedContainerKeysDataSource: [], + expandedRowData: {}, + prevKeyOpen: "", + prevKeyDeletePending: "", + prevKeyDeleted: 0, + prevKeyMismatch: 0, + mismatchMissingState: 'SCM', + includeFso: true, + includeNonFso: false, + DEFAULT_LIMIT: 10, + }, () => { if (activeKey === '2') { this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); @@ -674,24 +705,34 @@ export class Om extends React.Component, IOmdbInsightsSta }; fetchPreviousRecords = () => { - // To call API get key from local storage console.log("previous Records", this.state); - if (this.state.activeTab === '2') { - this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); + this.setState({ + prevKeyOpen: openPrevKeyList[openPrevKeyList.indexOf(this.state.prevKeyOpen)-2] + }) + this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT,openPrevKeyList[openPrevKeyList.indexOf(this.state.prevKeyOpen)-2]); } else if (this.state.activeTab === '3') { - this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeletePending); + this.setState({ + prevKeyDeletePending: keysPendingPrevList[keysPendingPrevList.indexOf(this.state.prevKeyDeletePending)-2] + }) + this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, keysPendingPrevList[keysPendingPrevList.indexOf(this.state.prevKeyDeletePending)-2]); } else if (this.state.activeTab === '4') { - this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); - } - else { - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT,this.state.prevKeyMismatch, this.state.mismatchMissingState); + this.setState({ + prevKeyDeleted: deletedKeysPrevList[deletedKeysPrevList.indexOf(this.state.prevKeyDeleted)-2] + }) + this.fetchDeletedKeys(this.state.DEFAULT_LIMIT,deletedKeysPrevList[deletedKeysPrevList.indexOf(this.state.prevKeyDeleted)-2]); } + else{ + this.setState({ + prevKeyMismatch: mismatchPrevKeyList[mismatchPrevKeyList.indexOf(this.state.prevKeyMismatch)-2] + }) + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT,mismatchPrevKeyList[mismatchPrevKeyList.indexOf(this.state.prevKeyMismatch)-2], this.state.mismatchMissingState); + } }; fetchNextRecords = () => { - // To Call API for Page Level for each page - console.log("fetchnextrecord", this.state.DEFAULT_LIMIT, "Last Key--", this.state.prevKeyDeletePending); + // To Call API for Page Level for each page fetch next records + console.log("In fetchnextrecord",this.state); if (this.state.activeTab === '2') { this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); } else if (this.state.activeTab === '3') { @@ -706,7 +747,7 @@ export class Om extends React.Component, IOmdbInsightsSta itemRender = (_: any, type: string, originalElement: any) => { if (type === 'prev') { - return
{ Prev}
; + return
{this.state.prevClickable ? Prev: No Records}
; } if (type === 'next') { return
{this.state.clickable ? {'>>'} : No More Further Records}
; @@ -715,21 +756,21 @@ export class Om extends React.Component, IOmdbInsightsSta }; onShowSizeChange = (current: number, pageSize: number) => { - console.log("onShowSizeChange",pageSize, this.state); - //On Size Change Call respective API with current previous page key + console.log("onShowSizeChange","pageSize",pageSize, this.state); if (this.state.activeTab === '2') { + //open keys this.setState({ DEFAULT_LIMIT: pageSize, - prevKeyOpen:localStorage.getItem('prevKeyOpen') + prevKeyOpen: openPrevKeyList[openPrevKeyList.indexOf(this.state.prevKeyOpen)-1] }, () => { this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT,this.state.prevKeyOpen); }); } else if (this.state.activeTab === '3') { - //keys pending for deletiontion + //keys pending for deletion this.setState({ DEFAULT_LIMIT: pageSize, - prevKeyDeletePending: localStorage.getItem('prevKeyDeletePending') + prevKeyDeletePending: keysPendingPrevList[keysPendingPrevList.indexOf(this.state.prevKeyDeletePending)-1] }, () => { this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeletePending); }) @@ -738,17 +779,17 @@ export class Om extends React.Component, IOmdbInsightsSta //deleted container keys this.setState({ DEFAULT_LIMIT: pageSize, - prevKeyDeleted:parseInt(localStorage.getItem('prevKeyDeleted')) + prevKeyDeleted: deletedKeysPrevList[deletedKeysPrevList.indexOf(this.state.prevKeyDeleted)-1] + // prevKeyDeleted:parseInt(localStorage.getItem('prevKeyDeleted')) }, () => { this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); }) } else { // active tab 1 for mismatch - console.log(parseInt(localStorage.getItem('prevKeyMismatch')) ); this.setState({ DEFAULT_LIMIT: pageSize, - prevKeyMismatch:parseInt(localStorage.getItem('prevKeyMismatch')) + prevKeyMismatch: mismatchPrevKeyList[mismatchPrevKeyList.indexOf(this.state.prevKeyMismatch)-1] }, () => { this.fetchMismatchContainers(this.state.DEFAULT_LIMIT,this.state.prevKeyMismatch, this.state.mismatchMissingState); }); @@ -876,9 +917,8 @@ export class Om extends React.Component, IOmdbInsightsSta render() { const { mismatchDataSource, loading, openKeysDataSource, pendingDeleteKeyDataSource, deletedContainerKeysDataSource } = this.state; - + console.log("Render--",this.state); const paginationConfig: PaginationConfig = { - //showTotal: (total: number, range) => `${range[0]}-${range[1]} of ${total} containers`, defaultPageSize: this.state.DEFAULT_LIMIT, pageSizeOptions: ['10', '20', '30', '50'], showSizeChanger: true, 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 8b3e7abaaab3..2a38d83bfd73 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 @@ -23,7 +23,7 @@ import axios from 'axios'; import {IStorageReport} from 'types/datanode.types'; import moment from 'moment'; import AutoReloadPanel from 'components/autoReloadPanel/autoReloadPanel'; -import {showDataFetchError} from 'utils/common'; +import {showDataFetchError,byteToSize} from 'utils/common'; import {AutoReloadHelper} from 'utils/autoReloadHelper'; import filesize from 'filesize'; import './overview.less'; @@ -62,6 +62,13 @@ interface IOverviewState { openContainers: number; deletedContainers: number; keysPendingDeletion: number; + openSummarytotalUnrepSize: number, + openSummarytotalRepSize: number, + openSummarytotalOpenKeys: number, + deletePendingSummarytotalUnrepSize: number, + deletePendingSummarytotalRepSize: number, + deletePendingSummarytotalDeletedKeys: number, + blocksDeletePendingtotalCount:number } export class Overview extends React.Component, IOverviewState> { @@ -90,7 +97,14 @@ export class Overview extends React.Component, IOverviewS omStatus: '', openContainers: 0, deletedContainers: 0, - keysPendingDeletion: 0 + keysPendingDeletion: 0, + openSummarytotalUnrepSize: 0, + openSummarytotalRepSize: 0, + openSummarytotalOpenKeys: 0, + deletePendingSummarytotalUnrepSize: 0, + deletePendingSummarytotalRepSize: 0, + deletePendingSummarytotalDeletedKeys: 0, + blocksDeletePendingtotalCount:0 }; this.autoReload = new AutoReloadHelper(this._loadData); } @@ -101,8 +115,11 @@ export class Overview extends React.Component, IOverviewS }); axios.all([ axios.get('/api/v1/clusterState'), - axios.get('/api/v1/task/status') - ]).then(axios.spread((clusterStateResponse, taskstatusResponse) => { + axios.get('/api/v1/task/status'), + axios.get('/api/v1/keys/open?limit=0'), + axios.get('/api/v1/keys/deletePending?limit=0'), + axios.get('/api/v1/blocks/deletePending?limit=0') + ]).then(axios.spread((clusterStateResponse, taskstatusResponse, openResponse, deletePendingResponse, blocksPendingResponse) => { const clusterState: IClusterStateResponse = clusterStateResponse.data; const taskStatus = taskstatusResponse.data; @@ -125,7 +142,14 @@ export class Overview extends React.Component, IOverviewS deletedContainers: clusterState.deletedContainers, lastRefreshed: Number(moment()), lastUpdatedOMDBDelta: omDBDeltaObject && omDBDeltaObject.lastUpdatedTimestamp, - lastUpdatedOMDBFull: omDBFullObject && omDBFullObject.lastUpdatedTimestamp + lastUpdatedOMDBFull: omDBFullObject && omDBFullObject.lastUpdatedTimestamp, + openSummarytotalUnrepSize: openResponse.data && openResponse.data.keysSummary && openResponse.data.keysSummary.totalUnreplicatedDataSize, + openSummarytotalRepSize: openResponse.data && openResponse.data.keysSummary && openResponse.data.keysSummary.totalReplicatedDataSize, + openSummarytotalOpenKeys: openResponse.data && openResponse.data.keysSummary && openResponse.data.keysSummary.totalOpenKeys, + deletePendingSummarytotalUnrepSize: deletePendingResponse.data && deletePendingResponse.data.keysSummary && deletePendingResponse.data.keysSummary.totalUnreplicatedDataSize, + deletePendingSummarytotalRepSize: deletePendingResponse.data && deletePendingResponse.data.keysSummary && deletePendingResponse.data.keysSummary.totalReplicatedDataSize, + deletePendingSummarytotalDeletedKeys: deletePendingResponse.data && deletePendingResponse.data.keysSummary && deletePendingResponse.data.keysSummary.totalDeletedKeys, + blocksDeletePendingtotalCount:blocksPendingResponse && blocksPendingResponse.data && blocksPendingResponse.data.totalCount }); })).catch(error => { this.setState({ @@ -165,14 +189,29 @@ export class Overview extends React.Component, IOverviewS } render() { - const {loading, datanodes, pipelines, storageReport, containers, volumes, buckets, - keys, missingContainersCount, lastRefreshed, lastUpdatedOMDBDelta, lastUpdatedOMDBFull, omStatus, openContainers, deletedContainers, keysPendingDeletion} = this.state; + const {loading, datanodes, pipelines, storageReport, containers, volumes, buckets, openSummarytotalUnrepSize, openSummarytotalRepSize, openSummarytotalOpenKeys, + deletePendingSummarytotalUnrepSize,deletePendingSummarytotalRepSize,deletePendingSummarytotalDeletedKeys,blocksDeletePendingtotalCount,keysPendingDeletion, + keys, missingContainersCount, lastRefreshed, lastUpdatedOMDBDelta, lastUpdatedOMDBFull, omStatus, openContainers, deletedContainers } = this.state; const datanodesElement = ( {datanodes} HEALTHY ); + const openSummaryData = ( +
+ {openSummarytotalRepSize!== undefined ? byteToSize(openSummarytotalRepSize, 1): '0'} Total Replicated Data Size
+ {openSummarytotalUnrepSize!== undefined ? byteToSize(openSummarytotalUnrepSize, 1): '0'} Total UnReplicated Data Size
+ {openSummarytotalOpenKeys !== undefined ? openSummarytotalOpenKeys: '0'} Total Open Keys +
+ ); + const deletePendingSummaryData = ( +
+ {deletePendingSummarytotalRepSize!== undefined ? byteToSize(deletePendingSummarytotalRepSize, 1): '0'} Total Replicated Data Size
+ {deletePendingSummarytotalUnrepSize!== undefined ? byteToSize(deletePendingSummarytotalUnrepSize,1): '0'} Total UnReplicated Data Size
+ {deletePendingSummarytotalDeletedKeys !== undefined ? deletePendingSummarytotalDeletedKeys: '0'} Total Pending Delete Keys +
+ ); const containersTooltip = missingContainersCount === 1 ? 'container is missing' : 'containers are missing'; const containersLink = missingContainersCount > 0 ? '/MissingContainers' : '/Containers'; const duLink = '/DiskUsage'; @@ -241,6 +280,16 @@ export class Overview extends React.Component, IOverviewS
+ + + + + + + + + + ); From 01811591fed7794f69974b8ae2258f056a568f74 Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Tue, 27 Jun 2023 10:57:45 +0530 Subject: [PATCH 09/15] HDDS-8415. Recon UI:OM DB Insights Changes to remove Total deleted blocks from overview page --- .../webapps/recon/ozone-recon-web/api/db.json | 19 ---------- .../recon/ozone-recon-web/api/routes.json | 3 +- .../src/views/insights/om/om.tsx | 35 ++++++++++++------- .../src/views/overview/overview.less | 6 ++++ .../src/views/overview/overview.tsx | 22 ++++-------- 5 files changed, 36 insertions(+), 49 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 bf4e735d4aee..8ae6df57cd00 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 @@ -3432,25 +3432,6 @@ "unreplicatedDataSize": 29291, "status": "OK" }, - "blocksdeletePendingSummary": { - "totalCount": 1000, - "containerStateBlockInfoListMap": { - "OPEN": [ - { - "containerId": 100, - "localIDList": [ - 1, - 2, - 3, - 4 - ], - "localIDCount": 4, - "txID": 1 - } - ] - } - }, - "omMismatch":{ "lastKey":11, "containerDiscrepancyInfo": [ 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 edef68cda29f..d7efeea053c1 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 @@ -30,8 +30,7 @@ "/heatmap/readaccess?startDate=*&path=*&entityType=volume": "/heatmap", "/features/disabledFeatures": "/disabledFeatures", "/keys/open?limit=0": "/keysOpenSummary", - "/keys/deletePending?limit=0": "/keysdeletePendingSummary", - "/blocks/deletePending?limit=0": "/blocksdeletePendingSummary", + "/keys/deletePending?limit=1": "/keysdeletePendingSummary", "/containers/mismatch?limit=*&prevKey=11&missingIn=OM" : "/omMismatch1", "/containers/mismatch?limit=*&prevKey=21&missingIn=OM" : "/omMismatch2", diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index 31043423292b..887356872a70 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -379,10 +379,10 @@ export class Om extends React.Component, IOmdbInsightsSta mismatchMissingState: 'SCM', prevKeyMismatch: 0, expandedRowData:{} - },() => { + },async() => { mismatchPrevKeyList=[0]; console.log("before If fetchMismatchContainers OM",this.state); - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); + await this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); }); } else { @@ -390,10 +390,10 @@ export class Om extends React.Component, IOmdbInsightsSta mismatchMissingState: 'OM', prevKeyMismatch: 0, expandedRowData:{} - },() => { + },async() => { mismatchPrevKeyList=[0]; console.log("before fetchMismatchContainers SCM",this.state); - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); + await this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); }); } }; @@ -443,10 +443,10 @@ export class Om extends React.Component, IOmdbInsightsSta includeFso: true, includeNonFso: false, prevKeyOpen: "", - },() => { + },async () => { openPrevKeyList =[""]; console.log("If handlefsoNonfsoMenuChang before fetchOpenkeys",this.state); - this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); + await this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); }); } else { @@ -454,10 +454,11 @@ export class Om extends React.Component, IOmdbInsightsSta includeFso: false, includeNonFso: true, prevKeyOpen: "", - },() => { + openKeysDataSource: [] + },async () => { openPrevKeyList =[""]; console.log("else handlefsoNonfsoMenuChang nonfso before fetchOpenkeys--",this.state); - this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); + await this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); }); } }; @@ -468,7 +469,6 @@ export class Om extends React.Component, IOmdbInsightsSta }; fetchMismatchContainers = (limit: number, prevKeyMismatch: number, mismatchMissingState: any) => { - console.log("before setstate in fetchMismatchContainers", this.state); this.setState({ loading: true, clickable: true, @@ -479,6 +479,7 @@ export class Om extends React.Component, IOmdbInsightsSta const mismatchContainers: IContainerResponse[] = mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.containerDiscrepancyInfo; if (mismatchContainersResponse && mismatchContainersResponse.data && mismatchContainersResponse.data.lastKey === null) { //No Further Records may be last record + mismatchPrevKeyList = [0]; this.setState({ loading: false, clickable: false, @@ -534,6 +535,8 @@ export class Om extends React.Component, IOmdbInsightsSta } if (openKeysResponse && openKeysResponse.data && openKeysResponse.data.lastKey === "") { + //last key of api is null may be last record no further records + openPrevKeyList = [""]; this.setState({ loading: false, clickable: false, @@ -601,6 +604,8 @@ export class Om extends React.Component, IOmdbInsightsSta }); if (deletePendingKeysResponse && deletePendingKeysResponse.data && deletePendingKeysResponse.data.lastKey === "") { + //last key of api is empty may be last record no further records + keysPendingPrevList =[""]; this.setState({ loading: false, clickable: false, @@ -641,6 +646,8 @@ export class Om extends React.Component, IOmdbInsightsSta let deletedContainerKeys = []; deletedContainerKeys = deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.containers; if (deletedKeysResponse && deletedKeysResponse.data && deletedKeysResponse.data.lastKey === null) { + // no more further records last key + deletedKeysPrevList = [0]; this.setState({ loading: false, clickable: false, @@ -673,7 +680,10 @@ export class Om extends React.Component, IOmdbInsightsSta changeTab = (activeKey: any) => { //when changing tab make empty all datasets and prevkey and deafult filtering to intial values - console.log("ChangeTab", this.state); + mismatchPrevKeyList = [0]; + openPrevKeyList =[""]; + keysPendingPrevList =[""]; + deletedKeysPrevList =[0]; this.setState({ activeTab: activeKey, mismatchDataSource: [], @@ -705,7 +715,7 @@ export class Om extends React.Component, IOmdbInsightsSta }; fetchPreviousRecords = () => { - console.log("previous Records", this.state); + // to fetch previous call stored all prevkey in array and fetching in respective tabs if (this.state.activeTab === '2') { this.setState({ prevKeyOpen: openPrevKeyList[openPrevKeyList.indexOf(this.state.prevKeyOpen)-2] @@ -732,7 +742,6 @@ export class Om extends React.Component, IOmdbInsightsSta fetchNextRecords = () => { // To Call API for Page Level for each page fetch next records - console.log("In fetchnextrecord",this.state); if (this.state.activeTab === '2') { this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); } else if (this.state.activeTab === '3') { @@ -919,11 +928,11 @@ export class Om extends React.Component, IOmdbInsightsSta const { mismatchDataSource, loading, openKeysDataSource, pendingDeleteKeyDataSource, deletedContainerKeysDataSource } = this.state; console.log("Render--",this.state); const paginationConfig: PaginationConfig = { + pageSize:this.state.DEFAULT_LIMIT, defaultPageSize: this.state.DEFAULT_LIMIT, pageSizeOptions: ['10', '20', '30', '50'], showSizeChanger: true, onShowSizeChange: this.onShowSizeChange, - //onChange: this.onChangePagination, itemRender: this.itemRender }; diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.less b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.less index 343370789476..e683a7d5d042 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.less +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/overview/overview.less @@ -28,3 +28,9 @@ padding-left: 5px; } } + +.summary-font{ + .overview-card .ant-card-meta-detail .ant-card-meta-title { + font-size: 17px !important; + } + } 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 2a38d83bfd73..09720fbc223e 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 @@ -68,7 +68,6 @@ interface IOverviewState { deletePendingSummarytotalUnrepSize: number, deletePendingSummarytotalRepSize: number, deletePendingSummarytotalDeletedKeys: number, - blocksDeletePendingtotalCount:number } export class Overview extends React.Component, IOverviewState> { @@ -103,8 +102,7 @@ export class Overview extends React.Component, IOverviewS openSummarytotalOpenKeys: 0, deletePendingSummarytotalUnrepSize: 0, deletePendingSummarytotalRepSize: 0, - deletePendingSummarytotalDeletedKeys: 0, - blocksDeletePendingtotalCount:0 + deletePendingSummarytotalDeletedKeys: 0 }; this.autoReload = new AutoReloadHelper(this._loadData); } @@ -117,9 +115,8 @@ export class Overview extends React.Component, IOverviewS axios.get('/api/v1/clusterState'), axios.get('/api/v1/task/status'), axios.get('/api/v1/keys/open?limit=0'), - axios.get('/api/v1/keys/deletePending?limit=0'), - axios.get('/api/v1/blocks/deletePending?limit=0') - ]).then(axios.spread((clusterStateResponse, taskstatusResponse, openResponse, deletePendingResponse, blocksPendingResponse) => { + axios.get('/api/v1/keys/deletePending?limit=1'), + ]).then(axios.spread((clusterStateResponse, taskstatusResponse, openResponse, deletePendingResponse) => { const clusterState: IClusterStateResponse = clusterStateResponse.data; const taskStatus = taskstatusResponse.data; @@ -148,8 +145,7 @@ export class Overview extends React.Component, IOverviewS openSummarytotalOpenKeys: openResponse.data && openResponse.data.keysSummary && openResponse.data.keysSummary.totalOpenKeys, deletePendingSummarytotalUnrepSize: deletePendingResponse.data && deletePendingResponse.data.keysSummary && deletePendingResponse.data.keysSummary.totalUnreplicatedDataSize, deletePendingSummarytotalRepSize: deletePendingResponse.data && deletePendingResponse.data.keysSummary && deletePendingResponse.data.keysSummary.totalReplicatedDataSize, - deletePendingSummarytotalDeletedKeys: deletePendingResponse.data && deletePendingResponse.data.keysSummary && deletePendingResponse.data.keysSummary.totalDeletedKeys, - blocksDeletePendingtotalCount:blocksPendingResponse && blocksPendingResponse.data && blocksPendingResponse.data.totalCount + deletePendingSummarytotalDeletedKeys: deletePendingResponse.data && deletePendingResponse.data.keysSummary && deletePendingResponse.data.keysSummary.totalDeletedKeys }); })).catch(error => { this.setState({ @@ -190,7 +186,7 @@ export class Overview extends React.Component, IOverviewS render() { const {loading, datanodes, pipelines, storageReport, containers, volumes, buckets, openSummarytotalUnrepSize, openSummarytotalRepSize, openSummarytotalOpenKeys, - deletePendingSummarytotalUnrepSize,deletePendingSummarytotalRepSize,deletePendingSummarytotalDeletedKeys,blocksDeletePendingtotalCount,keysPendingDeletion, + deletePendingSummarytotalUnrepSize,deletePendingSummarytotalRepSize,deletePendingSummarytotalDeletedKeys,keysPendingDeletion, keys, missingContainersCount, lastRefreshed, lastUpdatedOMDBDelta, lastUpdatedOMDBFull, omStatus, openContainers, deletedContainers } = this.state; const datanodesElement = ( @@ -280,16 +276,12 @@ export class Overview extends React.Component, IOverviewS - + - + - - - - ); From bae29f524e98d841b331e8727d50f4f737ed8f0f Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Tue, 27 Jun 2023 17:31:24 +0530 Subject: [PATCH 10/15] HDDS-8415. Recon UI:OM DB Insights Changes to remove commented lines --- .../webapps/recon/ozone-recon-web/src/views/insights/om/om.less | 2 -- .../webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx | 1 - 2 files changed, 3 deletions(-) diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.less b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.less index 129e3619a7c6..78a7e98aa6c9 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.less +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.less @@ -1,11 +1,9 @@ .ant-pagination-disabled a, .ant-pagination-disabled:hover a, .ant-pagination-disabled:focus a, .ant-pagination-disabled .ant-pagination-item-link, .ant-pagination-disabled:hover .ant-pagination-item-link, .ant-pagination-disabled:focus .ant-pagination-item-link { color: rgba(0, 0, 0, 0.65); - //border-color: #d9d9d9; cursor: pointer !important; } .ant-pagination-disabled, .ant-pagination-disabled:hover, .ant-pagination-disabled:focus { color: rgba(0, 0, 0, 0.65); - //border-color: #d9d9d9; cursor: pointer !important; } \ No newline at end of file diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index 887356872a70..396413a15621 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -362,7 +362,6 @@ export class Om extends React.Component, IOmdbInsightsSta existAtScmOmMenu = () => ( this.handleExistsAtChange(e)}> OM From bb41021043bcadffb89139d580e3d71152605be4 Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Wed, 28 Jun 2023 16:27:02 +0530 Subject: [PATCH 11/15] HDDS-8415. Recon UI:OM DB Insights Changes Filter Change Commit --- .../src/views/insights/om/om.tsx | 75 +++++++------------ 1 file changed, 26 insertions(+), 49 deletions(-) diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index 396413a15621..43f6a3937949 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -373,27 +373,14 @@ export class Om extends React.Component, IOmdbInsightsSta ); handleExistsAtChange = (e: any) => { + console.log("handleExistsAtChange", e.key); if (e.key === 'OM') { - this.setState({ - mismatchMissingState: 'SCM', - prevKeyMismatch: 0, - expandedRowData:{} - },async() => { - mismatchPrevKeyList=[0]; - console.log("before If fetchMismatchContainers OM",this.state); - await this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); - }); + mismatchPrevKeyList = [0]; + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, 0, 'SCM'); } else { - this.setState({ - mismatchMissingState: 'OM', - prevKeyMismatch: 0, - expandedRowData:{} - },async() => { - mismatchPrevKeyList=[0]; - console.log("before fetchMismatchContainers SCM",this.state); - await this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, this.state.prevKeyMismatch, this.state.mismatchMissingState); - }); + mismatchPrevKeyList = [0]; + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT, 0, 'OM'); } }; @@ -437,28 +424,14 @@ export class Om extends React.Component, IOmdbInsightsSta ); handlefsoNonfsoMenuChange = (e: any) => { + console.log("handlefsoNonfsoMenuChange", e.key); if (e.key === 'fso') { - this.setState({ - includeFso: true, - includeNonFso: false, - prevKeyOpen: "", - },async () => { - openPrevKeyList =[""]; - console.log("If handlefsoNonfsoMenuChang before fetchOpenkeys",this.state); - await this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); - }); + openPrevKeyList =[""]; + this.fetchOpenKeys(true, false, this.state.DEFAULT_LIMIT, ""); } else { - this.setState({ - includeFso: false, - includeNonFso: true, - prevKeyOpen: "", - openKeysDataSource: [] - },async () => { - openPrevKeyList =[""]; - console.log("else handlefsoNonfsoMenuChang nonfso before fetchOpenkeys--",this.state); - await this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); - }); + openPrevKeyList = [""]; + this.fetchOpenKeys(false, true, this.state.DEFAULT_LIMIT, ""); } }; @@ -573,7 +546,7 @@ export class Om extends React.Component, IOmdbInsightsSta prevClickable :true }); let deletePendingKeysEndpoint; - if (prevKeyDeletePending === "") { + if (prevKeyDeletePending === "" || prevKeyDeletePending === undefined ) { deletePendingKeysEndpoint = `/api/v1/keys/deletePending?limit=${limit}&prevKey`; } else { @@ -612,7 +585,7 @@ export class Om extends React.Component, IOmdbInsightsSta }) } else { - if (this.state.prevKeyDeletePending === "" ){ + if (this.state.prevKeyDeletePending === "" ||this.state.prevKeyDeletePending === undefined ){ this.setState({ prevClickable: false }) @@ -716,26 +689,30 @@ export class Om extends React.Component, IOmdbInsightsSta fetchPreviousRecords = () => { // to fetch previous call stored all prevkey in array and fetching in respective tabs if (this.state.activeTab === '2') { - this.setState({ - prevKeyOpen: openPrevKeyList[openPrevKeyList.indexOf(this.state.prevKeyOpen)-2] - }) - this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT,openPrevKeyList[openPrevKeyList.indexOf(this.state.prevKeyOpen)-2]); + this.setState({ + prevKeyOpen: openPrevKeyList[openPrevKeyList.indexOf(this.state.prevKeyOpen)-2] + }, () => { + this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT,this.state.prevKeyOpen); + }) } else if (this.state.activeTab === '3') { this.setState({ prevKeyDeletePending: keysPendingPrevList[keysPendingPrevList.indexOf(this.state.prevKeyDeletePending)-2] + }, () => { + this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeletePending); }) - this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, keysPendingPrevList[keysPendingPrevList.indexOf(this.state.prevKeyDeletePending)-2]); } else if (this.state.activeTab === '4') { this.setState({ prevKeyDeleted: deletedKeysPrevList[deletedKeysPrevList.indexOf(this.state.prevKeyDeleted)-2] + }, () => { + this.fetchDeletedKeys(this.state.DEFAULT_LIMIT,this.state.prevKeyDeleted); }) - this.fetchDeletedKeys(this.state.DEFAULT_LIMIT,deletedKeysPrevList[deletedKeysPrevList.indexOf(this.state.prevKeyDeleted)-2]); } - else{ + else { this.setState({ prevKeyMismatch: mismatchPrevKeyList[mismatchPrevKeyList.indexOf(this.state.prevKeyMismatch)-2] + }, () => { + this.fetchMismatchContainers(this.state.DEFAULT_LIMIT,this.state.prevKeyMismatch, this.state.mismatchMissingState); }) - this.fetchMismatchContainers(this.state.DEFAULT_LIMIT,mismatchPrevKeyList[mismatchPrevKeyList.indexOf(this.state.prevKeyMismatch)-2], this.state.mismatchMissingState); } }; @@ -764,7 +741,8 @@ export class Om extends React.Component, IOmdbInsightsSta }; onShowSizeChange = (current: number, pageSize: number) => { - console.log("onShowSizeChange","pageSize",pageSize, this.state); + console.log("onShowSizeChange",pageSize, this.state); + console.log("Open Keys Array", keysPendingPrevList); if (this.state.activeTab === '2') { //open keys this.setState({ @@ -788,7 +766,6 @@ export class Om extends React.Component, IOmdbInsightsSta this.setState({ DEFAULT_LIMIT: pageSize, prevKeyDeleted: deletedKeysPrevList[deletedKeysPrevList.indexOf(this.state.prevKeyDeleted)-1] - // prevKeyDeleted:parseInt(localStorage.getItem('prevKeyDeleted')) }, () => { this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); }) From 44b40b5713705e9082102a69ffe2be3308c35c59 Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Wed, 28 Jun 2023 17:09:20 +0530 Subject: [PATCH 12/15] HDDS-8415. Recon UI:OM DB Insights Changes Filter Change Commit Remove Console --- .../webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index 43f6a3937949..e3cdbcda9bc5 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -902,7 +902,7 @@ export class Om extends React.Component, IOmdbInsightsSta render() { const { mismatchDataSource, loading, openKeysDataSource, pendingDeleteKeyDataSource, deletedContainerKeysDataSource } = this.state; - console.log("Render--",this.state); + const paginationConfig: PaginationConfig = { pageSize:this.state.DEFAULT_LIMIT, defaultPageSize: this.state.DEFAULT_LIMIT, From 6f3e090b66a48de265e73fa5d134720c1227549e Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Thu, 29 Jun 2023 10:44:40 +0530 Subject: [PATCH 13/15] HDDS-8415.Recon UI:OM DB Insights Changes Tooltip for container mismatch --- .../src/views/insights/om/om.tsx | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index e3cdbcda9bc5..39713bb89b99 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -165,10 +165,10 @@ const MISMATCH_TAB_COLUMNS = [ const OPEN_KEY_TAB_COLUMNS = [ { - title: 'Path', + title: 'Key', dataIndex: 'path', key: 'path', - isSearchable: true, + isSearchable: true }, { title: 'Amount of data', @@ -177,7 +177,7 @@ const OPEN_KEY_TAB_COLUMNS = [ render: (size :any) => size = byteToSize(size,1) }, { - title: 'Key', + title: 'Path', dataIndex: 'key', key: 'key', width: '270px' @@ -339,10 +339,17 @@ export class Om extends React.Component, IOmdbInsightsSta const existsAtColumn = { title: - - , + +    + + , dataIndex: 'existsAt', key: 'existsAt', isVisible: true, @@ -833,7 +840,6 @@ export class Om extends React.Component, IOmdbInsightsSta rowKey='uid' /> ); } - return
Loading...
; }; @@ -947,6 +953,8 @@ export class Om extends React.Component, IOmdbInsightsSta /> } + + return (
From 4c357d54b3a1629da82abfbd7acd6f1620e54f74 Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Thu, 29 Jun 2023 15:08:36 +0530 Subject: [PATCH 14/15] Recon UI:OM DB Insights Changes Expand Button Functionality on keysdeletepending endpoint. --- .../webapps/recon/ozone-recon-web/api/db.json | 16 +++--- .../src/views/insights/om/om.tsx | 56 +++++++++++++++++-- 2 files changed, 60 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 8ae6df57cd00..d821e1377f3d 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 @@ -5735,8 +5735,8 @@ "parentObjectID": 0, "volumeName": "sampleVol", "bucketName": "bucketOne", - "keyName": "/-9223372036854775552/-9223372036854775040/-9223372036852420095/2411/110569623850191", - "dataSize": -1530804718628866300, + "keyName": "key22", + "dataSize": 1000, "keyLocationVersions": [], "creationTime": 0, "modificationTime": 0, @@ -5746,12 +5746,12 @@ "replicationType": "STANDALONE" }, "fileChecksum": null, - "fileName": "key_22", + "fileName": "file_key22", "acls": [], "path": "0/key_one", "file": false, "latestVersionLocations": null, - "replicatedSize": -1530804718628866300, + "replicatedSize": 120000000, "fileEncryptionInfo": null, "updateIDset": false }, @@ -5762,8 +5762,8 @@ "parentObjectID": 0, "volumeName": "sampleVol", "bucketName": "bucketOne", - "keyName": "key_22", - "dataSize": -1530804718628866300, + "keyName": "key22", + "dataSize": 2000, "keyLocationVersions": [], "creationTime": 0, "modificationTime": 0, @@ -5773,9 +5773,9 @@ "replicationType": "STANDALONE" }, "fileChecksum": null, - "fileName": "key_two", + "fileName": "file_key22", "acls": [], - "path": "0/key_two", + "path": "0/key_one", "file": false, "latestVersionLocations": null, "replicatedSize": -1530804718628866300, diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx index 39713bb89b99..9b8e1297919b 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx @@ -35,6 +35,7 @@ let mismatchPrevKeyList = [0]; let openPrevKeyList =[""]; let keysPendingPrevList =[""]; let deletedKeysPrevList =[0]; +let keysPendingExpanded: any = []; interface IContainerResponse { containerId: number; mismatchMissingState: string; @@ -552,6 +553,7 @@ export class Om extends React.Component, IOmdbInsightsSta clickable: true, prevClickable :true }); + keysPendingExpanded =[]; let deletePendingKeysEndpoint; if (prevKeyDeletePending === "" || prevKeyDeletePending === undefined ) { deletePendingKeysEndpoint = `/api/v1/keys/deletePending?limit=${limit}&prevKey`; @@ -565,12 +567,13 @@ export class Om extends React.Component, IOmdbInsightsSta let deletedKeyInfoData = []; deletedKeyInfoData = deletePendingKeys && deletePendingKeys.flatMap((infoObject:any) => { const { omKeyInfoList } = infoObject; + keysPendingExpanded.push(infoObject); let count = 0; let item = omKeyInfoList && omKeyInfoList.reduce((obj:any, item:any) => { const { dataSize } = item; - item.dataSize = obj.dataSize + dataSize; + const newDataSize = obj.dataSize + dataSize; count = count + 1; - return item; + return { ...item, dataSize: newDataSize }; }, { "dataSize": 0 }); return { @@ -614,6 +617,49 @@ export class Om extends React.Component, IOmdbInsightsSta }); }; + expandedKey = ( record:any)=> { + const filteredData = keysPendingExpanded && keysPendingExpanded.flatMap((info:any) => + info.omKeyInfoList && info.omKeyInfoList.filter((item: any) => item.keyName === record.keyName) + ) + const columns= [{ + title: 'Data Size', + dataIndex: 'dataSize', + key: 'dataSize', + render: (dataSize :any) => dataSize = dataSize > 0 ? byteToSize(dataSize,1) : dataSize + }, + { + title: 'Replicated Data Size', + dataIndex: 'replicatedSize', + key: 'replicatedSize', + render: (replicatedSize :any) => replicatedSize = replicatedSize > 0 ? byteToSize(replicatedSize,1) : replicatedSize + }, + { + title: 'Creation Time', + dataIndex: 'creationTime', + key: 'creationTime', + render: (creationTime: number) => { + return creationTime > 0 ? moment(creationTime).format('ll LTS') : 'NA'; + } + }, + { + title: 'Modification Time', + dataIndex: 'modificationTime', + key: 'modificationTime', + render: (modificationTime: number) => { + return modificationTime > 0 ? moment(modificationTime).format('ll LTS') : 'NA'; + } + } + ] + return ( +
+ ); + } + fetchDeletedKeys = (limit: number, prevKeyDeleted: number) => { this.setState({ loading: true, @@ -683,6 +729,7 @@ export class Om extends React.Component, IOmdbInsightsSta if (activeKey === '2') { this.fetchOpenKeys(this.state.includeFso, this.state.includeNonFso, this.state.DEFAULT_LIMIT, this.state.prevKeyOpen); } else if (activeKey === '3') { + keysPendingExpanded =[]; this.fetchDeletePendingKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeletePending); } else if (activeKey === '4') { this.fetchDeletedKeys(this.state.DEFAULT_LIMIT, this.state.prevKeyDeleted); @@ -931,7 +978,7 @@ export class Om extends React.Component, IOmdbInsightsSta return
} @@ -940,7 +987,8 @@ export class Om extends React.Component, IOmdbInsightsSta expandRowByClick dataSource={dataSource} columns={this.searchKeysPendingColumn()} loading={loading} - pagination={paginationConfig} rowKey='keyName' /> + pagination={paginationConfig} rowKey='keyName' + expandedRowRender={this.expandedKey} /> } const generateDeletedKeysTable = (dataSource: any) => { From 30ff1f97eea02acf6d667ac1dd1b847aa675b4d6 Mon Sep 17 00:00:00 2001 From: smitajoshi Date: Fri, 30 Jun 2023 13:44:42 +0530 Subject: [PATCH 15/15] HDDS-8415. Recon UI:OM DB Insights Changes apache header adding --- .../src/views/insights/om/om.less | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.less b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.less index 78a7e98aa6c9..15d68dfc8600 100644 --- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.less +++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.less @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + .ant-pagination-disabled a, .ant-pagination-disabled:hover a, .ant-pagination-disabled:focus a, .ant-pagination-disabled .ant-pagination-item-link, .ant-pagination-disabled:hover .ant-pagination-item-link, .ant-pagination-disabled:focus .ant-pagination-item-link { color: rgba(0, 0, 0, 0.65); cursor: pointer !important;