-
Notifications
You must be signed in to change notification settings - Fork 237
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
Conversation
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
build |
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
tools/src/main/scala/org/apache/spark/sql/rapids/tool/FilterAppInfo.scala
Outdated
Show resolved
Hide resolved
tools/src/test/scala/com/nvidia/spark/rapids/tool/qualification/AppFilterSuite.scala
Outdated
Show resolved
Hide resolved
tools/src/test/scala/com/nvidia/spark/rapids/tool/qualification/AppFilterSuite.scala
Outdated
Show resolved
Hide resolved
tools/src/main/scala/org/apache/spark/sql/rapids/tool/FilterAppInfo.scala
Outdated
Show resolved
Hide resolved
@@ -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 |
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.
test other configs in here other then just port.
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.
added tests with combination for port and host.
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.
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] |
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.
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.
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
tools/src/main/scala/com/nvidia/spark/rapids/tool/qualification/QualificationArgs.scala
Outdated
Show resolved
Hide resolved
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
tools/src/main/scala/org/apache/spark/sql/rapids/tool/AppFilterImpl.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
build |
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.