jojochuang commented on a change in pull request #1252: HDFS-14678. Allow
triggerBlockReport to a specific namenode.
URL: https://github.com/apache/hadoop/pull/1252#discussion_r313981645
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
##########
@@ -3311,10 +3311,13 @@ public ReconfigurationTaskStatus
getReconfigurationStatus() throws IOException {
public void triggerBlockReport(BlockReportOptions options)
throws IOException {
checkSuperuserPrivilege();
+ InetSocketAddress namenodeAddr = options.getNamenodeAddr();
for (BPOfferService bpos : blockPoolManager.getAllNamenodeThreads()) {
if (bpos != null) {
for (BPServiceActor actor : bpos.getBPServiceActors()) {
- actor.triggerBlockReport(options);
+ if (namenodeAddr == null || namenodeAddr.equals(actor.nnAddr)) {
Review comment:
Can we make this condition more readable?
Like create a boolean shouldTriggerBlockReportForAllNameNodes =
(namenodeAddr == null)
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]