public List<Container> filterContainers(ModuleDescriptor moduleDescriptor, Iterable<Container> availableContainers) {
		ModuleOptions options;
		ModuleOptionsMetadata optionsMetadata = moduleOptionsMetadataResolver.resolve(moduleDescriptor.getModuleDefinition());
		List<Container> containersForDeployment = Lists.newArrayList(availableContainers);
		try {
			options = optionsMetadata.interpolate(moduleDescriptor.getParameters());
			String name = (String) options.asPropertySource().getProperty(ModuleFactory.MODULE_EXECUTION_FRAMEWORK_KEY);
			if (SparkStreamingSupport.MODULE_EXECUTION_FRAMEWORK.equals(name)) {
				Iterable<ModuleMetadata> deployedModules = moduleMetadataRepository.findAll();
				List<ModuleMetadata> sparkModules = new ArrayList<ModuleMetadata>();
				for (ModuleMetadata moduleMetadata : deployedModules) {
					String moduleExecutionFramework =
							moduleMetadata.getModuleOptions().getProperty(ModuleFactory.MODULE_EXECUTION_FRAMEWORK_KEY);
					if (moduleExecutionFramework != null &&
							(moduleExecutionFramework.equals(SparkStreamingSupport.MODULE_EXECUTION_FRAMEWORK))) {
						sparkModules.add(moduleMetadata);
					}
				}
				for (Container container : availableContainers) {
					for (ModuleMetadata sparkModule : sparkModules) {
						if (sparkModule.getContainerId().equals(container.getName())) {
							containersForDeployment.remove(container);
						}
					}
				}
			}
		}
		catch (BindException be) {
			throw new RuntimeException(be);
		}
		return containersForDeployment;
	}
Return the list of containers that can deploy this module. If the underlying module is a spark streaming
module then make sure the list doesn't have a container that has a spark streaming module already deployed.

@param moduleDescriptor the module descriptor
@param availableContainers the matched containers
@return the list of eligible containers for this module deployment.
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/spark/SparkStreamingContainerFilter.java