{"id":186436,"date":"2013-07-12T17:46:05","date_gmt":"2013-07-12T13:46:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=186436"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=186436","title":{"rendered":"<span class=\"post_title\">\u0418\u0437\u0443\u0447\u0430\u0435\u043c Storm Framework. \u0427\u0430\u0441\u0442\u044c II<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412 <a href=\"http:\/\/habrahabr.ru\/post\/186208\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f Storm.<\/p>\n<p>  \u0420\u0430\u0437\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0437\u0430\u0434\u0430\u0447 \u043f\u0440\u0435\u0434\u044a\u044f\u0432\u043b\u044f\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438. \u041e\u0434\u043d\u043e \u0434\u0435\u043b\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043f\u0440\u0438 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u0439, \u0433\u0434\u0435 \u0441\u0447\u0435\u0442 \u0438\u0434\u0435\u0442 \u043d\u0430 \u0441\u043e\u0442\u043d\u0438 \u0442\u044b\u0441\u044f\u0447 \u0438 \u043e\u0441\u043e\u0431\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u0430. \u0418 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0435 \u2014 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432 Storm. <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<p>  <\/p>\n<h4>Spout<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0435 \u0432\u0430\u0436\u043d\u043e \u0431\u044b\u043b\u0438 \u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 Tuple, \u0442\u043e Spout \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 Tuple \u0432 SpoutOutputCollector \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/storm\/CdrSpout.java#L45\">emit(new Values(&#8230;))<\/a>. <\/p>\n<p>  E\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0443\u0437\u043d\u0430\u0442\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0441\u044f Tuple, \u0442\u043e \u0432\u044b\u0437\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a emit(new Values(&#8230;), msgId), \u0433\u0434\u0435 msgId \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/spout\/ISpout.html\">ISpout<\/a> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u0442\u043e\u0434\u044b:  <\/p>\n<ul>\n<li><a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/spout\/ISpout.html#ack(java.lang.Object)\">ack(Object msgId)<\/a> \u2014 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d \u0435\u0441\u043b\u0438 Tuple \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d<\/li>\n<li><a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/spout\/ISpout.html#fail(java.lang.Object)\">fail(Object msgId)<\/a> \u2014 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d \u0435\u0441\u043b\u0438 Tuple \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d<\/li>\n<\/ul>\n<p>\u0433\u0434\u0435 msgId \u2014 \u044d\u0442\u043e msgId \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u044b\u043b \u0432\u044b\u0437\u0432\u0430\u043d <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/spout\/SpoutOutputCollector.html#emit(java.util.List, java.lang.Object)\">SpoutOutputCollector.emit<\/a>.<br \/>  \u041f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/faults\/FailAwareSpout.java\">FailAwareSpout<\/a>:  <\/p>\n<pre><code class=\"java\">public class FailAwareSpout extends BaseRichSpout { private Message[] messages; \/\/ Skipped ...     private static class Message implements Serializable {         private String message;         private int failCount;          private Message(String message) {             this.message = message;         }     } \/\/ Skipped ...     @Override     public void nextTuple() { \/\/ Skipped ... \/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c Tuple c msgId         outputCollector.emit(new Values(messages[messageId].message), messageId);     }  \/\/ Tuple \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e     @Override     public void ack(Object msgId) {         Message m = messages[(Integer) msgId];          System.out.println(&quot;IN&gt;&gt; [&quot; + Thread.currentThread().getId() + &quot;] message &quot; +                 m.message + &quot; processed successfully&quot;);     }  \/\/ Tuple \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d     @Override     public void fail(Object msgId) {         Message m = messages[(Integer) msgId];         if(++m.failCount &gt; MAX_RETRY_COUNT) {             throw new IllegalStateException(&quot;Too many message processing errors&quot;);         }         System.out.println(&quot;IN&gt;&gt; [&quot; + Thread.currentThread().getId() + &quot;] message &quot; +                 m.message + &quot; processing failed &quot; + &quot;[&quot; + m.failCount + &quot;]&quot;); \/\/ \u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443         sendQueue.addLast((Integer) msgId);     } } <\/code><\/pre>\n<p>  <i>\u041c\u0435\u0442\u043e\u0434\u044b nextTuple, ack \u0438 fail, \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043f\u043e\u043b\u044f\u043c Spout.<\/i><\/p>\n<h4>Bolt<\/h4>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0431\u044b Bolt \u043c\u043e\u0433 \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c Storm \u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/topology\/IRichBolt.html\">IRichBolt<\/a>. \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0432 \u043a\u043b\u0430\u0441\u0441 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/topology\/base\/BaseRichBolt.html\">BaseRichBolt<\/a>.<br \/>  Bolt \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 Storm o \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430 OutputCollector \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/task\/IBolt.html#execute(backtype.storm.tuple.Tuple)\">execute(Tuple)<\/a>:  <\/p>\n<ul>\n<li><a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/task\/OutputCollector.html#ack(backtype.storm.tuple.Tuple)\">ack(Tuple)<\/a> \u2014 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e<\/li>\n<li><a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/task\/OutputCollector.html#fail(backtype.storm.tuple.Tuple)\">fail(Tuple)<\/a> \u2014 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439<\/li>\n<\/ul>\n<p> \u041f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/faults\/FailingBolt.java\">FailingBolt<\/a>:  <\/p>\n<pre><code class=\"java\">public class FailingBolt extends BaseRichBolt {     OutputCollector outputCollector; \/\/ Skipped ...     @Override     public void execute(Tuple tuple) { \/\/ Skipped ...             outputCollector.ack(tuple); \/\/ \u0414\u0430\u043d\u043d\u044b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b         }         else { \/\/ Skipped ...             outputCollector.fail(tuple); \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439         }     } \/\/ Skipped ... }  <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/BasicFailApp.java\">BasicFailApp<\/a>, Spout <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/faults\/FailAwareSpout.java\">FailAwareSpout<\/a> \u0438 Bolt <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/faults\/FailingBolt.java\">FailingBolt<\/a> \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>  \u0412 Bolt&#8217;\u0430\u0445 \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/topology\/base\/BaseBasicBolt.html\">BaseBasicBolt<\/a>, <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/task\/OutputCollector.html#ack(backtype.storm.tuple.Tuple)\">ack(Tuple)<\/a> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/topology\/IBasicBolt.html#execute(backtype.storm.tuple.Tuple, backtype.storm.topology.BasicOutputCollector)\">execute<\/a> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<h2>Anchoring<\/h2>\n<p>  \u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e Tuple, Bolt \u043c\u043e\u0436\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e Tuple. \u0415\u0441\u043b\u0438 Bolt \u0432\u044b\u0437\u0432\u0430\u043b <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/task\/OutputCollector.html#emit(java.util.Collection, java.util.List)\">emit(sourceTuple, resultTuple)<\/a> \u0442\u043e \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%9D%D0%B0%D0%BF%D1%80%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9_%D0%B0%D1%86%D0%B8%D0%BA%D0%BB%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9_%D0%B3%D1%80%D0%B0%D1%84\">DAG<\/a> \u0441 \u0432\u0435\u0440\u0448\u0438\u043d\u043e\u0439 \u0432 \u0432\u0438\u0434\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e Tuple \u0438 \u043f\u043e\u0442\u043e\u043c\u043a\u0430\u043c\u0438 \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u0440\u043e\u0436\u0434\u0435\u043d\u043d\u044b\u0445 Tuple. Storm \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432 \u0433\u0440\u0430\u0444\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438, Spout, \u043f\u043e\u0440\u043e\u0434\u0438\u0432\u0448\u0438\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 Tuple, \u0431\u0443\u0434\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d \u0432\u044b\u0437\u043e\u0432\u043e\u043c fail. \u041f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/faults\/MultiplierBolt.java\">MultiplierBolt<\/a>:  <\/p>\n<pre><code class=\"java\">public class MultiplierBolt extends BaseRichBolt { \/\/ Skipped ...     @Override     public void execute(Tuple tuple) { \/\/ \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e  \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 Tuple \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e         for(int i = 0; i &lt; MULTI_COUNT; ++i) { \/\/ Anchoring, \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 Tuple \u043a \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u043c\u0443              outputCollector.emit(tuple, new Values(tuple.getString(0) + &quot; - &quot; + i));         }         outputCollector.ack(tuple);     } \/\/ Skipped ... } <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Anchoring: <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/TreeFailApp.java\">TreeFailApp<\/a><\/p>\n<p>  \u0412 Bolt&#8217;\u0430\u0445 \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/topology\/base\/BaseBasicBolt.html\">BaseBasicBolt<\/a> \u043c\u0435\u0442\u043e\u0434 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/topology\/IBasicBolt.html#execute(backtype.storm.tuple.Tuple, backtype.storm.topology.BasicOutputCollector)\">execute(Tuple, BasicOutputCollector)<\/a> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u043e\u043c <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/topology\/BasicOutputCollector.html\">BasicOutputCollector<\/a>. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c BasicOutputCollector \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 Anchor \u043d\u0430 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 Tuple \u043f\u0440\u0438 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/topology\/BasicOutputCollector.html#emit(java.util.List)\">emit<\/a>.<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Storm \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439, Tuple \u043c\u043e\u0433\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c Storm \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0432\u0435\u0441\u044c \u0433\u0440\u0430\u0444 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0437\u0430 30 \u0441\u0435\u043a\u0443\u043d\u0434, \u0438\u043b\u0438 Storm \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 fail \u0443 \u043f\u043e\u0440\u043e\u0434\u0438\u0432\u0448\u0435\u0433\u043e \u0433\u0440\u0430\u0444 Spout&#8217;\u0430. \u0422\u0430\u0439\u043c\u0430\u0443\u0442 \u043c\u043e\u0436\u043d\u043e <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/backtype\/storm\/Config.html#TOPOLOGY_MESSAGE_TIMEOUT_SECS\">\u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c<\/a>.<\/p>\n<p>  \u041a\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/scanban\/stormex\">GitHub<\/a>.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 Transactional Topologies, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445\u0441\u044f \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.       \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/186436\/\"> http:\/\/habrahabr.ru\/post\/186436\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412 <a href=\"http:\/\/habrahabr.ru\/post\/186208\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f Storm.<\/p>\n<p>  \u0420\u0430\u0437\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0437\u0430\u0434\u0430\u0447 \u043f\u0440\u0435\u0434\u044a\u044f\u0432\u043b\u044f\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438. \u041e\u0434\u043d\u043e \u0434\u0435\u043b\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043f\u0440\u0438 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u0439, \u0433\u0434\u0435 \u0441\u0447\u0435\u0442 \u0438\u0434\u0435\u0442 \u043d\u0430 \u0441\u043e\u0442\u043d\u0438 \u0442\u044b\u0441\u044f\u0447 \u0438 \u043e\u0441\u043e\u0431\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u0430. \u0418 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0435 \u2014 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432 Storm.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-186436","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/186436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=186436"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/186436\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}