slfan1989 commented on code in PR #7206:
URL: https://github.com/apache/ozone/pull/7206#discussion_r1832217094
##########
hadoop-hdds/container-service/src/main/resources/webapps/hddsDatanode/dn.js:
##########
@@ -36,20 +36,104 @@
volume.TotalCapacity = transform(volume.TotalCapacity);
})
});
+
+
$http.get("jmx?qry=Hadoop:service=HddsDatanode,name=SCMConnectionManager")
+ .then(function (result) {
+ ctrl.dnmetrics2 = result.data.beans;
+ ctrl.dnmetrics2.forEach(scm => {
+ var scmServers = scm.SCMServers;
+ scmServers.forEach(scmServer => {
+ scmServer.lastSuccessfulHeartbeat =
convertTimestampToDate(scmServer.lastSuccessfulHeartbeat)
+ })
+ })
+ });
}
});
- function transform(v) {
- var UNITS = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'ZB'];
- var prev = 0, i = 0;
- while (Math.floor(v) > 0 && i < UNITS.length) {
+
+ // Register ioStatus Controller
+ angular.module('ozone').config(function ($routeProvider) {
+ $routeProvider.when('/iostatus', {
+ templateUrl: 'iostatus.html',
+ controller: 'IOStatusController as ioStatusCtrl',
+ });
+ });
+
+ angular.module('ozone')
+ .controller('IOStatusController', function ($http) {
+ var ctrl = this;
+
$http.get("jmx?qry=Hadoop:service=HddsDatanode,name=VolumeIOStats*")
+ .then(function (result) {
+ ctrl.dniostatus = result.data.beans;
+ });
+ });
+
+ // Register Scanner Controller
+ angular.module('ozone').config(function ($routeProvider) {
+ $routeProvider.when('/dn-scanner', {
+ templateUrl: 'dn-scanner.html',
+ controller: 'DNScannerController as scannerStatusCtrl',
+ });
+ });
+
+ angular.module('ozone')
+ .controller('DNScannerController', function ($http) {
+ var ctrl = this;
+
$http.get("jmx?qry=Hadoop:service=HddsDatanode,name=ContainerDataScannerMetrics*")
+ .then(function (result) {
+ ctrl.dnscanner = result.data.beans;
+ });
Review Comment:
`ContainerDataScannerMetrics` like the following content:
```
{
"name" :
"Hadoop:service=HddsDatanode,name=ContainerDataScannerMetrics-/data7/ozonedata/hddsdata/hdds",
"modelerType" :
"ContainerDataScannerMetrics-/data7/ozonedata/hddsdata/hdds",
"tag.Context" : "dfs",
"tag.StorageDirectory" : "/data7/ozonedata/hddsdata/hdds",
"tag.Hostname" : "bigdata-s3602-ozone.apache01",
"NumBytesScannedNumOps" : 31652033,
"NumBytesScannedAvgTime" : 1048576.0,
"NumContainersScanned" : 548,
"NumScanIterations" : 7,
"NumUnHealthyContainers" : 0
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]