-
Type:
Improvement
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 3.0.0-alpha4
-
Fix Version/s: None
-
Component/s: datanode
-
Labels:None
RoundRobinVolumeChoosingPolicy#chooseVolume does not consider parameter storageId.
The BlockPlacementPolicy considers specific storages and return the infomation including storageId to client.
@Override public V chooseVolume(final List<V> volumes, long blockSize, String storageId) throws IOException { if (volumes.size() < 1) { throw new DiskOutOfSpaceException("No more available volumes"); } // As all the items in volumes are with the same storage type, // so only need to get the storage type index of the first item in volumes StorageType storageType = volumes.get(0).getStorageType(); int index = storageType != null ? storageType.ordinal() : StorageType.DEFAULT.ordinal(); synchronized (syncLocks[index]) { return chooseVolume(index, volumes, blockSize); } }
- relates to
-
HDFS-9807 Add an optional StorageID to writes
-
- Resolved
-