Skip to content

use System.err and System.out to print exit messages on CliPeon#6975

Merged
asdf2014 merged 3 commits intoapache:masterfrom
clintropolis:cli-peon-log-on-exit
Feb 1, 2019
Merged

use System.err and System.out to print exit messages on CliPeon#6975
asdf2014 merged 3 commits intoapache:masterfrom
clintropolis:cli-peon-log-on-exit

Conversation

@clintropolis
Copy link
Copy Markdown
Member

@clintropolis clintropolis commented Feb 1, 2019

CliPeon attempts to log stuff after the log module has been stopped, which does not work. This switches these messages to directly use System.out and System.err so at least the messages go somewhere.

End of task if an error occurs after stopping will appear as:

org.apache.druid.initialization.Log4jShutterDownerModule$Log4jShutterDowner.stop()] on object[org.apache.druid.initialization.Log4jShutterDownerModule$Log4jShutterDowner@7237f3c1].
Error!
java.lang.Exception: Oh noes, I wrecked yer peon after logger shutdown!
	at org.apache.druid.cli.CliPeon.run(CliPeon.java:382)
	at org.apache.druid.cli.Main.main(Main.java:118)

instead of the exception being eaten and nothing printed.

This will make it more obvious why a task might report SUCCESS in task logs in terms of completion of the indexing job, but show as FAILED overall.

@jon-wei jon-wei added the Bug label Feb 1, 2019
@jon-wei jon-wei added this to the 0.14.0 milestone Feb 1, 2019
Copy link
Copy Markdown
Member

@asdf2014 asdf2014 left a comment

Choose a reason for hiding this comment

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

LGTM

@asdf2014 asdf2014 merged commit 5c0fbbd into apache:master Feb 1, 2019
@clintropolis clintropolis deleted the cli-peon-log-on-exit branch February 1, 2019 11:08
justinborromeo pushed a commit to justinborromeo/incubator-druid that referenced this pull request Feb 2, 2019
…he#6975)

* use System.err and System.out to print exit messages on CliPeon

* more

* not necessarily a stopping error...
@clintropolis clintropolis mentioned this pull request Feb 3, 2019
gianm pushed a commit to implydata/druid-public that referenced this pull request Feb 5, 2019
…he#6975)

* use System.err and System.out to print exit messages on CliPeon

* more

* not necessarily a stopping error...
clintropolis added a commit to implydata/druid-public that referenced this pull request Feb 5, 2019
…he#6975)

* use System.err and System.out to print exit messages on CliPeon

* more

* not necessarily a stopping error...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants