errose28 commented on code in PR #6774:
URL: https://github.com/apache/ozone/pull/6774#discussion_r1630243384
##########
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:
I'm not sure this is the correct type to use. The Java doc says this is for
character encodings. We probably want to throw some type of
`StorageContainerException`.
--
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]