ibzib commented on a change in pull request #13743:
URL: https://github.com/apache/beam/pull/13743#discussion_r567454089
##########
File path:
runners/spark/src/main/java/org/apache/beam/runners/spark/SparkCommonPipelineOptions.java
##########
@@ -32,6 +32,8 @@
public interface SparkCommonPipelineOptions
extends PipelineOptions, StreamingOptions, ApplicationNameOptions {
String DEFAULT_MASTER_URL = "local[4]";
+ String DEFAULT_SPARK_HISTORY_DIR = "/tmp/spark-events/";
Review comment:
Remove `DEFAULT_SPARK_HISTORY_DIR` and `DEFAULT_EVENT_LOG_ENABLED` since
they are unused now.
##########
File path:
runners/spark/src/main/java/org/apache/beam/runners/spark/SparkPipelineRunner.java
##########
@@ -212,6 +246,22 @@ public PortablePipelineResult run(RunnerApi.Pipeline
pipeline, JobInfo jobInfo)
pipelineOptions.as(MetricsOptions.class),
result);
metricsPusher.start();
+ if (pipelineOptions.getEventLogEnabled()) {
+ eventLoggingListener.onApplicationStart(
+ new SparkListenerApplicationStart(
+ jobInfo.jobId(),
+ scala.Option.apply(jobInfo.jobName()),
+ Instant.now().getMillis(),
Review comment:
This block runs after the job has completed, so this would report the
start time being almost exactly the same as the end time.
##########
File path:
runners/spark/src/main/java/org/apache/beam/runners/spark/SparkPipelineRunner.java
##########
@@ -212,6 +246,22 @@ public PortablePipelineResult run(RunnerApi.Pipeline
pipeline, JobInfo jobInfo)
pipelineOptions.as(MetricsOptions.class),
result);
metricsPusher.start();
+ if (pipelineOptions.getEventLogEnabled()) {
+ eventLoggingListener.onApplicationStart(
+ new SparkListenerApplicationStart(
+ jobInfo.jobId(),
Review comment:
There are a number of (job or app) * (name or id) fields. It will be
misleading to users if one of these fields is used in place of another. I think
the following mapping is more accurate:
```java
appName = pipelineOptions.as(ApplicationNameOptions.class).getAppName();
appId = jsc.getConf().getAppId();
appAttemptId = "1";
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]