flume-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hari Shreedharan <hshreedha...@cloudera.com>
Subject Re: will memory channel lose data when stop flume?
Date Thu, 05 Dec 2013 07:15:15 GMT
Memory Channel will lose the data in memory if the application restarts. If the config is changed
and the channel is restarted the data will still be available.

Thanks,
Hari


On Wednesday, December 4, 2013 at 7:47 PM, Shangan Chen wrote:

> When I check the code in Application, I found the stop logic doesn't guarantee the memory
channel is drained out. It seems to stop component randomly as components are stored in a
map. So events in memory channel might be lost when stopping flume. This can also happen in
reload mode. Am I right ? 
>    
>    Runtime.getRuntime().addShutdownHook(new Thread("agent-shutdown-hook") {
>         @Override
>         public void run() {
>           appReference.stop();
>         }
>       });
> 
>   public synchronized void stop() {
>     supervisor.stop();
>     if(monitorServer != null) {
>       monitorServer.stop();
>     }
> 
>   }
> 
> -- 
> have a good day! 
> chenshang'an
> 


Mime
View raw message