This is an automated email from the ASF dual-hosted git repository.
ivandika pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 6b872073b9 HDDS-11469. Statistics of Pipeline and Container (#7217)
6b872073b9 is described below
commit 6b872073b9769482e01b89090bfb19f53d388690
Author: jianghuazhu <[email protected]>
AuthorDate: Wed Sep 25 10:51:59 2024 +0800
HDDS-11469. Statistics of Pipeline and Container (#7217)
---
.../main/resources/webapps/scm/scm-overview.html | 108 +++++++++++++++++++++
.../src/main/resources/webapps/scm/scm.js | 68 +++++++++++++
2 files changed, 176 insertions(+)
diff --git
a/hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm-overview.html
b/hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm-overview.html
index 0f233bf4ea..2748716e67 100644
--- a/hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm-overview.html
+++ b/hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm-overview.html
@@ -110,6 +110,114 @@
</tbody>
</table>
+<h2>Pipeline Statistics</h2>
+<table class="table table-bordered table-striped">
+ <tbody>
+ <tr>
+ <th>Pipeline State</th>
+ <th>Size</th>
+ </tr>
+ <tr>
+ <td>Closed</td>
+ <td>{{statistics.pipelines.closed}}</td>
+ </tr>
+ <tr>
+ <td>Allocated</td>
+ <td>{{statistics.pipelines.allocated}}</td>
+ </tr>
+ <tr>
+ <td>Open</td>
+ <td>{{statistics.pipelines.open}}</td>
+ </tr>
+ <tr>
+ <td>Dormant</td>
+ <td>{{statistics.pipelines.dormant}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2>Container Statistics</h2>
+<table class="table table-bordered table-striped">
+ <tbody>
+ <tr>
+ <th>Operational State</th>
+ <th>Size</th>
+ </tr>
+ <tr>
+ <td>Open</td>
+ <td>{{statistics.containers.lifecycle.open}}</td>
+ </tr>
+ <tr>
+ <td>Closing</td>
+ <td>{{statistics.containers.lifecycle.closing}}</td>
+ </tr>
+ <tr>
+ <td>Quasi Closed</td>
+ <td>{{statistics.containers.lifecycle.quasi_closed}}</td>
+ </tr>
+ <tr>
+ <td>Closed</td>
+ <td>{{statistics.containers.lifecycle.closed}}</td>
+ </tr>
+ <tr>
+ <td>Deleting</td>
+ <td>{{statistics.containers.lifecycle.deleting}}</td>
+ </tr>
+ <tr>
+ <td>Deleted</td>
+ <td>{{statistics.containers.lifecycle.deleted}}</td>
+ </tr>
+ <tr>
+ <td>Recovering</td>
+ <td>{{statistics.containers.lifecycle.recovering}}</td>
+ </tr>
+ </tbody>
+</table>
+<table class="table table-bordered table-striped">
+ <tbody>
+ <tr>
+ <th>Health</th>
+ <th>Size</th>
+ </tr>
+ <tr>
+ <td>Under Replicated</td>
+ <td>{{statistics.containers.health.under_replicated}}</td>
+ </tr>
+ <tr>
+ <td>Mis Replicated</td>
+ <td>{{statistics.containers.health.mis_replicated}}</td>
+ </tr>
+ <tr>
+ <td>Over Replicated</td>
+ <td>{{statistics.containers.health.over_replicated}}</td>
+ </tr>
+ <tr>
+ <td>Missing</td>
+ <td>{{statistics.containers.health.missing}}</td>
+ </tr>
+ <tr>
+ <td>Unhealthy</td>
+ <td>{{statistics.containers.health.unhealthy}}</td>
+ </tr>
+ <tr>
+ <td>Empty</td>
+ <td>{{statistics.containers.health.empty}}</td>
+ </tr>
+ <tr>
+ <td>Open Unhealthy</td>
+ <td>{{statistics.containers.health.open_unhealthy}}</td>
+ </tr>
+ <tr>
+ <td>Quasi Closed Stuck</td>
+ <td>{{statistics.containers.health.quasi_closed_stuck}}</td>
+ </tr>
+ <tr>
+ <td>Open Without Pipeline</td>
+ <td>{{statistics.containers.health.open_without_pipeline}}</td>
+ </tr>
+ </tbody>
+</table>
+
<h2>Node Status</h2>
<div class="row">
<div class="col-md-6 text-left">
diff --git a/hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm.js
b/hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm.js
index e00f8b8ede..fc216c0686 100644
--- a/hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm.js
+++ b/hadoop-hdds/server-scm/src/main/resources/webapps/scm/scm.js
@@ -53,6 +53,34 @@
remaining : "N/A",
nonscmused : "N/A"
}
+ },
+ pipelines : {
+ closed : "N/A",
+ allocated : "N/A",
+ open : "N/A",
+ dormant : "N/A"
+ },
+ containers : {
+ lifecycle : {
+ open : "N/A",
+ closing : "N/A",
+ quasi_closed : "N/A",
+ closed : "N/A",
+ deleting : "N/A",
+ deleted : "N/A",
+ recovering : "N/A"
+ },
+ health : {
+ under_replicated : "N/A",
+ mis_replicated : "N/A",
+ over_replicated : "N/A",
+ missing : "N/A",
+ unhealthy : "N/A",
+ empty : "N/A",
+ open_unhealthy : "N/A",
+ quasi_closed_stuck : "N/A",
+ open_without_pipeline : "N/A"
+ }
}
}
@@ -142,6 +170,46 @@
}
});
});
+
+
$http.get("jmx?qry=Hadoop:service=SCMPipelineManager,name=SCMPipelineManagerInfo")
+ .then(function (result) {
+ const URLScheme = location.protocol.replace(":" , "");
+ ctrl.scmpipelinemanager = result.data.beans[0];
+ ctrl.scmpipelinemanager.PipelineInfo.forEach(({key,
value}) => {
+ if(key == "CLOSED") {
+ $scope.statistics.pipelines.closed = value;
+ } else if(key == "ALLOCATED") {
+ $scope.statistics.pipelines.allocated = value;
+ } else if(key == "OPEN") {
+ $scope.statistics.pipelines.open = value;
+ } else if(key == "DORMANT") {
+ $scope.statistics.pipelines.dormant = value;
+ }
+ });
+ });
+
+
$http.get("jmx?qry=Hadoop:service=StorageContainerManager,name=ReplicationManagerMetrics")
+ .then(function (result) {
+ const URLScheme = location.protocol.replace(":" , "");
+ ctrl.scmcontainermanager = result.data.beans[0];
+ $scope.statistics.containers.lifecycle.open =
ctrl.scmcontainermanager.OpenContainers;
+ $scope.statistics.containers.lifecycle.closing =
ctrl.scmcontainermanager.ClosingContainers;
+ $scope.statistics.containers.lifecycle.quasi_closed =
ctrl.scmcontainermanager.QuasiClosedContainers;
+ $scope.statistics.containers.lifecycle.closed =
ctrl.scmcontainermanager.ClosedContainers;
+ $scope.statistics.containers.lifecycle.deleting =
ctrl.scmcontainermanager.DeletingContainers;
+ $scope.statistics.containers.lifecycle.deleted =
ctrl.scmcontainermanager.DeletedContainers;
+ $scope.statistics.containers.lifecycle.recovering =
ctrl.scmcontainermanager.RecoveringContainers;
+ $scope.statistics.containers.health.under_replicated =
ctrl.scmcontainermanager.UnderReplicatedContainers;
+ $scope.statistics.containers.health.mis_replicated =
ctrl.scmcontainermanager.MisReplicatedContainers;
+ $scope.statistics.containers.health.over_replicated =
ctrl.scmcontainermanager.OverReplicatedContainers;
+ $scope.statistics.containers.health.missing =
ctrl.scmcontainermanager.MissingContainers;
+ $scope.statistics.containers.health.unhealthy =
ctrl.scmcontainermanager.UnhealthyContainers;
+ $scope.statistics.containers.health.empty =
ctrl.scmcontainermanager.EmptyContainers;
+ $scope.statistics.containers.health.open_unhealthy =
ctrl.scmcontainermanager.OpenUnhealthyContainers;
+ $scope.statistics.containers.health.quasi_closed_stuck =
ctrl.scmcontainermanager.StuckQuasiClosedContainers;
+ $scope.statistics.containers.health.open_without_pipeline
= ctrl.scmcontainermanager.OpenContainersWithoutPipeline;
+ });
+
/*if option is 'All' display all records else display specified
record on page*/
$scope.UpdateRecordsToShow = () => {
if($scope.RecordsToDisplay == 'All') {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]