2.4. Presto Verifier

The Presto Verifier can be used to test Presto against another database (such as MySQL),or to test two Presto clusters against each other. We use it to continuously test trunkagainst the previous release while developing Presto.

Running Verifier

Create a MySQL database with the following table and load it with the queries you would like to run:

  1. CREATE TABLE verifier_queries (
  2. id int(11) unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
  3. suite varchar(256) NOT NULL,
  4. name varchar(256) DEFAULT NULL,
  5. control_catalog varchar(256) NOT NULL,
  6. control_schema varchar(256) NOT NULL,
  7. control_query text NOT NULL,
  8. test_catalog varchar(256) NOT NULL,
  9. test_schema varchar(256) NOT NULL,
  10. test_query text NOT NULL,
  11. control_username varchar(256) NOT NULL DEFAULT 'verifier-test',
  12. control_password varchar(256) DEFAULT NULL,
  13. test_username varchar(256) NOT NULL DEFAULT 'verifier-test',
  14. test_password varchar(256) DEFAULT NULL,
  15. session_properties_json varchar(2048) DEFAULT NULL)

Next, create a properties file to configure the verifier:

  1. source-query.suite=my_suite
  2. source-query.database=jdbc:mysql://localhost:3306/my_database?user=my_username&password=my_password
  3. control.gateway=jdbc:presto://localhost:8080
  4. test.gateway=jdbc:presto://localhost:8081
  5. test-id=1

Lastly, download presto-verifier-0.220-executable.jar, rename it to verifier,make it executable with chmod +x, then run it:

  1. ./verifier verify config.properties

Configuration Reference

NameDescription
control.timeoutThe maximum execution time of the control queries.
test.timeoutThe maximum execution time of the test queries.
metadata.timeoutThe maximum execution time of the queries that are required forobtaining table metadata or rewriting queries.
checksum.timeoutThe maximum execution time of the queries that computes checksum forthe control and the test results.
whitelistA comma-separated list that specifies names of the queries within thesuite to verify.
blacklistA comma-separated list that specifies names of the queries to beexcluded from suite. blacklist is applied after whitelist.
source-query.table-nameSpecifies the MySQL table from which to read the source queries forverification.
event-clientsA comma-separated list that specifies where the output events should beemitted. Valid individual values are json and human-readable.
json.log-fileSpecifies the output files for JSON events. If json is specified inevent-clients but this property is not set, JSON events are emittedto stdout.
human-readable.log-fileSpecifies the output files for human readable events. Ifhuman-readable is specified in event-clients but this propertyis not set, human readable events are emitted to stdout.
max-concurrencySpecifies the maximum concurrent verification. Alternatively speaking,the maximum concurrent queries that will be submitted to control andtest clusters combined.
relative-error-marginSpecified the maximum tolerable relative error between control and testqueries for floating point columns.