Skip to content

Can we implement a MetaStoreFilterHook to modify the path and support HMS that uses the same ns #320

@flaming-archer

Description

@flaming-archer

Is your feature request related to a problem? Please describe.

An HMS uses a Hadoop cluster, assuming its path name is hdfs://ns/path/to/hms1 . Another HMS uses another Hadoop cluster, assuming its path name is hdfs://ns/path/to/hms2 .In this case, if hs2 obtains two identical ns paths, it is unclear which Hadoop cluster to access.
Assuming we have RBF connecting these two different Hadoop clusters, we can change these two paths to RBF paths. For example, hdfs://ns/path/to/hms1 become hdfs://rbf/ns1/path/to/hms1 , hdfs://ns/path/to/hms2 become hdfs://rbf/ns2/path/to/hms2 . The change of path can be modified based on a set of rules, and the above example is a simple rule. In this scenario, can we implement a MetaStoreFilterHook to achieve this goal.

Describe the solution you'd like

I see an example of PrefixingMetastoreFilter that can be used to modify a path. Perhaps we can refer to this to add a new class to achieve such functionality.

Describe alternatives you've considered

Perhaps there are other ways, such as changing the path of the existing HMS to the RBF path, but this may introduce some operational risks to the existing environment

Additional context
No, this is a new feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions