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

Use PartitionIterator for getPartition calls #215

Open
patduin opened this issue May 18, 2021 · 0 comments
Open

Use PartitionIterator for getPartition calls #215

patduin opened this issue May 18, 2021 · 0 comments

Comments

@patduin
Copy link
Contributor

patduin commented May 18, 2021

Depending on the batch size given we're doing potentially large listPartition calls here:
https://github.com/HotelsDotCom/circus-train/blob/main/circus-train-core/src/main/java/com/hotels/bdp/circustrain/core/HiveEndpoint.java#L152
and
https://github.com/HotelsDotCom/circus-train/blob/main/circus-train-core/src/main/java/com/hotels/bdp/circustrain/core/HiveEndpoint.java#L154

We should use a partitionIterator: https://github.com/HotelsDotCom/hcommon-hive-metastore/blob/master/src/main/java/com/hotels/hcommon/hive/metastore/iterator/PartitionIterator.java if possible.

Benefit is that we'll be nicer to the Hive Metastore as calling getPartition with a very high number of will cause OOMs in the Metastore. Good rule of thumb is to try and not fetch more than 1000 partitions in one call.

Wether CT will fail trying to replicate 10000 partitions is another matter but at least we stop causing issues to the Metastore.

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

No branches or pull requests

1 participant