minihippo commented on code in PR #4718: URL: https://github.com/apache/hudi/pull/4718#discussion_r925764014
########## rfc/rfc-36/rfc-36.md: ########## @@ -0,0 +1,605 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +# RFC-36: Hudi Metastore Server + +## Proposers + +- @minihippo + +## Approvers + + +## Status + +JIRA: [HUDI-3345](https://issues.apache.org/jira/browse/HUDI-3345) + +> Please keep the status updated in `rfc/README.md`. + +# Hudi Metastore Server + +## Abstract + +Currently, Hudi is widely used as a table format in the data warehouse. There is a lack of central metastore server to manage the metadata of data lake table. Hive metastore as a commonly used catalog service in the data warehouse on Hadoop cannot store the unique metadata like timeline of the hudi table. + +The proposal is to implement an unified metadata management system called hudi metastore server to store the metadata of the hudi table, and be compatible with hive metastore so that other engines can access it without any changes. + +## Backgroud + +**How Hudi metadata is stored** + +The metadata of hudi are table location, configuration and schema, timeline generated by instants, metadata of each commit / instant, which records files created / updated, new records num and so on in this commit. Besides, the information of files in a hudi table is also a part of hudi metadata. + +Different from instant or schema recorded by a separate file that is stored under `${tablelocation}/.hoodie` on the HDFS or object storage, files info are managed by the HDFS directly. Hudi gets all files of a table by file listing. File listing is a costly operation and its performance is limited by namenode. In addition, there will be a few invalid files on the file system, which are created by spark speculative tasks(for example) and are not deleted successfully. Getting files by listing will result in inconsistency, so hudi has to store the valid files from each commit metadata, the metadata about files is usually referred to snapshot. + +RFC-15 metadata table is a proposal that can solve these problems. However, it only manages the metadata of one table. There is a lack of a unified view. + +**The integration of Hive metastore and Hudi metadata lacks a single source of truth.** Review Comment: For the first part, i think it's a question about how we provide a lake metastore that is hive compatible, so that the metastore can connect engines with no effort. There is a discussion / simple idea left in the `Hive Metastore Adapter` part, the end of the rfc page. Maybe the lake metastore is another store which adapts to the existing hive metastore, and the lake one is a superset of functions -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
