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

Read support for Hive's INSERT ONLY ACID tables #1034

Closed
wants to merge 3 commits into from

Conversation

shubhamtagra
Copy link
Member

@shubhamtagra shubhamtagra commented Jun 24, 2019

@cla-bot cla-bot bot added the cla-signed label Jun 24, 2019
@electrum
Copy link
Member

I quickly skimmed this. Looks fairly straightforward. Thanks a lot for adding this feature.

Can you pull out the changes to HiveMetastore and ThriftMetastore to be in a separate commit? That will keep the main commit smaller and easier to review. Something like

Add transactional support to metastore interface

@shubhamtagra
Copy link
Member Author

I quickly skimmed this. Looks fairly straightforward. Thanks a lot for adding this feature.

Can you pull out the changes to HiveMetastore and ThriftMetastore to be in a separate commit? That will keep the main commit smaller and easier to review. Something like

Add transactional support to metastore interface

This is done

Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

Just skimming.

In particular, I noticed there will be a bit of naming comments, as certain names do not align with our code style (abbreviations, or spelling of well-known acronyms in names, or spelling of "heartbeat"). I have marked some of them, but I think it could be more effective, if you could take another look at the code and try to update the names. Then the review will be more focused on merits rather than naming.

findepi
findepi previously requested changes Aug 1, 2019
Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
Copy link
Member

Choose a reason for hiding this comment

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

When is this environment run?

Anyway, #1239 will make test scaffolding sane here.

Copy link
Member Author

Choose a reason for hiding this comment

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

This had to added to scripts, I was running it by hand but I see with your change it will be default. Will wait for #1239 to merge and then remove this env.

@@ -379,13 +389,42 @@ private void invokeNoMoreSplitsIfNecessary()

// Bucketed partitions are fully loaded immediately since all files must be loaded to determine the file to bucket mapping
if (tableBucketInfo.isPresent()) {
if (AcidUtils.isTransactionalTable(table.getParameters())) {
throw new PrestoException(NOT_SUPPORTED, "Presto cannot read bucketted hive transactional tables");
Copy link
Member

Choose a reason for hiding this comment

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

This seems to be a serious limitation. For Hive < 3, a transactional table has to be bucketed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is one of the next items to be picked.

Copy link
Member

@electrum electrum left a comment

Choose a reason for hiding this comment

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

I need to do another pass over some parts in more detail, but overall this looks great.

@shubhamtagra
Copy link
Member Author

Handled your comments @findepi

@shubhamtagra shubhamtagra force-pushed the acid-ii branch 4 times, most recently from 0decba8 to 22e5208 Compare November 21, 2019 09:49
@findepi findepi assigned findepi and unassigned dain Nov 22, 2019
Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

I bunch of comments. Overall looks great.
Few outstanding questions.

To make the process more efficient, I made some fixups.
Please double check whcih comments i managed to fixup which i didn't -- and whether you agree with the fixups.

@findepi
Copy link
Member

findepi commented Nov 22, 2019

@stagraqubole the PR needs a rebase.

Please do the following

  1. squash the fixups if you agree with them
  2. rebase changing as little as possible
  3. apply outstanding changes as fixups

thanks for your work on this!

@dain dain mentioned this pull request Nov 23, 2019
@shubhamtagra shubhamtagra force-pushed the acid-ii branch 2 times, most recently from bd49dba to 024a743 Compare November 25, 2019 16:07
Copy link
Member

@dain dain left a comment

Choose a reason for hiding this comment

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

Let's merge this after the current release goes out.

Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

LGTM % nits.

Requesting changes or discussion around handling of original files.
I'd prefer to split this out into separate PR.

Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

Thanks, please squash.

@findepi
Copy link
Member

findepi commented Nov 28, 2019

Merged, thanks!

@findepi findepi closed this Nov 28, 2019
@findepi findepi mentioned this pull request Nov 28, 2019
7 tasks
rzeyde-varada referenced this pull request Mar 6, 2020
testBad() fails on TestHiveInMemoryMetastore with:

java.lang.IllegalStateException: Query already begun: Optional[20200306_080241_00002_adgin] while starting query 20200306_080241_00003_adgin

	at com.google.common.base.Preconditions.checkState(Preconditions.java:823)
	at io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore.beginQuery(SemiTransactionalHiveMetastore.java:999)
	at io.prestosql.plugin.hive.HiveMetadata.beginQuery(HiveMetadata.java:2367)
	at io.prestosql.plugin.hive.AbstractTestHive.testBad(AbstractTestHive.java:954)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants