{"id":186634,"date":"2013-07-15T17:45:03","date_gmt":"2013-07-15T13:45:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=186634"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=186634","title":{"rendered":"<span class=\"post_title\">\u0418\u0437\u0443\u0447\u0430\u0435\u043c Storm Framework. \u0427\u0430\u0441\u0442\u044c III<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412\u043e <a href=\"http:\/\/habrahabr.ru\/post\/186436\/\">\u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0441\u0442\u0430\u0442\u044c\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430\u0445 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438. <\/p>\n<p>  \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, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435? \u0412\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u0430 \u0441\u0432\u044f\u0437\u044c \u0441 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043d\u0435\u043b\u044c\u0437\u044f \u0441 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438\u0441\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0430 \u043a\u0430\u043a\u0438\u0435 \u2014 \u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b (<a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%98%D0%B4%D0%B5%D0%BC%D0%BF%D0%BE%D1%82%D0%B5%D0%BD%D1%82%D0%BD%D0%BE%D1%81%D1%82%D1%8C\">\u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u044b<\/a>), \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0444\u043b\u0430\u0433\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 Storm.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041a\u043e\u0433\u0434\u0430 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439, \u0442\u0443\u0442 \u0436\u0435 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u0435\u0442 \u0442\u0435\u0440\u043c\u0438\u043d <a href=\"http:\/\/ru.wikipedia.org\/wiki\/ACID\">ACID<\/a>:  <\/p>\n<ul>\n<li><b>A<\/b>tomicity (\u0430\u0442\u043e\u043c\u0430\u0440\u043d\u043e\u0441\u0442\u044c). \u0412\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u043b\u0438\u0431\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u043b\u0438\u0431\u043e \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0432\u0441\u0435\u043c.<\/li>\n<li><b>C<\/b>onsistency (c\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c). \u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0435\u043f\u0440\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0432\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u0435.<\/li>\n<li><b>I<\/b>solation (\u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c). \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043d\u0435 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430.<\/li>\n<li><b>D<\/b>urability (\u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c). \u0417\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/li>\n<\/ul>\n<p>  Consistency \u0438 Durability \u0432 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u0440\u043d\u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c Atomicity \u0438 Isolation.<\/p>\n<p>  \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 0.8.0 \u0432 Storm \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 <a href=\"https:\/\/github.com\/nathanmarz\/storm\/wiki\/Trident-tutorial\">Trident<\/a> \u2014 \u0430\u043d\u0430\u043b\u043e\u0433 <a href=\"http:\/\/pig.apache.org\/\">Apache Pig<\/a>. \u0412 \u043d\u0435\u0435 \u0436\u0435 \u043f\u0435\u0440\u0435\u043a\u043e\u0447\u0435\u0432\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b <a href=\"https:\/\/github.com\/nathanmarz\/storm\/wiki\/Transactional-topologies\">Transactional topology<\/a>.<\/p>\n<h2>\u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 Storm<\/h2>\n<p>  <\/p>\n<h4><b>A<\/b>tomicity<\/h4>\n<p>\u0412 Topology \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/storm\/trident\/state\/State.html\">State<\/a>, \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0411\u0414. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0435 \u0432 Spout, \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 Tuple \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0430\u043a\u0435\u0442\u044b (batch). Batch \u0430\u0441\u0441\u043e\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c transaction id. Tuple \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0449\u0438\u0435 batch \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e.<br \/>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043d\u0430\u0431\u043e\u0440 Tuple, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0445\u0441\u044f \u043a \u043e\u0434\u043d\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/storm\/trident\/state\/StateUpdater.html#updateState(S, java.util.List, storm.trident.operation.TridentCollector)\">updateState<\/a> \u043a\u043b\u0430\u0441\u0441\u0430, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/storm\/trident\/state\/StateUpdater.html\">StateUpdater<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u043f\u0440\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e State. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f, Spout \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043e\u0431 \u0443\u0441\u043f\u0435\u0445\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 batch&#8217;a. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, Spout \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u0435\u0441\u044c batch \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e.<br \/>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c Storm \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e Batch \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0411\u0414 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437.<\/p>\n<h4><b>I<\/b>solation<\/h4>\n<p>Storm \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e Batch&#8217;\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 StateUpdater \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044f transaction id. \u0422\u043e \u0435\u0441\u0442\u044c Batch #2 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 Batch&#8217;\u0430 #1.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>  Spout \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \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\/storm\/trident\/spout\/ICommitterTridentSpout.html\">ICommitterTridentSpout&lt;TransactionMetadata&gt;<\/a>. TransactionMetadata \u2014 \u043b\u044e\u0431\u043e\u0439 \u043a\u043b\u0430\u0441\u0441, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Batch&#8217;\u0435\u0439 \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438: <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/tx\/TxMeta.java\">TxMeta<\/a>.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class TxMeta {     private int start;     private int count;      public TxMeta(int start, int count) {         this.start = start;         this.count = count;     } \/\/ Skipped getters  } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/storm\/trident\/spout\/ITridentSpout.BatchCoordinator.html\">ITridentSpout.BatchCoordinator&lt;TransactionMetadata&gt;<\/a> \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 TransactionMetadata \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0433\u043e\u0442\u043e\u0432\u044b \u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438: <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/tx\/TridentTxSpout.java\">TridentTxSpout<\/a>. \u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 Topology.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">    static class BCoordinator implements BatchCoordinator&lt;TxMeta&gt; {         private static final int TRANSACTION_COUNT = 5;         private static final int TRANSACTION_ELEMENT_COUNT = 5;  \/\/TxMeta - \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438         @Override         public TxMeta initializeTransaction(long l, TxMeta txMeta) {              if(txMeta != null) {              System.out.println(String.format(&quot;Initializing transaction id: %08d, &quot;             + &quot;start: %04d, count: %04d&quot;, l, txMeta.getStart() +                 txMeta.getCount(), txMeta.getCount()));              return new TxMeta(txMeta.getStart() + txMeta.getCount(),                     TRANSACTION_ELEMENT_COUNT);             } else {                 return new TxMeta(0, TRANSACTION_ELEMENT_COUNT);             }         }  \/\/ \u0413\u043e\u0442\u043e\u0432\u044b \u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438         @Override         public boolean isReady(long l) {             if(l &lt;= TRANSACTION_COUNT) {                 System.out.println(&quot;ISREADY &quot; + l);                 return true;             }             return false;         }     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/storm\/trident\/spout\/ICommitterTridentSpout.Emitter.html\">ICommitterTridentSpout.Emitter<\/a> \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 Batch. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 Batch&#8217;a, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 Batch \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e.<br \/>  <i>\u0412\u0430\u0436\u043d\u043e \u2014 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 Batch \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043d\u0430\u0431\u043e\u0440 Tuple, \u0447\u0442\u043e \u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439.<br \/>  <\/i><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">static class BEmitter implements Emitter { \/\/ \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 Batch \u043f\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 TransactionMetadata         @Override         public void emitBatch(TransactionAttempt transactionAttempt,                                Object coordinatorMeta,                               TridentCollector tridentCollector) {              TxMeta txMeta = (TxMeta) coordinatorMeta;              System.out.println(&quot;Emitting transaction id: &quot; +                     transactionAttempt.getTransactionId() + &quot; attempt:&quot; +                     transactionAttempt.getAttemptId()             );             for(int i = 0; i &lt; txMeta.getCount(); ++i) {                 tridentCollector.emit(new Values(&quot;TRANS [&quot; +                         transactionAttempt.getAttemptId() +                          &quot;] [&quot; + (txMeta.getStart() + i) + &quot;]&quot;)                 );             }         }  \/\/ \u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f  \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0438\u0447\u0435\u043d\u0430 \u0432 State        @Override         public void success(TransactionAttempt transactionAttempt) {             System.out.println(&quot;BEmitter:Transaction success id:&quot; +                                           transactionAttempt.getTransactionId());         }  \/\/ \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 State         @Override         public void commit(TransactionAttempt transactionAttempt) {             System.out.println(&quot;BEmitter:Transaction commit id:&quot; +                                          transactionAttempt.getTransactionId());         }     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/storm\/trident\/state\/State.html\">State<\/a> \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0411\u0414: <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/tx\/TxDatabase.java\">TxDatabase<\/a>.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class TxDatabase implements State { \/\/ \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u0447\u0430\u043b\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0411\u0414     @Override     public void beginCommit(Long txId) {         System.out.println(&quot;beginCommit [&quot; + Thread.currentThread().getId() + &quot;] &quot; + txId);     }  \/\/ \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u0411\u0414     @Override     public void commit(Long txId) {         System.out.println(&quot;commit [&quot; + Thread.currentThread().getId() + &quot;] &quot; + txId);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/storm\/trident\/state\/BaseStateUpdater.html\">BaseStateUpdater&lt;S extends State&gt;<\/a>, \u0432\u043d\u043e\u0441\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 State (\u0411\u0414): <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/tx\/TxDatabaseUpdater.java\">TxDatabaseUpdater<\/a>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class TxDatabaseUpdater extends BaseStateUpdater&lt;TxDatabase&gt; {     int count;      \/\/ \u0412\u043d\u043e\u0441\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0411\u0414     @Override     public void updateState(TxDatabase txDatabase,                              List&lt;TridentTuple&gt; tridentTuples,                             TridentCollector tridentCollector) {          \/\/ \u042d\u043c\u0443\u043b\u044f\u0446\u0438\u044f \u0441\u0431\u043e\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438         if(++count == 2) throw new FailedException(&quot;YYYY&quot;);           for(TridentTuple t: tridentTuples) {             System.out.println(&quot;Updating: &quot; + t.getString(0));         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"http:\/\/nathanmarz.github.io\/storm\/doc\/storm\/trident\/state\/StateFactory.html\">StateFactory<\/a>, \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b State: <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/tx\/TxDatabaseFactory.java\">TxDatabaseFactory<\/a>.<\/p>\n<p>  \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 <a href=\"https:\/\/github.com\/scanban\/stormex\/blob\/master\/src\/main\/java\/examples\/TridentTransactionApp.java\">TridentTransactionApp<\/a>:  <\/p>\n<pre><code class=\"java\">public class TridentTransactionApp {     public static void main( String[] args ) throws Throwable     {         Logger.getRootLogger().setLevel(Level.ERROR);  \/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044e         TridentTopology tridentTopology = new TridentTopology(); \/\/ \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448 Spout         tridentTopology.newStream(&quot;TridentTxSpout&quot;, new TridentTxSpout()). \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 Tuple \u043f\u043e\u0439\u0434\u0435\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e - OpPrintout \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0438                 shuffle().each(new Fields(&quot;msg&quot;), new OpPrintout()).                 parallelismHint(2). \/\/ \u0421\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a                 global(). \/\/ \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 State (\u0411\u0414)                 partitionPersist(new TxDatabaseFactory(),                         new Fields(&quot;msg&quot;), new TxDatabaseUpdater()); \/\/ Skipped         LocalCluster cluster = new LocalCluster();         cluster.submitTopology(&quot;T2&quot;, config, tridentTopology.build());         Thread.sleep(1000*100);         cluster.shutdown();     } } <\/code><\/pre>\n<p>  \u0422\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Storm \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0434\u0440\u0443\u0433\u0443\u044e, \u043a\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0434\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0444\u0430\u0439\u043b\u044b, Storm \u0438\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u0438, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0432 \u0411\u0414. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0435\u0441\u0442\u044c \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u044f, \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0434\u0432\u0430\u0436\u0434\u044b.<\/p>\n<p>  <b>PS.<\/b> \u0420\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Storm \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u0445\u0432\u0430\u0442\u0438\u0442 \u043d\u0430 \u0446\u0435\u043b\u0443\u044e \u043a\u043d\u0438\u0433\u0443. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. <br \/>  \u041f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u2014 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e <a href=\"http:\/\/www.michael-noll.com\/tutorials\/running-multi-node-storm-cluster\/\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a>. \u041d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f. \u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c Storm \u0432 production \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e.<\/p>\n<p>  <b>PPS.<\/b> \u0412 <a href=\"http:\/\/hadoop.apache.org\/\">Hadoop<\/a> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433 on-line \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Storm \u2014 <a href=\"http:\/\/hadoop.apache.org\/docs\/stable\/streaming.html\">Hadoop Streaming<\/a>, \u043d\u043e \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 Storm, \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442.      \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\/186634\/\"> http:\/\/habrahabr.ru\/post\/186634\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412\u043e <a href=\"http:\/\/habrahabr.ru\/post\/186436\/\">\u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0441\u0442\u0430\u0442\u044c\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430\u0445 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438. <\/p>\n<p>  \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, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435? \u0412\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u0430 \u0441\u0432\u044f\u0437\u044c \u0441 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043d\u0435\u043b\u044c\u0437\u044f \u0441 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438\u0441\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0430 \u043a\u0430\u043a\u0438\u0435 \u2014 \u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b (<a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%98%D0%B4%D0%B5%D0%BC%D0%BF%D0%BE%D1%82%D0%B5%D0%BD%D1%82%D0%BD%D0%BE%D1%81%D1%82%D1%8C\">\u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u044b<\/a>), \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0444\u043b\u0430\u0433\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 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-186634","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/186634","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=186634"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/186634\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}