Real-Time Analytics Over Cloud Database Engines
Compiler needed:
- Linux: LLVM-12 or later versions.
- Mac OS: LLVM-13.
Set up AWS access credentials and config. Run aws configure or manually set ~/.aws/credentials and ~/.aws/config.
- Install required dependency. For Ubuntu, ./tools/project/bin/ubuntu-prerequisites.sh. For other Linux OS or Mac OS, required dependencies listed in tools/project/bin/ubuntu-prerequisites.sh have to be manually installed.
- Build the system
./resources/script/build.sh -s(Or using an IDE like Clion to build).
- Create a cluster of EC2 nodes (at least 2), within which one is the coordinator, the others are executors. The coordinator is not necessarily as powerful as the executor.
- Log in the coordinator. Put public IP of all nodes (including the coordinator) into
resources/config/cluster_ips. Each line is one IP. - Set up the system
./resources/script/setup.sh. If all required dependencies are already installed, the system can also be set up by./resources/script/build.sh -d,./resources/script/deploy.sh.
install_dependencywhether to install required dependencies when runningresources/script/setup.sh.cleanwhether to clean before the build starts.build_parallelparallel degree used for CMake build.build_dir_namename of the directory for the built files.deploy_dir_namename of the directory used for deploying to and running on a cluster.temp_dir_namename of the directory to store temp files after the system starts.pem_paththe pem file (AWS private key) used to log in created EC2 nodes.
- Make AWS access credentials and config are set.
- Organize data files as follows on one S3 bucket:
- Under
resources/metadata/, create a directory of which the absolute path denotes the schema name, e.g. data files unders3://ssb-sf10-htap/csv/belong to schemassb-sf10-htap/csv/. - For each table
Twith a single partition, name the file asT.tblfor CSV format orT.parquetfor Parquet format; for each tableTwith multiple partitions, create a directoryT_sharded/and put partition files named asT.tbl.0/T.parquet.0,T.tbl.1/T.parquet.1... into it.
- Under
- Register data by creating metadata files under
resources/metadata/. Create a directory named as the schema name, and organize metadata files as follows:schema.jsonFor each table, specifyname,format(delimiterif CSV),numPartitions,fields.stats.jsonFor each table, specifyname,rowCount,apxColumnLength(no need to be accurate, just an estimation, used by W-LFU).zoneMap.jsonFor each table, specifyname, collected min_max values of each partition on some columns, leave it empty if not collected.
- Specify the binary log file under
fpdb-logparser/java/main/java/com/flexpushdowndb/logparser/parser/Parser.java/in the variable binlogFile.
- Start the Calcite server
java -jar fpdb-calcite/java/target/flexpushdowndb.thrift.calcite-1.0-SNAPSHOT.jar &. - Start the LogParser server
java -jar fpdb-logparser/java/target/flexpushdowndb.thrift.logparser-1.0-SNAPSHOT.jar &. cd <build directory>/fpdb-main.- Run tests
./fpdb-main-test -ts=<test-suite> -tc=<test-case>, available single-node test suites aressb-sf10-single_node-no-parallel,ssb-sf50-single_node-no-parallel - When finished, stop the Calcite and LogParser servers.
The configurations are used by fpdb-main-client by default. When writing test cases, you may input your parameters in your code or read from configuration files. For example, in fpdb-main-test, parameters of execution config are specified in the code, while parameters of AWS config are read from aws.conf. In this way your test cases can be more flexible and easy to be adjusted.
S3_BUCKETs3 bucket name where the data is in.SCHEMA_NAMEthe name of the schema to query.CACHE_SIZEsize of local cache.MODEexecution mode, can be one ofPULLUP,PUSHDOWN_ONLY,CACHING_ONLY,HYBRID. Currently SSB tests support all modes, TPC-H tests only supportPULLUPandCACHING_ONLY.CACHING_POLICYcache replacement policy, can be one ofLRU,LFU,LFU-S(size normalized LFU),W-LFU(Weighted LFU).PARALLEL_DEGREEexecution parallel degree of the same kind of operator (e.g. join), independent of data parallel degree which corresponds to the number of partitions of a table.SHOW_OP_TIMESwhether to show execution times of each operator and each kind of operator.SHOW_SCAN_METRICSwhether to show scan metrics like data load speed, selectivity, data conversion speed...CAF_SERVER_PORTport used by CAF for cross-node communications.IS_DISTRIBUTEDwhether the system runs across a cluster or just locally.
S3_CLIENT_TYPEtype of S3 client, can be one ofS3,AIRMETTLE,MINIO. ForAIRMETTLEandMINIO, access key and endpoint need to be set infpdb-aws/src/AWSClient.cpp.NETWORK_LIMITused to throttle data loading from S3, set to 0 if not throttling.
SERVER_PORTport for the Calcite server.JAR_NAMEbuilt jar name of the Calcite server.
SERVER_PORTport for the Calcite server, should be kept same as cpp side.RESOURCE_PATHabsolute path ofresources/used for metadata fetching.exec.conf.ec2is a fixed config for EC2 deployment and does not need to be changed.
SERVER_PORTport for the LogParser server.RESOURCE_PATHabsolute path ofresources/used for metadata fetching.exec.conf.ec2is a fixed config for EC2 deployment and does not need to be changed.