Skip to content
pwendell edited this page Oct 10, 2012 · 22 revisions

Executing Queries

Shark CLI

The easiest way to run Shark is to start a Shark Command Line Client (CLI) and being executing queries. Shark executables are available in the bin/ directory. To start the Shark CLI, simply run:

$ ./bin/shark
shark> 

The Shark CLI will only work correctly if the HIVE_HOME environment variable is set (see Configuration).

SharkServer

It is also possible to run a persistent SharkServer which retains session state, such as cached tables, across executions of the Shark CLI. This can be very useful for those hoping to keep a few tables in cache for long periods of time.

To start a SharkServer, run

$./bin/shark --service sharkserver <port>

A client can connect to the server using

$./bin/shark -h <server-host> p -<server-port>