Port the flume kestrel code for flume ng version 1.4.0