Skip to content

Modularize Hive Metastore#13601

Merged
highker merged 1 commit intoprestodb:masterfrom
islamismailov:modularize-hive-metastore
Nov 8, 2019
Merged

Modularize Hive Metastore#13601
highker merged 1 commit intoprestodb:masterfrom
islamismailov:modularize-hive-metastore

Conversation

@islamismailov
Copy link
Member

== RELEASE NOTES ==

Hive Changes
* Metastore interface is separated into a separate module to reduce monolithicness 

@islamismailov islamismailov force-pushed the modularize-hive-metastore branch 2 times, most recently from 8331662 to e8f4301 Compare October 25, 2019 04:11
@highker highker self-requested a review October 25, 2019 05:51
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

I feel the core part is to move out ExtendedHiveMetastore together with its implementation hopefully. Also, SemiTransactionalHiveMetastore might also need to be moved out as a stretch goal.

@islamismailov
Copy link
Member Author

I can move ExtendedHiveMetastore into the new module too, and possibly the SemiTransactionalHiveMetastore too. I am afraid that might be too coupled and monolithic (e.g. classes like HiveType etc. I will try to do in separate commits so we can reason about it in pieces, as it might be easier.

@islamismailov islamismailov force-pushed the modularize-hive-metastore branch from 4baee89 to 4f3fc99 Compare October 25, 2019 18:46
@islamismailov
Copy link
Member Author

Here are the three commits:

  1. Modularize only necessary components
  2. Add ExtendedHiveMetastore pieces to the module
  3. Add SemiTransactionalHiveMetastore pieces to the module

@islamismailov islamismailov requested a review from highker October 25, 2019 19:21
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

This is a good start! Let's discuss in person what component should go to the new module. The new module needs to be self contained and flexible enough to be re-used by many other connectors.

pom.xml Outdated
Copy link

Choose a reason for hiding this comment

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

How about calling it presto-hive-metastore?

@islamismailov islamismailov force-pushed the modularize-hive-metastore branch 3 times, most recently from 1ce6cb5 to a9f55aa Compare October 31, 2019 20:51
@islamismailov islamismailov requested a review from highker October 31, 2019 23:39
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

Two quick comments while I'm doing the review:

  • The test failure is related. It is reproducible locally.
  • Could you call the new module presto-hive-metastore?

@islamismailov islamismailov force-pushed the modularize-hive-metastore branch 2 times, most recently from 5c082ca to 09a7c09 Compare November 1, 2019 07:07
@highker highker self-requested a review November 1, 2019 07:13
@islamismailov islamismailov force-pushed the modularize-hive-metastore branch from 09a7c09 to af8ce24 Compare November 1, 2019 17:34
@islamismailov
Copy link
Member Author

This should be ready for the review now :)

@islamismailov islamismailov force-pushed the modularize-hive-metastore branch from af8ce24 to 1ebdb54 Compare November 1, 2019 18:14
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

There are lots of code movement within a file. Can we keep them at the same place as they were?

pom.xml Outdated
Copy link

Choose a reason for hiding this comment

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

This doesn't seem to be necessary

Copy link

Choose a reason for hiding this comment

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

Can we keep this as it was?

Copy link

Choose a reason for hiding this comment

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

just call this config

Copy link

Choose a reason for hiding this comment

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

keep as is

Copy link

Choose a reason for hiding this comment

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

Keep this file as is

@islamismailov islamismailov force-pushed the modularize-hive-metastore branch 2 times, most recently from 79a8f90 to 24602fa Compare November 4, 2019 20:32
@islamismailov islamismailov requested a review from highker November 4, 2019 20:33
@islamismailov islamismailov force-pushed the modularize-hive-metastore branch from 24602fa to f46a8aa Compare November 5, 2019 18:15
@highker highker requested a review from jessesleeping November 5, 2019 21:34
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

Minor comments; otherwise looks good to me

Copy link

Choose a reason for hiding this comment

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

Shall we make 0x0100_0000 a constant and use it in both MetastoreErrorCode and HiveErrorCode?

Copy link

Choose a reason for hiding this comment

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

Let's complete the comment to say "Shared error code with HiveErrorCode".

Copy link

Choose a reason for hiding this comment

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

accident change?

Copy link

Choose a reason for hiding this comment

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

unrelated change?

Copy link

Choose a reason for hiding this comment

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

unrelated change?

Copy link

Choose a reason for hiding this comment

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

unrelated change?

Copy link

Choose a reason for hiding this comment

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

Let's make sure this file has no unrelated code movement

Copy link

Choose a reason for hiding this comment

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

same

Copy link

Choose a reason for hiding this comment

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

same

@islamismailov islamismailov requested a review from highker November 5, 2019 22:50
@highker
Copy link

highker commented Nov 5, 2019

@islamismailov, could you address the comments?

@highker highker removed their request for review November 5, 2019 22:54
@islamismailov
Copy link
Member Author

oh whoops! I thought i did push - sorry i forgot to press enter!

@islamismailov islamismailov force-pushed the modularize-hive-metastore branch from f46a8aa to 0a7ac43 Compare November 6, 2019 01:11
@highker highker self-requested a review November 6, 2019 01:13
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

Some more comments

  • Can we keep HiveColumnHandle and TestHiveColumnHandle inside presto-hive. HiveColumnHandle is part of the Hive connector, it shouldn't be separated out. To make this work, just move the only caller validateColumns as a private method to HiveMetadata
  • Same for HivePartitionKey. It is part of the HiveSplit and then part of hive connector. There is a place HiveTypeName gets it referenced. The INSTANCE_SIZE is wrong. Could you fix that?

Copy link

Choose a reason for hiding this comment

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

Keep as is

Copy link

Choose a reason for hiding this comment

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

keep this line

Copy link

Choose a reason for hiding this comment

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

Do not move this around

Copy link

Choose a reason for hiding this comment

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

keep this line

Copy link

Choose a reason for hiding this comment

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

keep as is

@islamismailov islamismailov force-pushed the modularize-hive-metastore branch from 0a7ac43 to 56e1d3e Compare November 6, 2019 17:24
@islamismailov islamismailov requested a review from highker November 6, 2019 17:25
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

LGTM! @jessesleeping, do you have extra comments?

@highker highker self-assigned this Nov 6, 2019
@islamismailov islamismailov force-pushed the modularize-hive-metastore branch from 56e1d3e to 9d6836e Compare November 8, 2019 03:10
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 8, 2019

CLA Check
The committers are authorized under a signed CLA.

  • ✅ Islam Ismailov (9d6836ecb82634f9e95908547ffc9ddf4ad4f92c)

@islamismailov islamismailov force-pushed the modularize-hive-metastore branch from 9d6836e to 8b8cc24 Compare November 8, 2019 17:57
@islamismailov
Copy link
Member Author

rebasing...

@islamismailov islamismailov force-pushed the modularize-hive-metastore branch from 8b8cc24 to 3da78f6 Compare November 8, 2019 18:11
Copy link

@highker highker left a comment

Choose a reason for hiding this comment

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

one last comment

Copy link

Choose a reason for hiding this comment

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

keep this line

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.

3 participants

Comments