Skip to content

Conversation

@s2lomon
Copy link
Member

@s2lomon s2lomon commented Mar 17, 2020

This pr is a continuation of #2305 with all the subsequent comments applied.

@kokosing
Copy link
Member

There is something wrong with guice configuration. Tests are failing with:

2020-03-17T15:54:15.3841500Z [ERROR]   TestGenerateTokenFilter.setup:62 » Creation Unable to create injector, see the...
2020-03-17T15:54:15.3842028Z [ERROR]   TestNodeResource.setup:40 » Creation Unable to create injector, see the follow...
2020-03-17T15:54:15.3842393Z [ERROR] io.prestosql.server.TestQueryResource.setup(io.prestosql.server.TestQueryResource)
2020-03-17T15:54:15.3842789Z [ERROR]   Run 1: TestQueryResource.setup:75 » Creation Unable to create injector, see the follo...
2020-03-17T15:54:15.3843019Z [INFO]   Run 2: PASS
2020-03-17T15:54:15.3843153Z [INFO]   Run 3: PASS
2020-03-17T15:54:15.3843255Z [INFO]   Run 4: PASS
2020-03-17T15:54:15.3843445Z [INFO]   Run 5: PASS
2020-03-17T15:54:15.3843566Z [INFO]   Run 6: PASS
2020-03-17T15:54:15.3843732Z [INFO] 
2020-03-17T15:54:15.3844167Z [ERROR]   TestQueryStateInfoResource.setUp:61 » Creation Unable to create injector, see ...
2020-03-17T15:54:15.3844615Z [ERROR]   TestServer.setup:89 » Creation Unable to create injector, see the following er...
2020-03-17T15:54:15.3845040Z [ERROR]   TestWebUi.setup:80 » Creation Unable to create injector, see the following err...

Copy link
Member

@kokosing kokosing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments. Please fix automation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be extracted as method so you don't need to have uninitialized variable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undo this rename. We are within the scope of event listener.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add should add, not replace entire collection.

@s2lomon s2lomon force-pushed the s2lomon/multiple-event-listeners branch from 4d9c853 to 3c7bd73 Compare March 18, 2020 19:25
@s2lomon s2lomon requested a review from kokosing March 19, 2020 08:32
@kokosing kokosing merged commit 72a7511 into trinodb:master Mar 19, 2020
@kokosing
Copy link
Member

Merged, thanks!

@kokosing kokosing mentioned this pull request Mar 19, 2020
8 tasks
@kokosing kokosing added this to the 332 milestone Mar 19, 2020
@tooptoop4
Copy link
Contributor

this is great feature but the docs are not that clear, posting this for others who want to use it:

echo 'event-listener.name=event-logger' > etc/event-listener.properties
echo 'event-listener.name=query-logger' > etc/event-listener2.properties
echo 'event-listener.config-files=etc/event-listener.properties,etc/event-listener2.properties' >> etc/config.properties
place your custom eventlistener1 jar (which has event-logger inside the .java code) in /plugin/queryeventlistener/
place your custom eventlistener2 jar (which has query-logger inside the .java code) in /plugin/queryeventlistener2/

@tooptoop4
Copy link
Contributor

@s2lomon thanks for this, i tested it out, found one issue with logging. if one of the multiple event listeners fails, the log message does not mention which one.
ie i see 'EventListenerManager Failed to publish QueryCreatedEvent for query 20200327_123611_00047_wag3k' but i don't know if that was from eventlistener1 or eventlistener2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants