Giter Club home page Giter Club logo

mt__test_postgresql__data_querying's Introduction

Test - Postgresql - Data Querying

Tester of the Postgresql ability of querying speed on series data

Repository Structure

  • build/, containing the generated .class files after compiling the java code;
  • logs/, containing the log information of the queries executed;
  • 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.

In the main directory, there is:

  • compile_and_run.bash, a bash file containing the commands for compiling the java code and running it.

Requirements

  • PostgreSQL JDBC Driver (42.2.14)

Installation and running the project

  • Create the folder build;
  • Create the folder logs;
  • 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

Preparing an executable jar file

Since I couldn't manage to find a way with the command line, I used Eclipse:

  • Create the folder standalone;
  • Open the project in Eclipse;
  • Set Java 8 as the default JRE:
    • Window > Preferences > Java > Installed JREs;
    • Select Java 8;
    • Apply and Close;
  • Set Java 8 as the compiler version:
    • Window > Preferences > Java > Compiler;
    • Compiler compliance level: 1.8;
    • Apply and Close;
  • Create the JAR file:
    • Right-click on the project folder > Export;
    • Java > Runnable JAR file > Next;
    • Launch Configuration: Main;
    • Export destination: test_postgresql_data_querying/standalone/DataQueryingTest.jar;
    • Finish.
  • Execute the JAR file:
    • If you have this repository available:
      • From the main directory, execute java -jar standalone/DataQueryingTest.jar.
    • If you need a proper standalone version:
      • Check the next paragraph.

Preparing the standalone version on the server

  • Connect to the unibz VPN through Cisco AnyConnect;
  • Open the terminal:
    • Execute ssh -t [email protected] "cd /data/sfracalossi ; bash";
    • Execute mkdir postgresql;
    • Execute mkdir postgresql/standalone_query;
    • Execute mkdir postgresql/standalone_query/resources;
  • Send the JAR and the help files from another terminal (not connected through SSH):
    • Execute scp standalone/DataQueryingTest.jar [email protected]:/data/sfracalossi/postgresql/standalone_query;
    • Execute scp resources/server_postgresql_credentials.txt [email protected]:/data/sfracalossi/postgresql/standalone_query/resources;
    • Execute scp resources/logging.properties [email protected]:/data/sfracalossi/postgresql/standalone_query/resources;
  • Execute the JAR file (use the terminal connected through SSH):
    • Execute cd postgresql/standalone_query;
    • Execute nohup java -jar DataQueryingTest.jar [l/s] [test_table/test_table_n] > logs/out.txt &.

mt__test_postgresql__data_querying's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.