Skip to content

Commit

Permalink
Merge pull request #15 from rchukh/jdk11
Browse files Browse the repository at this point in the history
Update to JDK 11 and PrestoSQL 326
  • Loading branch information
rchukh authored Dec 8, 2019
2 parents 3aaca22 + 20d4beb commit fb9d52d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: java
jdk:
- openjdk8
- openjdk11
- openjdk13
addons:
sonarcloud:
organization: "rchukh-github"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Overview

Presto QueryLog is a Presto plugin for logging query events into separate log file.
Presto QueryLog is a [PrestoSQL](https://prestosql.io/) plugin for logging query events into separate log file.

Its main purpose is to gather queries metadata and statistics as one event per line, so it can be easily collected by external software (e.g. Elastic FileBeat which will send data to Logstash/ElasticSearch/Kibana for storage/analysis).

Expand Down
38 changes: 14 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@

<groupId>com.github.rchukh</groupId>
<artifactId>presto-querylog</artifactId>
<version>0.2.1-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<name>Presto Query Log</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<log4j2.version>2.12.0</log4j2.version>
<presto-spi.version>316</presto-spi.version>
<!--NOTE: PrestoSQL 316 uses 2.9.8-->
<!--This dependency comes from io.airlift:airbase 91-->
<jackson.version>2.9.8</jackson.version>
<maven.compiler.release>11</maven.compiler.release>
<log4j2.version>2.12.1</log4j2.version>
<presto-spi.version>326</presto-spi.version>
<!--NOTE: PrestoSQL 326 uses Jackson 2.10.0-->
<!--This dependency comes from io.airlift:airbase 93-->
<jackson.version>2.10.0</jackson.version>
<!-- Test -->
<junit.jupiter.version>5.5.1</junit.jupiter.version>
<junit.platform.version>1.3.2</junit.platform.version>
<junit.jupiter.version>5.5.2</junit.jupiter.version>
</properties>

<dependencies>
Expand All @@ -31,12 +30,13 @@
<scope>provided</scope>
</dependency>

<!--</dependency>-->
<!-- Plugin dependency -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
</dependency>
<!-- Although Jackson is used by plugin, it is better to align the version with the one used in Presto -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand All @@ -61,15 +61,6 @@
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.junit.platform/junit-platform-surefire-provider -->
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>

</dependencies>


Expand All @@ -79,8 +70,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.source}</target>
<release>${maven.compiler.release}</release>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
Expand All @@ -107,7 +97,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -122,7 +112,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<release>${maven.compiler.release}</release>
</configuration>
<executions>
<execution>
Expand All @@ -136,7 +126,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
<executions>
<execution>
<phase>package</phase>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.github.presto.querylog;

import io.airlift.units.DataSize;
import io.prestosql.spi.eventlistener.QueryContext;
import io.prestosql.spi.eventlistener.QueryCreatedEvent;
import io.prestosql.spi.eventlistener.QueryMetadata;
Expand Down Expand Up @@ -132,9 +131,9 @@ private QueryContext prepareQueryContext() {
"user",
Optional.of("principal"),
Optional.empty(), Optional.empty(), Optional.empty(),
Optional.empty(), new HashSet<String>(), new HashSet<String>(), Optional.empty(), Optional.empty(),
Optional.empty(),Optional.empty(),new HashMap<>(),
new ResourceEstimates(Optional.empty(), Optional.empty(), Optional.of(DataSize.succinctDataSize(1000, DataSize.Unit.BYTE))),
Optional.empty(), new HashSet<>(), new HashSet<>(), Optional.empty(), Optional.empty(),
Optional.empty(), Optional.empty(), new HashMap<>(),
new ResourceEstimates(Optional.empty(), Optional.empty(), Optional.of(1000L)),
"serverAddress", "serverVersion", "environment"
);
}
Expand Down

0 comments on commit fb9d52d

Please sign in to comment.