解决修改序列化方式之后产生的null值问题

This commit is contained in:
wangkuan
2024-08-09 18:23:27 +08:00
parent 2d0dcf89e3
commit c08b94fec2
6 changed files with 25 additions and 19 deletions

View File

@@ -45,7 +45,7 @@ public class MetricsCalculate extends ProcessWindowFunction<
dosSketchLog.setSession_rate(dosSketchLog.getSessions()/ (duration/1000) );
dosSketchLog.setPacket_rate(dosSketchLog.getPkts()/(duration/1000));
dosSketchLog.setBit_rate(dosSketchLog.getBytes()*8/(duration/1000));
dosSketchLog.setAttack_type(attackTypeMapping.getOrDefault(dosSketchLog.getDecoded_as(),""));
dosSketchLog.setAttack_type(attackTypeMapping.get(dosSketchLog.getDecoded_as()));
}catch (RuntimeException e){
logger.error(e.toString());
}