-
Notifications
You must be signed in to change notification settings - Fork 1.5k
PARQUET-401: Deprecate Log and move to SLF4J Logger #319
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
PARQUET-401: Deprecate Log and move to SLF4J Logger #319
Conversation
|
@liancheng I think the owner of the PR can retrigger the build from the travis ui (need to be logged in) |
|
This seems fine. |
…T-401--Deprecate-Log-and-move-to-SLF4J-Logger # Conflicts: # parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ColumnChunkPageReadStore.java # parquet-hadoop/src/main/java/org/apache/parquet/hadoop/InternalParquetRecordReader.java # parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java
|
hi @rdblue, finally this is ready for a another (hopefully the last) round of review. Changes since the first round:
Also, things that are intentionally left out(let's fix them in following-up PRs):
So, could you take another look at this? Thanks! :-) |
…ate-Log-and-move-to-SLF4J-Logger # Conflicts: # parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetOutputForm at.java
|
two weeks' ping to some committer @rdblue :-) |
|
@lw-lin, thanks for working on this. Looks like my previous comment about fixing the You've replaced a lot of those calls with a static final constant at the top of the file. That's a bad thing because it means we can't turn on debug logging once the code is loaded. We should only do that when it matters for performance, which you said above was in Most of the rest of the debug logging calls should not be wrapped by The only time we should use I think getting the debug logging right is going to require going through the code and making sure each call makes sense, rather than transforming certain patterns with an IDE. |
| if (DEBUG_ENABLED) { | ||
| ++indent; | ||
| } | ||
| if (DEBUG_ENABLED) { |
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.
@lw-lin, it looks like there are still some if statements that can be combined. Please make sure you check through the code before the next round of review for these.
|
@rdblue @julienledem sorry for the late response -- oh I somehow missed @rdblue 's kind comments. I'll update this within this week. Thanks @rdblue @julienledem ! |
|
thank you @lw-lin ! |
# Conflicts: # parquet-column/src/main/java/org/apache/parquet/column/values/boundedint/BitWriter.java # parquet-column/src/main/java/org/apache/parquet/column/values/boundedint/BoundedIntValuesReader.java # parquet-column/src/main/java/org/apache/parquet/column/values/boundedint/BoundedIntValuesWriter.java # parquet-encoding/src/test/java/org/apache/parquet/column/values/bitpacking/TestByteBitPacking.java # parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java # parquet-hadoop/src/main/java/org/apache/parquet/hadoop/InternalParquetRecordReader.java # parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java # parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java # parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetOutputFormat.java
Fix 2
|
This has been updated a lot -- @julienledem @rdblue would you take a look at your convenience? |
|
Plus, five rounds of
For detailed results please refer to https://docs.google.com/spreadsheets/d/1FLwD71WFmkEfqDWyo2pe1vfkk7BI6bJKMOnAzGCl5XI/edit#gid=1865972057) |
| import org.junit.Assert; | ||
| import org.junit.Test; | ||
|
|
||
| public class TestLog { |
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 class is not necessary any more
|
Thank you @julienledem . I like that PR too. Thank you also @rdblue @liancheng for the efforts you'd put into this! |
The current Log class is intended to allow swapping out logger back-ends, but SLF4J already does this. It also doesn't expose as nice of an API as SLF4J, which can handle formatting to avoid the cost of building log messages that won't be used.
We should deprecate the org.apache.parquet.Log class and move to using SLF4J directly, instead of wrapping SLF4J (PARQUET-305).