You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by di...@apache.org on 2020/09/21 11:05:08 UTC

[flink] 01/02: [refactor][python] Rename AbstractPythonFunctionOperatorBase to AbstractPythonFunctionOperator

This is an automated email from the ASF dual-hosted git repository.

dianfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 1c41c1e79b9ff0058f4f9a8c37617f8d66a6361f
Author: Dian Fu <di...@apache.org>
AuthorDate: Fri Sep 18 16:18:48 2020 +0800

    [refactor][python] Rename AbstractPythonFunctionOperatorBase to AbstractPythonFunctionOperator
---
 .../java/org/apache/flink/python/util/PythonConfigUtil.java    | 10 +++++-----
 .../python/AbstractOneInputPythonFunctionOperator.java         |  2 +-
 ...onOperatorBase.java => AbstractPythonFunctionOperator.java} |  6 +++---
 .../python/AbstractTwoInputPythonFunctionOperator.java         |  2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/flink-python/src/main/java/org/apache/flink/python/util/PythonConfigUtil.java b/flink-python/src/main/java/org/apache/flink/python/util/PythonConfigUtil.java
index 1d2a177..19c6b4d 100644
--- a/flink-python/src/main/java/org/apache/flink/python/util/PythonConfigUtil.java
+++ b/flink-python/src/main/java/org/apache/flink/python/util/PythonConfigUtil.java
@@ -29,7 +29,7 @@ import org.apache.flink.streaming.api.graph.StreamNode;
 import org.apache.flink.streaming.api.operators.SimpleOperatorFactory;
 import org.apache.flink.streaming.api.operators.StreamOperator;
 import org.apache.flink.streaming.api.operators.StreamOperatorFactory;
-import org.apache.flink.streaming.api.operators.python.AbstractPythonFunctionOperatorBase;
+import org.apache.flink.streaming.api.operators.python.AbstractPythonFunctionOperator;
 import org.apache.flink.streaming.runtime.partitioner.ForwardPartitioner;
 
 import java.lang.reflect.InvocationTargetException;
@@ -135,12 +135,12 @@ public class PythonConfigUtil {
 				StreamOperator streamOperator = ((SimpleOperatorFactory) streamOperatorFactory).getOperator();
 				if ((streamOperator instanceof DataStreamPythonStatelessFunctionOperator) ||
 					(streamOperator instanceof DataStreamTwoInputPythonStatelessFunctionOperator)) {
-					AbstractPythonFunctionOperatorBase abstractPythonFunctionOperatorBase =
-						(AbstractPythonFunctionOperatorBase) streamOperator;
+					AbstractPythonFunctionOperator abstractPythonFunctionOperator =
+						(AbstractPythonFunctionOperator) streamOperator;
 
-					Configuration oldConfig = abstractPythonFunctionOperatorBase.getPythonConfig()
+					Configuration oldConfig = abstractPythonFunctionOperator.getPythonConfig()
 						.getMergedConfig();
-					abstractPythonFunctionOperatorBase.setPythonConfig(generateNewPythonConfig(oldConfig,
+					abstractPythonFunctionOperator.setPythonConfig(generateNewPythonConfig(oldConfig,
 						mergedConfig));
 				}
 			}
diff --git a/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractOneInputPythonFunctionOperator.java b/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractOneInputPythonFunctionOperator.java
index 0ae4ed9..5bb8735 100644
--- a/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractOneInputPythonFunctionOperator.java
+++ b/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractOneInputPythonFunctionOperator.java
@@ -28,7 +28,7 @@ import org.apache.flink.streaming.api.operators.OneInputStreamOperator;
  */
 @Internal
 public abstract class AbstractOneInputPythonFunctionOperator<IN, OUT>
-	extends AbstractPythonFunctionOperatorBase<OUT>
+	extends AbstractPythonFunctionOperator<OUT>
 	implements OneInputStreamOperator<IN, OUT>, BoundedOneInput {
 
 	private static final long serialVersionUID = 1L;
diff --git a/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractPythonFunctionOperatorBase.java b/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractPythonFunctionOperator.java
similarity index 98%
rename from flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractPythonFunctionOperatorBase.java
rename to flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractPythonFunctionOperator.java
index ca30232..c827170 100644
--- a/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractPythonFunctionOperatorBase.java
+++ b/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractPythonFunctionOperator.java
@@ -45,7 +45,7 @@ import java.util.concurrent.ScheduledFuture;
  * Base class for all stream operators to execute Python functions.
  */
 @Internal
-public abstract class AbstractPythonFunctionOperatorBase<OUT>
+public abstract class AbstractPythonFunctionOperator<OUT>
 	extends AbstractStreamOperator<OUT> {
 
 	private static final long serialVersionUID = 1L;
@@ -83,7 +83,7 @@ public abstract class AbstractPythonFunctionOperatorBase<OUT>
 	/**
 	 * Callback to be executed after the current bundle was finished.
 	 */
-	protected transient Runnable bundleFinishedCallback;
+	private transient Runnable bundleFinishedCallback;
 
 	/**
 	 * The size of the reserved memory from the MemoryManager.
@@ -95,7 +95,7 @@ public abstract class AbstractPythonFunctionOperatorBase<OUT>
 	 */
 	private PythonConfig config;
 
-	public AbstractPythonFunctionOperatorBase(Configuration config) {
+	public AbstractPythonFunctionOperator(Configuration config) {
 		this.config = new PythonConfig(Preconditions.checkNotNull(config));
 		this.chainingStrategy = ChainingStrategy.ALWAYS;
 	}
diff --git a/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractTwoInputPythonFunctionOperator.java b/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractTwoInputPythonFunctionOperator.java
index ed221c6..c02dc98 100644
--- a/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractTwoInputPythonFunctionOperator.java
+++ b/flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractTwoInputPythonFunctionOperator.java
@@ -28,7 +28,7 @@ import org.apache.flink.streaming.api.operators.TwoInputStreamOperator;
  */
 @Internal
 public abstract class AbstractTwoInputPythonFunctionOperator<IN1, IN2, OUT>
-	extends AbstractPythonFunctionOperatorBase<OUT>
+	extends AbstractPythonFunctionOperator<OUT>
 	implements TwoInputStreamOperator<IN1, IN2, OUT>, BoundedMultiInput {
 
 	private static final long serialVersionUID = 1L;