Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hive] Cache TableSchema into Configuration to avoid loading read scheme file in PaimonSerDe #2946

Merged
merged 4 commits into from
Mar 15, 2024

Conversation

wg1026688210
Copy link
Contributor

@wg1026688210 wg1026688210 commented Mar 5, 2024

Purpose

The Map Task will fetch the tableschema of paimon. we cache the schema json to configuration to reduce the access of FileSystem

Linked issue: close #xxx

Tests

API and Format

Documentation

@wg1026688210 wg1026688210 marked this pull request as ready for review March 11, 2024 04:16
@wg1026688210 wg1026688210 force-pushed the improve/reduce_nm_io branch from 5207f0a to a160915 Compare March 11, 2024 04:22
@wg1026688210 wg1026688210 changed the title [Hive] Read TableSchema from Configuration [Hive] Cache TableSchema into Configuration to avoid loading read scheme file in PaimonSerDe Mar 11, 2024
@@ -192,7 +198,16 @@ public static HiveSchema extract(@Nullable Configuration configuration, Properti
return new HiveSchema(builder.build());
}

private static Optional<TableSchema> getExistingSchema(
@VisibleForTesting
static Optional<TableSchema> getTableSchemaFromCache(Properties properties) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just cache HiveSchema?

@@ -192,7 +198,16 @@ public static HiveSchema extract(@Nullable Configuration configuration, Properti
return new HiveSchema(builder.build());
}

private static Optional<TableSchema> getExistingSchema(
@VisibleForTesting
static Optional<TableSchema> getTableSchemaFromCache(Properties properties) {
Copy link
Contributor

Choose a reason for hiding this comment

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

getSchemaFromProperties

@wg1026688210 wg1026688210 requested a review from JingsongLi March 12, 2024 15:47
Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

+1

@JingsongLi JingsongLi merged commit 8338cad into apache:master Mar 15, 2024
zhu3pang pushed a commit to zhu3pang/incubator-paimon that referenced this pull request Mar 29, 2024
Sign up for free to 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.

2 participants