Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Hyrise Things

Jan Koßmann edited this page Sep 15, 2020 · 8 revisions

This Guide explains how to install a Hyrise, build the Tables and plugins needed for the Cockpit. The tables are needed to run the benchmarks (TPCC, TPCH, ...).

Install a hyrise

Get the Hyrise Source Code

  1. Clone the repository: git clone --recursive https://github.com/hyrise/hyrise.git
  2. Enter the Hyrise directory: cd hyrise
  3. Checkout the right branch: git checkout bp1920

Native Setup

First you need to install all dependencies and setup the makefiles:

  1. Let the install script handle Hyrise's dependencies: ./install_dependencies.sh
  2. Create the build directory: mkdir cmake-build-release && cd cmake-build-release
  3. Generate Makefiles: cmake ..
  4. Build the Hyrise Executables: make hyriseServer hyriseBenchmarkTPCH hyriseBenchmarkTPCDS hyriseBenchmarkJoinOrder hyriseBenchmarkTPCC hyriseConsole -j [#Threads]
  5. Leave the build directory: cd ..

If you have problems installing the hyrise try to reduce the number of threads.

Docker setup

You can simply pull a docker image with a hyrise and all needed tables and plugins inside. The dockerfiles builds automated the tables and plugins the exact way like described in the following parts of this guide. For more detailed information please refer to https://github.com/hyrise/Cockpit/wiki/Docker-Setup#build-the-hyrise-image .

Building Tables

To run the Cockpit you need to have the tables that are relevant for the benchmark at the machine where the Hyrise is running under the location /usr/local/hyrise/cached_tables. If the Cockpit tells the hyrise to load the data for a benchmark it will look in this directory. The supported benchmarks at the moment are:

  • TPCH SF 0.1
  • TPCH SF 1
  • TPCDS SF 1
  • TPCC SF 1
  • TPCC SF 5
  • JOB SF 1

Manually build tables (Native Setup)

You need to execute the following commands on the machine where the hyrise is running:

Build TPCH, TPCDS, JOB

  1. Create the directory: mkdir -p /usr/local/hyrise/cached_tables
  2. Enter hyrise root dir: path_to_hyrise_dir/hyrise
  3. Build TPCH binarie tables: ./cmake-build-release/hyriseBenchmarkTPCH --scale 1 --runs 0 && ./cmake-build-release/hyriseBenchmarkTPCH --scale 0.1 --runs 0
  4. Build TPCDS binarie tables: ./cmake-build-release/hyriseBenchmarkTPCDS --scale 1 --runs 0
  5. Build JoinOrder binarie tables: ./cmake-build-release/hyriseBenchmarkJoinOrder --runs 0 (This could take a while)
  6. Remove not needed tables from JOB cd imdb_data && rm -r *.csv && rm -r *.csv.json && cd ..
  7. Move binarie tables to final directory:
mv tpch_cached_tables/sf-1.000000 /usr/local/hyrise/cached_tables/tpch_1 \
&& mv tpch_cached_tables/sf-0.100000 /usr/local/hyrise/cached_tables/tpch_0_1 \
&& mv tpcds_cached_tables/sf-1 /usr/local/hyrise/cached_tables/tpcds_1 \
&& mv imdb_data /usr/local/hyrise/cached_tables/job_1

Build TPCC

To build the TPCC tables you need to use the hyriseConsole. in the same folder where the hyriseConsole is you need to create two sql files. You can find these files in the Cockpit repository under Cockpit/hyrise. You need to copy these files (tpcc_table_generation_sf_1.sql, tpcc_table_generation_sf_5.sql) in the folder where the hyriseConsole executable lies path_to_hyrise_dir/hyrise/cmake-build-release. Then run:

  1. Enter hyrise release dir: path_to_hyrise_dir/hyrise/cmake-build-release
  2. Build TPCC binaries: ./hyriseConsole tpcc_table_generation_sf_1.sql && ./hyriseConsole tpcc_table_generation_sf_5.sql

Now you should have the files in /usr/local/hyrise/cached_tables.
Please make sure the /usr/local/hyrise/cached_tables directory exists before building the TPCC tables

Building Plugins (Native Setup)

The Plugin need to be in the location /usr/local/hyrise/lib/ on the same machine where the hyrise is running. To build the plugins please run:

  1. Enter hyrise release dir: path_to_hyrise_dir/hyrise/cmake-build-release
  2. Build Plugins: make CompressionPlugin ClusteringPlugin IndexSelectionPlugin
  3. Copy Plugins to the right location: cp lib/libClusteringPlugin.so lib/libCompressionPlugin.so lib/libIndexSelectionPlugin.so /usr/local/hyrise/lib/