HDFS-11074. Remove unused method FsDatasetSpi#getFinalizedBlocksOnPersistentStorage. Contributed by Hanisha Koneru.
This commit is contained in:
parent
f646fe34be
commit
a9d68d2e8e
|
@ -241,9 +241,6 @@ public interface FsDatasetSpi<V extends FsVolumeSpi> extends FSDatasetMBean {
|
|||
*/
|
||||
List<ReplicaInfo> getFinalizedBlocks(String bpid);
|
||||
|
||||
/** @return a list of finalized blocks for the given block pool. */
|
||||
List<ReplicaInfo> 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
|
||||
|
|
|
@ -1737,26 +1737,6 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of finalized blocks from in-memory blockmap for a block pool.
|
||||
*/
|
||||
@Override
|
||||
public List<ReplicaInfo> getFinalizedBlocksOnPersistentStorage(
|
||||
String bpid) {
|
||||
try (AutoCloseableLock lock = datasetLock.acquire()) {
|
||||
ArrayList<ReplicaInfo> finalized =
|
||||
new ArrayList<ReplicaInfo>(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.
|
||||
*
|
||||
|
|
|
@ -1339,11 +1339,6 @@ public class SimulatedFSDataset implements FsDatasetSpi<FsVolumeSpi> {
|
|||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReplicaInfo> getFinalizedBlocksOnPersistentStorage(String bpid) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getVolumeInfoMap() {
|
||||
throw new UnsupportedOperationException();
|
||||
|
|
|
@ -93,11 +93,6 @@ public class ExternalDatasetImpl implements FsDatasetSpi<ExternalVolumeImpl> {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReplicaInfo> getFinalizedBlocksOnPersistentStorage(String bpid) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkAndUpdate(String bpid, long blockId, File diskFile,
|
||||
File diskMetaFile, FsVolumeSpi vol) {
|
||||
|
|
Loading…
Reference in New Issue