hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cyrille Djoko" ...@agnik.com>
Subject Hive ServerSocket
Date Thu, 14 Feb 2013 18:23:32 GMT
	Hi, intern here.

My setup is the following, Hadoop 1.0.4, Sqoop 1.4.2, Hive 0.9.0

Hardware: Memory 495.6 MiB
	  Processor Intel(R) Pentium(R) 4 CPU 2.66GHz

Ubuntu 10.04 Lucid

I wrote a small program that would connect to the local hive, grabs data
from a given table and then create a query that would be use in inserting
the data into a server located on another computer.
>From my understanding I need the hive server needs to be running before I
can access it through the jdbc.
but when I try to run the server though the following command: hive
--service hiveserver, I get the following output:

user@user-7:~/hive$ bin/hive --service hiveserver
Starting Hive Thrift Server
WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please
use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties
files.
org.apache.thrift.transport.TTransportException: Could not create
ServerSocket on address 0.0.0.0/0.0.0.0:10000.
	at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:93)
	at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:75)
	at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:68)
	at org.apache.hadoop.hive.service.HiveServer.main(HiveServer.java:659)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

Disregard the warning I made the change in properties.

Synopsis of my program is:

try {
	Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
	Class.forName("org.apache.hadoop.hive.jdbc.HiveDriver").newInstance();
} catch (ClassNotFoundException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
	System.exit(1);
}catch (InstantiationException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
	System.exit(1);
}catch (IllegalAccessException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
	System.exit(1);
}
Connection con=null;
Connection con2 = null;
try {
	//Location of the hive on the current computer
	System.out.println("About to Connect");
	con = DriverManager.getConnection(DatabaseIn, usernameIn, passwordIn); //
<-- Problem Happens Here
	System.out.println("First Done");

	con2 = DriverManager.getConnection(DatabaseOut, usernameOut, passwordOut);

} catch (SQLException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
	System.exit(1);
}
System.out.println("Connections Done");

Sorry for the long email,
And thank you in advance for any input.
Regards,

Cyrille Djoko

Agnik LLC
Data Mining Developer Intern


Mime
View raw message