rchukh / trino-querylog Goto Github PK
View Code? Open in Web Editor NEWTrino plugin for logging query events into a separate log file.
License: Apache License 2.0
Trino plugin for logging query events into a separate log file.
License: Apache License 2.0
There seems to be a bug in the logging for fields of type Optional<Duration>
in at least the fields for QueryStatistics
.
When examining the logs for a query I see that the Duration
fields cpuTime
, wallTime
, and queuedTime
are all logged correctly as
"cpuTime": {
"seconds": 123,
"units": [
"SECONDS",
"NANOS"
],
"zero": false,
"negative": false,
"nano": 123456789
},
"wallTime": {
"seconds": 123,
"units": [
"SECONDS",
"NANOS"
],
"zero": false,
"negative": false,
"nano": 123456789
},
"queuedTime": {
"seconds": 123,
"units": [
"SECONDS",
"NANOS"
],
"zero": false,
"negative": false,
"nano": 123456789
}
but the Optional<Duration>
fields seem to have the contained value dropped:
"scheduledTime": {
"empty": false,
"present": true
},
"analysisTime": {
"empty": false,
"present": true
},
"planningTime": {
"empty": false,
"present": true
},
"executionTime": {
"empty": false,
"present": true
}
For information security tasks, it is necessary to log each request and, preferably, statistics on it to a file. To be able to investigate the information leakage scenario.
At the moment, each request is not logged.
Hi! I followed all the steps provided in the README, but I am getting the following error -
2019-07-30T22:10:02.296Z ERROR main com.facebook.presto.server.PrestoServer io/prestosql/spi/Plugin java.lang.NoClassDefFoundError: io/prestosql/spi/Plugin at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) at java.net.URLClassLoader.access$100(URLClassLoader.java:74) at java.net.URLClassLoader$1.run(URLClassLoader.java:369) at java.net.URLClassLoader$1.run(URLClassLoader.java:363) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:362) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at com.facebook.presto.server.PluginClassLoader.loadClass(PluginClassLoader.java:80) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:370) at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) at java.util.ServiceLoader$1.next(ServiceLoader.java:480) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:273) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:234) at com.facebook.presto.server.PluginManager.loadPlugin(PluginManager.java:164) at com.facebook.presto.server.PluginManager.loadPlugin(PluginManager.java:156) at com.facebook.presto.server.PluginManager.loadPlugins(PluginManager.java:137) at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:117) at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:67) Caused by: java.lang.ClassNotFoundException: io.prestosql.spi.Plugin at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at com.facebook.presto.server.PluginClassLoader.loadClass(PluginClassLoader.java:80) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 24 more
Any help would be appreciated. Thanks!
This plugin is based on the PrestoSQL foundation distribution - https://github.com/prestosql/presto
And somewhat tested on the current version of Presto, which is 316.
The README should reflect that.
Could you please make this compatible with java 11?
Hi! Thanks for responding quickly and fixing the ClassNotFoundException! I am getting the following error now -
2019-07-31T15:47:40.109Z ERROR main com.facebook.presto.server.PrestoServer Event listener presto-querylog is not registered java.lang.IllegalStateException: Event listener presto-querylog is not registered at com.google.common.base.Preconditions.checkState(Preconditions.java:585) at com.facebook.presto.eventlistener.EventListenerManager.setConfiguredEventListener(EventListenerManager.java:81) at com.facebook.presto.eventlistener.EventListenerManager.loadConfiguredEventListener(EventListenerManager.java:68) at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:144) at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:73)
Could you please help me with this? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.