Bläddra i källkod

HDFS-12887. [READ] Allow Datanodes with Provided volumes to start when blocks with the same id exist locally

Virajith Jalaparti 7 år sedan
förälder
incheckning
71ec170107

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/ProvidedVolumeImpl.java

@@ -208,8 +208,8 @@ class ProvidedVolumeImpl extends FsVolumeImpl {
             incrNumBlocks();
             incrNumBlocks();
             incDfsUsed(region.getBlock().getNumBytes());
             incDfsUsed(region.getBlock().getNumBytes());
           } else {
           } else {
-            throw new IOException("A block with id " + newReplica.getBlockId()
-                + " already exists in the volumeMap");
+            LOG.warn("A block with id " + newReplica.getBlockId()
+                + " exists locally. Skipping PROVIDED replica");
           }
           }
         }
         }
       }
       }