JDBC connection to Shark Server hangs - hadoop

I am using following configuration for my shark cluster
Scala 2.10.3
Spark 0.9.0
Hive 0.12.0-chd5.0.2
Shark 0.9.0
Spark and Hive are configured via Cloudera manager (CDH 5.0.2)
I am following this tutorial to connect to shark server:
https://cwiki.apache.org/confluence/display/Hive/HiveClient
I start shark server as follows:./shark --service sharkserver 9956
I am able to connect to hive server using code in above mentioned tutorial.
But when i try to connect to shark server it hung at this line
Connection con = DriverManager.getConnection("jdbc:hive://localhost:9956/default", "", "");
It does not give any error or exception, just program stuck at that line.

I was able to solve this problem by running server in sudo mode.
In default mode shark server was unable to write a file because of permission denied error.

Related

Pig ReadTimeOut Exception

I've installed hortonworks sandbox on Virtual Box. (6092MB of Ram)
I'm following this tutorial.
When I try to execute one simple script
Using arguments: -useHCatalog
Execute on Tez.
I got this error:
java.net.SocketTimeoutException: Read timed out
What can I do?
It sounds like HiveServer is not running. Can you open Ambari (browser - port 8080) and verify that it is running? Ambari can let you restart Hive if it is not.

Hive - issues while starting

I have been using Hive for sometime now on Ubuntu while Hadoop is in Pseudo Distribution mode however today out of nowhere i am getting error while starting Hive shell.I have not made any changes in configuration at all -
Caused by: Meta Exception(message:Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused
The hivemetastore service is not running. You can start the service with the command below. This command is for installations made using packages.
service hive-metastore start
For tarball installations, you can start the hive metastore using the below command
hive --service metastore &

Beeline command issue

I am new to Hive and hopefully this is going to be an easy thing to solve
for someone with more experience, but I am having trouble doing it on my
own.
On my EC2 app server I am running the following command with no error:
beeline -u jdbc:hive2://master
This is working on Hive 13 which was installed through a bootstrap action
using the latest AMI version. 'master' is pointing to my EMR cluster
Then I downloaded the source for Hive 14 and built it. I have replaced my
/home/hadoop/hive directory with the package that was built.
However, if I try to execute the same command, I get an error:
scan complete in 6ms
Connecting to jdbc:hive2://master
Error: Could not open client transport with JDBC Uri: jdbc:hive2://master:
Cannot open without port. (state=08S01,code=0)
Beeline version 0.14.0 by Apache Hive
0: jdbc:hive2://master (closed)>
Running it with the port provided works correctly:
beeline -u jdbc:hive2://master:10000
I would like to be able to able to run the command without providing the
default port number.
Can anyone direct me with an instruction.
Thanks,
Hive Beeline Connection in Two Modes:
1.Embedded Mode:
If both Hive Client and Hive server are same then connect beeline by using below url:
!connect jdbc:hive2://
2.Remote Mode:
If server in one machine but client in one machine you can connect beeline using below url:
!connect jdbc:hive2://<host>:<port>

phoenix hbase not connecting remotely

I have two cloudera VM and on both i've configured phoenix and it is working fine as long as it is localhost.
When i'm trying to connect hbase from one VM from phoenix of another VM, i'm using this command
$ ./sqlline.sh xxx.xx.xx.xx:2181
The connection is successful, but phoenix is still referencing the local HBASE and not the remote HBASE. Can anyone tell me where is the problem?

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

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
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.

Resources