-
Notifications
You must be signed in to change notification settings - Fork 424
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
zabetak
wants to merge
5
commits into
apache:master
Choose a base branch
from
zabetak:TEZ-4503
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0be881d
TEZ-4503: Warn about large conf properties in payload
zabetak 17e07e7
Allow different logging threshold per configuration object
zabetak 687bd3b
Refactor to use native JDK APIs instead of Guava
zabetak d8215af
Add newline between new properties
zabetak 1253d18
Add tests for new method and to check logs content
zabetak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1580,6 +1580,26 @@ public TezConfiguration(boolean loadDefaults) { | |
TEZ_PREFIX + "generate.debug.artifacts"; | ||
public static final boolean TEZ_GENERATE_DEBUG_ARTIFACTS_DEFAULT = false; | ||
|
||
/** | ||
* Int value. Property size threshold (in bytes) for logging during payload serialization. Properties exceeding the | ||
* threshold are considered unusually large and potentially problematic thus they should be logged. | ||
*/ | ||
@ConfigurationScope(Scope.VERTEX) | ||
@ConfigurationProperty(type="integer") | ||
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; | ||
/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in d8215af |
||
* Boolean value. Whether property masking is enabled for logging. Properties may contain sensitive user information | ||
* such as passwords, credentials, secrets, etc., so they shouldn't be logged unconditionally. When masking is | ||
* enabled, the property value (content) is not displayed in the logs. | ||
*/ | ||
@ConfigurationScope(Scope.VERTEX) | ||
@ConfigurationProperty | ||
public static final String TEZ_LOGGING_PROPERTY_MASK = | ||
TEZ_PREFIX + "logging.property.mask"; | ||
public static final boolean TEZ_LOGGING_PROPERTY_MASK_DEFAULT = true; | ||
|
||
/** | ||
* Set of tasks for which specific launch command options need to be added. | ||
* Format: "vertexName[csv of task ids];vertexName[csv of task ids].." | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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)
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.
I reworked the PR (https://github.com/apache/tez/pull/308/commits/17e07e7c714d670cfbd5e15eb3c56f33a022f2ec,https://github.com/apache/tez/pull/308/commits/687bd3b22f26288c0f49d40d05588d4f17a7b2fa) to allow using the size threshold from within the configuration object.