presto-spring-boot-starter

SpringBoot Starter for using Presto

License

License

Categories

Categories

Spring Boot Container Microservices Ant Build Tools Data
GroupId

GroupId

com.polarquant.data
ArtifactId

ArtifactId

presto-spring-boot-starter
Last Version

Last Version

1.0.0.RELEASE
Release Date

Release Date

Type

Type

jar
Description

Description

presto-spring-boot-starter
SpringBoot Starter for using Presto
Project URL

Project URL

https://github.com/ifengkou/spring-boot-starter-data-presto
Project Organization

Project Organization

PolarQuant, Inc.
Source Code Management

Source Code Management

https://github.com/ifengkou/spring-boot-starter-data-presto

Download presto-spring-boot-starter

How to add to project

<!-- https://jarcasting.com/artifacts/com.polarquant.data/presto-spring-boot-starter/ -->
<dependency>
    <groupId>com.polarquant.data</groupId>
    <artifactId>presto-spring-boot-starter</artifactId>
    <version>1.0.0.RELEASE</version>
</dependency>
// https://jarcasting.com/artifacts/com.polarquant.data/presto-spring-boot-starter/
implementation 'com.polarquant.data:presto-spring-boot-starter:1.0.0.RELEASE'
// https://jarcasting.com/artifacts/com.polarquant.data/presto-spring-boot-starter/
implementation ("com.polarquant.data:presto-spring-boot-starter:1.0.0.RELEASE")
'com.polarquant.data:presto-spring-boot-starter:jar:1.0.0.RELEASE'
<dependency org="com.polarquant.data" name="presto-spring-boot-starter" rev="1.0.0.RELEASE">
  <artifact name="presto-spring-boot-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.polarquant.data', module='presto-spring-boot-starter', version='1.0.0.RELEASE')
)
libraryDependencies += "com.polarquant.data" % "presto-spring-boot-starter" % "1.0.0.RELEASE"
[com.polarquant.data/presto-spring-boot-starter "1.0.0.RELEASE"]

Dependencies

compile (4)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter jar 2.3.4.RELEASE
io.prestosql : presto-jdbc jar 322
com.alibaba : druid jar 1.1.24
com.polarquant.data : presto-spring-boot-autoconfigure jar 1.0.0.RELEASE

Project Modules

There are no modules declared in this project.

spring-boot-starter-data-presto

presto-spring-boot-starter

  • druid connection pool
  • ssl enable
  • code completion in IDE
  • more configuration

Use

  1. add dependency
<dependency>
    <groupId>com.polarquant.data</groupId>
    <artifactId>presto-spring-boot-starter</artifactId>
    <version>1.0.0.RELEASE</version>
</dependency>
  1. configuration

application.properties

spring.data.presto.jdbc.driver=com.facebook.presto.jdbc.PrestoDriver
spring.data.presto.jdbc.url= jdbc:presto://ark2:4285/hive/default
spring.data.presto.jdbc.username=isuhadoop
spring.data.presto.jdbc.password=abc
spring.data.presto.jdbc.ssl.enabled=true
spring.data.presto.jdbc.ssl.key-store-path=/usr/local/conf/presto.jks
spring.data.presto.jdbc.ssl.key-store-password=abc
spring.data.presto.pool.initial-size=1
spring.data.presto.pool.max-wait-millis=60000
  1. use in spring boot

add spring-boot-starter-jdbc dependency to pom.xml

@Autowired
@Qualifier("prestoJdbcTemplate")
JdbcTemplate prestoJdbcTemplate;

//invoke
List<Map<String, Object>> results = prestoJdbcTemplate.queryForList(sql);

Example

see ./presto-started-example

Versions

Version
1.0.0.RELEASE