Example #1
0
 private FlumeNodeManager()
 {
     nodes = BuildNodes(FlumeConfig.Instance.Collectors);
     sourceCollectorPair = BuildSourceCollectorPair(FlumeConfig.Instance.Sources);
     rand = new Random((int) DateTime.Now.Ticks);
     FlumeConfig.ConfigChanged += FlumeConfig_Changed;
     config = FlumeConfig.Instance;
 }
Example #2
0
 private void FlumeConfig_Changed(object sender, EventArgs e)
 {
     var elasticSearchConfig = sender as FlumeConfig;
     if (elasticSearchConfig != null)
     {
     //				logger.Info("Flume config reloading");
         config = elasticSearchConfig;
         sourceCollectorPair = BuildSourceCollectorPair(FlumeConfig.Instance.Sources);
         nodes = BuildNodes(config.Collectors);
     //				logger.Info("Flume config reloaded");
     }
     else
     {
     //				logger.Error("Attempt to reload with null flume config");
     }
 }