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
[BEAM-11213] Display Beam Metrics in Spark History Server for Classic Runner #14409
[BEAM-11213] Display Beam Metrics in Spark History Server for Classic Runner #14409
Conversation
8059182
to
26ee103
Compare
@@ -34,18 +34,6 @@ | |||
*/ | |||
public interface SparkPipelineOptions extends SparkCommonPipelineOptions { | |||
|
|||
@Description("Set it to true if event logs should be saved to Spark History Server directory") |
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.
Historically we avoid if possible to introduce variables that are already defined as Spark Configurations, so these variables should come from the Spark configuration to avoid duplicated non synchronized configuration changes and confusion for end users.
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.
Makes sense. 👍
final JavaSparkContext jsc, SparkPipelineOptions pipelineOptions, long startTime) { | ||
EventLoggingListener eventLoggingListener = null; | ||
try { | ||
if (jsc.getConf().getBoolean("spark.eventLog.enabled", false)) { |
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 is the official Spark way to configure what the eventLogEnabled
and sparkHistoryDir
options were doing. So better to use these.
… Runner too It also removes the SparkPipelineOptions related to events logging because those are already configured and used by Spark config.
26ee103
to
9e0b378
Compare
Run Spark ValidatesRunner |
Run Spark ValidatesRunner Java 11 |
Run Java Spark PortableValidatesRunner Batch |
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.
LGTM, thanks for extending and improving this.
@@ -34,18 +34,6 @@ | |||
*/ | |||
public interface SparkPipelineOptions extends SparkCommonPipelineOptions { | |||
|
|||
@Description("Set it to true if event logs should be saved to Spark History Server directory") |
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.
Makes sense. 👍
@@ -97,7 +102,7 @@ | |||
private static final Logger LOG = LoggerFactory.getLogger(SparkRunner.class); | |||
|
|||
/** Options used in this pipeline runner. */ | |||
private final SparkPipelineOptions mOptions; | |||
private final SparkPipelineOptions pipelineOptions; |
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.
+1 😄
metricsPusher.start(); | ||
|
||
if (eventLoggingListener != null && jsc != null) { |
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 curious how jsc
could be null here?
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 can't it would have definitely failed before but I am double checking just to be sure.
Thanks @ibzib ! |
… Metrics in Spark History Server for Classic Runner It also removes the SparkPipelineOptions related to events logging because those are already configured and used by Spark config.
… 2.29.0: Display Beam Metrics in Spark History Server for Classic Runner
R: @ibzib
CC: @tszerszen (for awareness)