YARN-11369. Commons.compress throws an IllegalArgumentException with large uids after 1.21. Contributed by Benjamin Teke

This commit is contained in:
Szilard Nemeth 2022-11-16 13:07:05 +01:00
parent cd929457c9
commit 142df247ed
1 changed files with 2 additions and 0 deletions

View File

@ -331,6 +331,8 @@ public class FrameworkUploader implements Runnable {
LOG.info("Compressing tarball");
try (TarArchiveOutputStream out = new TarArchiveOutputStream(
targetStream)) {
// Workaround for the compress issue present from 1.21: COMPRESS-587
out.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_STAR);
for (String fullPath : filteredInputFiles) {
LOG.info("Adding " + fullPath);
File file = new File(fullPath);