Skip to content

Quick Start: Local Mode

Aleksandar Vitorovic edited this page Mar 27, 2016 · 74 revisions

This section is a tutorial for installing Squall/Storm on your local machine.

  1. Squall is under continuous development at this point, and therefore to benefit from the latest improvements it is better to directly clone the repository from GitHub:
 $ git clone https://github.com/epfldata/squall.git
  1. Prerequisites. Make sure that you have sbt, Java v7 (or higher) and Scala v2.10 (or higher) installed, and that they are on your system PATH. (Scala is required only for some query plans). To check the versions (and their presence on system PATH), please run java -version and scala -version. If you don't have the appropriate versions, please install them using instructions for your platform. While sbt and Java are available from the central repositories (provided by the operating system distribution), Scala needs to be installed manually, for example, on a Linux machine by running:
 $ wget http://www.scala-lang.org/files/archive/scala-2.10.4.deb
 $ sudo dpkg -i scala-2.10.4.deb
 $ sudo apt-get update
 $ sudo apt-get install scala
  1. To install Squall, simply run the following command in the bin directory ( please note that you will have working internet connection to complete this step, in order to download some libraries ):
 $ ./install.sh

This scripts downloads apache-storm-0.9.4 to the root directory of your Squall installation, it compiles Squall (it creates squall-core/target/squall-0.2.0.jar) and downloads all the dependencies (and puts them in squall-core/target/squall-dependencies-0.2.0.jar). It also installs DBToaster, which is a special local join operator used in certain query plans.

  1. Installation is now completed. The following commands run Squall:
    cd bin
    ./squall_local.sh ../test/squall/confs/local/0_01G_hyracks_ncl

If everything is set up correctly, you will get something like this:

    All the tasks of the last component in total received 15000 tuples.
    FURNITURE = 3007 
    AUTOMOBILE = 2979 
    MACHINERY = 2536 
    BUILDING = 3706 
    HOUSEHOLD = 2772

The script also checks the results (the expected results are provided in test/results directory), and the last line of the output should be something like:

    OK: Expected result achieved for username_0_01G_hyracks_ncl.

If everything worked fine, you are ready to go! You will find further documentation in the rest of the wiki. If this doesn't work, check the troubleshooting section or open an issue. If you want to recompile the code, please consult Recompilation.

In order to run Squall with a different query and/or different database size, please consult Squall Local Configs. Other pre-bundled local sql configurations are available here. SQL example queries over TPC-H schema are available in the squall-$VERSION/test/squall/sql_queries directory, including Q3, Q5, Q7, Q8, Q9 and Q10 as well as the Hyracks query (a query over the TPC-H schema from [1]). The schema is specified as a txt file in squall-$VERSION/test/squall/schemas/tpch.txt. A user can also easily provide its own schema. Before writing your own queries, please consult Supported features.

Squall building is managed by sbt. To check if your code modifications broke anything, you can run Squall on all the pre-bundled query plans, and Squall will verify the result correctness (the command should be issues from root Squall directory, which contains build.sbt):

 $ sbt test

References

[1] V. R. Borkar, M. J. Carey, R. Grover, N. Onose, and R. Vernica, “Hyracks: A flexible and extensible foundation for data-intensive computing.,” in ICDE (S. Abiteboul, K. B ̈hm, C. Koch, and K.-L. Tan, eds.), pp. 1151–1162, IEEE Computer Society, 2011.