First, see the documentation at http://calcite.apache.org/docs/avatica_overview.html#http-server.
The simplest way to start the server is to run $ java <classpath> org.apache.calcite.avatica.server.Main <args> as a command line. It creates an implementation of Meta, then wraps it in a Jetty handler, then invokes Jetty. There are arguments that can change the port, the implementation of Meta, and so forth. See Main.java for the details. (You can use any implementation of Meta. If your database is based on Calcite, you will probably use org.apache.calcite.jdbc.CalciteMetaImpl. But Avatica does not require that you use Calcite.) Once the server is started, you can connect using the remote client driver. Make sure that org.apache.calcite.avatica.remote.Driver is on your path. Then connect to “jdbc:avatica:remote://hostname” using JDBC. (Others, please chime in if you see errors in the above instructions.) Julian > On Nov 25, 2015, at 10:58 AM, Sarnath <[email protected]> wrote: > > Hi All, > > Good morning! > > We are implementing an OLAP engine on Hadoop. We store the aggregations as > documents in elastic search. Elastic search provides a JSON based query DSL > that can be used via REST API to filter and select these aggregations. > > We want to provide an SQL interface on top of this...and power the queries > through the cubes that we store in Elastic Search. > > I am seeking your guidance on how to go about it using calcite and avatica. > We already developed a model.json for ES and able to run SQL on Elastic > search from sqlline that accompanies calcite. But what we would like to do > is deploy a JDBC server and automatically serve queries either from elastic > search or through hiveserver. We are not clear how to roll out our own jdbc > client and server... Can some1 explain this please? > > Also in the calcite presentation, I found references to lattice and tiles. > I am yet to find out what are their roles are within calcite and how our > project could benefit out from these. If one of you could throw some light, > I would be grateful. > > Thanks, > Best, > Sarnath > > Best, > Sarnath
