Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Getting Error while connecting impala with node JS

Getting Error while connecting impala with node JS

New Contributor

I have been trying to connect the impala hosted on AWS EMR with node js.

 

Code :-

var JDBC = require('jdbc');
var jinst = require('jdbc/lib/jinst');


if (!jinst.isJvmCreated()){
jinst.addOption("-Xrs");

jinst.setupClasspath(['./jars/hive-jdbc-1.2.1-standalone.jar','./jars/hadoop-common-2.7.0-mapr-1607.jar','./jars/hadoop-common-2.7.1.jar','./jars/hadoop-common-2.7.1-sources.jar']);
}

var conf = {
url: 'jdbc:hive2://AWS_MASTER_NODE_URL:21050/default;auth=noSasl',
drivername: 'org.apache.hive.jdbc.HiveDriver',
};

var hive = new JDBC(conf);

 

hive.initialize( function(err) {
if (err) {
console.log(err);
}else{
console.log('success');
}
});

I am getting the below error :- 

 

[Error: Error running static method
org.apache.hive.service.cli.HiveSQLException: Ignoring invalid configuration option: use:database
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:256)
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:247)
at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:586)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:192)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
] {
cause: nodeJava_org_apache_hive_service_cli_HiveSQLException {}
}

Does anyone have any idea why this does not work?

Don't have an account?
Coming from Hortonworks? Activate your account here