Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0.0-alpha4
-
None
-
None
Description
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); } }
Attachments
Issue Links
- relates to
-
HDFS-9807 Add an optional StorageID to writes
- Resolved