verifyContainerData also does fixup, renamed. Added a Javadoc comment, both as per review discussion

This commit is contained in:
sdeka 2019-05-22 09:34:21 +05:30
parent 64c39856d2
commit 456bb8a3e0
1 changed files with 9 additions and 2 deletions

View File

@ -165,14 +165,21 @@ public class ContainerReader implements Runnable {
"Skipping loading of this container.", containerFile);
return;
}
verifyContainerData(containerData);
verifyAndFixupContainerData(containerData);
} catch (IOException ex) {
LOG.error("Failed to parse ContainerFile for ContainerID: {}",
containerID, ex);
}
}
public void verifyContainerData(ContainerData containerData)
/**
* verify ContainerData loaded from disk and fix-up stale members.
* Specifically blockCommitSequenceId, delete related metadata
* and bytesUsed
* @param containerData
* @throws IOException
*/
public void verifyAndFixupContainerData(ContainerData containerData)
throws IOException {
switch (containerData.getContainerType()) {
case KeyValueContainer: