1996fanrui commented on code in PR #765:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/765#discussion_r1490275258


##########
flink-autoscaler-standalone/src/main/java/org/apache/flink/autoscaler/standalone/config/AutoscalerStandaloneOptions.java:
##########
@@ -109,4 +110,51 @@ private static ConfigOptions.OptionBuilder 
autoscalerStandaloneConfig(String key
                                                     + "export the password 
using this environment variable.",
                                             code(STATE_STORE_TYPE.key()), 
code(JDBC.toString()))
                                     .build());
+
+    public static final ConfigOption<EventHandlerType> EVENT_HANDLER_TYPE =
+            autoscalerStandaloneConfig("event-handler.type")
+                    .enumType(EventHandlerType.class)
+                    .defaultValue(EventHandlerType.LOGGING)
+                    .withDescription("The autoscaler event handler type.");

Review Comment:
   We can configure them separately.
   
   ```
   --autoscaler.standalone.state-store.type jdbc \
   --autoscaler.standalone.event-handler.type jdbc \
   ```
   
   After users choose JDBC for them, we can reuse all jdbc related options, 
such as:
   
   ```
   autoscaler.standalone.jdbc.username
   autoscaler.standalone.jdbc.url
   ```
   
   Here is an whole example(This example is from the doc):
   
   ```
   JDBC_DRIVER_JAR=./mysql-connector-java-8.0.30.jar
   # export the password of jdbc state store & jdbc event handler
   export JDBC_PWD=123456
   
   java -cp flink-autoscaler-standalone-{{< version >}}.jar:${JDBC_DRIVER_JAR} \
   org.apache.flink.autoscaler.standalone.StandaloneAutoscalerEntrypoint \
   --autoscaler.standalone.fetcher.flink-cluster.host localhost \
   --autoscaler.standalone.fetcher.flink-cluster.port 8081 \
   --autoscaler.standalone.state-store.type jdbc \
   --autoscaler.standalone.event-handler.type jdbc \
   --autoscaler.standalone.jdbc.url 
jdbc:mysql://localhost:3306/flink_autoscaler \
   --autoscaler.standalone.jdbc.username root
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to