1
0

[HUDI-3709] Fixing ParquetWriter impls not respecting Parquet Max File Size limit (#5129)

This commit is contained in:
Alexey Kudinkin
2022-03-26 14:51:36 -07:00
committed by GitHub
parent 57b4f39c31
commit 189d5297b8
7 changed files with 4 additions and 21 deletions

View File

@@ -56,7 +56,7 @@ public class HoodieInternalRowParquetWriter extends ParquetWriter<InternalRow>
@Override
public boolean canWrite() {
return fs.getBytesWritten(file) < maxFileSize;
return getDataSize() < maxFileSize;
}
@Override

View File

@@ -437,7 +437,7 @@ public class TestCopyOnWriteActionExecutor extends HoodieClientTestBase {
counts++;
}
}
assertEquals(3, counts, "If the number of records are more than 1150, then there should be a new file");
assertEquals(5, counts, "If the number of records are more than 1150, then there should be a new file");
}
@Test