Updated Partition doc and added note on Yarn deployment

Changed the note to a subsection of partitioning

resolves spring-cloud/spring-cloud-task#196
This commit is contained in:
Glenn Renfro
2016-08-26 15:15:34 -04:00
committed by Michael Minella
parent 025c447b89
commit 3c63196a47

View File

@@ -80,8 +80,10 @@ public PartitionHandler partitionHandler(TaskLauncher taskLauncher,
Map<String, String> environmentProperties = new HashMap<>();
environmentProperties.put("spring.profiles.active", "worker");
SimpleEnvironmentVariablesProvider environmentVariablesProvider = new SimpleEnvironmentVariablesProvider(this.environment);
environmentVariablesProvider.setEnvironmentProperties(environmentProperties);
partitionHandler.setEnvironmentVariablesProvider(environmentVariablesProvider);
partitionHandler.setEnvironmentProperties(environmentProperties);
partitionHandler.setMaxWorkers(2);
return partitionHandler;
@@ -107,6 +109,20 @@ public DeployerStepExecutionHandler stepExecutionHandler(JobExplorer jobExplorer
}
```
=== Notes on developing a batch partitioned app for the Yarn platform
* When deploying partitioned apps on the Yarn platform be sure use the following dependency for the
Spring Cloud Yarn Deployer:
```
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-deployer-yarn</artifactId>
</dependency>
```
* Also add the following property to your application.properties: `spring.yarn.container.keepContextAlive=false`.
* When setting up environment variables for the partitions in the PartitionHandler it is recommended that you do not
copy the current working environment properties.
[[batch-informational-messages]]
== Batch Informational Messages