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

Qualification tool: Add filtering based on configuration parameters #3418

Merged
merged 10 commits into from
Sep 15, 2021

Conversation

nartal1
Copy link
Collaborator

@nartal1 nartal1 commented Sep 9, 2021

This fixes #3043.
Filtering for configuration parameters is done for specific values of configuration or keys of configs if values are not provided.
Added tests for all cases and updated Readme.
If multiple configs are given where some have specific values and some have just the keys, then specific values takes precedence and filtering is done based on that.

Signed-off-by: Niranjan Artal <nartal@nvidia.com>
@nartal1 nartal1 added the tools label Sep 9, 2021
@nartal1 nartal1 added this to the Aug 30 - Sept 10 milestone Sep 9, 2021
@nartal1 nartal1 self-assigned this Sep 9, 2021
@nartal1
Copy link
Collaborator Author

nartal1 commented Sep 9, 2021

build

@@ -673,7 +711,8 @@ class AppFilterSuite extends FunSuite {
// scalastyle:off line.size.limit
val supText =
s"""{"Event":"SparkListenerLogStart","Spark Version":"3.1.1"}
|{"Event":"SparkListenerApplicationStart","App Name":"${app.appName}", "App ID":"local-16261043003${app.uniqueId}","Timestamp":${app.appTime}, "User":"${app.userName}"}""".stripMargin
|{"Event":"SparkListenerApplicationStart","App Name":"${app.appName}", "App ID":"local-16261043003${app.uniqueId}","Timestamp":${app.appTime}, "User":"${app.userName}"}
|{"Event":"SparkListenerEnvironmentUpdate","JVM Information":{"Java Home":"/usr/lib/jvm/java-8-openjdk-amd64/jre"},"Spark Properties":{"spark.driver.host":"10.10.19.19","spark.eventLog.enabled":"true","spark.driver.port":"4349${app.uniqueId}"},"Hadoop Properties":{"hadoop.service.shutdown.timeout":"30s"},"System Properties":{"java.io.tmpdir":"/tmp"},"Classpath Entries":{"/home/user1/runspace/spark311/spark-3.1.1-bin-hadoop3.2/jars/hive-exec-2.3.7-core.jar":"System Classpath"}}""".stripMargin
Copy link
Collaborator

Choose a reason for hiding this comment

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

test other configs in here other then just port.

Copy link
Collaborator Author

@nartal1 nartal1 Sep 13, 2021

Choose a reason for hiding this comment

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

added tests with combination for port and host.

Copy link
Collaborator

Choose a reason for hiding this comment

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

my point here was to add in other variations of configs that might not always be there, things like the sql plugin config, shuffle manager config, what about confs that take a comma separated list. Test other patterns to make sure we match properly

Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
val appTimeFilteredForDisjunction = if (appArgs.startAppTime.isSupplied && appArgs.any()) {
appTimeFiltered
} else {
Seq.empty[AppFilterReturnParameters]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There was a bug here - for disjunction(any) with only one filter parameter, if the filter did not match to any eventlogs, then all the event logs were selected. Reason being appNameFiltered would be set to apps and then userNameFiltered would be to appNameFiltered. So in the code below finalLogicFiltered would be set to apps which is wrong. So now I am making sure finalLogicFiltered gets the correct value. Added a test to veridy this.

Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
@tgravescs
Copy link
Collaborator

build

@nartal1 nartal1 merged commit 232b14f into NVIDIA:branch-21.10 Sep 15, 2021
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.

[FEA] Qualification tool: Add support to filter specific configuration values
3 participants