smengcl commented on pull request #1601:
URL: https://github.com/apache/ozone/pull/1601#issuecomment-732696270


   Summary of major changes to the latest diff:
   
   - Renamed `reports` to `incrementalReportsQueue` to better reflect the 
functionality of the map.
   - Added `acceptedIncrementalReportTypeSet` for rigorous report type checking.
   - `StateContext#addReport` now explicitly throws, instead of hiding any 
possible NPEs. Rationale: As I think again, those reports are all internally 
generated rather than dependent on direct user input. It's better to catch any 
problem early (if any).
   - `StateContext#addReport` also strictly checks for report type now. This 
intends to force any future additions of report types to be explicitly allowed. 
Only 5 report types (names) are expected:
   ```
   hadoop.hdds.NodeReportProto
   hadoop.hdds.ContainerReportsProto
   hadoop.hdds.IncrementalContainerReportProto
   hadoop.hdds.CommandStatusReportsProto
   hadoop.hdds.PipelineReportsProto
   ```
   - `StateContext#putBackReports` now checks ALL reports in the list to be put 
back. I'd expect the list to be small. And since the logic is run on each 
DataNode, it shouldn't become a performance bottleneck. Also added debug 
logging just in case we need to diagnose it in the future.
   - Added new UT `testPutBackReports` and `testReportQueueWithAddReports` to 
check that `putBackReports` and `getReports` behaves.
   
   Let me know if you think I missed anything, or it might be a bit over 
engineered.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to