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/03 11:11:15 UTC

[GitHub] [flink] twalthr commented on a change in pull request #9874: [FLINK-14240][table] Merge table config parameters into the global job parameters for legacy planner to align with blink planner

twalthr commented on a change in pull request #9874: [FLINK-14240][table] Merge table config parameters into the global job parameters for legacy planner to align with blink planner
URL: https://github.com/apache/flink/pull/9874#discussion_r353117298
 
 

 ##########
 File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/util/GlobalJobParametersMerger.java
 ##########
 @@ -0,0 +1,42 @@
+/*
+ * 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.table.util;
+
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.table.api.TableConfig;
+
+/**
+ * Utilities for merging the table config parameters and global job parameters.
+ */
+public class GlobalJobParametersMerger {
+
+	private GlobalJobParametersMerger() {}
+
+	/**
+	 * Merge global job parameters and table config parameters,
+	 * and set the merged result to GlobalJobParameters.
+	 */
+	public static void mergeParameters(ExecutionConfig executionConfig, TableConfig tableConfig) {
+		Configuration parameters = new Configuration();
+		parameters.addAll(tableConfig.getConfiguration());
 
 Review comment:
   This still mixes global job parameters with general configuration. According to FLIP-59, the job parameters should be under `pipeline.global-job-parameters`. CC @dawidwys 

----------------------------------------------------------------
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