Details
-
Type: extRequest
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:None
-
Sender Email:
-
HD-Chapter:Data
-
HD-Enabler:Cosmos
Description
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
_______________________________________________
Fiware-lab-help mailing list
Fiware-lab-help@lists.fi-ware.org
https://lists.fi-ware.org/listinfo/fiware-lab-help
[Created via e-mail received from: =?UTF-8?Q?Benjamin_Gei=C3=9Fler?= <benjamin.geissler@gmail.com>]
Hi Benjamin,
the code seems to be OK. Are you still facing this problem or was it solved?
In addition, have you tried a simple "ping" to the Cosmos Namenode in order to discard a networking issue?
(apologies for the delay).
Regards,
Francisco