I have created a simple program to read from file and generate a file.Its working perfectly.I am worrying about how to make it real time topology.I want if i modify source file means added a new record it should come in my target file how i will do it without redeploying my topology on cluster.What else i need to configure to achieve this behavior.Below is code of submitting topology locally:-
Config conf= new Config();
conf.setDebug(false);
conf.put(Config.TOPOLOGY_MAX_SPOUT_PENDING,1);
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout("file-reader",new FileReaderSpout(args[0]));
builder.setBolt("file-writer",new WriteToFileBolt(args[0])).shuffleGrouping("file-reader");
LocalCluster cluster= new LocalCluster();
cluster.submitTopology("File-To-File",conf,builder.createTopology());
Thread.sleep(10000);
cluster.shutdown();