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
[HUDI-1707] Reduces log level for too verbose messages from info to debug level. #2714
Conversation
@liujinhui1994 Can you help to review this PR? |
@@ -109,7 +109,7 @@ public static SchemaDifference getSchemaDifference(MessageType storageSchema, Ma | |||
schemaDiffBuilder.addTableColumn(entry.getKey(), entry.getValue()); | |||
} | |||
} | |||
LOG.info("Difference between schemas: " + schemaDiffBuilder.build().toString()); | |||
LOG.debug("Difference between schemas: " + schemaDiffBuilder.build().toString()); |
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.
guess we should not move this log message to 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.
It can be very large some times, that's why I moved it to debug. Schemas on our side are hundreds of pages long. However, if you find it very useful for yourself, I can move it back to info. Just let me know.
@vburenin Can you please fix the build? There are test failures. Just one minor comment from my side and rest looks good. :) |
I wonder what could cause those failures as the only change I made is log level and some extra config print out... unless tests are looking into the logs... which is not good. |
Codecov Report
@@ Coverage Diff @@
## master #2714 +/- ##
============================================
- Coverage 52.55% 47.34% -5.22%
+ Complexity 3707 3383 -324
============================================
Files 485 485
Lines 23172 23185 +13
Branches 2459 2463 +4
============================================
- Hits 12179 10976 -1203
- Misses 9922 11254 +1332
+ Partials 1071 955 -116
Flags with carried forward coverage won't be shown. Click here to find out more. |
I have re kicked the tests |
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.
Otherwise lgtm
Rebased and repushed. Will land once tests pass. |
@hudi-bot run azure |
Codecov Report
@@ Coverage Diff @@
## master #2714 +/- ##
=========================================
Coverage 54.77% 54.77%
- Complexity 3796 3800 +4
=========================================
Files 481 481
Lines 23284 23300 +16
Branches 2478 2484 +6
=========================================
+ Hits 12753 12762 +9
- Misses 9385 9387 +2
- Partials 1146 1151 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
||
// Create the path if it does not exist already | ||
Path partitionPath = FSUtils.getPartitionPath(metaClient.getBasePath(), partitionPathStr); | ||
FSUtils.createPathIfNotExists(metaClient.getFs(), partitionPath); | ||
long beginLsTs = System.currentTimeMillis(); | ||
FileStatus[] statuses = listPartition(partitionPath); | ||
long endLsTs = System.currentTimeMillis(); | ||
LOG.info("#files found in partition (" + partitionPathStr + ") =" + statuses.length + ", Time taken =" | ||
LOG.debug("#files found in partition (" + partitionPathStr + ") =" + statuses.length + ", Time taken =" |
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 would be info
level ? it is helpful to show the time cost.
@@ -293,7 +293,7 @@ private void ensurePartitionLoadedCorrectly(String partition) { | |||
LOG.debug("View already built for Partition :" + partitionPathStr + ", FOUND is "); | |||
} | |||
long endTs = System.currentTimeMillis(); | |||
LOG.info("Time to load partition (" + partitionPathStr + ") =" + (endTs - beginTs)); | |||
LOG.debug("Time to load partition (" + partitionPathStr + ") =" + (endTs - beginTs)); |
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.
ditto
It is not helpful by any means if there are a few thousands partitions are
getting updated every 15 minutes. Dumping aggregated stats would way more
useful. Like p50, p95.
…On Sun, May 2, 2021 at 7:54 AM leesf ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java
<#2714 (comment)>:
> @@ -293,7 +293,7 @@ private void ensurePartitionLoadedCorrectly(String partition) {
LOG.debug("View already built for Partition :" + partitionPathStr + ", FOUND is ");
}
long endTs = System.currentTimeMillis();
- LOG.info("Time to load partition (" + partitionPathStr + ") =" + (endTs - beginTs));
+ LOG.debug("Time to load partition (" + partitionPathStr + ") =" + (endTs - beginTs));
ditto
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2714 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBGHK56VYKTU23WE4O3ZJLTLVDOTANCNFSM4ZXNOKDA>
.
|
travis failures seem unrelated, but keeps failing somehow (while other PRs pass). I am going to look at it more closely. |
@leesf It does make sense to have it in debug for large tables, right? wdyt? |
@vinothchandar @vburenin it would be changed to debug if there are some stats to indicate the time cost. I think it is an important stat when profiling. |
This test is just flaky
|
Typically, we turn on logs with perf profiing only after a dashboard shows some regression right. For e.g in bloom filter code, this is what we do. Keep everything in |
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.
@leesf It does make sense to have it in debug for large tables, right? wdyt?
@vinothchandar @vburenin it would be changed to debug if there are some stats to indicate the time cost. I think it is an important stat when profiling.
profiling == debugging. I think you want to have such metrics exposed to see these things on your dashboard to monitor them in the first place.
@@ -109,7 +109,7 @@ public static SchemaDifference getSchemaDifference(MessageType storageSchema, Ma | |||
schemaDiffBuilder.addTableColumn(entry.getKey(), entry.getValue()); | |||
} | |||
} | |||
LOG.info("Difference between schemas: " + schemaDiffBuilder.build().toString()); | |||
LOG.debug("Difference between schemas: " + schemaDiffBuilder.build().toString()); |
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.
It can be very large some times, that's why I moved it to debug. Schemas on our side are hundreds of pages long. However, if you find it very useful for yourself, I can move it back to info. Just let me know.
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.
In the interest of moving this forward, made some changes that strike a balance.
@@ -113,7 +113,9 @@ protected HoodieActiveTimeline(HoodieTableMetaClient metaClient, Set<String> inc | |||
// multiple casts will make this lambda serializable - | |||
// http://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.16 | |||
this.details = (Function<HoodieInstant, Option<byte[]>> & Serializable) this::getInstantDetails; | |||
LOG.info("Loaded instants " + getInstants().collect(Collectors.toList())); | |||
if (LOG.isDebugEnabled()) { |
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 is actually a helpful debug aid, to tell us what the state of the timeline was. So I am changing this to print the last instant , while moving it back to INFO
@@ -271,15 +271,15 @@ private void ensurePartitionLoadedCorrectly(String partition) { | |||
if (!isPartitionAvailableInStore(partitionPathStr)) { | |||
// Not loaded yet | |||
try { | |||
LOG.info("Building file system view for partition (" + partitionPathStr + ")"); | |||
LOG.debug("Building file system view for partition (" + partitionPathStr + ")"); |
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 is actually good to keep IMO.
@@ -135,7 +135,7 @@ private boolean syncIfLocalViewBehind(Context ctx) { | |||
synchronized (view) { | |||
if (isLocalViewBehind(ctx)) { | |||
HoodieTimeline localTimeline = viewManager.getFileSystemView(basePath).getTimeline(); | |||
LOG.info("Syncing view as client passed last known instant " + lastKnownInstantFromClient | |||
LOG.debug("Syncing view as client passed last known instant " + lastKnownInstantFromClient |
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 is again rather important. Going to just have the last instant printed out.
- Fixing flaky multi delta streamer test - Using isDebugEnabled() checks - Some changes to shorten log message without moving to DEBUG
What is the purpose of the pull request
Some log messages are too verbose and some are not really readable, this PR is aimed at moving most verbose messages from info to debug level as well as improving print out of the configuration info in delta streamer.
Verify this pull request
This pull request is a trivial rework / code cleanup without any test coverage.
Has a corresponding JIRA in PR title & commit
Commit message is descriptive of the change
CI is green