[
https://issues.apache.org/jira/browse/HIVE-25882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18003962#comment-18003962
]
Butao Zhang commented on HIVE-25882:
------------------------------------
>From the description of HIVE-16993, for C++ hms client, like kudu:
{code:java}
when the C++ implementation sends a Database without the field set, it actually
writes an empty string, and the MetaStore treats it as a set field (non-null),
and then calls a Path API which rejects the empty string.
{code}
This indicates that if the user's database (db) does not specify a path, the
C++ implementation will treat an empty string as a invalid path. Based on the
example provided by the user, the example uses a database created by Trino
without specifying a database path.
Therefore, I believe a workaround to resolve this issue is to specify the
database path when creating the Hive database through Trino. This should
address the problem, like this:
{code:java}
CREATE SCHEMA hive.schema_name
WITH (
location = 'hdfs://namenode:8020/path/to/schema'
);
{code}
So, for now, we can temporarily remove the hive-4.1.0-must label from this
ticket.
As for the empty string path solution for the C++ client mentioned in
HIVE-16993, since no user has provided feedback yet, we can attempt to address
it in a future version.
> Using the Hive Metastore with Kudu not work
> -------------------------------------------
>
> Key: HIVE-25882
> URL: https://issues.apache.org/jira/browse/HIVE-25882
> Project: Hive
> Issue Type: Bug
> Components: Accumulo Storage Handler
> Affects Versions: 3.1.2, 4.0.0
> Environment: HIVE: 3.1
> HDP: 3.1.1.3.1
> KUDU:kudu 1.15.0
> Reporter: liu
> Priority: Critical
> Labels: hive-4.1.0-must
>
> I follow this page config . It looks as if the configuration was successful.
> [https://kudu.apache.org/docs/hive_metastore.html#enabling-the-hive-metastore-integration]
> kudu master start log
> {code:java}
> I1115 18:51:37.391942 1832 catalog_manager.cc:1253] Loading table and tablet
> metadata into memory...
> I1115 18:51:37.392135 1832 catalog_manager.cc:495] Loaded metadata for table
> $schemas [id=9c31d249228f42b38468835a7ae2c6e6]
> I1115 18:51:37.392266 1832 catalog_manager.cc:549] Loaded metadata for
> tablet 1526622b192145b8973fc852c2cfbd8f (table $schemas
> [id=9c31d249228f42b38468835a7ae2c6e6])
> I1115 18:51:37.392287 1832 catalog_manager.cc:549] Loaded metadata for
> tablet 2842be87bec74f0592a01ca0535bd9aa (table $schemas
> [id=9c31d249228f42b38468835a7ae2c6e6])
> I1115 18:51:37.392294 1832 catalog_manager.cc:1262] Initializing Kudu
> cluster ID...
> I1115 18:51:37.392381 1832 catalog_manager.cc:1098] Loaded cluster ID:
> 70b19944b04543759922355e6ce259ac
> I1115 18:51:37.392387 1832 catalog_manager.cc:1273] Initializing Kudu
> internal certificate authority...
> I1115 18:51:37.392593 1832 catalog_manager.cc:1282] Loading token signing
> keys...
> I1115 18:51:37.392693 1832 catalog_manager.cc:5093] T
> 00000000000000000000000000000000 P 2bc3b2318ca640a78a99fcbe4d058a9f: Loaded
> TSK: 0
> I1115 18:51:37.392736 1832 catalog_manager.cc:1292] Initializing in-progress
> tserver states...
> I1115 18:51:37.392812 1832 catalog_manager.cc:1305] Loading latest processed
> Hive Metastore notification log event ID... {code}
> Now I use trino to connect to kudu and execute the following script。
> {code:java}
> trino:default> create schema cdr;
> CREATE SCHEMA
> trino:default> use cdr;
> USE
> trino:cdr> show schemas;
> Schema
> --------------------
> cdr
> default
> information_schema
> (3 rows)Query 20211118_033415_00020_4gwuw, FINISHED, 3 nodes
> Splits: 36 total, 36 done (100.00%)
> 0.22 [3 rows, 43B] [13 rows/s, 195B/s]
> trino:cdr> CREATE TABLE kudu.cdr.users (
> -> user_id int WITH (primary_key = true),
> -> first_name varchar,
> -> last_name varchar
> -> ) WITH (
> -> partition_by_hash_columns = ARRAY['user_id'],
> -> partition_by_hash_buckets = 2
> -> );
> ->
> W1118 13:56:00.671370 31226 catalog_manager.cc:1959] Remote error: failed to
> create HMS catalog entry for table [id=3490249b929842509d3364a18f07a4e5]:
> failed to create Hive MetaStore table: TException - service has thrown:
> MetaException(message=NoSuchObjectException(message:cdr)) {code}
> master log:
> {code:java}
> W1118 13:56:00.671370 31226 catalog_manager.cc:1959] Remote error: failed to
> create HMS catalog entry for table [id=3490249b929842509d3364a18f07a4e5]:
> failed to create Hive MetaStore table: TException - service has thrown:
> MetaException(message=NoSuchObjectException(message:cdr)) {code}
> Schemas Failed to synchronize to hive metadata,If I create this database in
> hive,the error log:
> {code:java}
> W1118 13:30:00.148990 31226 catalog_manager.cc:1959] Remote error: failed to
> create HMS catalog entry for table [id=4a40e0c12d9a4d26a11fcce0cf259d35]:
> failed to create Hive MetaStore table: TException - service has thrown:
> MetaException(message=java.lang.IllegalArgumentException: Can not create a
> Path from an empty string) {code}
> Now I don't know how to solve this problem
> [link title|https://issues.apache.org/jira/browse/KUDU-3338]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)