cchenax commented on a change in pull request #2628:
URL: https://github.com/apache/ozone/pull/2628#discussion_r705846254
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/ChunkUtils.java
##########
@@ -256,12 +257,21 @@ public static boolean validateChunkForOverwrite(File
chunkFile,
public static boolean isOverWriteRequested(File chunkFile, ChunkInfo
chunkInfo) {
- if (!chunkFile.exists()) {
+ long offset = chunkInfo.getOffset();
+ try {
+ FileInputStream inputStream = new FileInputStream(chunkFile);
+ inputStream.getChannel().position(offset);
Review comment:
chunkfile.length depend on the offset
--
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]