Skip to content

HIVE-28967: Support multiple partitions in RELOAD event #5832

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

Merged
merged 5 commits into from
Jun 26, 2025

Conversation

saihemanth-cloudera
Copy link
Contributor

What changes were proposed in this pull request?

To support multiple partitions in the Reload event

Why are the changes needed?

Clients like Impala can use this fire multiple partitions in a single RELOAD event

Does this PR introduce any user-facing change?

No

How was this patch tested?

Local

table, partVals);
this.ptns = new ArrayList<>();
for(List<String> partVal : partVals) {
this.ptns.add(handler.get_partition(MetaStoreUtils.prependNotNullCatToDbName(catName, db),
Copy link
Member

Choose a reason for hiding this comment

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

how about use get_partitions_by_names_req to get all partitions in a round

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

if (event.getPartitionObj() != null) {
msg += "partition " + Arrays
.toString(event.getPartitionObj().getValues().toArray()) + " of ";
if (event.getPartitions() != null) {
Copy link
Member

Choose a reason for hiding this comment

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

if the partitions are large, will the message pollute the whole log file? if we really need it, how about only log the part_vals?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These partitions spec comes directly from end-user, so this won't big (usually 5-10 partitions). We need entire partition object to identify the self event.

import org.apache.hadoop.hive.metastore.api.GetTableRequest;
import org.apache.hadoop.hive.metastore.api.MetaException;
import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
import org.apache.hadoop.hive.metastore.api.Partition;
import org.apache.hadoop.hive.metastore.api.Table;
import org.apache.hadoop.hive.metastore.utils.MetaStoreUtils;
import org.apache.thrift.TException;
//import org.datanucleus.store.types.wrappers.ArrayList;
Copy link
Member

Choose a reason for hiding this comment

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

nit: you may need to remove this commented line, leave it to you to decide.

Copy link

@saihemanth-cloudera saihemanth-cloudera merged commit 4ae618c into apache:master Jun 26, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants