diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsDatasetSpi.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsDatasetSpi.java index e11321246b..547392fe4e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsDatasetSpi.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsDatasetSpi.java @@ -241,9 +241,6 @@ StorageReport[] getStorageReports(String bpid) */ List getFinalizedBlocks(String bpid); - /** @return a list of finalized blocks for the given block pool. */ - List getFinalizedBlocksOnPersistentStorage(String bpid); - /** * Check whether the in-memory block record matches the block on the disk, * and, in case that they are not matched, update the record or mark it diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java index 0f40f2a2dc..69831f45cb 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java @@ -1737,26 +1737,6 @@ public List getFinalizedBlocks(String bpid) { } } - /** - * Get the list of finalized blocks from in-memory blockmap for a block pool. - */ - @Override - public List getFinalizedBlocksOnPersistentStorage( - String bpid) { - try (AutoCloseableLock lock = datasetLock.acquire()) { - ArrayList finalized = - new ArrayList(volumeMap.size(bpid)); - for (ReplicaInfo b : volumeMap.replicas(bpid)) { - if(!b.getVolume().isTransientStorage() && - b.getState() == ReplicaState.FINALIZED) { - finalized.add(new ReplicaBuilder(ReplicaState.FINALIZED) - .from(b).build()); - } - } - return finalized; - } - } - /** * Check if a block is valid. * diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java index 6c592310d6..8e6191a12d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java @@ -1339,11 +1339,6 @@ public List getFinalizedBlocks(String bpid) { throw new UnsupportedOperationException(); } - @Override - public List getFinalizedBlocksOnPersistentStorage(String bpid) { - throw new UnsupportedOperationException(); - } - @Override public Map getVolumeInfoMap() { throw new UnsupportedOperationException(); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/extdataset/ExternalDatasetImpl.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/extdataset/ExternalDatasetImpl.java index 7b7f04f2a8..41663464f7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/extdataset/ExternalDatasetImpl.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/extdataset/ExternalDatasetImpl.java @@ -93,11 +93,6 @@ public List getFinalizedBlocks(String bpid) { return null; } - @Override - public List getFinalizedBlocksOnPersistentStorage(String bpid) { - return null; - } - @Override public void checkAndUpdate(String bpid, long blockId, File diskFile, File diskMetaFile, FsVolumeSpi vol) {