2

After I created a Hive catalog, show tables works fine, but querying errors:

java.net.UnknownHostException: xxxxx

The steps to reproduce are:

  1. Create a Hive catalog (Hive is on HDFS):
CREATE CATALOG hive_catalog PROPERTIES (
    'type'='hms',
    'hive.metastore.uris' = 'thrift://172.0.0.1:9083',
    'hadoop.username' = 'hive'
);
  1. Run show tables:
switch hive_catalog; 
show databases;
use my_hive_db_name;
show tables;

This works fine; I can get the full table names of my Hive database.

  1. Execute a query:
select * from hive_catalog.my_hive_db_name.my_table_name;

This errors:

java.net.UnknownHostException: xxxxx

I know this error is about host name, but I don't understand why I can get the full table names without error?

I just want to query my Hive table via Apache Doris catalog.

1 Answer 1

1

You can try add the fs.defaultFS property in the Catalog properties and write the HDFS namenode address, for example:

'fs.defaultFS' = 'hdfs://namenode:port'

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you very much! I have added the fs.defaultFS in my create catalog statement. Now I can read data from hive via doris, it' really a good way to query hive.
if this answer solved your problem, you should "accept" it by clicking the checkmark to the left of its text

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.