dawidwys commented on a change in pull request #8852:  
[FLINK-12798][table-api][table-planner] Add a proper discover mechanism that 
will  enable switching between Flink & Blink Planner/Executor
URL: https://github.com/apache/flink/pull/8852#discussion_r297194109
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/descriptors/PlannerDescriptor.java
 ##########
 @@ -0,0 +1,102 @@
+/*
+ * 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.descriptors;
+
+import org.apache.flink.annotation.VisibleForTesting;
+import org.apache.flink.table.delegation.Executor;
+import org.apache.flink.table.delegation.Planner;
+
+import javax.annotation.Nullable;
+
+import java.util.Map;
+
+/**
+ * Common class that defines necessary properties to choose and create both
+ * {@link Executor} and {@link Planner}.
+ */
+public class PlannerDescriptor {
+       public static final String BATCH_MODE = "batch-mode";
+       public static final String CLASS_NAME = "class-name";
+
+       private final DescriptorProperties commonProperties = new 
DescriptorProperties();
+       private final String plannerClass;
+       private final String executorClass;
+
+       @VisibleForTesting
+       private PlannerDescriptor(@Nullable String plannerClass, @Nullable 
String executorClass) {
+               this.plannerClass = plannerClass;
+               this.executorClass = executorClass;
+       }
+
+       /**
+        * Sets the legacy planner as the required module.
+        */
+       public static PlannerDescriptor legacy() {
 
 Review comment:
   I started with the approach you described. The problem with it is that we 
require that users now the class names of planner and executor, plus as you 
noticed they have to specify both. 
   
   With the `legacy()`/`blink()` approach they are preconfigured and user does 
not need to know about the underlying classes.

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


With regards,
Apache Git Services

Reply via email to