Hello!
   I'm using the storm version 0.9.2 incubating. I have a CSV file is
initialized in the prepare  method
of a BaseBasicBolt
 prepare() {
   csvWriter = new CSVWriter(new BufferedWriter(new FileWriter("myFile")));
 }
and I would like to close it when I kill the topology

public void cleanup() {
   csvWriter.close()
}

I have observed that when I was shutting down the Local cluster by calling
the LocalCluster shutdown method, the cleanup method was called. But, when
I kill the topology the cleanup method is not called anymore.
  Can you please advice on how to properly close the resources when killing
the topology?

I look forward for your answers.
  Regards,
 Florin

Reply via email to