[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-20 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=599678=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-599678
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 20/May/21 08:47
Start Date: 20/May/21 08:47
Worklog Time Spent: 10m 
  Work Description: haiyang1987 commented on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-844873208


   @ferhui Thanks review.


-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 599678)
Time Spent: 2h 50m  (was: 2h 40m)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 3.4.0
>
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=598953=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-598953
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 19/May/21 01:05
Start Date: 19/May/21 01:05
Worklog Time Spent: 10m 
  Work Description: ferhui commented on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-843668948


   @haiyang1987 Thanks for contribution, merged to trunk.


-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 598953)
Time Spent: 2h 40m  (was: 2.5h)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=598952=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-598952
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 19/May/21 01:04
Start Date: 19/May/21 01:04
Worklog Time Spent: 10m 
  Work Description: ferhui merged pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747


   


-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 598952)
Time Spent: 2.5h  (was: 2h 20m)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=598085=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-598085
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 17/May/21 18:30
Start Date: 17/May/21 18:30
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-842490494


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 37s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  37m  2s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   1m 32s |  |  trunk passed with JDK 
Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |   1m 24s |  |  trunk passed with JDK 
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08  |
   | +1 :green_heart: |  checkstyle  |   1m  6s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 32s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 57s |  |  trunk passed with JDK 
Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 30s |  |  trunk passed with JDK 
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   3m 39s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  18m 34s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m 21s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m 26s |  |  the patch passed with JDK 
Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javac  |   1m 26s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m 13s |  |  the patch passed with JDK 
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08  |
   | +1 :green_heart: |  javac  |   1m 13s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   1m  0s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   1m 22s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 51s |  |  the patch passed with JDK 
Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 22s |  |  the patch passed with JDK 
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   3m 38s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  18m 42s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  | 230m 32s |  |  hadoop-hdfs in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 44s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 327m  7s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2747/3/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/2747 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux 01da3e889f77 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 
16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 5f18053ba0061442c19be76a08b71190a1cf8225 |
   | Default Java | Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2747/3/testReport/ |
   | Max. process+thread count | 3783 (vs. ulimit of 5500) |
   | modules | C: hadoop-hdfs-project/hadoop-hdfs U: 
hadoop-hdfs-project/hadoop-hdfs |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2747/3/console |
   | versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
   | Powered by | Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org |
   
   
   This 

[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=597994=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597994
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 17/May/21 18:22
Start Date: 17/May/21 18:22
Worklog Time Spent: 10m 
  Work Description: haiyang1987 edited a comment on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-842136488






-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597994)
Time Spent: 2h 10m  (was: 2h)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=597964=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597964
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 17/May/21 18:17
Start Date: 17/May/21 18:17
Worklog Time Spent: 10m 
  Work Description: ferhui commented on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-841928897






-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597964)
Time Spent: 2h  (was: 1h 50m)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=597885=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597885
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 17/May/21 18:07
Start Date: 17/May/21 18:07
Worklog Time Spent: 10m 
  Work Description: haiyang1987 commented on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-841792013






-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597885)
Time Spent: 1h 50m  (was: 1h 40m)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=597789=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597789
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 17/May/21 17:09
Start Date: 17/May/21 17:09
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-842490494


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 37s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  37m  2s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   1m 32s |  |  trunk passed with JDK 
Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |   1m 24s |  |  trunk passed with JDK 
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08  |
   | +1 :green_heart: |  checkstyle  |   1m  6s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 32s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 57s |  |  trunk passed with JDK 
Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 30s |  |  trunk passed with JDK 
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   3m 39s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  18m 34s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m 21s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m 26s |  |  the patch passed with JDK 
Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javac  |   1m 26s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m 13s |  |  the patch passed with JDK 
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08  |
   | +1 :green_heart: |  javac  |   1m 13s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   1m  0s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   1m 22s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 51s |  |  the patch passed with JDK 
Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 22s |  |  the patch passed with JDK 
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   3m 38s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  18m 42s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  | 230m 32s |  |  hadoop-hdfs in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 44s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 327m  7s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2747/3/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/2747 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux 01da3e889f77 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 
16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 5f18053ba0061442c19be76a08b71190a1cf8225 |
   | Default Java | Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2747/3/testReport/ |
   | Max. process+thread count | 3783 (vs. ulimit of 5500) |
   | modules | C: hadoop-hdfs-project/hadoop-hdfs U: 
hadoop-hdfs-project/hadoop-hdfs |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2747/3/console |
   | versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
   | Powered by | Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org |
   
   
   This 

[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=597520=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597520
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 17/May/21 09:43
Start Date: 17/May/21 09:43
Worklog Time Spent: 10m 
  Work Description: ferhui commented on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-842181520


   @haiyang1987 Thanks for comments.
   You can push an empty commit to trigger Yutes, and then i will merge this if 
no problems because the lastest build is on 15 Mar


-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597520)
Time Spent: 1.5h  (was: 1h 20m)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=597505=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597505
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 17/May/21 08:48
Start Date: 17/May/21 08:48
Worklog Time Spent: 10m 
  Work Description: haiyang1987 edited a comment on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-842136488


   @ferhui Thanks for reviewing.
   This does not seem to cause any problems in production,
   However  in this case the debug log output execution information is a 
problem.
   
   
   ```java
   BlockManager#computeReconstructionWorkForBlocks
   int computeReconstructionWorkForBlocks(
 List> blocksToReconstruct) {
   ...
   if (blockLog.isDebugEnabled()) {
 // log which blocks have been scheduled for reconstruction
 for (BlockReconstructionWork rw : reconWork) {
   DatanodeStorageInfo[] targets = rw.getTargets();
   if (targets != null && targets.length != 0) {
 StringBuilder targetList = new StringBuilder("datanode(s)");
 for (DatanodeStorageInfo target : targets) {
   targetList.append(' ').append(target.getDatanodeDescriptor());
 }
 blockLog.debug("BLOCK* ask {} to replicate {} to {}", 
rw.getSrcNodes(),
 rw.getBlock(), targetList);
   }
   ...
   ```


-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597505)
Time Spent: 1h 20m  (was: 1h 10m)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=597502=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597502
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 17/May/21 08:41
Start Date: 17/May/21 08:41
Worklog Time Spent: 10m 
  Work Description: haiyang1987 edited a comment on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-842136488


   @ferhui Thanks for reviewing.
   This does not seem to cause any problems in production,
   However  in this case the debug log output execution information is a 
problem.
   
   
   > 
   BlockManager#computeReconstructionWorkForBlocks
   int computeReconstructionWorkForBlocks(
 List> blocksToReconstruct) {
   ...
   if (blockLog.isDebugEnabled()) {
 // log which blocks have been scheduled for reconstruction
 for (BlockReconstructionWork rw : reconWork) {
   DatanodeStorageInfo[] targets = rw.getTargets();
   if (targets != null && targets.length != 0) {
 StringBuilder targetList = new StringBuilder("datanode(s)");
 for (DatanodeStorageInfo target : targets) {
   targetList.append(' ').append(target.getDatanodeDescriptor());
 }
 blockLog.debug("BLOCK* ask {} to replicate {} to {}", 
rw.getSrcNodes(),
 rw.getBlock(), targetList);
   }
   ...
   > 


-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597502)
Time Spent: 1h 10m  (was: 1h)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=597500=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597500
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 17/May/21 08:38
Start Date: 17/May/21 08:38
Worklog Time Spent: 10m 
  Work Description: haiyang1987 edited a comment on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-842136488


   @ferhui Thanks for reviewing.
   This does not seem to cause any problems in production,
   However  in this case the debug log output execution information is a 
problem.
   
   
   > 
   BlockManager#computeReconstructionWorkForBlocks
   int computeReconstructionWorkForBlocks(
 List> blocksToReconstruct) {
 ...
   if (blockLog.isDebugEnabled()) {
 // log which blocks have been scheduled for reconstruction
 for (BlockReconstructionWork rw : reconWork) {
   DatanodeStorageInfo[] targets = rw.getTargets();
   if (targets != null && targets.length != 0) {
 StringBuilder targetList = new StringBuilder("datanode(s)");
 for (DatanodeStorageInfo target : targets) {
   targetList.append(' ').append(target.getDatanodeDescriptor());
 }
 blockLog.debug("BLOCK* ask {} to replicate {} to {}", 
rw.getSrcNodes(),
 rw.getBlock(), targetList);
   }
 }
   > 


-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597500)
Time Spent: 1h  (was: 50m)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=597499=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597499
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 17/May/21 08:38
Start Date: 17/May/21 08:38
Worklog Time Spent: 10m 
  Work Description: haiyang1987 commented on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-842136488


   @ferhui Thanks for reviewing.
   This does not seem to cause any problems in production,
   However  in this case the debug log output execution information is a 
problem.
   
   `BlockManager#computeReconstructionWorkForBlocks
   int computeReconstructionWorkForBlocks(
 List> blocksToReconstruct) {
 ...
   if (blockLog.isDebugEnabled()) {
 // log which blocks have been scheduled for reconstruction
 for (BlockReconstructionWork rw : reconWork) {
   DatanodeStorageInfo[] targets = rw.getTargets();
   if (targets != null && targets.length != 0) {
 StringBuilder targetList = new StringBuilder("datanode(s)");
 for (DatanodeStorageInfo target : targets) {
   targetList.append(' ').append(target.getDatanodeDescriptor());
 }
 blockLog.debug("BLOCK* ask {} to replicate {} to {}", 
rw.getSrcNodes(),
 rw.getBlock(), targetList);
   }
 }
   `


-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597499)
Time Spent: 50m  (was: 40m)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=597445=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597445
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 17/May/21 02:06
Start Date: 17/May/21 02:06
Worklog Time Spent: 10m 
  Work Description: ferhui commented on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-841928897


   @haiyang1987 Thanks for ping, It looks good. Does this cause any problems in 
production environment?


-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597445)
Time Spent: 40m  (was: 0.5h)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-05-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=597361=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597361
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 16/May/21 09:31
Start Date: 16/May/21 09:31
Worklog Time Spent: 10m 
  Work Description: haiyang1987 commented on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-841792013


   @ferhui Please take a look, Thanks!


-- 
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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597361)
Time Spent: 0.5h  (was: 20m)

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Assignee: Haiyang Hu
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-03-15 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=566127=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-566127
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 15/Mar/21 11:15
Start Date: 15/Mar/21 11:15
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747#issuecomment-799336367


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 35s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  1s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  32m 33s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   1m 18s |  |  trunk passed with JDK 
Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |   1m 14s |  |  trunk passed with JDK 
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08  |
   | +1 :green_heart: |  checkstyle  |   1m  5s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 20s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 55s |  |  trunk passed with JDK 
Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 23s |  |  trunk passed with JDK 
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   3m  6s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  16m  4s |  |  branch has no errors 
when building and testing our client artifacts.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m 12s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m 14s |  |  the patch passed with JDK 
Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javac  |   1m 14s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m  5s |  |  the patch passed with JDK 
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08  |
   | +1 :green_heart: |  javac  |   1m  5s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 54s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   1m 13s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 44s |  |  the patch passed with JDK 
Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 15s |  |  the patch passed with JDK 
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08  |
   | +1 :green_heart: |  spotbugs  |   3m  7s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  16m  6s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | -1 :x: |  unit  | 227m 43s | 
[/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2747/2/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt)
 |  hadoop-hdfs in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 43s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 312m 41s |  |  |
   
   
   | Reason | Tests |
   |---:|:--|
   | Failed junit tests | 
hadoop.hdfs.server.namenode.snapshot.TestNestedSnapshots |
   |   | hadoop.hdfs.server.datanode.TestDirectoryScanner |
   |   | hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFSStriped |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2747/2/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/2747 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux e4667034572c 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 
16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 4a1f15192bb4c972e99f12c0418e0600d1d95ed0 |
   | Default Java | Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08 |
   |  Test Results | 

[jira] [Work logged] (HDFS-15877) BlockReconstructionWork should resetTargets() before BlockManager#validateReconstructionWork return false

2021-03-05 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HDFS-15877?focusedWorklogId=561395=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-561395
 ]

ASF GitHub Bot logged work on HDFS-15877:
-

Author: ASF GitHub Bot
Created on: 05/Mar/21 12:41
Start Date: 05/Mar/21 12:41
Worklog Time Spent: 10m 
  Work Description: haiyang1987 opened a new pull request #2747:
URL: https://github.com/apache/hadoop/pull/2747


   ## NOTICE
   
   Please create an issue in ASF JIRA before opening a pull request,
   and you need to set the title of the pull request which starts with
   the corresponding JIRA issue number. (e.g. HADOOP-X. Fix a typo in YYY.)
   For more details, please see 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
   



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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 561395)
Remaining Estimate: 0h
Time Spent: 10m

> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> -
>
> Key: HDFS-15877
> URL: https://issues.apache.org/jira/browse/HDFS-15877
> Project: Hadoop HDFS
>  Issue Type: Improvement
>Reporter: Haiyang Hu
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> BlockReconstructionWork should resetTargets() before 
> BlockManager#validateReconstructionWork return false
> the related code is in BlockManager.java
> {code:java}
> // code placeholder
> private boolean validateReconstructionWork(BlockReconstructionWork rw) {
>   BlockInfo block = rw.getBlock();
>   int priority = rw.getPriority();
>   ...
>   if (block.isDeleted() || !block.isCompleteOrCommitted()) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> return false;
>   }
>   // do not schedule more if enough replicas is already pending
>   ...
>   if (hasEnoughEffectiveReplicas(block, numReplicas, pendingNum)) {
> neededReconstruction.remove(block, priority);
> rw.resetTargets();
> blockLog.debug("BLOCK* Removing {} from neededReconstruction as" +
> " it has enough replicas", block);
> return false;
>   }
>   DatanodeStorageInfo[] targets = rw.getTargets();
>   BlockPlacementStatus placementStatus = getBlockPlacementStatus(block);
>   if ((numReplicas.liveReplicas() >= requiredRedundancy) &&
>   (!placementStatus.isPlacementPolicySatisfied())) {
> BlockPlacementStatus newPlacementStatus =
> getBlockPlacementStatus(block, targets);
> if (!newPlacementStatus.isPlacementPolicySatisfied() &&
> (newPlacementStatus.getAdditionalReplicasRequired() >=
> placementStatus.getAdditionalReplicasRequired())) {
>   ...
>   //Here to add rw.resetTargets();
>   return false;
> }
>   
> rw.setNotEnoughRack();
>   }
>   ...
>   return true;
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org