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
|