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

TEZ-4503: Warn about large conf properties in payload #308

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

zabetak
Copy link
Member

@zabetak zabetak commented Sep 14, 2023

The changes were tested by running mvn test -Dtest=TestTezUtils and manually inspecting the output under: tez-common/target/surefire-reports/org.apache.tez.common.TestTezUtils-output.txt .

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/stamatis/.m2/repository/org/slf4j/slf4j-reload4j/1.7.36/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/stamatis/.m2/repository/org/slf4j/slf4j-log4j12/1.7.25/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Reload4jLoggerFactory]
2023-09-14 15:03:08,732 WARN  [Time-limited test] common.TezUtils (TezUtils.java:logEntryIfLarge(237)) - Property 'testLargeValue' is unusually big (67108886 bytes); large payload may lead to OOM.
2023-09-14 15:03:08,841 INFO  [Time-limited test] common.TezUtils (TezUtils.java:logEntryIfLarge(239)) - Large property 'testLargeValue': ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDE...

Additionally, I added a `tez-site.xml` file under `tez-common/test/resources` and varied a bit the values for the new configs. 

@tez-yetus

This comment was marked as outdated.

@tez-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 18s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚 mvninstall 9m 57s master passed
+1 💚 compile 0m 35s master passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu122.04
+1 💚 compile 0m 35s master passed with JDK Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
+1 💚 checkstyle 0m 37s master passed
+1 💚 javadoc 0m 45s master passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu122.04
+1 💚 javadoc 0m 42s master passed with JDK Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
+0 🆗 spotbugs 1m 49s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 1m 47s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 24s the patch passed
+1 💚 compile 0m 27s the patch passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu122.04
+1 💚 javac 0m 27s the patch passed
+1 💚 compile 0m 23s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
+1 💚 javac 0m 23s the patch passed
+1 💚 checkstyle 0m 14s the patch passed
-1 ❌ whitespace 0m 0s The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
+1 💚 javadoc 0m 26s the patch passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu122.04
+1 💚 javadoc 0m 26s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
+1 💚 findbugs 1m 9s the patch passed
_ Other Tests _
+1 💚 unit 2m 17s tez-api in the patch passed.
+1 💚 asflicense 0m 16s The patch does not generate ASF License warnings.
22m 26s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-308/2/artifact/out/Dockerfile
GITHUB PR #308
JIRA Issue TEZ-4503
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
uname Linux 9309314f74f7 4.15.0-212-generic #223-Ubuntu SMP Tue May 23 13:09:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/tez.sh
git revision master / 7855c1f
Default Java Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu122.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
whitespace https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-308/2/artifact/out/whitespace-eol.txt
Test Results https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-308/2/testReport/
Max. process+thread count 571 (vs. ulimit of 5500)
modules C: tez-api U: tez-api
Console output https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-308/2/console
versions git=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@zabetak
Copy link
Member Author

zabetak commented Sep 18, 2023

@abstractdog Can you please have a look in this PR when you get the chance. Thanks!

public static final String TEZ_LOGGING_PROPERTY_SIZE_THRESHOLD =
TEZ_PREFIX + "logging.property.size.threshold";
public static final int TEZ_LOGGING_PROPERTY_SIZE_THRESHOLD_DEFAULT = 512 * 1024;
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, we tend to add a line between every config properties, even if they are related to each other

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in d8215af

private static final boolean PROPERTY_MASK;

static {
TezConfiguration c = new TezConfiguration();
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm afraid this approach will become confusing hard to handle over time
a new TezConfiguration() in a static initializer will always pick up whatever is present in tez-site.xml, hence we don't really have control over that: I think if we want to be able to use the size threshold, we need to achieve that from the actual config, which might need a bit of refactoring as this method receives Configuration as an iterable (and we need to see the threshold and mask property beforehand without iterating over the values)

Copy link
Member Author

Choose a reason for hiding this comment

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

Instead of using the central Tez configuration (tez-site.xml) for selecting the threshold and masking for logging large properties check for the respective entries in each individual configuration object.
@tez-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 24m 52s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 2 new or modified test files.
_ master Compile Tests _
+0 🆗 mvndep 12m 46s Maven dependency ordering for branch
+1 💚 mvninstall 15m 43s master passed
+1 💚 compile 3m 38s master passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu122.04
+1 💚 compile 3m 19s master passed with JDK Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
+1 💚 checkstyle 2m 38s master passed
+1 💚 javadoc 2m 44s master passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu122.04
+1 💚 javadoc 2m 21s master passed with JDK Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
+0 🆗 spotbugs 5m 47s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 8m 22s master passed
-0 ⚠️ patch 6m 8s Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
+1 💚 mvninstall 4m 46s the patch passed
+1 💚 compile 3m 36s the patch passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu122.04
+1 💚 javac 3m 36s the patch passed
+1 💚 compile 3m 21s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
+1 💚 javac 3m 21s the patch passed
-0 ⚠️ checkstyle 0m 31s tez-api: The patch generated 1 new + 72 unchanged - 1 fixed = 73 total (was 73)
+1 💚 checkstyle 0m 26s tez-common: The patch generated 0 new + 14 unchanged - 1 fixed = 14 total (was 15)
-0 ⚠️ checkstyle 0m 57s root: The patch generated 1 new + 86 unchanged - 2 fixed = 87 total (was 88)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 javadoc 2m 22s the patch passed with JDK Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu122.04
+1 💚 javadoc 2m 17s the patch passed with JDK Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
+1 💚 findbugs 7m 54s the patch passed
_ Other Tests _
+1 💚 unit 2m 36s tez-api in the patch passed.
+1 💚 unit 0m 44s tez-common in the patch passed.
+1 💚 unit 75m 59s root in the patch passed.
+1 💚 asflicense 1m 27s The patch does not generate ASF License warnings.
186m 40s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-308/5/artifact/out/Dockerfile
GITHUB PR #308
JIRA Issue TEZ-4503
Optional Tests dupname asflicense javac javadoc unit xml compile spotbugs findbugs checkstyle
uname Linux ff9dd343b5c7 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/tez.sh
git revision master / 51d6f53
Default Java Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.20.1+1-post-Ubuntu-0ubuntu122.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_382-8u382-ga-1~22.04.1-b05
checkstyle https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-308/5/artifact/out/diff-checkstyle-tez-api.txt
checkstyle https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-308/5/artifact/out/diff-checkstyle-root.txt
Test Results https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-308/5/testReport/
Max. process+thread count 1589 (vs. ulimit of 5500)
modules C: tez-api tez-common . U: .
Console output https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-308/5/console
versions git=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

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.

3 participants