How to Connect to Drill via JDBC fails with IllegalStateException (java.lang.IllegalStateException: No DrillbitEndpoint can be found)

 

March 11, 2016

admin

This  is my own  Generated code which I am using to connect to Drill via JDBC and query  *.csv file on my cloudera sandbox.

Code:

try{
Class.forName(“org.apache.drill.jdbc.Driver”);
Connection connection =DriverManager.getConnection(“jdbc:drill:zk=localhost:2181″,”root”,”cloudera”);
Statement st = connection.createStatement();
ResultSet rs = st.executeQuery(“SELECT * from dfs.`/home/cloudera/Desktop/test.csv`”);
while(rs.next()){
System.out.println(rs.getString(1));
…..
}
}catch(Exception e){
//Handle errors
e.printStackTrace();
}
(more…)

Leave a Reply

Your email address will not be published. Required fields are marked *

More like this

The Ultimate Guide For Notion AI

The Game-Changing Impact Of Extended Reality (XR) On The Future

MEAN vs MERN: Which Stack Is Best For Your Next Web Development Project?