ivandika3 commented on code in PR #7206:
URL: https://github.com/apache/ozone/pull/7206#discussion_r1802469027
##########
hadoop-hdds/container-service/src/main/resources/webapps/hddsDatanode/dn-overview.html:
##########
@@ -22,8 +22,28 @@
</tbody>
</table>
+<h2>HeartBeat Information</h2>
+<table class="table" class="col-md-6">
+ <thead>
+ <tr>
+ <th>Address</th>
+ <th>Last Successful HeartBeat</th>
+ <th>Missed Count</th>
+ <th>State</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="scm in $ctrl.dnmetrics2[0].SCMServers">
+ <td>{{scm.addressString}}</td>
+ <td>{{scm.lastSuccessfulHeartbeat}}</td>
+ <td>{{scm.missedCount}}</td>
+ <td>{{scm.state}}</td>
+ </tr>
+ </tbody>
+</table>
+
<h2>Volume Information</h2>
-<table class="table table-bordered table-striped" class="col-md-6">
Review Comment:
Any reason why this is removed? We can add this to the "HeartBeat
Information" table instead and all the other new tables.
##########
hadoop-hdds/container-service/src/main/resources/webapps/hddsDatanode/dn-overview.html:
##########
@@ -22,8 +22,28 @@
</tbody>
</table>
+<h2>HeartBeat Information</h2>
+<table class="table" class="col-md-6">
+ <thead>
+ <tr>
+ <th>Address</th>
+ <th>Last Successful HeartBeat</th>
+ <th>Missed Count</th>
+ <th>State</th>
Review Comment:
Could you also add other things in `SCMConnectionManager` such as `type`,
`versionNumber`?
##########
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 => {
Review Comment:
Nit: Rather than `dnmetrics2`, we can change this to something like
`ctrl.heartbeatmetrics` or other more appropriate names.
##########
hadoop-hdds/framework/src/main/resources/webapps/static/templates/overview.html:
##########
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<h1>Overview</h1>
+<h1>Overview <small>({{$ctrl.jmx.Hostname}}:{{$ctrl.jmx.HttpPort}})</small>
</h1>
Review Comment:
Let's omit the `ctrl.jmx.HttpPort` since technically the page can be
accessed using HTTPs.
##########
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:
Could you post the example of the JMX page for
`ContainerDataScannerMetrics`. For some reason my internal datanodes based on
1.4.1 returns empty for the jmx query.
##########
hadoop-hdds/framework/src/main/resources/webapps/static/ozone.js:
##########
@@ -48,8 +48,13 @@
});
angular.module('ozone').component('jvmParameters', {
templateUrl: 'static/templates/jvm.html',
- controller: function($http) {
+ controller: function($http, $scope) {
var ctrl = this;
+
+ $scope.toggleContent = function() {
+ $scope.contentVisible = !$scope.contentVisible;
Review Comment:
Just wanna check what is the default value of `$scope.contentVisible`? And
where was it initialized?
--
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]