Ich finde, dass in meiner Topologie ein unausgewogener Datenfluss vorliegt. Die Menge an Daten, die von einem Strom empfangen werden, ist viel geringer als die einer anderen Schraube, die Daten von demselben Strom empfängt. Hier ist meine Topologie:Unsymmetrische Daten in Storm empfangen
// Create 3 spouts for APMM APCC APSM respectively
builder.setSpout(GlobalStorm.SPOUT_APMM, new UniversalApSpout(GlobalStorm.APMM));
builder.setSpout(GlobalStorm.SPOUT_APCC, new UniversalApSpout(GlobalStorm.APCC));
builder.setSpout(GlobalStorm.SPOUT_APSM, new UniversalApSpout(GlobalStorm.APSM));
// Create moving point bolt connecting three streams above
builder.setBolt(GlobalStorm.MovingPointMapBolt, new MovingPointMapBolt(), 9)
.shuffleGrouping(GlobalStorm.SPOUT_APMM, GlobalStorm.STREAM_MM)
.shuffleGrouping(GlobalStorm.SPOUT_APCC, GlobalStorm.STREAM_CC)
.shuffleGrouping(GlobalStorm.SPOUT_APSM, GlobalStorm.STREAM_SM);
// Real time bolt connecting APMM only
builder.setBolt(GlobalStorm.RealTimeBolt, new RealTimeBolt(), 9).
shuffleGrouping(GlobalStorm.SPOUT_APMM, GlobalStorm.STREAM_MM);
// Redis bolt that saving data from moving point bolt and real time bolt together.
builder.setBolt(GlobalStorm.RedisStoreBolt, new RedisStoreBolt(), 9)
.shuffleGrouping(GlobalStorm.MovingPointMapBolt, GlobalStorm.STREAM_MOVING_POINT)
.shuffleGrouping(GlobalStorm.RealTimeBolt, GlobalStorm.STREAM_REAL_TIME);
Und hier ist Sturm UI Daten Statistik: SpoutApcc, SpoutApmm, SpoutApsm emittieren STREAM_APCC, STREAM_APMM, STREAM_APSM sind. RealTimeBolt ruft nur Daten von STREAM_APMM ab und MovingPointMapBolt ruft Daten aus allen drei Streams ab.
Wenn alles korrekt ist, sollte der ausgeführte Betrag von RealTimeBolt der ausgegebenen Menge von SpoutAPMM entsprechen (oder die Hälfte der übertragenen Menge davon). Auch wenn das Problem mit der Maschinenleistung auftritt, sollte der Anteil der Ausführungsanzahl zwischen MovingPointMapBolt und RealtimeBolt dem Anteil der Datenmenge von drei Streams entsprechen.
Die Anzahl der ausgeführten Nachrichten von realtimebolt ist jedoch viel kleiner als die von MovingpointmapBolt, was nur weniger als 1% davon ist.
Was ist der Grund für dieses Problem?