-
Notifications
You must be signed in to change notification settings - Fork 242
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
Add profiling tool #2402
Add profiling tool #2402
Conversation
Signed-off-by: Niranjan Artal <[email protected]>
This is still WIP. I am not able to convert this to draft PR. Update: Converted to draft PR. |
Signed-off-by: Niranjan Artal <[email protected]>
event_log_profiling/README.md
Outdated
@@ -0,0 +1,139 @@ | |||
# Spark event log profiling tool |
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 wondering about directory name here, this is event_log_profiling, but really this tool should do both profiling and qualification. I realize the first part is pulling in profiling tool, but perhaps we should name this directory something generic like 'workload_profiling'
event_log_profiling/README.md
Outdated
@@ -0,0 +1,139 @@ | |||
# Spark event log profiling tool |
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'd say lets remove "event log" from title
event_log_profiling/README.md
Outdated
@@ -0,0 +1,139 @@ | |||
# Spark event log profiling tool | |||
|
|||
This is a profiling tool to parse and analyze Spark event logs. |
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 would be nice to provide more information here. In the very least we should say generates information used for debugging and profiling. information such as X, Y, Z. See more information below for specifics.
Does this work with both cpu and gpu generated event logs?
event_log_profiling/README.md
Outdated
|
||
## How to compile and use with Spark | ||
1. `mvn clean package` | ||
2. Copy event_log_profiling_2.12-0.6.0-SNAPSHOT.jar to $SPARK_HOME/jars/ |
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.
similarly here, I think we want different name for the jar, I wonder if we use something like rapids-4-spark-workload-profiling
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.
Or maybe something even more generic such as rapids-4-spark-tools
because who knows what else we will come up with in the future
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.
yeah I want to think about this, I didn't realize we are basically running local mode for all the queries here so we can do an uber jar but its essentially all of spark.
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.
Updated the jar name.
event_log_profiling/README.md
Outdated
|
||
`cp target/event_log_profiling_2.12-0.6.0-SNAPSHOT.jar $SPARK_HOME/jars/` | ||
|
||
3. Add below entries in $SPARK_HOME/conf/log4j.properties |
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 was wanting to get rid of this before it went into github. is it only the driver that prints? If so lets just make it print to a file specified by user
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.
Removed log4j and using PrintWriter instead.
event_log_profiling/pom.xml
Outdated
|
||
<!--<parent> | ||
<groupId>com.nvidia</groupId> | ||
<artifactId>rapids-4-spark-parent</artifactId> |
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.
lets figure out parent
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.
done
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.spark.sql.rapids.tool.profiling |
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 doesn't seem like it needs to be in org.apache.spark, anything that doesn't need to be, lets put in com.nvidia.spark.rapids.XX
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.
done. Moved 2 files to com.nvidia.spark.rapids.tool.profiling package.
pom.xml
Outdated
@@ -72,7 +72,8 @@ | |||
|
|||
<modules> | |||
<module>api_validation</module> | |||
<module>dist</module> | |||
<module>dist</module> |
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.
spacing is off
|
||
// Create the same logger and sparkSession used for ALL Applications. | ||
val logger = ProfileUtils.createLogger(outputDirectory, logFileName) | ||
val sparkSession = ProfileUtils.createSparkSession |
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 didn't realize we are creating a spark session for this, I thought we were just using the classes, this essentially requires spark then to run, I need to think about that
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.
We were creating uber jar for this reason and then run using java command to run. Let us know your inputs on handling this in a better way.
Signed-off-by: Niranjan Artal <[email protected]>
Yet to do: Getting rid of log4j and moving some files to com.nvidia.spark.rapids.XX |
Signed-off-by: Niranjan Artal <[email protected]>
Signed-off-by: Niranjan Artal <[email protected]>
Signed-off-by: Niranjan Artal <[email protected]>
workload_profiling/src/main/scala/com/nvidia/spark/rapids/tool/profiling/ProfileArgs.scala
Outdated
Show resolved
Hide resolved
...ofiling/src/test/scala/org/apache/spark/sql/rapids/tool/profiling/ApplicationInfoSuite.scala
Outdated
Show resolved
Hide resolved
workload_profiling/src/main/scala/org/apache/spark/sql/rapids/tool/profiling/ProfileUtils.scala
Outdated
Show resolved
Hide resolved
workload_profiling/src/main/scala/org/apache/spark/sql/rapids/tool/profiling/ProfileUtils.scala
Outdated
Show resolved
Hide resolved
workload_profiling/src/main/scala/org/apache/spark/sql/rapids/tool/profiling/ProfileUtils.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Niranjan Artal <[email protected]>
Signed-off-by: Niranjan Artal <[email protected]>
...ofiling/src/test/scala/org/apache/spark/sql/rapids/tool/profiling/ApplicationInfoSuite.scala
Outdated
Show resolved
Hide resolved
workload_profiling/src/main/scala/com/nvidia/spark/rapids/tool/profiling/ProfileMain.scala
Outdated
Show resolved
Hide resolved
...ad_profiling/src/main/scala/org/apache/spark/sql/rapids/tool/profiling/ApplicationInfo.scala
Outdated
Show resolved
Hide resolved
...oad_profiling/src/main/scala/org/apache/spark/sql/rapids/tool/profiling/ClassWarehouse.scala
Outdated
Show resolved
Hide resolved
...rofiling/src/main/scala/org/apache/spark/sql/rapids/tool/profiling/CompareApplications.scala
Outdated
Show resolved
Hide resolved
workload_profiling/src/main/scala/org/apache/spark/sql/rapids/tool/profiling/ProfileUtils.scala
Outdated
Show resolved
Hide resolved
workload_profiling/src/main/scala/org/apache/spark/sql/rapids/tool/profiling/ProfileUtils.scala
Outdated
Show resolved
Hide resolved
...ofiling/src/test/scala/org/apache/spark/sql/rapids/tool/profiling/ApplicationInfoSuite.scala
Outdated
Show resolved
Hide resolved
...ofiling/src/test/scala/org/apache/spark/sql/rapids/tool/profiling/ApplicationInfoSuite.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Niranjan Artal <[email protected]>
Signed-off-by: Niranjan Artal <[email protected]>
Signed-off-by: Niranjan Artal <[email protected]>
build |
...spark-tools/src/test/scala/com/nvidia/spark/rapids/tool/profiling/ApplicationInfoSuite.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Niranjan Artal <[email protected]>
build |
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 think this is at a good point to merge now.
@tgravescs @andygrove Could you please approve again. Thanks for reviewing. |
* Add profiling tool Signed-off-by: Niranjan Artal <[email protected]> * update readme Signed-off-by: Niranjan Artal <[email protected]> * change package name Signed-off-by: Niranjan Artal <[email protected]> * Remove log4j and add PrintWriter to save report Signed-off-by: Niranjan Artal <[email protected]> * move some files to different package Signed-off-by: Niranjan Artal <[email protected]> * update pom to remove dependency on reduced pom file Signed-off-by: Niranjan Artal <[email protected]> * addressed review comments Signed-off-by: Niranjan Artal <[email protected]> * update tests Signed-off-by: Niranjan Artal <[email protected]> * addressed review comments Signed-off-by: Niranjan Artal <[email protected]> * Addressed review comments Signed-off-by: Niranjan Artal <[email protected]> * Create sparkSession in unit tests Signed-off-by: Niranjan Artal <[email protected]> * addressed review comments Signed-off-by: Niranjan Artal <[email protected]>
* Add profiling tool Signed-off-by: Niranjan Artal <[email protected]> * update readme Signed-off-by: Niranjan Artal <[email protected]> * change package name Signed-off-by: Niranjan Artal <[email protected]> * Remove log4j and add PrintWriter to save report Signed-off-by: Niranjan Artal <[email protected]> * move some files to different package Signed-off-by: Niranjan Artal <[email protected]> * update pom to remove dependency on reduced pom file Signed-off-by: Niranjan Artal <[email protected]> * addressed review comments Signed-off-by: Niranjan Artal <[email protected]> * update tests Signed-off-by: Niranjan Artal <[email protected]> * addressed review comments Signed-off-by: Niranjan Artal <[email protected]> * Addressed review comments Signed-off-by: Niranjan Artal <[email protected]> * Create sparkSession in unit tests Signed-off-by: Niranjan Artal <[email protected]> * addressed review comments Signed-off-by: Niranjan Artal <[email protected]>
This is the initial PR to add profiling tool.
In this PR, we process event logs to print executor information, properties, Spark version and application information.
Signed-off-by: Niranjan Artal [email protected]