{"id":13491,"date":"2018-07-19T21:40:50","date_gmt":"2018-07-19T19:40:50","guid":{"rendered":"https:\/\/touk.pl\/blog\/?p=13491"},"modified":"2022-07-27T10:07:56","modified_gmt":"2022-07-27T08:07:56","slug":"what-really-grinds-my-gears-apache-nifi","status":"publish","type":"post","link":"https:\/\/touk.pl\/blog\/2018\/07\/19\/what-really-grinds-my-gears-apache-nifi\/","title":{"rendered":"What Really Grinds My Gears: Apache NiFi"},"content":{"rendered":"<h1 id=\"introduction\">Introduction<\/h1>\n<p>Complaining and doing nothing to solve a problem. That&#8217;s what everybody does on the Internet. And that&#8217;s precisely what I am going to do. Why? Apache NiFi has recently proved to be powerful and effective tool for processing gigabytes of data in our telco integration project. Yet, sometimes I feel like I am just clicking too much to achieve small things. It hurts just like hitting your head against a door frame every time you enter your bedroom. Let&#8217;s take a closer look at it.<\/p>\n<h1 id=\"navigation\">Navigation<\/h1>\n<p>Dividing complex data flows into the process groups is a great way of achieving modularization and reusability, however, navigation between them is rather painful. Imagine set of process groups with nested process groups with nested process groups&#8230; Every time I want to go from A-&gt;B-&gt;C to A-&gt;E-&gt;F I have to use a well-hidden breadcrumb for A and double click to get into E and F.<\/p>\n<p>What is the problem? At the beginning I couldn&#8217;t even find the breadcrumb! I didn&#8217;t expect it to be at the very bottom of the screen as it is an untypical location for it. What I did expect however was a big shiny arrow <em>go back<\/em>. Moreover, having navigated to A-&gt;E-&gt;F I wanted to go back to A-&gt;B-&gt;C. As there was no &#8220;go forward \/ redo&#8221; button I had to search for components E and F among others which made me sacrifice my precious time.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/nifi-breadcrumb-1-1024x496.png\" alt=\"\" width=\"660\" height=\"320\" class=\"alignnone size-large wp-image-13498\" srcset=\"https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/nifi-breadcrumb-1-1024x496.png 1024w, https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/nifi-breadcrumb-1-300x145.png 300w, https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/nifi-breadcrumb-1-768x372.png 768w, https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/nifi-breadcrumb-1.png 1600w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/p>\n<p>Why do I need to navigate so much you ask? Well, I am lazy and have rather short memory at the same time. What developing flows means for me is checking what I did yesterday and adjusting it to current problem. Maybe if I had a possibility to open yesterday&#8217;s flow in another tab I wouldn&#8217;t change those views at all? My internet browser can obviously do that but it has some limits like copy-paste. Similar idea is a screen division. I know it is all difficult to achieve but I would find it a major improvement.<\/p>\n<h1 id=\"list-queue\">List queue<\/h1>\n<p>When I integrate with external data source all I have is documentation and hope for its correctness. In fact this rule applies to every new NiFi processor I try. When something fails I investigate the reason of failure. When everything seems right I ensure that it truly is. In both scenarios I check the first element in the queue.<\/p>\n<p>Again, my expectations are simple. I double click the queue to see what it contains because it is the most interesting feature of a queue: it holds elements. According to my experience 95% of times when I do anything related to a queue I check its first element. Sadly, when double clicking I see a configuration window which comes useful from time to time. Still, in my opinion it is not as important as the content itself.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/queue2.png\" alt=\"\" width=\"761\" height=\"564\" class=\"alignnone size-full wp-image-13520\" srcset=\"https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/queue2.png 761w, https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/queue2-300x222.png 300w\" sizes=\"auto, (max-width: 761px) 100vw, 761px\" \/><\/p>\n<p>So how do you see elements of a queue anyway? Just like starting engine with cables: not easy but one can get used to it. Open context menu, select &#8220;List queue&#8221; and click the &#8220;info&#8221; button on the very left. Clicking the button is the weirdest step for me. It does not look like a button at all and I discovered its &#8216;clickability&#8217; only because my friend told me about it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/queue3.png\" alt=\"\" width=\"997\" height=\"486\" class=\"alignnone size-full wp-image-13515\" srcset=\"https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/queue3.png 997w, https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/queue3-300x146.png 300w, https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/queue3-768x374.png 768w\" sizes=\"auto, (max-width: 997px) 100vw, 997px\" \/><\/p>\n<p>I am sure there must be faster way to take a quick look at the queue content. I know that the current state is consistent with the processors front-end design but I do not feel a there&#8217;s such a strong link between queues and processors. What you typically do with a processor is configuration but what you typically do with a queue is checking the content details.<\/p>\n<h1 id=\"error-display\">Error display<\/h1>\n<p>NiFi displays error in flows with big red label located in the top right corner of the processor \/ process group. I have nothing against it. Yet, what does a true programmer do when an error occurs? He or she copies an error message and enters stack overflow :)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/error-1024x480.png\" alt=\"\" width=\"660\" height=\"309\" class=\"alignnone size-large wp-image-13523\" srcset=\"https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/error-1024x480.png 1024w, https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/error-300x141.png 300w, https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/error-768x360.png 768w, https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/error.png 1150w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/p>\n<p>And here comes the problem: there is no way to copy an error from NiFi GUI. My workaround is to open logs. Usually, it takes ages. Sometimes it is even impossible. As a software vendor company we struggle with the limited access to hosts and services on everyday basis. Just let me copy my own errors and i will do my job. Trust me I&#8217;m an engineer.<\/p>\n<p>Surprisingly in the review my colleague noted that I can actually copy errors from <em>Bulletin board<\/em> located in the main settings menu. However, I find it a bit dissapointing as the messages are incomplete and the menu itself is hidden deeply.<\/p>\n<h1 id=\"templates\">Templates<\/h1>\n<p>Exporting templates from one NiFi instance to another is another unintuitive feature. What I expect is to right click on a process group and choose <em>export<\/em> option. What I get is a sequence of actions:<\/p>\n<ol>\n<li>Create template<\/li>\n<li>Open &#8220;templates&#8221; from the main settings menu in a top-right corner<\/li>\n<li>Choose a very small &#8220;download&#8221; button that doesn&#8217;t look like a download button<\/li>\n<\/ol>\n<p>I do not understand why I can&#8217;t export a process group which is not a template. Of course it has to be imported as a template but exporting seems to be just an on demand XML generation. What are the benefits of such dependency?<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/template.png\" alt=\"\" width=\"672\" height=\"346\" class=\"alignnone size-full wp-image-13526\" srcset=\"https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/template.png 672w, https:\/\/touk.pl\/blog\/wp-content\/uploads\/2018\/07\/template-300x154.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/p>\n<h1 id=\"summary\">Summary<\/h1>\n<p>I hope that this post will not be taken as offensive by any means. As a programmer I know how difficult it is to design beautiful, functional and consistent frontend even for very simple application. Therefore, I would like to think about this case study as a guidance for everyone who designs UX. Ask your users about their habits, analyse how the application is used. Automating your client&#8217;s job will bring you tons of respect.<\/p>\n<p>And what is your experience with NiFi GUI? I think it looks pretty good but still may be more functional and convenient. I hope it will be soon.<\/p>\n<p>Finally I would like to thanks Micha\u0142 Hofman and Bart\u0142omiej Tartanus for the review.<\/p>\n","protected":false},"excerpt":{"rendered":"Introduction Complaining and doing nothing to solve a problem. That&#8217;s what everybody does on the Internet. And that&#8217;s&hellip;\n","protected":false},"author":73,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[252,440],"class_list":{"0":"post-13491","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-development-design","7":"tag-big-data","8":"tag-ux"},"_links":{"self":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts\/13491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/users\/73"}],"replies":[{"embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/comments?post=13491"}],"version-history":[{"count":27,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts\/13491\/revisions"}],"predecessor-version":[{"id":13532,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts\/13491\/revisions\/13532"}],"wp:attachment":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/media?parent=13491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/categories?post=13491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/tags?post=13491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}