部署属性
当任务定义启动到目标平台(local
、cloudFoundry
和 kubernetes
)时,您可以提供在启动时应用于任务应用程序的配置属性。例如,您可以指定
- 部署器属性 - 这些属性自定义任务的启动方式。
- 应用程序属性 - 这些是特定于应用程序的属性。
您可以通过选择以下链接之一来查看每个平台的部署属性
部署器属性
部署器属性是告诉 Spring Cloud Data Flow 的部署器如何启动应用程序的属性。它们的格式为 deployer.<应用程序名称>.property
。例如,如果您要启动到本地平台,并且希望将最大堆设置为 2048m,则需要设置以下部署器属性:deployer.timestamp.local.javaOpts=-Xmx2048m
。
应用程序属性
应用程序属性是由应用程序开发人员创建的,用于指定应用程序行为的属性。例如,时间戳应用程序允许您通过参数或属性设置时间戳的格式。应用程序属性的格式为 app.<应用程序名称>.<属性>
。因此,时间戳格式属性将是 app.timestamp.format=YYYY
。
如何设置这些属性
Make sure you have registered your timestamp application and have created a definition for it, as discussed in the Getting Started Guide.
So, by using the UI, we can launch the timestamp-task
by pressing the play
button (that's the middle icon that looks like an arrow head pointing right).
Doing so takes you to a form where you can add command line arguments and deployment parameters. As shown below:
YYYY
and use the javaOpts deployer property to set the max heap size.
First lets set the format of the timestamp. This is done by selecting the edit
button under the Applications Properties
The following dialog will appear:
YYYY
in the format
field and click the UPDATE
button.
Now select the edit
button under the Deployment Properties
.
The following dialog will appear:
-Xmx2048m
in the java-opts
field and click the UPDATE
button.
按下**启动任务**。这样做会在 Data Flow 服务器的任务平台上运行任务,并记录一个新的任务执行
。执行完成后,状态将变为绿色,并显示完成。
选择**执行**选项卡以查看此任务的执行摘要。