[Fiware-lab-help] FI-Lab Assistance

Benjamin Geißler benjamin.geissler at gmail.com
Tue Nov 11 15:03:22 CET 2014


Dear all,

I'm trying to connect from a VM in the FIWARE Lab to the Cosmos GE using
Hive (following this description
http://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/BigData_Analysis_-_User_and_Programmer_Guide#Java).
Here is my code for opening a connection to Hive:

try {
Class.forName("org.apache.hadoop.hive.jdbc.HiveDriver");
} catch (ClassNotFoundException error) {
System.err.println(error.getMessage());
return null;
}
try {
// use JDBC to connect to hive and your Cosmos credentials (first part of
FIWARE Lab user name and FIWARE Lab password
return DriverManager.getConnection("jdbc:hive://
cosmos.lab.fi-ware.org:10000/default?user=" + user + "&password=" +
password);
} catch (SQLException error) {
error.printStackTrace();
System.err.println(error.getMessage());
}

user and password are my FIWARE Lab credentials, with out the part after
the @.

After a couble of seconds I get the following message, that the connection
has been rest:

java.sql.SQLException: org.apache.thrift.transport.TTransportException:
java.net.SocketException: Connection reset
        at
org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:196)
        at
org.apache.hadoop.hive.jdbc.HiveStatement.execute(HiveStatement.java:132)
        at
org.apache.hadoop.hive.jdbc.HiveConnection.configureConnection(HiveConnection.java:132)
        at
org.apache.hadoop.hive.jdbc.HiveConnection.<init>(HiveConnection.java:122)
        at
org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:106)
        at java.sql.DriverManager.getConnection(DriverManager.java:571)
        at java.sql.DriverManager.getConnection(DriverManager.java:233)

I've even tried to use the IP Address (130.206.80.46), but still the same
error.
Can you please give me a hint, what I'm doing wrong.

Thank,
Benjamin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-lab-help/attachments/20141111/0fd1eaee/attachment.html>


More information about the Fiware-lab-help mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy