{"id":296027,"date":"2019-12-18T15:01:23","date_gmt":"2019-12-18T15:01:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=296027"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=296027","title":{"rendered":"\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430 Apache Hadoop: production VS test"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/480928\/\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c48\/f76\/cf1\/c48f76cf15c8138ce1d944918b1dcc07.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1\"><\/div>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 production \u043a\u043e\u0434, \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0442\u0435\u0441\u0442\u0430\u043c\u0438. \u041d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0442\u0435\u0441\u0442\u044b \u043e\u0431\u044f\u0437\u0430\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0441\u043f\u043b\u043e\u0447\u0435\u043d\u043d\u043e\u043c \u0442\u0430\u043d\u0434\u0435\u043c\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u0434\u0435\u043b\u044f\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0436\u0435, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u2013 \u0437\u0430\u043b\u043e\u0433 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043d \u043e\u0442\u043b\u043e\u0432\u0438\u0442 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044e \u0432 production. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u0430\u0433\u0438 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u0432 production, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio. \u0426\u0435\u043b\u044c: Apache Hadoop. <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041f\u0440\u043e \u043f\u0440\u043e\u0435\u043a\u0442<\/h2>\n<p>  \u0422\u0435, \u043a\u0442\u043e \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0441\u044f \u0442\u0435\u043c\u043e\u0439 Big Data, \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0441\u043b\u044b\u0448\u0430\u043b \u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441 \u0442\u0430\u043a\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u043a\u0430\u043a <a href=\"https:\/\/hadoop.apache.org\/\">Apache Hadoop<\/a>. \u0415\u0441\u043b\u0438 \u043e\u0447\u0435\u043d\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u0442\u043e Hadoop \u2013 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u044b \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c Big Data \u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438. <\/p>\n<p>  Hadoop \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<ul>\n<li>Hadoop Common<\/li>\n<li>MapReduce <\/li>\n<li>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 Hadoop HDFS (Hadoop Distributed File System)<\/li>\n<li>YARN<\/li>\n<\/ul>\n<p>  \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u043d\u0438\u043c \u043f\u043e\u043b\u043d\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435.<\/p>\n<h2>\u041e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435<\/h2>\n<p>  \u041a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 <a href=\"https:\/\/www.viva64.com\/ru\/m\/0044\/\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>, PVS-Studio \u043c\u043e\u0436\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 maven \u043f\u043b\u0430\u0433\u0438\u043d\u0430; <\/li>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 gradle \u043f\u043b\u0430\u0433\u0438\u043d\u0430;<\/li>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 IntellJ IDEA;<\/li>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. <\/li>\n<\/ul>\n<p>  Hadoop \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b maven, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e.<\/p>\n<p>  \u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0432 \u0441\u043a\u0440\u0438\u043f\u0442 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u043e\u0434\u0438\u043d \u0438\u0437 pom.xml (\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445 \u0431\u044b\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0431\u044b\u043b\u043e), \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u043e\u0448\u0435\u043b!<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0432\u044b\u0431\u0440\u0430\u0432 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u044f \u043e\u0431\u0440\u0430\u0442\u0438\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u043d\u0430\u0431\u0440\u0430\u043b\u043e\u0441\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043a\u0430\u043a \u0432 production \u043a\u043e\u0434\u0435, \u0442\u0430\u043a \u0438 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445. \u041e\u0431\u044b\u0447\u043d\u043e \u044f \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0442\u0435\u0441\u0442\u044b. \u041d\u043e, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0432 \u0438\u0445, \u044f \u043d\u0435 \u0441\u043c\u043e\u0433 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 &#8216;\u0442\u0435\u0441\u0442\u044b&#8217; \u043c\u0438\u043c\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u00ab\u0410 \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u043d\u0435\u0442?\u00bb \u2013 \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u044f, \u0432\u0435\u0434\u044c \u0431\u0430\u0433\u0438 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u0432\u043e\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u043c\u0443, \u043b\u0438\u0431\u043e \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u043c\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u0430 \u0442\u043e \u0438 \u0432\u043e\u0432\u0441\u0435 \u043a \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0438\u0446\u0435 (\u043b\u0438\u0448\u044c \u0434\u043b\u044f \u0433\u0430\u043b\u043e\u0447\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0435\u043b\u0435\u043d\u0435\u043d\u044c\u043a\u0438\u0435). <\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0441\u043e\u0431\u0440\u0430\u0432 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0432 \u0438\u0445 \u043f\u043e \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u043a \u043a\u043e\u0434\u0443 (production, test) \u0438 \u043f\u043e \u0447\u0435\u0442\u044b\u0440\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043c\u043e\u0434\u0443\u043b\u044f\u043c Hadoop, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u0440\u0430\u0437\u0431\u043e\u0440 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<h2>Production code<\/h2>\n<p>  <\/p>\n<h3>Hadoop Common<\/h3>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6033\/\">V6033<\/a> An item with the same key &#8216;KDC_BIND_ADDRESS&#8217; has already been added. MiniKdc.java(163), MiniKdc.java(162)  <\/p>\n<pre><code class=\"java\">public class MiniKdc {   ....   private static final Set&lt;String&gt; PROPERTIES = new HashSet&lt;String&gt;();   ....   static {     PROPERTIES.add(ORG_NAME);     PROPERTIES.add(ORG_DOMAIN);     PROPERTIES.add(KDC_BIND_ADDRESS);     PROPERTIES.add(KDC_BIND_ADDRESS); \/\/ &lt;=     PROPERTIES.add(KDC_PORT);     PROPERTIES.add(INSTANCE);     ....   }   .... }<\/code><\/pre>\n<p>  \u0414\u0432\u0430\u0436\u0434\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0435 \u0432 <i>HashSet<\/i> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u044b\u0439 \u0434\u0435\u0444\u0435\u043a\u0442 \u043f\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041f\u043e \u0444\u0430\u043a\u0442\u0443 \u0432\u0442\u043e\u0440\u043e\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e. \u0425\u043e\u0440\u043e\u0448\u043e, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u043b\u0435\u043f\u0430\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c. \u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f?<\/p>\n<h3>MapReduce<\/h3>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6072\/\">V6072<\/a> Two similar code fragments were found. Perhaps, this is a typo and &#8216;localFiles&#8217; variable should be used instead of &#8216;localArchives&#8217;. LocalDistributedCacheManager.java(183), LocalDistributedCacheManager.java(178), LocalDistributedCacheManager.java(176), LocalDistributedCacheManager.java(181)  <\/p>\n<pre><code class=\"java\">public synchronized void setup(JobConf conf, JobID jobId) throws IOException {   ....   \/\/ Update the configuration object with localized data.   if (!localArchives.isEmpty()) {     conf.set(MRJobConfig.CACHE_LOCALARCHIVES, StringUtils         .arrayToString(localArchives.toArray(new String[localArchives  \/\/ &lt;=             .size()])));   }   if (!localFiles.isEmpty()) {     conf.set(MRJobConfig.CACHE_LOCALFILES, StringUtils         .arrayToString(localFiles.toArray(new String[localArchives     \/\/ &lt;=             .size()])));   }   .... }<\/code><\/pre>\n<p>  \u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 V6072 \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u043a\u0438. \u0421\u0443\u0442\u044c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0445 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u043f\u0443\u0442\u0435\u043c copy-paste \u0438 \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u043e\u0434\u043d\u043e\u0439-\u0434\u0432\u0443\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u043a \u0438 \u00ab\u043d\u0435\u0434\u043e\u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u00bb.<\/p>\n<p>  \u0412\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u044d\u0442\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>localArchives<\/i>, \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u2014 \u0441 <i>localFiles<\/i>. \u0418 \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u043e\u0431\u0440\u043e\u0441\u043e\u0432\u0435\u0441\u0442\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434, \u0430 \u043d\u0435 \u0431\u0435\u0433\u043b\u043e \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u0442\u0435\u0441\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u0435\u043d\u044c\u043a\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438 code review, \u0442\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435 \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u0437\u0430\u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <i>localArchives<\/i>.<\/p>\n<p>  \u0422\u0430\u043a\u0430\u044f \u043e\u043f\u043b\u043e\u0448\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044e:<\/p>\n<ul>\n<li>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <i>localArchives<\/i> (size = 4) \u0438 <i>localFiles<\/i> (size = 2);<\/li>\n<li>\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <i>localFiles.toArray(new String[localArchives.size()])<\/i> \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 2 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0431\u0443\u0434\u0443\u0442 <i>null<\/i> ([\u00abpathToFile1\u00bb, \u00abpathToFile2\u00bb, null, null]);<\/li>\n<li>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e <i>org.apache.hadoop.util.StringUtils.arrayToString<\/i> \u043d\u0430\u043c \u0432\u0435\u0440\u043d\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043a\u0430\u043a \u00abnull\u00bb (\u00abpathToFile1, pathToFile2, null, null\u00bb<i>)<\/i>;<\/li>\n<li>\u0412\u0441\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0434\u0430\u043b\u044c\u0448\u0435, \u0438 \u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0442\u0430\u043a\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 =).<\/li>\n<\/ul>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6007\/\">V6007<\/a> Expression &#8216;children.size() &gt; 0&#8217; is always true. Queue.java(347)  <\/p>\n<pre><code class=\"java\">boolean isHierarchySameAs(Queue newState) {   ....   if (children == null || children.size() == 0) {     ....   }   else if(children.size() &gt; 0)   {     ....   }   .... }<\/code><\/pre>\n<p>  \u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 0 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <i>children.size() &gt; 0<\/i> \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0441\u0442\u0438\u043d\u0443.<\/p>\n<h3>HDFS<\/h3>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6001\/\">V6001<\/a> There are identical sub-expressions &#8216;this.bucketSize&#8217; to the left and to the right of the &#8216;%&#8217; operator. RollingWindow.java(79)  <\/p>\n<pre><code class=\"java\">  RollingWindow(int windowLenMs, int numBuckets) {     buckets = new Bucket[numBuckets];     for (int i = 0; i &lt; numBuckets; i++) {       buckets[i] = new Bucket();     }     this.windowLenMs = windowLenMs;     this.bucketSize = windowLenMs \/ numBuckets;     if (this.bucketSize % bucketSize != 0) {         \/\/ &lt;=       throw new IllegalArgumentException(           \"The bucket size in the rolling window is not integer: windowLenMs= \"               + windowLenMs + \" numBuckets= \" + numBuckets);     }   }<\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u0434\u0435\u0444\u0435\u043a\u0442 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u043c\u0443 \u0441\u0435\u0431\u044f. \u0412\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0447\u0435\u0433\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043a\u0440\u0430\u0442\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0432\u0441\u0435\u0433\u0434\u0430, \u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (<i>windowLenMs<\/i>, <i>numBuckets<\/i>), \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u043a \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u043e. <\/p>\n<h3>YARN<\/h3>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6067\/\">V6067<\/a> Two or more case-branches perform the same actions. TimelineEntityV2Converter.java(386), TimelineEntityV2Converter.java(389)  <\/p>\n<pre><code class=\"java\"> public static ApplicationReport  convertToApplicationReport(TimelineEntity entity) {   ....   if (metrics != null) {     long vcoreSeconds = 0;     long memorySeconds = 0;     long preemptedVcoreSeconds = 0;     long preemptedMemorySeconds = 0;      for (TimelineMetric metric : metrics) {       switch (metric.getId()) {       case ApplicationMetricsConstants.APP_CPU_METRICS:         vcoreSeconds = getAverageValue(metric.getValues().values());         break;       case ApplicationMetricsConstants.APP_MEM_METRICS:         memorySeconds = ....;         break;       case ApplicationMetricsConstants.APP_MEM_PREEMPT_METRICS:         preemptedVcoreSeconds = ....;                         \/\/ &lt;=         break;       case ApplicationMetricsConstants.APP_CPU_PREEMPT_METRICS:         preemptedVcoreSeconds = ....;                         \/\/ &lt;=         break;       default:         \/\/ Should not happen..         break;       }     }     ....   }   .... }<\/code><\/pre>\n<p>  \u0412 \u0434\u0432\u0443\u0445 <i>case <\/i> \u0432\u0435\u0442\u0432\u044f\u0445 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0434\u0430. \u0422\u0430\u043a\u043e\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u043b\u043e\u0448\u044c \u0438 \u0440\u044f\u0434\u043e\u043c! \u0412 \u043f\u0440\u0435\u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u044d\u0442\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439, \u0430 \u043b\u0438\u0448\u044c \u043f\u043e\u0432\u043e\u0434\u043e\u043c \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f \u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0435 <i>switch<\/i>. \u041d\u043e \u043d\u0435 \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f. \u0412 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0445 \u043a\u043e\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>preemptedVcoreSeconds<\/i>. \u0415\u0441\u043b\u0438 \u0432\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0439\u0442\u0438 \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 <i>metric.getId() == APP_MEM_PREEMPT_METRICS<\/i> \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>preemptedMemorySeconds<\/i>, \u0430 \u043d\u0435 <i>preemptedVcoreSeconds<\/i>. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c, <i>preemptedMemorySeconds <\/i> \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 &#8216;switch&#8217; \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 0, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>preemptedVcoreSeconds<\/i> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u043c.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6046\/\">V6046<\/a> Incorrect format. A different number of format items is expected. Arguments not used: 2. AbstractSchedulerPlanFollower.java(186)  <\/p>\n<pre><code class=\"java\">@Override public synchronized void synchronizePlan(Plan plan, boolean shouldReplan) {   ....   try   {     setQueueEntitlement(planQueueName, ....);   }   catch (YarnException e)   {     LOG.warn(\"Exception while trying to size reservation for plan: {}\",               currResId,               planQueueName,               e);   }   .... }<\/code><\/pre>\n<p>  \u041d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>planQueueName <\/i> \u043f\u0440\u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438. \u0422\u0443\u0442 \u0438\u043b\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0438\u043b\u0438 \u043d\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u041d\u043e \u044f \u0432\u0441\u0435 \u0436\u0435 \u0441\u043a\u043b\u043e\u043d\u044f\u044e\u0441\u044c \u043a \u0441\u0442\u0430\u0440\u043e\u043c\u0443 \u0434\u043e\u0431\u0440\u043e\u043c\u0443 \u0438, \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043d\u043e\u0441\u044f\u0449\u0435\u043c\u0443 \u043c\u0435\u0434\u0432\u0435\u0436\u044c\u044e \u0443\u0441\u043b\u0443\u0433\u0443, copy-paste&#8217;\u0443.<\/p>\n<h2>Test code<\/h2>\n<p>  <\/p>\n<h3>Hadoop Common<\/h3>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6072\/\">V6072<\/a> Two similar code fragments were found. Perhaps, this is a typo and &#8216;allSecretsB&#8217; variable should be used instead of &#8216;allSecretsA&#8217;. TestZKSignerSecretProvider.java(316), TestZKSignerSecretProvider.java(309), TestZKSignerSecretProvider.java(306), TestZKSignerSecretProvider.java(313)  <\/p>\n<pre><code class=\"java\">public void testMultiple(int order) throws Exception {     ....     currentSecretA = secretProviderA.getCurrentSecret();     allSecretsA = secretProviderA.getAllSecrets();     Assert.assertArrayEquals(secretA2, currentSecretA);     Assert.assertEquals(2, allSecretsA.length);         \/\/ &lt;=     Assert.assertArrayEquals(secretA2, allSecretsA[0]);     Assert.assertArrayEquals(secretA1, allSecretsA[1]);      currentSecretB = secretProviderB.getCurrentSecret();     allSecretsB = secretProviderB.getAllSecrets();     Assert.assertArrayEquals(secretA2, currentSecretB);     Assert.assertEquals(2, allSecretsA.length);        \/\/ &lt;=     Assert.assertArrayEquals(secretA2, allSecretsB[0]);     Assert.assertArrayEquals(secretA1, allSecretsB[1]);     .... }<\/code><\/pre>\n<p>  \u0418 \u0441\u043d\u043e\u0432\u0430 V6072. \u0421\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 <i>allSecretsA<\/i> \u0438 <i>allSecretsB<\/i>.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6043\/\">V6043<\/a> Consider inspecting the &#8216;for&#8217; operator. Initial and final values of the iterator are the same. TestTFile.java(235)  <\/p>\n<pre><code class=\"java\">private int readPrepWithUnknownLength(Scanner scanner, int start, int n)     throws IOException {   for (int i = start; i &lt; start; i++) {     String key = String.format(localFormatter, i);     byte[] read = readKey(scanner);     assertTrue(\"keys not equal\", Arrays.equals(key.getBytes(), read));     try {       read = readValue(scanner);       assertTrue(false);     }     catch (IOException ie) {       \/\/ should have thrown exception     }     String value = \"value\" + key;     read = readLongValue(scanner, value.getBytes().length);     assertTrue(\"values nto equal\", Arrays.equals(read, value.getBytes()));     scanner.advance();   }   return (start + n); }<\/code><\/pre>\n<p>  \u0422\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0435\u043b\u0435\u043d\u0435\u043d\u044c\u043a\u0438\u0439? =). \u0422\u0435\u043b\u043e \u0446\u0438\u043a\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0447\u0430\u0441\u0442\u044c \u0442\u0435\u0441\u0442\u0430, \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0435 <i>for<\/i> \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430. \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <i>i &lt; start<\/i> \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0432\u044b\u0434\u0430\u0441\u0442 \u043d\u0430\u043c false, \u0447\u0442\u043e \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e. \u042f \u043f\u0440\u043e\u0431\u0435\u0436\u0430\u043b\u0441\u044f \u043f\u043e \u0444\u0430\u0439\u043b\u0438\u043a\u0443 \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0438 \u043f\u0440\u0438\u0448\u0435\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 <i>i &lt; (start + n)<\/i>.<\/p>\n<h3>MapReduce<\/h3>\n<p>  a href=\u00ab<a href=\"https:\/\/www.viva64.com\/ru\/w\/v6007\/\">www.viva64.com\/ru\/w\/v6007<\/a>\u00bb&gt;V6007 Expression &#8216;byteAm &lt; 0&#8217; is always false. DataWriter.java(322)  <\/p>\n<pre><code class=\"java\">GenerateOutput writeSegment(long byteAm, OutputStream out)     throws IOException {   long headerLen = getHeaderLength();   if (byteAm &lt; headerLen) {     \/\/ not enough bytes to write even the header     return new GenerateOutput(0, 0);   }   \/\/ adjust for header length   byteAm -= headerLen;   if (byteAm &lt; 0) {    \/\/ &lt;=     byteAm = 0;   }   .... }<\/code><\/pre>\n<p>  \u0423\u0441\u043b\u043e\u0432\u0438\u0435 <i>byteAm &lt; 0<\/i> \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u043e\u0436\u044c. \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u043c\u0441\u044f \u043f\u043e \u043a\u043e\u0434\u0443 \u0432\u044b\u0448\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u0430 \u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 <i>byteAm -= headerLen<\/i>, \u0442\u043e \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 <i>byteAm &gt;= headerLen<\/i>. \u041e\u0442\u0441\u044e\u0434\u0430, \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u044f, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>byteAm <\/i> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u0427\u0442\u043e \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c. <\/p>\n<h3>HDFS<\/h3>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6072\/\">V6072<\/a> Two similar code fragments were found. Perhaps, this is a typo and &#8216;normalFile&#8217; variable should be used instead of &#8216;normalDir&#8217;. TestWebHDFS.java(625), TestWebHDFS.java(615), TestWebHDFS.java(614), TestWebHDFS.java(624)  <\/p>\n<pre><code class=\"java\">public void testWebHdfsErasureCodingFiles() throws Exception {   ....   final Path normalDir = new Path(\"\/dir\");   dfs.mkdirs(normalDir);   final Path normalFile = new Path(normalDir, \"file.log\");   ....   \/\/ logic block #1   FileStatus expectedNormalDirStatus = dfs.getFileStatus(normalDir);   FileStatus actualNormalDirStatus = webHdfs.getFileStatus(normalDir); \/\/ &lt;=   Assert.assertEquals(expectedNormalDirStatus.isErasureCoded(),                       actualNormalDirStatus.isErasureCoded());   ContractTestUtils.assertNotErasureCoded(dfs, normalDir);   assertTrue(normalDir + \" should have erasure coding unset in \" + ....);    \/\/ logic block #2   FileStatus expectedNormalFileStatus = dfs.getFileStatus(normalFile);   FileStatus actualNormalFileStatus = webHdfs.getFileStatus(normalDir); \/\/ &lt;=   Assert.assertEquals(expectedNormalFileStatus.isErasureCoded(),                       actualNormalFileStatus.isErasureCoded());   ContractTestUtils.assertNotErasureCoded(dfs, normalFile);   assertTrue( normalFile + \" should have erasure coding unset in \" + ....); }<\/code><\/pre>\n<p>  \u041d\u0435 \u043f\u043e\u0432\u0435\u0440\u0438\u0442\u0435, \u0438 \u0441\u043d\u043e\u0432\u0430 V6072! \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 <i>normalDir<\/i> \u0438 <i>normalFile<\/i><\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6027\/\">V6027<\/a> Variables are initialized through the call to the same function. It&#8217;s probably an error or un-optimized code. TestDFSAdmin.java(883), TestDFSAdmin.java(879)  <\/p>\n<pre><code class=\"java\">private void verifyNodesAndCorruptBlocks(     final int numDn,     final int numLiveDn,     final int numCorruptBlocks,     final int numCorruptECBlockGroups,     final DFSClient client,     final Long highestPriorityLowRedundancyReplicatedBlocks,     final Long highestPriorityLowRedundancyECBlocks)     throws IOException {   \/* init vars *\/   ....   final String expectedCorruptedECBlockGroupsStr = String.format(       \"Block groups with corrupt internal blocks: %d\",       numCorruptECBlockGroups);   final String highestPriorityLowRedundancyReplicatedBlocksStr       = String.format(       \"\\tLow redundancy blocks with highest priority \" +           \"to recover: %d\",       highestPriorityLowRedundancyReplicatedBlocks);   final String highestPriorityLowRedundancyECBlocksStr = String.format(       \"\\tLow redundancy blocks with highest priority \" +           \"to recover: %d\",       highestPriorityLowRedundancyReplicatedBlocks);   .... }<\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <i>highestPriorityLowRedundancyReplicatedBlocksStr <\/i> \u0438 <i>highestPriorityLowRedundancyECBlocksStr <\/i> \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u0427\u0430\u0441\u0442\u043e \u0442\u0430\u043a \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c, \u043d\u043e \u043d\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0442\u0443\u0442 \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0445\u043e\u0436\u0438 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u044f \u043d\u0435 \u0443\u0434\u0438\u0432\u043b\u0435\u043d, \u0447\u0442\u043e \u043f\u0440\u0438 copy-paste \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439. \u0414\u043b\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>highestPriorityLowRedundancyECBlocksStr <\/i> \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <i>highestPriorityLowRedundancyECBlocks<\/i>. \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0443\u0436\u043d\u043e \u0435\u0449\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6019\/\">V6019<\/a> Unreachable code detected. It is possible that an error is present. TestReplaceDatanodeFailureReplication.java(222)  <\/p>\n<pre><code class=\"java\">private void verifyFileContent(...., SlowWriter[] slowwriters) throws IOException {   LOG.info(\"Verify the file\");   for (int i = 0; i &lt; slowwriters.length; i++) {     LOG.info(slowwriters[i].filepath + ....);     FSDataInputStream in = null;     try {       in = fs.open(slowwriters[i].filepath);       for (int j = 0, x;; j++) {         x = in.read();         if ((x) != -1) {           Assert.assertEquals(j, x);         } else {           return;         }       }     } finally {       IOUtils.closeStream(in);     }   } }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0440\u0443\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 <i>i++<\/i> \u0432 \u0446\u0438\u043a\u043b\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u043e. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432 \u0446\u0438\u043a\u043b\u0435 <i>for (int i = 0; i &lt; slowwriters.length; i++) {&#8230;.}<\/i> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u044f\u0441\u043d\u0438\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435. \u0418\u0442\u0430\u043a, \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0442\u043e\u043a \u0441 \u0444\u0430\u0439\u043b\u043e\u043c, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c <i>slowwriters[0]<\/i>, \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f. \u0427\u0435\u0440\u0435\u0437 \u0446\u0438\u043a\u043b <i>for (int j = 0, x;; j++)<\/i> \u043f\u043e\u0431\u0430\u0439\u0442\u043e\u0432\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430, \u0433\u0434\u0435:<\/p>\n<ul>\n<li>\u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0447\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e\u0435, \u0442\u043e \u0447\u0435\u0440\u0435\u0437 <i>assertEquals <\/i> \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u0439\u0442 \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 <i>j<\/i> (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u044b \u0432\u044b\u043b\u0435\u0442\u0430\u0435\u043c \u0438\u0437 \u0442\u0435\u0441\u0442\u0430 \u0441 fail&#8217;\u043e\u043c);<\/li>\n<li>\u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0448\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443, \u0438 \u043c\u044b \u0434\u043e\u0448\u043b\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0444\u0430\u0439\u043b\u0430 (\u043f\u0440\u043e\u0447\u043b\u0438 -1), \u0442\u043e \u043c\u044b \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430. <\/li>\n<\/ul>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0431\u044b \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043f\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 <i>slowwriters[0]<\/i>, \u0434\u0435\u043b\u043e \u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0442\u0430\u043a \u0438 \u043d\u0435 \u0434\u043e\u0439\u0434\u0435\u0442. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u043c\u0435\u0441\u0442\u043e <i>return <\/i> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <i>break<\/i>.<\/p>\n<h3>YARN<\/h3>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6019\/\">V6019<\/a> Unreachable code detected. It is possible that an error is present. TestNodeManager.java(176)  <\/p>\n<pre><code class=\"java\">@Test public void  testCreationOfNodeLabelsProviderService() throws InterruptedException {   try {     ....   } catch (Exception e) {     Assert.fail(\"Exception caught\");     e.printStackTrace();   } }<\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 stacktrace \u0442\u0430\u043a \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u043d \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u0435\u0442\u043e\u0434 <i>Assert.fail <\/i> \u043f\u0440\u0435\u0440\u0432\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u0430. \u0415\u0441\u043b\u0438 \u0437\u0434\u0435\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0439\u043c\u0430\u043d\u043e, \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f, \u043f\u0435\u0447\u0430\u0442\u044c stacktrace&#8217;a \u043d\u0443\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043f\u0435\u0447\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435\u0433\u043e-\u043d\u0430\u0432\u0441\u0435\u0433\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u043c\u0438.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u043c\u043d\u043e\u0433\u043e:<\/p>\n<ul>\n<li>V6019 Unreachable code detected. It is possible that an error is present. TestResourceTrackerService.java(928)<\/li>\n<li>V6019 Unreachable code detected. It is possible that an error is present. TestResourceTrackerService.java(737)<\/li>\n<li>V6019 Unreachable code detected. It is possible that an error is present. TestResourceTrackerService.java(685)<\/li>\n<li>&#8230;.<\/li>\n<\/ul>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v6072\/\">V6072<\/a> Two similar code fragments were found. Perhaps, this is a typo and &#8216;publicCache&#8217; variable should be used instead of &#8216;usercache&#8217;. TestResourceLocalizationService.java(315), TestResourceLocalizationService.java(309), TestResourceLocalizationService.java(307), TestResourceLocalizationService.java(313)  <\/p>\n<pre><code class=\"java\">@Test public void testDirectoryCleanupOnNewlyCreatedStateStore()     throws IOException, URISyntaxException {   ....   \/\/ verify directory creation   for (Path p : localDirs) {     p = new Path((new URI(p.toString())).getPath());      \/\/ logic block #1     Path usercache = new Path(p, ContainerLocalizer.USERCACHE);     verify(spylfs).rename(eq(usercache), any(Path.class), any()); \/\/ &lt;=     verify(spylfs).mkdir(eq(usercache), ....);      \/\/ logic block #2     Path publicCache = new Path(p, ContainerLocalizer.FILECACHE);     verify(spylfs).rename(eq(usercache), any(Path.class), any()); \/\/ &lt;=     verify(spylfs).mkdir(eq(publicCache), ....);     ....   }   .... }<\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a, \u043e\u043f\u044f\u0442\u044c V6072 =). \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u043c: <i>usercache<\/i> \u0438 <i>publicCache<\/i>. <\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u0441\u043e\u0442\u043d\u0438 \u0442\u044b\u0441\u044f\u0447 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430. \u0415\u0441\u043b\u0438 production \u043a\u043e\u0434 \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0432 \u0447\u0438\u0441\u0442\u043e\u0442\u0435 \u043e\u0442 \u0431\u0430\u0433\u043e\u0432, \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432 \u0438 \u043d\u0435\u0434\u043e\u0447\u0435\u0442\u043e\u0432 (\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u0430\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434, \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 code review \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435), \u0442\u043e \u0442\u0435\u0441\u0442\u044b \u0432 \u044d\u0442\u043e\u043c \u044f\u0432\u043d\u043e \u0443\u0441\u0442\u0443\u043f\u0430\u044e\u0442. \u0414\u0435\u0444\u0435\u043a\u0442\u044b \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u00ab\u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u0433\u0430\u043b\u043e\u0447\u043a\u043e\u0439\u00bb. \u0418 \u043a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u044f\u043b\u0438 \u0438\u0437 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0435\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439, \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439.<\/p>\n<p>  \u041f\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b Apache Hadoop \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0432\u043e\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0434\u0435\u0442 \u0432 production, \u043d\u043e \u0438 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a\u0436\u0435 \u0438\u0433\u0440\u0430\u044e\u0442 \u043d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u043d\u0443\u044e \u0440\u043e\u043b\u044c \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<p>  \u0422\u0430\u043a \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b, \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432\u0430\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u0418 \u043f\u0435\u0440\u0432\u044b\u043c \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.viva64.com\/ru\/pvs-studio-download\/\">PVS-Studio<\/a>.<\/p>\n<p><a href=\"https:\/\/habr.com\/en\/company\/pvs-studio\/blog\/480918\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c78\/30f\/70c\/c7830f70c5577c3d6704f254d7cad6a3.png\" align=\"left\"><\/a><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Maxim Stefanov. <a href=\"https:\/\/habr.com\/en\/company\/pvs-studio\/blog\/480918\/\">Apache Hadoop Code Quality: Production VS Test<\/a>.<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d() } } }t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>      <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/480928\/\"> https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/480928\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/480928\/\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c48\/f76\/cf1\/c48f76cf15c8138ce1d944918b1dcc07.png\" alt=\"\u0420\u0438\u0441\u0443\u043d\u043e\u043a 1\"><\/div>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 production \u043a\u043e\u0434, \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0442\u0435\u0441\u0442\u0430\u043c\u0438. \u041d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0442\u0435\u0441\u0442\u044b \u043e\u0431\u044f\u0437\u0430\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0441\u043f\u043b\u043e\u0447\u0435\u043d\u043d\u043e\u043c \u0442\u0430\u043d\u0434\u0435\u043c\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u0434\u0435\u043b\u044f\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0436\u0435, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u2013 \u0437\u0430\u043b\u043e\u0433 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043d \u043e\u0442\u043b\u043e\u0432\u0438\u0442 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044e \u0432 production. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u0430\u0433\u0438 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u0432 production, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio. \u0426\u0435\u043b\u044c: Apache Hadoop.   <\/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-296027","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/296027","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=296027"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/296027\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=296027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=296027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=296027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}