use of com.facebook.presto.verifier.retry.RetryConfig in project presto by prestodb.
the class AbstractVerificationTest method getPrestoAction.
protected PrestoAction getPrestoAction(Optional<QueryConfiguration> queryConfiguration) {
VerificationContext verificationContext = VerificationContext.create(NAME, SUITE);
VerifierConfig verifierConfig = new VerifierConfig().setTestId(TEST_ID);
RetryConfig retryConfig = new RetryConfig();
PrestoActionConfig prestoActionConfig = new PrestoActionConfig().setHosts(queryRunner.getServer().getAddress().getHost()).setJdbcPort(queryRunner.getServer().getAddress().getPort());
QueryActionsConfig queryActionsConfig = new QueryActionsConfig();
return new JdbcPrestoAction(exceptionClassifier, queryConfiguration.orElse(QUERY_CONFIGURATION), verificationContext, new JdbcUrlSelector(prestoActionConfig.getJdbcUrls()), prestoActionConfig, queryActionsConfig.getMetadataTimeout(), queryActionsConfig.getChecksumTimeout(), retryConfig, retryConfig, verifierConfig);
}
use of com.facebook.presto.verifier.retry.RetryConfig in project presto by prestodb.
the class TestDeterminismAnalyzer method createDeterminismAnalyzer.
private static DeterminismAnalyzer createDeterminismAnalyzer(String mutableCatalogPattern) {
QueryConfiguration configuration = new QueryConfiguration(CATALOG, SCHEMA, Optional.of("user"), Optional.empty(), Optional.empty());
VerificationContext verificationContext = VerificationContext.create(SUITE, NAME);
VerifierConfig verifierConfig = new VerifierConfig().setTestId("test-id");
RetryConfig retryConfig = new RetryConfig();
QueryActionsConfig queryActionsConfig = new QueryActionsConfig();
TypeManager typeManager = createTypeManager();
PrestoAction prestoAction = new JdbcPrestoAction(PrestoExceptionClassifier.defaultBuilder().build(), configuration, verificationContext, new JdbcUrlSelector(ImmutableList.of()), new PrestoActionConfig(), queryActionsConfig.getMetadataTimeout(), queryActionsConfig.getChecksumTimeout(), retryConfig, retryConfig, verifierConfig);
QueryRewriter queryRewriter = new QueryRewriter(sqlParser, typeManager, prestoAction, ImmutableMap.of(CONTROL, QualifiedName.of("tmp_verifier_c"), TEST, QualifiedName.of("tmp_verifier_t")), ImmutableMap.of());
ChecksumValidator checksumValidator = createChecksumValidator(verifierConfig);
SourceQuery sourceQuery = new SourceQuery("test", "", "", "", configuration, configuration);
return new DeterminismAnalyzer(sourceQuery, prestoAction, queryRewriter, checksumValidator, typeManager, new DeterminismAnalyzerConfig().setNonDeterministicCatalogs(mutableCatalogPattern));
}
use of com.facebook.presto.verifier.retry.RetryConfig in project presto by prestodb.
the class TestJdbcPrestoAction method setup.
@BeforeMethod
public void setup() {
QueryActionsConfig queryActionsConfig = new QueryActionsConfig();
verificationContext = VerificationContext.create(SUITE, NAME);
PrestoActionConfig prestoActionConfig = new PrestoActionConfig().setHosts(queryRunner.getServer().getAddress().getHost()).setJdbcPort(queryRunner.getServer().getAddress().getPort());
prestoAction = new JdbcPrestoAction(PrestoExceptionClassifier.defaultBuilder().build(), CONFIGURATION, verificationContext, new JdbcUrlSelector(prestoActionConfig.getJdbcUrls()), prestoActionConfig, queryActionsConfig.getMetadataTimeout(), queryActionsConfig.getChecksumTimeout(), new RetryConfig(), new RetryConfig(), new VerifierConfig().setTestId("test"));
}
use of com.facebook.presto.verifier.retry.RetryConfig in project presto by prestodb.
the class TestQueryRewriter method setup.
@BeforeClass
public void setup() throws Exception {
queryRunner = setupPresto();
queryRunner.execute("CREATE TABLE test_table (a bigint, b varchar)");
PrestoActionConfig prestoActionConfig = new PrestoActionConfig().setHosts(queryRunner.getServer().getAddress().getHost()).setJdbcPort(queryRunner.getServer().getAddress().getPort());
prestoAction = new JdbcPrestoAction(PrestoExceptionClassifier.defaultBuilder().build(), CONFIGURATION, VerificationContext.create(SUITE, NAME), new JdbcUrlSelector(prestoActionConfig.getJdbcUrls()), prestoActionConfig, new QueryActionsConfig().getMetadataTimeout(), new QueryActionsConfig().getChecksumTimeout(), new RetryConfig(), new RetryConfig(), new VerifierConfig().setTestId("test"));
}
Aggregations