Skip to content

Add hive metastore catalog support #113

Closed

Description

@Xuanwo

Tasks

Activity

  1. marvinlanhenke commented on Mar 4, 2024

    @marvinlanhenke
    Contributor

    @Xuanwo I've started looking into this (just started yesterday taking a look at the codebase in general) - how would you go about unit testing the catalog trait for hms? The integration test could probably be done using the docker-compose utils etc. but I am not sure how to best unit test this? Do you have any suggestions or pointers for me to look at? Thank you very much and best regards.

    EDIT:
    I've done a simple prototype with my hive-metastore running locally via docker-compose, which works just fine. So testing via integration tests seems to be no problem.

    Still unsure about how to unit-test this.

  2. Xuanwo commented on Mar 5, 2024

    @Xuanwo
    MemberAuthor

    I've done a simple prototype with my hive-metastore running locally via docker-compose, which works just fine. So testing via integration tests seems to be no problem.

    It's fine to have integration tests. It doesn't make sense to me to mock HMS.

  3. marvinlanhenke commented on Mar 6, 2024

    @marvinlanhenke
    Contributor

    @Xuanwo
    Yes, I thought the same - mocking the HMS would not be beneficial.
    I've setup the basic test-infra for the hms-catalog. In the next couple of days I will try to work on / finish the implementation of the catalog.

  4. Xuanwo commented on Mar 6, 2024

    @Xuanwo
    MemberAuthor

    I setup the basis test-infra for the hms-catalog. In the next couple of days I will try to work on / finish the implementation of the catalog.

    That's great!

  5. marvinlanhenke commented on Mar 8, 2024

    @marvinlanhenke
    Contributor

    @Xuanwo @liurenjie1024
    ...just a quick update and a request for feedback.

    I 'finished' the work on all the namespace operations.
    Since this would be my first contribution to this repo, I would appreciate it if someone could take a quick look at the current status.

    I just want to make sure it aligns with the rest of the codebase, before I put in the effort to implement the rest of the catalog.
    https://github.com/marvinlanhenke/iceberg-rust/blob/hms/crates/catalog/hms/src/catalog.rs#L260-L428

    sidenote:
    For the hive-metastore docker-compose, I used a file I had from a previous project; however this needs some optimization since the connection to the mysql backend slows down the integration tests. My approach would be to use derby instead of mysql to speed things up - but I havent gotten around to take a look at it.

    Anyway best regards and thanks in advance for the feedback.

  6. Xuanwo commented on Mar 8, 2024

    @Xuanwo
    MemberAuthor

    I 'finished' the work on all the namespace operations.

    Awesome!

    I just want to make sure it aligns with the rest of the codebase, before I put in the effort to implement the rest of the catalog.

    Let's merge this PR first and then start another one. There's no need to combine them into a single large PR.

    In short, submit a PR and then we can polish it together.

  7. marvinlanhenke commented on Mar 8, 2024

    @marvinlanhenke
    Contributor

    In short, submit a PR and then we can polish it together.

    Sounds good to me - looking forward to it.

    Best regards.

  8. marvinlanhenke commented on Mar 9, 2024

    @marvinlanhenke
    Contributor

    @Xuanwo @liurenjie1024
    I'm currently looking at the table operations in particular create_table and I'm having some trouble understanding the handling of the metadata. Looking at the REST-Catalog implementation, I don't see any metadata.json actually being written (physically)? Is this correct or am I missing something?

    Anyway, is it correct to assume to use FileIO::from_path(metadata_location) and then create a new_output(...) -> Result<OutputFile> this would align with the python impl:
    https://github.com/apache/iceberg-python/blob/main/pyiceberg/catalog/hive.py#L309

  9. liurenjie1024 commented on Mar 10, 2024

    @liurenjie1024
    Contributor

    Hi, @marvinlanhenke I think currently we can leave create_table unimplemented since it has some dependencies, such as transaction api and table metadata builder, otherwise it's currently not practical.

  10. marvinlanhenke commented on Mar 10, 2024

    @marvinlanhenke
    Contributor

    [...] since it has some dependencies, such as transaction api and table metadata builder, otherwise it's currently not practical.
    Makes sense to me.

    So I'd leave create_table, load_table, update_table and drop_table as unimplemented, since they all depend on those dependencies you mentioned - or they need create_table; so those other methods can be tested.

    @liurenjie1024
    I think it'd be best to create another issue that sketches out the next steps (dependencies) for the upcomming week or two? (Andrew Lamb does this in Datafusion and it helps a lot coordinating the effort).

  11. liurenjie1024 commented on Mar 10, 2024

    @liurenjie1024
    Contributor

    Hi, @marvinlanhenke Thanks for the suggestion, I think creating tracking issue and clarifying their dependency would be quite helpful, let me create one for 0.3 release. I'm not sure if an issue for upcoming week or two helps.

  12. added this to the 0.3.0 Release milestone on Mar 11, 2024
  13. moved this to In Progress in iceberg-ruston Mar 11, 2024
  14. liurenjie1024 commented on Mar 11, 2024

    @liurenjie1024
    Contributor

    The left parts are blocked by #250

  15. marvinlanhenke commented on Mar 11, 2024

    @marvinlanhenke
    Contributor

    The left parts are blocked by #250

    thank you so much for setting up the projects and preparing release 0.3.0 - I like the structure.

    For this issue - I'll try to push part 2 this week where I setup as much as I can do without the TableMetadataBuilder - meaning all the table operations are implemented / including validations so the only parts left, will be the creation of the TableMetadata and the actual return of Result<Table>

  16. liurenjie1024 commented on Mar 12, 2024

    @liurenjie1024
    Contributor

    @marvinlanhenke Thanks for the work. I'll also try to work on setting up TableMetadataBuilder this week.

  17. marvinlanhenke commented on Mar 12, 2024

    @marvinlanhenke
    Contributor

    @liurenjie1024
    just a quick update: I've implemented most of the stuff I can do without the TableMetadataBuilder. Also you can assign this issue to me, if you'd like.

  18. liurenjie1024 commented on Mar 13, 2024

    @liurenjie1024
    Contributor

    @marvinlanhenke Sure, thanks!

  19. marvinlanhenke commented on Mar 17, 2024

    @marvinlanhenke
    Contributor

    @liurenjie1024
    I'm done with the implementation and ready to push the PR.
    However, I think it would be great to review #272 first, since it blocked my implementation / serialization of metadata. Thus, I made the changes. Let me know what you think

  20. liurenjie1024 commented on Mar 19, 2024

    @liurenjie1024
    Contributor

    @marvinlanhenke The pr looks great, thanks!

  21. moved this from In Progress to Done in iceberg-ruston Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions