-
Notifications
You must be signed in to change notification settings - Fork 979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRILL-5761: Disable Lilith ClassicMultiplexSocketAppender by default #930
Conversation
LGTM. +1 |
I have some concern about this PR. AFASIK, some of Drill developers use Lilith to debug issues when running individual unit testcases. If remove it, does it mean people has to manually reverse this PR, in order to get log in Lilith? If you shutdown Lilith application while running unit test suite, does it hang as well? |
Unit tests hang when Lilith application is not running, but when |
@vvysotskyi is it possible to change the port number for Lilith to avoid the conflict? |
@priteshm, as I have mentioned in the Jira DRILL-5761, port in Lilith UI cannot be changed (huxi/lilith#10). |
Per this hive doc, seems it's possible to change hiveserver2 port #. Can you try to change hivesever2# if the other one is hardcoded? |
Yes, we can change hiveserver2 port #, but I think that it would be better to disable Lilith by default since hiveserver2 port number may be used in the configs of other applications and it would be cumbersome to change all that configs. |
We have run unit in our test clusters and I never heard that people complained that unit tests failed due to Lilith configuration. |
be17b28
to
0368a64
Compare
I have implemented the proposal of @vrozov to conditionally enable Lilith appender. I have used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As other modules have the dependency on drill-common-tests.jar in the test scope, common/src/test/resources/logback.xml is already in the classpath for other modules, will be it better to unify logback.xml in a single place?
@@ -16,17 +16,22 @@ | |||
<ReconnectionDelay>10000</ReconnectionDelay> | |||
<IncludeCallerData>true</IncludeCallerData> | |||
<RemoteHosts>${LILITH_HOSTNAME:-localhost}</RemoteHosts> | |||
<!-- Disables Lilith ClassicMultiplexSocketAppender since its use causes hanging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess is that using filter does not disable the appender and it is enabled but does not produce the output. There is still a question whether the appender tries to connect to the port and what is the behavior in case the connection can't be established (does it constantly retry to re-establish connection every 10 sec) or can be established but to HiveServer2 instead of Lilith server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you that it does not disable Lilith. The connection is established with HiveServer2 instead of Lilith server and unit tests hang when MultiplexSendBytesService
calls sendBytes()
method.
I have updated changes, so now Lilith is disabled.
The proposal from @vrozov makes sense to me. As long as Lilith is not completely disabled, I'm fine with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have unified logback config file in a single place for tests and updated changes. @vrozov, could you please take a look?
@@ -16,17 +16,22 @@ | |||
<ReconnectionDelay>10000</ReconnectionDelay> | |||
<IncludeCallerData>true</IncludeCallerData> | |||
<RemoteHosts>${LILITH_HOSTNAME:-localhost}</RemoteHosts> | |||
<!-- Disables Lilith ClassicMultiplexSocketAppender since its use causes hanging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you that it does not disable Lilith. The connection is established with HiveServer2 instead of Lilith server and unit tests hang when MultiplexSendBytesService
calls sendBytes()
method.
I have updated changes, so now Lilith is disabled.
0368a64
to
ca04b15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good improvement overall. Some questions about the default test log levels.
--> | ||
|
||
<logger name="org.apache.drill" additivity="false"> | ||
<level value="debug"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put the test debug level at ERROR
. I have a copy of logback-test.xml
that I copy into each working branch that sets the level to ERROR
. Then, specific tests set more detailed logging as needed. Otherwise, the console is bombarded with unwanted logging messages making it very hard to find those of interest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logger contains only Lilith appender, and since we are using Lilith only for debugging separate tests, I think it would be better to left logging level here at DEBUG
. In this case, everyone who uses Lilith won't need to change logback file. Console appender is used in the root logger and it has ERROR
logging level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this logger be defined between line 21 and 22 in a single if condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without comment with file appender yes, it can. Thanks, done.
<!-- <appender-ref ref="FILE" /> --> | ||
</logger> | ||
|
||
<logger name="com.mapr" additivity="false"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be in Apache Drill? Only the MapR profile pulls in MapR code... It is not clear that tests that happen to use the MapR profile want debug level logging from this subsystem. Better to use the LogFixture
to set more detailed logging in those tests that need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially, I assumed that it would be useful for those, who work with the mapr-format-plugin. I agree with you that we should delete this logger.
--> | ||
|
||
<logger name="org.apache.hadoop" additivity="false"> | ||
<level value="info"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment below about MapR. It is not clear that we always want info-level logging from Hadoop. Seems this should be enabled only in tests that want that detail to avoid cluttering output with unwanted messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this, already removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paul-rogers, thanks for looking into this pull request, I have addressed all CR comments. Could you please take a look?
--> | ||
|
||
<logger name="org.apache.drill" additivity="false"> | ||
<level value="debug"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logger contains only Lilith appender, and since we are using Lilith only for debugging separate tests, I think it would be better to left logging level here at DEBUG
. In this case, everyone who uses Lilith won't need to change logback file. Console appender is used in the root logger and it has ERROR
logging level.
<!-- <appender-ref ref="FILE" /> --> | ||
</logger> | ||
|
||
<logger name="com.mapr" additivity="false"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially, I assumed that it would be useful for those, who work with the mapr-format-plugin. I agree with you that we should delete this logger.
--> | ||
|
||
<logger name="org.apache.hadoop" additivity="false"> | ||
<level value="info"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this, already removed.
ca04b15
to
b7e9ebf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvement!
LGTM
+1
--> | ||
|
||
<logger name="org.apache.drill" additivity="false"> | ||
<level value="debug"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
</encoder> | ||
</appender> | ||
|
||
<!-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to have RollingFileAppender defined for unit test, especially that it is commented anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is not necessary. It's hard to predict which appenders people use and since RollingFileAppender makes query execution slower, I decided to add it, but just in the comment.
Thanks for pointing this, I removed this comment with the appender.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 I think that developers are unlikely to use rolling file appender and can redirect console to a file if necessary.
Unify logback files. closes apache#930
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vrozov, I have addressed all CR comments. Could you please take a look?
</encoder> | ||
</appender> | ||
|
||
<!-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is not necessary. It's hard to predict which appenders people use and since RollingFileAppender makes query execution slower, I decided to add it, but just in the comment.
Thanks for pointing this, I removed this comment with the appender.
--> | ||
|
||
<logger name="org.apache.drill" additivity="false"> | ||
<level value="debug"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without comment with file appender yes, it can. Thanks, done.
b7e9ebf
to
d9f1aaf
Compare
Holding of on the merge waiting for review by @vrozov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
d9f1aaf
to
602d62f
Compare
@paul-rogers, @vrozov, thanks for the review. Squashed commits and rebased onto master. |
Unify logback files.
Unify logback files. closes apache#930
No description provided.