tencent cloud

文档反馈

Developing Jobs in Batches

最后更新时间: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.
    联系我们

    联系我们,为您的业务提供专属服务。

    技术支持

    如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

    7x24 电话支持