You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "konwu (Jira)" <ji...@apache.org> on 2022/11/14 09:47:00 UTC

[jira] [Created] (FLINK-30021) Table store Hive catalog getTableLocation by hms client

konwu created FLINK-30021:
-----------------------------

             Summary: Table store Hive catalog getTableLocation by hms client
                 Key: FLINK-30021
                 URL: https://issues.apache.org/jira/browse/FLINK-30021
             Project: Flink
          Issue Type: Improvement
          Components: Table Store
            Reporter: konwu


Currently table store catalog load table location use warehouse base path for hive catalog

which was not convenient for multiple warehouse for query client like spark thrift server.

Maybe we should get table location from hive meta client like below:
{code:java}
    @Override
    public Path getTableLocation(ObjectPath tablePath) {
        try {
            Table table = client.getTable(tablePath.getDatabaseName(), tablePath.getObjectName());
            return new Path(table.getSd().getLocation());
        } catch (TException e) {
            throw new RuntimeException("Failed to get table location", e);
        }
    } {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)