I have a SCDF local deployment where I want to deploy a custom docker-based sink. This sink internally consists of a java part that acts as translation wrapper between SCDF and another bit of nonjava code.
I need to be able to control
Looking at LocalAppDeployer
and DockerCommandBuilder
it seems I should be able to do (1) and (2) with something like
HashMap<String,String> params = new HashMap<>();
params.put(AppDeployer.COUNT_PROPERTY_KEY,2);
params.put(AppDeployer.GROUP_PROPERTY_KEY,"foo");
Stream.builder(scdf)
.name("mystream")
.definition("file|bar")
.create()
.deploy(props);
which I expect to give me 2 containers: foo-bar-1
and foo-bar-2
My question is how can I archive (3),(4) and (5)?
For any future searches:
TL;DR: use deployer.<appName>.local.docker.volume-mounts
and deployer.<appName>s.local.docker.port-mappings
e.g:
Map<String, String> properties = new HashMap<>();
properties.put(String.format("deployer.%s.local.docker.volume-mounts", "myApp"),"/tmp/foo:/bar");
properties.put(String.format("deployer.%s.local.docker.port-mappings", "myApp"),"9090:80");
Stream.builder(scdf).name("myStream").definition("time|log").create().deploy(properties)
See PR. Thank you to the SCDF team for their help