kezhuw commented on a change in pull request #15331:
URL: https://github.com/apache/flink/pull/15331#discussion_r599464165
##########
File path:
flink-core/src/main/java/org/apache/flink/api/common/operators/CollectionExecutor.java
##########
@@ -110,7 +111,7 @@ public JobExecutionResult execute(Plan program) throws
Exception {
initCache(program.getCachedFiles());
Collection<? extends GenericDataSinkBase<?>> sinks =
program.getDataSinks();
for (Operator<?> sink : sinks) {
- execute(sink);
+ execute(sink, program.getJobId());
}
Review comment:
According to javadoc of `Plan.getJobId` and `Plan.setJobId`, `null` is
possible. I think we need a fallback here.
##########
File path:
flink-core/src/main/java/org/apache/flink/api/common/operators/CollectionExecutor.java
##########
@@ -139,20 +140,28 @@ private void initCache(Set<Map.Entry<String,
DistributedCache.DistributedCacheEn
}
if (operator instanceof BulkIterationBase) {
- result = executeBulkIteration((BulkIterationBase<?>) operator);
+ result = executeBulkIteration((BulkIterationBase<?>) operator,
jobID);
} else if (operator instanceof DeltaIterationBase) {
- result = executeDeltaIteration((DeltaIterationBase<?, ?>)
operator);
- } else if (operator instanceof SingleInputOperator) {
- result = executeUnaryOperator((SingleInputOperator<?, ?, ?>)
operator, superStep);
- } else if (operator instanceof DualInputOperator) {
- result = executeBinaryOperator((DualInputOperator<?, ?, ?, ?>)
operator, superStep);
- } else if (operator instanceof GenericDataSourceBase) {
- result = executeDataSource((GenericDataSourceBase<?, ?>) operator,
superStep);
- } else if (operator instanceof GenericDataSinkBase) {
- executeDataSink((GenericDataSinkBase<?>) operator, superStep);
- result = Collections.emptyList();
+ result = executeDeltaIteration((DeltaIterationBase<?, ?>)
operator, jobID);
} else {
- throw new RuntimeException("Cannot execute operator " +
operator.getClass().getName());
+ if (operator instanceof SingleInputOperator) {
Review comment:
Nest `if else` ?
--
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]