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-21079: Stats replication for partitioned table #522

Closed
wants to merge 4 commits into from

Conversation

ashutosh-bapat
Copy link
Contributor

The first commit is for stats replication for partitioned table. The other two commits are fixing bugs in existing code, AFAIU.

@sankarh can you please review?

…lication

In AlterPartitionHandler, we set withinContext.replicationSpec.setIsMetadataOnly(true);
In ImportSemanticAnalyzer.createReplImportTasks(), per code around line 1197, we do not add new
PartitionSpecs and corresponding tasks. This means that we never apply an ALTER_PARTITION event
during incremental load. That looks like a serious bug.

Either we should check PartitionDescs irrespective of replicationSpec.setIsMetadataOnly() OR we
shouldn’t set replicationSpec.setIsMetadataOnly() to true while dumping an ALTER_PARTITION event. We
set replicationSpec.setIsMetadataOnly(true) for ALTER TABLE events as well, so doing that for ALTER
PARTITION event looks fine.

Ashutosh Bapat.
…ly dump.

During bootstrap metadata-only dump we do not dump partitions (See TableExport.getPartitions(). For
bootstrap dump we always pass TableSpec with TABLE_ONLY set.). So don't dump partition related
events for a metadata-only dump.

Ashutosh Bapat.
@ashutosh-bapat ashutosh-bapat changed the title Hive21079: Stats replication for partitioned table HIVE-21079: Stats replication for partitioned table Jan 24, 2019
Do not change get_partitions_by_names metastore API. Instead add another one
get_partitions_by_names_req function accepting a GetPartitionsByNamesRequest argument, returning
GetPartitionsByNamesResult output.

Get or update partition statistics in the same transaction in wich the partiton was obtained or
added resp.

We do not dump partitions in a metadata-only dump and hence we shouldn't dump DROP PARTITION events
as well.

Some other cosmetic comments.

Ashutosh Bapat.
@github-actions
Copy link

github-actions bot commented Jun 9, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.

@github-actions github-actions bot added the stale label Jun 9, 2020
@github-actions github-actions bot closed this Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants