Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Spring Yarn Multi Context Example

This example demonstrates the use of Spring Yarn functionality to launch a simple application with multiple containers.

To test this example:

	# gradlew clean :yarn-examples-common:yarn-examples-multi-context:build

To run this example against local Hadoop cluster:

	# gradlew -q run-yarn-examples-multi-context

To run this example against remote Hadoop cluster:

	# gradlew -q run-yarn-examples-multi-context -Dhd.fs=hdfs:// -Dhd.rm= -Dlocalresources.remote=hdfs://


This example demonstrates how a simple custom container can be created. Example launches 4 containers and each container will simply log "Hello from MultiContextContainer" and exit.

Quick Instructions

This quick command set assumes local hadoop cluster with default settings.

	# gradlew :yarn-examples-common:yarn-examples-multi-context:build -x test
	# hdfs dfs -rm -R /app /lib
	# hdfs dfs -mkdir -p /app/multi-context /lib
	# hdfs dfs -copyFromLocal yarn/multi-context/build/libs/* /app/multi-context
	# hdfs dfs -copyFromLocal yarn/multi-context/build/dependency-libs/* /lib
	# gradlew -q run-yarn-examples-multi-context