Skip to content

GH-3163: Reduce memory and time overhead of ParquetRewriterTests - #3164

Merged
wgtmac merged 3 commits into
apache:masterfrom
rahulketch:reduce-parquet-rewriter-test-overhead
Mar 4, 2025
Merged

GH-3163: Reduce memory and time overhead of ParquetRewriterTests#3164
wgtmac merged 3 commits into
apache:masterfrom
rahulketch:reduce-parquet-rewriter-test-overhead

Conversation

@rahulketch

Copy link
Copy Markdown
Contributor

Rationale for this change

Reduce the memory overhead and the time taken to run ParquetRewriterTests

What changes are included in this PR?

Reducing number of records from 100000 to 10000

Are these changes tested?

Are there any user-facing changes?

No

Closes #GH-3163

public class ParquetRewriterTest {

private final int numRecord = 100000;
private final int numRecord = 10000;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may result in a single page for each column chunk. Could you try following things:

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wgtmac : thanks for your comment. Do you happen to know how I can run a single test in the repository after making my changes? I wanted to run only the ParquetRewriterTest, but have not figured out a good way to achieve that via mvn.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cd ~/Projects/parquet-java # replace with your project root directory
cd parquet-hadoop
mvn test -Dtest=org.apache.parquet.hadoop.rewrite.ParquetRewriterTest

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand, the relevant config parameter is parquet.page.row.count.limit and I have changed that to be num_records / 5. Hope it looks good!

@rahulketch
rahulketchforce-pushed the reduce-parquet-rewriter-test-overhead branch from 86cd806 to d20ed14CompareFebruary 28, 2025 12:27
@rahulketch

Copy link
Copy Markdown
ContributorAuthor

@wgtmac : Will this line also require a change?

@wgtmac

Copy link
Copy Markdown
Member

@wgtmac : Will this line also require a change?

Yes, I think it would be good to test more than one row group.

@rahulketch

Copy link
Copy Markdown
ContributorAuthor

@wgtmac : Will this line also require a change?

Yes, I think it would be good to test more than one row group.

I verified that currently the test creates more than 1 row group with the current values. Let me know if any more concerns before merging.

@wgtmacwgtmac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks!

cc @ConeyLiu

@ConeyLiuConeyLiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, thanks for the contribution.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@rahulketch@wgtmac@ConeyLiu