Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

vvysotskyi
Copy link
Member

No description provided.

@arina-ielchiieva
Copy link
Member

LGTM. +1

@jinfengni
Copy link
Contributor

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?

@vvysotskyi
Copy link
Member Author

Unit tests hang when Lilith application is not running, but when ClassicMultiplexSocketAppender in logback.xml is defined and used in the loggers.

@priteshm
Copy link

priteshm commented Sep 1, 2017

@vvysotskyi is it possible to change the port number for Lilith to avoid the conflict?

@vvysotskyi
Copy link
Member Author

@priteshm, as I have mentioned in the Jira DRILL-5761, port in Lilith UI cannot be changed (huxi/lilith#10).

@jinfengni
Copy link
Contributor

Per this hive doc, seems it's possible to change hiveserver2 port #.

Can you try to change hivesever2# if the other one is hardcoded?

  1. https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2

@vvysotskyi
Copy link
Member Author

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.

@jinfengni
Copy link
Contributor

jinfengni commented Sep 1, 2017

We have run unit in our test clusters and I never heard that people complained that unit tests failed due to Lilith configuration.

@vvysotskyi
Copy link
Member Author

I have implemented the proposal of @vrozov to conditionally enable Lilith appender. I have used ThresholdFilter in Lilith appender, so it was not needed to change all places where it is used.
An example of how to enable Lilith was added to the Jira description.
@jinfengni, @vrozov could you please take a look?

Copy link
Member

@vrozov vrozov left a 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
Copy link
Member

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.

Copy link
Member Author

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.

@jinfengni
Copy link
Contributor

The proposal from @vrozov makes sense to me. As long as Lilith is not completely disabled, I'm fine with it.

Copy link
Member Author

@vvysotskyi vvysotskyi left a 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
Copy link
Member Author

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.

Copy link
Contributor

@paul-rogers paul-rogers left a 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"/>
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK.

Copy link
Member

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?

Copy link
Member Author

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">
Copy link
Contributor

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.

Copy link
Member Author

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"/>
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member Author

@vvysotskyi vvysotskyi left a 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"/>
Copy link
Member Author

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">
Copy link
Member Author

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"/>
Copy link
Member Author

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.

Copy link
Contributor

@paul-rogers paul-rogers left a 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"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

OK.

</encoder>
</appender>

<!--
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

paul-rogers pushed a commit to paul-rogers/drill that referenced this pull request Sep 12, 2017
Copy link
Member Author

@vvysotskyi vvysotskyi left a 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>

<!--
Copy link
Member Author

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"/>
Copy link
Member Author

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.

@paul-rogers
Copy link
Contributor

Holding of on the merge waiting for review by @vrozov.

Copy link
Member

@vrozov vrozov left a comment

Choose a reason for hiding this comment

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

LGTM

@vvysotskyi
Copy link
Member Author

@paul-rogers, @vrozov, thanks for the review. Squashed commits and rebased onto master.

paul-rogers pushed a commit to paul-rogers/drill that referenced this pull request Sep 14, 2017
@vvysotskyi vvysotskyi closed this Sep 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants