Quote - events are sent to S4 with no key. The QuoteSplitterPE object (PE1) listens for Quote events that have no key.
QuoteSplitterPE is a keyless PE object that processes all Quote events.
For each unique word in a document, the QuoteSplitterPE object will assign a count and emit a new event of type WordEvent, keyed on word.
WordCountPE objects listen for WordEvent events emitted with key word. For example, the WordCountPE object for key word=“said” (PE2) receives all events of type WordEvent keyed on word=“said”.
When a WordEvent event for key word=“said” arrives, S4 looks up the WordCountPE object using the key word=“said”.
If the WordCountPE object exists, the PE object is called and the counter is incremented, otherwise a new WordCountPE object is instantiated.
Whenever a WordCountPE object increments its counter, it sends the updated count to a SortPE object. The key of the SortPE object is a random integer in [1, n], where n is the desired number ofSortPE objects.
Once a WordCountPE object chooses a sortID, it uses that sortID for the rest of its existence.
The purpose of using more than one SortPE object is to better distribute the load across several nodes and/or processors. For example, the WordCountPE object for key word=“said” sends an UpdatedCountEvent event to a SortPE object with key sortID=2 (PE5). Each SortPE object updates its top K list as UpdatedCountEvent events arrive. Periodically, each SortPE sends its partial top K lists to a single MergePE object (PE8), using an arbitrary agreed upon key, in this example topK=1234.
The MergePE object merges the partial lists and outputs the latest authoritative top K list.
ใบเสนอราคา - เหตุการณ์จะถูกส่งไป S4 กับคีย์ไม่ วัตถุ QuoteSplitterPE (PE1) ฟังสำหรับกิจกรรมใบเสนอราคาที่มีคีย์ไม่QuoteSplitterPE เป็นวัตถุ PE keyless ที่ประมวลเหตุการณ์ทั้งหมดที่เสนอราคา สำหรับแต่ละคำที่ไม่ซ้ำกันในเอกสาร วัตถุ QuoteSplitterPE จะกำหนดวิธีการนับ และปล่อยเหตุการณ์ใหม่ของชนิด WordEvent, keyed ในคำวัตถุ WordCountPE ฟังสำหรับเหตุการณ์ WordEvent ออกมา ด้วยคำ ตัวอย่าง วัตถุ WordCountPE สำหรับคำ = "กล่าวว่า" เหตุการณ์ทั้งหมดของชนิด WordEvent keyed ในคำรับ (PE2) = "กล่าวว่า" เมื่อเหตุการณ์ WordEvent สำหรับคำ = "กล่าวว่า" การมาถึง S4 ค้นหาวัตถุ WordCountPE ใช้คำคีย์ = "กล่าวว่า" ถ้ามีวัตถุ WordCountPE เรียกวัตถุ PE และเพิ่มตัวนับ หรือวัตถุ WordCountPE ใหม่จะสร้างอินสแตนซ์ เมื่อใดก็ ตามที่วัตถุ WordCountPE เพิ่มตัวนับของ มันส่งนับปรับปรุงวัตถุ SortPE คีย์ของวัตถุ SortPE เป็นจำนวนเต็มแบบสุ่มใน [1, n], โดยที่ n คือ วัตถุ ofSortPE หมายเลขที่ระบุ เมื่อวัตถุ WordCountPE เลือกแบบ sortID ซึ่งใช้ sortID นั้นสำหรับส่วนเหลือของการดำรงอยู่ของThe purpose of using more than one SortPE object is to better distribute the load across several nodes and/or processors. For example, the WordCountPE object for key word=“said” sends an UpdatedCountEvent event to a SortPE object with key sortID=2 (PE5). Each SortPE object updates its top K list as UpdatedCountEvent events arrive. Periodically, each SortPE sends its partial top K lists to a single MergePE object (PE8), using an arbitrary agreed upon key, in this example topK=1234. The MergePE object merges the partial lists and outputs the latest authoritative top K list.
การแปล กรุณารอสักครู่..
