Hi,
you can use the JDBC driver shipped with the distribution, to execute SQL
queries against an HBase database:
String className = "org.apache.drill.jdbc.Driver";
try {
Class.forName(className);
} catch (ClassNotFoundException e) {
System.err.println("Failed to load JDBC driver '" + className + "': " +
e.getMessage());
}
String jdbcUrl = " jdbc:drill:zk=<yourIP>:2181/drill/drillbits1;schema=hbase";
try (Connection con = java.sql.DriverManager.getConnection(jdbcUrl); Statement
stmt = con.createStatement()) {
...
}
...
Best Regards,
Martin Mois
-----Ursprüngliche Nachricht-----
Von: Nishith Maheshwari [mailto:[email protected]]
Gesendet: Mittwoch, 27. Mai 2015 08:39
An: [email protected]
Betreff: JAVA API for Drill
Hi,
I wanted to create a java application to connect and query over a HBase
database using Drill, but was unable to find any documentation regarding this.
Is there a JAVA api through which Drill can be accessed? I did see a small
mention of C++ and JAVA api in the documentation but there was no other link or
information regarding the same.
Regards,
Nishith Maheshwari
#
" This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, you are
notified that any dissemination, copying of this e-mail and any attachments
thereto or use of their contents by any means whatsoever is strictly
prohibited. If you have received this e-mail in error, please advise the sender
immediately and delete this e-mail and all attached documents from your
computer system."
#