flume-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shangan Chen <chenshangan...@gmail.com>
Subject will memory channel lose data when stop flume?
Date Thu, 05 Dec 2013 03:47:04 GMT
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