ODBC Hive Connection makes Rstudio crash // Connection pane issue ?

Hi,

I use Rstudio Server 1.1.453 and when I try to initiate a Hive connection through ODBC, RStudio crashes.

The code I run :

library(odbc)
library("DBI")


con <- DBI::dbConnect(odbc(), Driver = "/opt/cloudera/hiveodbc/lib/64/libclouderahiveodbc64.so", 
                 Host = "myserver", 
                 port = 10000, 
                 Schema = "default",
                 UseSASL = 0,
                 AuthMech=3,
                 UID="myuser",
                 password="mypassword",
                 TrustedCerts="/home/centos/truststore.pem",
                 AllowSelfSignedServerCert=1,
                 SSL=1)  

dbGetQuery(con, "show databases")

The crash message (pretty generic, isn't it...)

The most weard thing is if I run the same query directly in a terminal by enabling an another R session or if I run the same code into a reprex function, I can query hive table right after the connection has been made.

So my questions :

  • How could I log what Rstudio try to do when I run the code ?
  • As an intuitive solution, I'd like to test to have no interaction with the RStudio connection pane. Is there a way to initiate a such connection without any interaction or results into the connection pane ?

Thanks :slight_smile:

Note : I don't have any issue to establish an impala connection with the help of the implyr package

I found a workaround with the callr package which is not so bad considering I run only basic queries in hive with Rstudio (create table).

callr:r(function(){
library(odbc)
con <- dbConnect(odbc::odbc(), Driver = '/opt/cloudera/hiveodbc/lib/64/libclouderahiveodbc64.so', 
                              Host = 'server, 
                              Port = 10000, 
                              Schema = 'default',
                              AuthMech=3,
                              UID='',
                              PWD='',
                              TrustedCerts='/home/centos/truststore.pem',
                              AllowSelfSignedServerCert=1,
                              SSL=1)
  
  dbGetQuery(con, 'SHOW DATABASES')} )

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.