1

I have work on Hadoop/Hive. I have installed Hadoop 1.1.2 and Hive 0.10.0.When I use Hive as command prompt then it works fine,but when I am using as it JDBC in Eclipse then gives the below error :

Could not establish connection to localhost:10000/default: java.net.ConnectException: Connection refused

1 Answer 1

4

You can connect to Hive in two modes. Through thrift server and embedded mode. By seeing your url localhost:10000/default, it looks like you are trying to connect to the thrift sever. So please ensure that you are have started the hive thrift server by the following command.

    $ hive --service hiveserver

If you want to connect in embedded mode. you should give the url as

   jdbc:hive://

To use the embedded mode you should add the hive/conf and the jars in hive/lib to your classpath.

It is to be noted that, use of the Thrift server is not thread safe as of now.

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

2 Comments

Can you please explain a bit more, I mean you said you are using JDBC to connect to hive. If this is so, are you using HiveMetaStoreClient or something else.
@Charnjeet Perhaps the port 10000 is already in use by some other process. Please check that once.

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.