Rui Fan created FLINK-34065:
-------------------------------

             Summary: Design AbstractAutoscalerStateStore to support serialize 
State to String
                 Key: FLINK-34065
                 URL: https://issues.apache.org/jira/browse/FLINK-34065
             Project: Flink
          Issue Type: Sub-task
          Components: Autoscaler
            Reporter: Rui Fan
            Assignee: Rui Fan


Some logic of {{KubernetesAutoScalerStateStore}} and 
{{JDBCAutoScalerStateStore}} are similar, we can share some common code.
 * {{ConfigMapStore}} and {{JDBCStore}} can be abstracted to 
{{StringStateStore}} interface

 ** They support {{{}put{}}}, {{get}} and {{remove}}
 ** The parameters of {{ConfigMapStore}} are the (JobContext, String key, 
String value).
 ** The parameters of {{JDBCStore}} are the (String jobKey, StateType 
stateType, String value).
 ** We can define a interface {{{}StringStateStore{}}}, and the parameters are 
{{{}(JobContext, StateType stateType, String value){}}}.
 * {{KubernetesAutoScalerStateStore}} and {{JDBCAutoScalerStateStore}} can be 
abstracted to {{AbstractAutoscalerStateStore}}

 ** They support serialize and compress {{Original State}} to String.
 ** {{AbstractAutoscalerStateStore}} can reuse the serialize and compress logic
 ** {{KubernetesAutoScalerStateStore}} support the limitation of stateValue
 ** We can define a parameter for {{{}AbstractAutoscalerStateStore{}}}, the 
limitation is disabled by default, and {{KubernetesAutoScalerStateStore}} can 
enable it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to