tencent cloud

Feedback

Developing Jobs in Batches

Last updated: 2023-11-08 10:09:02
    Stream Compute Service supports development of batch jobs of the following types: JAR and Python.

    JAR job

    The following example shows how to configure the batch job execution mode in the JAR job code.
    StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
    env.setRuntimeMode(RuntimeExecutionMode.BATCH);
    1. Change RuntimeExecutionMode.STREAMING to RuntimeExecutionMode.BATCH in a streaming job.
    2. Package the modified job into a .jar file and upload it to Dependencies in the platform.
    3. Use the uploaded .jar file to complete the development of the JAR batch job in the platform.

    Python job

    The following example shows how to configure the batch job execution mode in the Python job code.
    env_settings = EnvironmentSettings.new_instance().in_batch_mode().use_blink_planner().build()
    table_env = TableEnvironment.create(env_settings)
    1. Change EnvironmentSettings.new_instance().in_streaming_mode() to EnvironmentSettings.new_instance().in_batch_mode() in a streaming job. For details, see Intro to the Python Table API.
    2. Package the modified job into a .py file and upload it to Dependencies in the platform.
    3. Use the uploaded .py file to complete the development of the Python batch job in the platform.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support