Skip to content

Latest commit

 

History

History
47 lines (42 loc) · 3.24 KB

README.md

File metadata and controls

47 lines (42 loc) · 3.24 KB

Test - PostgreSQL - Mixed

Tester of the PostgreSQL ability of ingesting and querying time series data at the same time.

Repository Structure

  • build/, containing the generated .class files after compiling the java code;
  • data/, containing the printers parsed logs files in the format of CSV files;
  • logs/, containing the log information of all the tests done;
  • resources/, containing the postgresql driver, the database credentials file and the logger properties;
  • src/, containing the java source files;
  • standalone/, containing the JAR standalone version of this repository.

Requirements

  • PostgreSQL JDBC Driver (42.2.14)

Installation and running the project

  • Create the folder data;
    • Inside the folder, copy-paste the printers parsed log files;
  • Inside the folder resources,
    • Create a file called server_postgresql_credentials.txt, containing the username (first line) and the password (second line) to access the server PostgreSQL database;
    • Copy-paste the indicated PostgreSQL driver (called postgresql-42.2.14.jar);
  • Execute bash compile_and_run.bash [l/s] [table_name]

Preparing the standalone version on the server

  • Connect to the unibz VPN through Cisco AnyConnect;
  • Open a terminal:
    • Execute ssh -t sfracalossi@ironlady.inf.unibz.it "cd /data/sfracalossi ; bash";
    • Execute mkdir postgresql;
    • Execute mkdir postgresql/standalone_mixed;
    • Execute mkdir postgresql/standalone_mixed/resources;
    • Execute mkdir postgresql/standalone_mixed/data;
  • Send the JAR and the help files from another terminal (not connected through SSH):
    • Execute scp standalone/NDataIngestionTest.jar sfracalossi@ironlady.inf.unibz.it:/data/sfracalossi/postgresql/standalone_mixed/standalone;
    • Execute scp standalone/IndexChanger.jar sfracalossi@ironlady.inf.unibz.it:/data/sfracalossi/postgresql/standalone_mixed/standalone;
    • Execute scp standalone/IngestionMixed.jar sfracalossi@ironlady.inf.unibz.it:/data/sfracalossi/postgresql/standalone_mixed/standalone;
    • Execute scp standalone/QueryingMixed.jar sfracalossi@ironlady.inf.unibz.it:/data/sfracalossi/postgresql/standalone_mixed/standalone;
    • Execute scp resources/server_postgresql_credentials.txt sfracalossi@ironmaiden.inf.unibz.it:/data/sfracalossi/postgresql/standalone_mixed/resources;
    • Execute scp resources/logging.properties sfracalossi@ironmaiden.inf.unibz.it:/data/sfracalossi/postgresql/standalone_mixed/resources;
  • Send the data file:
    • Execute scp data/TEMPERATURE_HalfGB.csv sfracalossi@ironlady.inf.unibz.it:/data/sfracalossi/postgresql/standalone_mixed/data;
    • Execute scp data/TEMPERATURE_1GB.csv sfracalossi@ironlady.inf.unibz.it:/data/sfracalossi/postgresql/standalone_mixed/data;
  • Sending the scripts:
    • Execute scp compile_and_run.bash sfracalossi@ironlady.inf.unibz.it:/data/sfracalossi/postgresql/standalone_mixed;
    • Execute scp script.bash sfracalossi@ironlady.inf.unibz.it:/data/sfracalossi/postgresql/standalone_mixed;
  • Execute the JAR file (use the terminal connected through SSH):
    • Execute cd postgresql/standalone_mixed;
    • Execute nohup bash compile_and_run.bash [l/s] [table_name] > logs/out.txt &