xichen01 commented on code in PR #6774:
URL: https://github.com/apache/ozone/pull/6774#discussion_r1631513636
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/BlockManagerImpl.java:
##########
@@ -312,6 +325,105 @@ public List<BlockData> listBlock(Container container,
long startLocalID, int
}
}
+ public Set<MissingBlock> headBlocks(Container container, Set<Long> localIds)
throws IOException {
+ Preconditions.checkNotNull(container, "container cannot be null");
+ Preconditions.checkNotNull(localIds, "local ID cannot be null");
+ if (localIds.isEmpty()) {
+ return new HashSet<>();
+ }
+
+ container.readLock();
+ try {
+ KeyValueContainerData containerData = (KeyValueContainerData)
container.getContainerData();
+ if
(!containerData.getLayoutVersion().equals(ContainerLayoutVersion.FILE_PER_BLOCK))
{
+ throw new UnsupportedEncodingException("Not support Container Layout "
+ containerData.getLayoutVersion());
Review Comment:
Corrected to `UnsupportedOperationException`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]