youyangkou commented on PR #1839:
URL: 
https://github.com/apache/incubator-streampark/pull/1839#issuecomment-1288139811

   > hi youyang:
   > 
   > Thank you for your contribution! the bug does exist, and your current 
commit fixed it, but the code can be further improved:
   > 
   > 1. delete 163 lines of code in FlinkSubmitTrait:
   >    `.setSavepointRestoreSettings(submitRequest.savepointRestoreSettings)`
   > 2. `savepointRestoreSettings` need  improvement
   > 
   > before:
   > 
   > ```
   >   lazy val savepointRestoreSettings: SavepointRestoreSettings = {
   >     lazy val allowNonRestoredState = 
Try(extraParameter.get(SavepointConfigOptions.SAVEPOINT_IGNORE_UNCLAIMED_STATE.key).toString.toBoolean).getOrElse(false)
   >     savePoint match {
   >       case sp if Try(sp.isEmpty).getOrElse(true) => 
SavepointRestoreSettings.none
   >       case sp => SavepointRestoreSettings.forPath(sp, 
allowNonRestoredState)
   >     }
   >   }
   > ```
   > 
   > after:
   > 
   > ```
   >   lazy val allowNonRestoredState = 
Try(extraParameter.get(SavepointConfigOptions.SAVEPOINT_IGNORE_UNCLAIMED_STATE.key).toString.toBoolean).getOrElse(false)
   > ```
   > 
   > 3. add code line 101 in FlinkSubmitTrait:
   > 
   > ```
   > .safeSet(SavepointConfigOptions.SAVEPOINT_IGNORE_UNCLAIMED_STATE, 
submitRequest.allowNonRestoredState)
   > ```
   
   Thanks for your review, addressed.


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