In a Spring-XD job module, how to write data to two files respectively at the same path in two servers where XD containers are running?

29 views Asked by At

My XD cluster has two node servers, so there're two XDadmins and two XDcontainers. When I launch the job in XD-shell through one Admin server, the job writes data to the file at one node. At the other node, no data is written. I want the job to write data to these two servers under the installation directory, such as /app/spring-xd-1.3.1.RELEASE/xd/files/. In the job, I use java.util.Properties class to write data to files.

// file is the path where I want to put the file
properties.store(new FileOutputStream(file), "update properties");

My job is like job create --name Generate_properties_to_file --definition "GenProperties --proFile=/app/spring-xd-1.3.1.RELEASE/xd/files/test.properties --otherparameters=''" --deploy

How could I modify the job module to implement the function?

0

There are 0 answers