public static void main(String[] args) throws Exception{ StormExecutionEnvironment env = ExecutionEnvironments.getStorm(args); env.fromSpout(new KafkaSourcedSpoutProvider()).withOutputFields(1).nameAs("kafkaMsgConsumer") .alertWithConsumer("hdfsSecurityLogEventStream", "hdfsSecurityLogAlertExecutor"); env.execute(); } }
public static void main(String[] args) throws Exception{ StormExecutionEnvironment env = ExecutionEnvironments.getStorm(args); Config config = env.getConfig(); KafkaSourcedSpoutProvider provider = new KafkaSourcedSpoutProvider(); GCLogAnalysorExecutor logAnalysor = new GCLogAnalysorExecutor(); env.fromSpout(provider.getSpout(config)).withOutputFields(1).nameAs("kafkaMsgConsumer") .flatMap(logAnalysor) .flatMap(new GCMetricGeneratorExecutor()) .alertWithConsumer("NNGCLogStream", "NNGCAlert"); env.execute(); } }
public static void main(String[] args) throws Exception{ StormExecutionEnvironment env = ExecutionEnvironments.getStorm(args); String spoutName = "msgConsumer"; int parallelism = env.getConfig().getInt("envContextConfig.parallelismConfig." + spoutName); env.fromSpout(new HiveJobRunningSourcedStormSpoutProvider().getSpout(env.getConfig(), parallelism)) .withOutputFields(4).nameAs(spoutName).groupBy(Arrays.asList(0)) .flatMap(new JobConfigurationAdaptorExecutor()).groupBy(Arrays.asList(0)) .flatMap(new HiveQueryParserExecutor()).groupBy(Arrays.asList(0)) .flatMap(new HiveResourceSensitivityDataJoinExecutor()) .alertWithConsumer("hiveAccessLogStream", "hiveAccessAlertByRunningJob"); env.execute(); } }
@Override public void submit(String application, Config config) { //Config baseConfig = ConfigFactory.load(); //config = (config != null) ? config.withFallback(baseConfig): baseConfig; StormExecutionEnvironment env = ExecutionEnvironments.getStorm(config); env.fromSpout(new KafkaSourcedSpoutProvider()).withOutputFields(1).nameAs("kafkaMsgConsumer") .flatMap(new HbaseResourceSensitivityDataJoinExecutor()) .alertWithConsumer("hbaseSecurityLogEventStream", "hbaseSecurityLogAlertExecutor"); env.execute(); } }
@Override public void submit(String topology, Config config) { StormExecutionEnvironment env = ExecutionEnvironments.getStorm(config); String spoutName = "msgConsumer"; int parallelism = env.getConfig().getInt("envContextConfig.parallelismConfig." + spoutName); env.fromSpout(new HiveJobRunningSourcedStormSpoutProvider().getSpout(env.getConfig(), parallelism)) .withOutputFields(4).nameAs(spoutName).groupBy(Arrays.asList(0)) .flatMap(new JobConfigurationAdaptorExecutor()).groupBy(Arrays.asList(0)) .flatMap(new HiveQueryParserExecutor()).groupBy(Arrays.asList(0)) .flatMap(new HiveResourceSensitivityDataJoinExecutor()) .alertWithConsumer("hiveAccessLogStream", "hiveAccessAlertByRunningJob"); env.execute(); } }
public static void main(String[] args) throws Exception { StormExecutionEnvironment env = ExecutionEnvironments.getStorm(args); env.fromSpout(new KafkaSourcedSpoutProvider()).withOutputFields(1).nameAs("kafkaMsgConsumer") .flatMap(new OozieResourceSensitivityDataJoinExecutor()) .alertWithConsumer("oozieSecurityLogEventStream", "oozieAuditLogAlertExecutor"); env.execute(); } }
public static void main(String[] args) throws Exception { StormExecutionEnvironment env = ExecutionEnvironments.getStorm(args); Config config = env.getConfig(); String deserClsName = config.getString("dataSourceConfig.deserializerClass"); final KafkaSourcedSpoutScheme scheme = new KafkaSourcedSpoutScheme(deserClsName, config) { env.fromSpout(new KafkaOffsetSourceSpoutProvider()).withOutputFields(0).nameAs("kafkaLogLagChecker"); env.fromSpout(kafkaMessageSpoutProvider).withOutputFields(2).nameAs("kafkaMessageFetcher").groupBy(Arrays.asList(0)) .flatMap(new KafkaMessageDistributionExecutor()); env.execute();
public static void main(String[] args) throws Exception{ StormExecutionEnvironment env = ExecutionEnvironments.getStorm(args); env.fromSpout(new KafkaSourcedSpoutProvider()).withOutputFields(1).nameAs("kafkaMsgConsumer") .flatMap(new HbaseResourceSensitivityDataJoinExecutor()) .alertWithConsumer("hbaseSecurityLogEventStream", "hbaseSecurityLogAlertExecutor"); env.execute(); } }