symious commented on a change in pull request #3052:
URL: https://github.com/apache/ozone/pull/3052#discussion_r813556164
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/TarContainerPacker.java
##########
@@ -209,6 +216,12 @@ public void pack(Container<KeyValueContainerData>
container,
private void includePath(Path dir, String subdir,
ArchiveOutputStream archiveOutput) throws IOException {
+ // Add a directory entry before adding files, in case the directory is
+ // empty.
+ ArchiveEntry entry = archiveOutput.createArchiveEntry(dir.toFile(),
subdir);
+ archiveOutput.putArchiveEntry(entry);
+
+ // Add files in the directory.
try (Stream<Path> dirEntries = Files.list(dir)) {
Review comment:
I think the error is thrown here, so it still needs the CHUNK file to
exist?
Reproduced by adding `new File(data.getChunksPath()).delete();` after
checking the state of original container.
--
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]