This is an automated email from the ASF dual-hosted git repository.
Fokko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-java.git
The following commit(s) were added to refs/heads/master by this push:
new 48e2dbd3d Avoid Long boxing on the write path (#3462)
48e2dbd3d is described below
commit 48e2dbd3dfd4f2d6a3326a3cc5670989428eeb6b
Author: André Rouél <[email protected]>
AuthorDate: Tue Apr 21 09:16:43 2026 +0200
Avoid Long boxing on the write path (#3462)
---
.../apache/parquet/hadoop/InternalParquetRecordWriter.java | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git
a/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/InternalParquetRecordWriter.java
b/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/InternalParquetRecordWriter.java
index 4cb0e002d..dd51d1ef0 100644
---
a/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/InternalParquetRecordWriter.java
+++
b/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/InternalParquetRecordWriter.java
@@ -174,7 +174,9 @@ class InternalParquetRecordWriter<T> {
private void checkBlockSizeReached() throws IOException {
if (recordCount >= rowGroupRecordCountThreshold) {
- LOG.debug("record count reaches threshold: flushing {} records to
disk.", recordCount);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("record count reaches threshold: flushing {} records to
disk.", recordCount);
+ }
flushRowGroupToStore();
initStore();
recordCountForNextMemCheck = min(
@@ -188,7 +190,9 @@ class InternalParquetRecordWriter<T> {
// flush the row group if it is within ~2 records of the limit
// it is much better to be slightly under size than to be over at all
if (memSize > (nextRowGroupSize - 2 * recordSize)) {
- LOG.debug("mem size {} > {}: flushing {} records to disk.", memSize,
nextRowGroupSize, recordCount);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("mem size {} > {}: flushing {} records to disk.", memSize,
nextRowGroupSize, recordCount);
+ }
flushRowGroupToStore();
initStore();
recordCountForNextMemCheck = min(
@@ -204,7 +208,9 @@ class InternalParquetRecordWriter<T> {
recordCount
+ props.getMaxRowCountForPageSizeCheck() // will not look more
than max records ahead
);
- LOG.debug("Checked mem at {} will check again at: {}", recordCount,
recordCountForNextMemCheck);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Checked mem at {} will check again at: {}", recordCount,
recordCountForNextMemCheck);
+ }
}
}
}