[ https://issues.apache.org/jira/browse/HDFS-7408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14740303#comment-14740303 ]
Surendra Singh Lilhore commented on HDFS-7408: ---------------------------------------------- Attached initial patch based on [~atm] comment. *Patch 001:* 1. Added new metric {{StorageBlockReportInfo}}. This metric will give the {{lastReportTimestamp}} and {{reportCount}} for individual storage. 2. Added block report count in log. Please review.. *JMX out for this metric :* {code} "StorageBlockReportCounts" : "{\"127.0.0.1:52515\":{\"DISK\":{\"DS-2cbda63e-23f7-43e1-ac43-a1dd35fa8980\":{\"blockReportCount\":1,\"lastblockReportTimestamp\":1441864333343}},\"RAM_DISK\":{\"DS-d2dcd9dc-6dce-4187-ac1b-fa75d06002fd\":{\"blockReportCount\":1,\"lastblockReportTimestamp\":1441864333343}}},\"127.0.0.1:52603\":{\"ARCHIVE\":{\"DS-ac87c0ae-47f1-4911-900b-f2e2a17da94c\":{\"blockReportCount\":1,\"lastblockReportTimestamp\":1441864334382}},\"RAM_DISK\":{\"DS-033f5a4c-5a40-472e-8c65-94c32e642aee\":{\"blockReportCount\":1,\"lastblockReportTimestamp\":1441864334382}}},\"127.0.0.1:52469\":{\"DISK\":{\"DS-13e53daa-ffea-439e-b126-29bc391a51b0\":{\"blockReportCount\":1,\"lastblockReportTimestamp\":1441864333333}},\"RAM_DISK\":{\"DS-910b64fc-c2ac-4eba-89ab-b15f38496207\":{\"blockReportCount\":1,\"lastblockReportTimestamp\":1441864333343}}},\"127.0.0.1:52647\":{\"ARCHIVE\":{\"DS-3bdb084d-8f4b-4286-9c96-9d9e5ae13ea4\":{\"blockReportCount\":1,\"lastblockReportTimestamp\":1441864335123}},\"RAM_DISK\":{\"DS-bea5f61e-4688-45e6-9365-cb20363e96e7\":{\"blockReportCount\":1,\"lastblockReportTimestamp\":1441864335123}}},\"127.0.0.1:52559\":{\"ARCHIVE\":{\"DS-49093dbb-e560-464c-820c-eb9efcd392a3\":{\"blockReportCount\":1,\"lastblockReportTimestamp\":1441864333793}},\"RAM_DISK\":{\"DS-03ae5f28-0877-4b9f-846e-725486d5a750\":{\"blockReportCount\":1,\"lastblockReportTimestamp\":1441864333793}}},\"127.0.0.1:52422\":{\"DISK\":{\"DS-5e446e18-f4ca-4b40-a073-eb2c2a3561e2\":{\"blockReportCount\":1,\"lastblockReportTimestamp\":1441864333343}},\"RAM_DISK\":{\"DS-ebbd1829-bd6d-4bbe-93bc-c19427f53e08\":{\"blockReportCount\":1,\"lastblockReportTimestamp\":1441864333343}}}}" {code} > Add a counter in the log that shows the number of block reports processed > ------------------------------------------------------------------------- > > Key: HDFS-7408 > URL: https://issues.apache.org/jira/browse/HDFS-7408 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: namenode > Reporter: Suresh Srinivas > Assignee: Surendra Singh Lilhore > Attachments: HDFS-7408.001.patch > > > It would be great to have in the info log corresponding to block report > processing, printing information on how many block reports have been > processed. This can be useful to debug when namenode is unresponsive > especially during startup time to understand if datanodes are sending block > reports multiple times. -- This message was sent by Atlassian JIRA (v6.3.4#6332)