You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/12/07 14:32:05 UTC

[GitHub] [flink] hequn8128 commented on a change in pull request #10477: [FLINK-15096][python] Pass python configuration to the python operators via table config instead of global job parameters.

hequn8128 commented on a change in pull request #10477: [FLINK-15096][python] Pass python configuration to the python operators via table config instead of global job parameters.
URL: https://github.com/apache/flink/pull/10477#discussion_r355123452
 
 

 ##########
 File path: flink-python/src/main/java/org/apache/flink/python/PythonConfig.java
 ##########
 @@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.python;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.configuration.Configuration;
+
+import java.io.Serializable;
+import java.util.Optional;
+
+/**
+ * Configuration for the Python job.
+ */
+@Internal
+public class PythonConfig implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	public static final String PYTHON_FILES = "python.files";
+	public static final String PYTHON_REQUIREMENTS_FILE = "python.requirements-file";
+	public static final String PYTHON_REQUIREMENTS_CACHE = "python.requirements-cache";
+	public static final String PYTHON_ARCHIVES = "python.archives";
+	public static final String PYTHON_EXEC = "python.exec";
+
+	/**
+	 * Max number of elements to include in a bundle.
+	 */
+	private final int maxBundleSize;
+
+	/**
+	 * Max duration of a bundle.
+	 */
+	private final long maxBundleTimeMills;
+
+	/**
+	 * The amount of memory to be allocated by the Python framework.
+	 */
+	private final String pythonFrameworkMemorySize;
+
+	/**
+	 * The amount of memory to be allocated by the input/output buffer of a Python worker.
+	 */
+	private final String pythonDataBufferMemorySize;
+
+	/**
+	 * The python files uploaded by TableEnvironment#add_python_file() or command line option "-pyfs". It is a json
+	 * string. The key is the file key in distribute cache and the value is the corresponding origin file name.
+	 */
+	private final String pythonFilesInfo;
 
 Review comment:
   Add @Nullable annotation for these variables which can be null.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services