|
@@ -1468,7 +1468,7 @@ public class DatanodeManager {
|
|
|
}
|
|
|
|
|
|
private BlockRecoveryCommand getBlockRecoveryCommand(String blockPoolId,
|
|
|
- DatanodeDescriptor nodeinfo) {
|
|
|
+ DatanodeDescriptor nodeinfo) throws IOException {
|
|
|
BlockInfo[] blocks = nodeinfo.getLeaseRecoveryCommand(Integer.MAX_VALUE);
|
|
|
if (blocks == null) {
|
|
|
return null;
|
|
@@ -1476,7 +1476,10 @@ public class DatanodeManager {
|
|
|
BlockRecoveryCommand brCommand = new BlockRecoveryCommand(blocks.length);
|
|
|
for (BlockInfo b : blocks) {
|
|
|
BlockUnderConstructionFeature uc = b.getUnderConstructionFeature();
|
|
|
- assert uc != null;
|
|
|
+ if(uc == null) {
|
|
|
+ throw new IOException("Recovery block " + b +
|
|
|
+ "where it is not under construction.");
|
|
|
+ }
|
|
|
final DatanodeStorageInfo[] storages = uc.getExpectedStorageLocations();
|
|
|
// Skip stale nodes during recovery
|
|
|
final List<DatanodeStorageInfo> recoveryLocations =
|