<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Trident Spouts ## Trident spouts 像在 vanilla Storm API 中, spouts 是 Trident topology 中的 source of streams (streams 的來源). 在 vanilla Storm spouts 之上, Trident 為更復雜的 spouts 提供了額外的 API . 您的 how you source your data streams (數據流的來源)和 how you update state (e.g. databases) based on those data streams (基于這些數據流更新狀態(例如數據庫))之間存在著一個不可分割的聯系. 請參閱 [Trident state doc](Trident-state.html) , 以了解此信息 - 了解此聯系對于了解可用的 spout 選項是至關重要的. Regular Storm spouts 將是 Trident topology 中的 non-transactional spouts . 要使用 regular Storm IRichSpout, 請在 TridentTopology 中創建如下 stream : ``` TridentTopology topology = new TridentTopology(); topology.newStream("myspoutid", new MyRichSpout()); ``` Trident topology 中的所有 spouts 都需要為該流提供 unique identifier (唯一的標識符) - 該 identifier 在集群上運行的所有 topologies 中必須是唯一的. Trident 將使用此 identifier 來存儲 Zookeeper 中 spout 消耗的 metadata (元數據), 包括 txid 和與 spout 相關聯的任何 metadata (元數據). 您可以通過以下配置選項配置 spout metadata 的 Zookeeper 存儲: 1. `transactional.zookeeper.servers`: Zookeeper hostnames 列表 2. `transactional.zookeeper.port`: Zookeeper 集群的端口 3. `transactional.zookeeper.root`: Zookeeper 中存儲 Metadata 的根目錄. Metadata 將存儲在路徑 &lt;root path=""&gt;/&lt;/root&gt; ## Pipelining 默認情況下, Trident 一次處理 single batch (一個批次), 等待批次成功或失敗, 然后再嘗試處理 another batch (另一批次). 您可以通過 pipelining the batches 獲得 significantly higher throughput (明顯更高的吞吐量)并降低每個 batch (批處理)的延遲. 您可以使用 "topology.max.spout.pending" 屬性同時處理要處理的 maximum amount of batches (最大批處理量). 即使在同時處理 multiple batches (多個批次)的同時, Trident 也會在 topology 中將任何 state updates 按照 batches 的順序排序. 例如, 假設您正在對數據庫進行全局計數聚合. 這個想法是, 當您更新數據庫中 batch 1 的計數時, 您仍然可以計算 batch 2 到 10 的部分計數. Trident 將不會移動到 batch 2 的 state updates (狀態更新), 直到狀態更新為 batch 1 已成功. 這對于實現 exactly-once (一次且僅一次)處理語義非常重要, 如 [Trident state doc](Trident-state.html) 中的大綱. ## Trident spout types 以下是可用的以下 spout API: 1. [ITridentSpout](http://github.com/apache/storm/blob/master%0A/storm-core/src/jvm/org/apache/storm/trident/spout/ITridentSpout.java): 最通用的 API , 可以支持 transactional 或 opaque transactional semantics (語義). 一般來說, 您將直接使用此 API 的一種 partitioned (分區)風格, 而不是使用此 API . 2. [IBatchSpout](http://github.com/apache/storm/blob/master%0A/storm-core/src/jvm/org/apache/storm/trident/spout/IBatchSpout.java): 一次發送 batches of tuples 的 non-transactional spout . 3. [IPartitionedTridentSpout](http://github.com/apache/storm/blob/master%0A/storm-core/src/jvm/org/apache/storm/trident/spout/IPartitionedTridentSpout.java): 從 partitioned data source (分區數據源)讀取的 transactional spout (像 Kafka 服務器集群) 4. [IOpaquePartitionedTridentSpout](http://github.com/apache/storm/blob/master%0A/storm-core/src/jvm/org/apache/storm/trident/spout/IOpaquePartitionedTridentSpout.java): 一個從 partitioned data source (分區數據源)讀取的 opaque transactional spout . 而且, 像本教程開頭所提到的, 你也可以使用常規的 IRichSpout .
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看