@@ -2741,6 +2741,8 @@ public boolean processReport(final DatanodeID nodeID,
2741
2741
Collection <Block > invalidatedBlocks = Collections .emptyList ();
2742
2742
String strBlockReportId =
2743
2743
context != null ? Long .toHexString (context .getReportId ()) : "" ;
2744
+ String fullBrLeaseId =
2745
+ context != null ? Long .toHexString (context .getLeaseId ()) : "" ;
2744
2746
2745
2747
try {
2746
2748
node = datanodeManager .getDatanode (nodeID );
@@ -2763,20 +2765,20 @@ public boolean processReport(final DatanodeID nodeID,
2763
2765
if (namesystem .isInStartupSafeMode ()
2764
2766
&& !StorageType .PROVIDED .equals (storageInfo .getStorageType ())
2765
2767
&& storageInfo .getBlockReportCount () > 0 ) {
2766
- blockLog .info ("BLOCK* processReport 0x{}: "
2768
+ blockLog .info ("BLOCK* processReport 0x{} with lease ID 0x{} : "
2767
2769
+ "discarded non-initial block report from {}"
2768
2770
+ " because namenode still in startup phase" ,
2769
- strBlockReportId , nodeID );
2771
+ strBlockReportId , fullBrLeaseId , nodeID );
2770
2772
blockReportLeaseManager .removeLease (node );
2771
2773
return !node .hasStaleStorages ();
2772
2774
}
2773
2775
2774
2776
if (storageInfo .getBlockReportCount () == 0 ) {
2775
2777
// The first block report can be processed a lot more efficiently than
2776
2778
// ordinary block reports. This shortens restart times.
2777
- blockLog .info ("BLOCK* processReport 0x{}: Processing first "
2779
+ blockLog .info ("BLOCK* processReport 0x{} with lease ID 0x{} : Processing first "
2778
2780
+ "storage report for {} from datanode {}" ,
2779
- strBlockReportId ,
2781
+ strBlockReportId , fullBrLeaseId ,
2780
2782
storageInfo .getStorageID (),
2781
2783
nodeID );
2782
2784
processFirstBlockReport (storageInfo , newReport );
@@ -2795,8 +2797,8 @@ public boolean processReport(final DatanodeID nodeID,
2795
2797
2796
2798
if (blockLog .isDebugEnabled ()) {
2797
2799
for (Block b : invalidatedBlocks ) {
2798
- blockLog .debug ("BLOCK* processReport 0x{}: {} on node {} size {} " +
2799
- "does not belong to any file." , strBlockReportId , b ,
2800
+ blockLog .debug ("BLOCK* processReport 0x{} with lease ID 0x{} : {} on node {} size {} " +
2801
+ "does not belong to any file." , strBlockReportId , fullBrLeaseId , b ,
2800
2802
node , b .getNumBytes ());
2801
2803
}
2802
2804
}
@@ -2806,9 +2808,9 @@ public boolean processReport(final DatanodeID nodeID,
2806
2808
if (metrics != null ) {
2807
2809
metrics .addStorageBlockReport ((int ) (endTime - startTime ));
2808
2810
}
2809
- blockLog .info ("BLOCK* processReport 0x{}: from storage {} node {}, " +
2811
+ blockLog .info ("BLOCK* processReport 0x{} with lease ID 0x{} : from storage {} node {}, " +
2810
2812
"blocks: {}, hasStaleStorage: {}, processing time: {} msecs, " +
2811
- "invalidatedBlocks: {}" , strBlockReportId , storage .getStorageID (),
2813
+ "invalidatedBlocks: {}" , strBlockReportId , fullBrLeaseId , storage .getStorageID (),
2812
2814
nodeID , newReport .getNumberOfBlocks (),
2813
2815
node .hasStaleStorages (), (endTime - startTime ),
2814
2816
invalidatedBlocks .size ());
0 commit comments