You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "zhaoyang20201221 (via GitHub)" <gi...@apache.org> on 2023/04/23 06:22:38 UTC

[GitHub] [incubator-streampark] zhaoyang20201221 commented on issue #2678: Support third parties to quickly initiate flink tasks

zhaoyang20201221 commented on issue #2678:
URL: https://github.com/apache/incubator-streampark/issues/2678#issuecomment-1518960492

   `
       /**
        * @param copyId          The id of the copy task
        * @param configuration  The configuration object that needs to change the task
        * @return
        */
     public Boolean quickStartFlinkTask(String copyId,Application configuration){
   
        
         // First copy a configuration template and get the task id
         Long id = applicationService.copy(copyId);
   
        
         // Obtain task object information task
         Application application = applicationService.getApp(id);
   
        
         // Set user-defined task configuration
         application.set(configuration);
   
         
         // Check whether the task configuration is reasonable
         check(application);
   
         
         // Submit an update to this task
         applicationService.update(application);
   
         // build flink task
         applicationService.checkBuildAndUpdate(application);
   
         // start flink task
         applicationService.start(application);
     }`
   


-- 
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: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org