<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question replacing blank lines in a file using a efficeint approach in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/replacing-blank-lines-in-a-file-using-a-efficeint-approach/m-p/179594#M141840</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Thanks a lot this awesome community. I using replace text processor and I used the apporaches such as desribed in these 2 links below &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/147405/replacing-new-lines-weird-behavior-observed.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://community.hortonworks.com/questions/147405/replacing-new-lines-weird-behavior-observed.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/147226/replacetextprocessor-remove-blank-lines.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://community.hortonworks.com/questions/147226/replacetextprocessor-remove-blank-lines.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;this consumes a lot of heap space and need something efficient, &lt;A rel="user" href="https://community.cloudera.com/users/525/mclark.html" nodeid="525" target="_blank"&gt;@Matt Clarke&lt;/A&gt; suggested to use shown in picture. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="47429-sample.png" style="width: 784px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19367i9AC44E4E5D54ED3E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="47429-sample.png" alt="47429-sample.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now I am using &lt;/P&gt;&lt;P&gt;Evaluation mode as Line by line&lt;/P&gt;&lt;P&gt;Search regex as ^ (new line shift+enter) $&lt;/P&gt;&lt;P&gt;What should be my replacement value?&lt;/P&gt;&lt;P&gt;since there are no groups formed there?&lt;/P&gt;&lt;P&gt;Any help or suggestions?&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P style="margin-left: 80px;"&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 09:18:50 GMT</pubDate>
    <dc:creator>dhieru</dc:creator>
    <dc:date>2019-08-18T09:18:50Z</dc:date>
    <item>
      <title>replacing blank lines in a file using a efficeint approach</title>
      <link>https://community.cloudera.com/t5/Support-Questions/replacing-blank-lines-in-a-file-using-a-efficeint-approach/m-p/179594#M141840</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Thanks a lot this awesome community. I using replace text processor and I used the apporaches such as desribed in these 2 links below &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/147405/replacing-new-lines-weird-behavior-observed.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://community.hortonworks.com/questions/147405/replacing-new-lines-weird-behavior-observed.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/147226/replacetextprocessor-remove-blank-lines.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://community.hortonworks.com/questions/147226/replacetextprocessor-remove-blank-lines.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;this consumes a lot of heap space and need something efficient, &lt;A rel="user" href="https://community.cloudera.com/users/525/mclark.html" nodeid="525" target="_blank"&gt;@Matt Clarke&lt;/A&gt; suggested to use shown in picture. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="47429-sample.png" style="width: 784px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19367i9AC44E4E5D54ED3E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="47429-sample.png" alt="47429-sample.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now I am using &lt;/P&gt;&lt;P&gt;Evaluation mode as Line by line&lt;/P&gt;&lt;P&gt;Search regex as ^ (new line shift+enter) $&lt;/P&gt;&lt;P&gt;What should be my replacement value?&lt;/P&gt;&lt;P&gt;since there are no groups formed there?&lt;/P&gt;&lt;P&gt;Any help or suggestions?&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P style="margin-left: 80px;"&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 09:18:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/replacing-blank-lines-in-a-file-using-a-efficeint-approach/m-p/179594#M141840</guid>
      <dc:creator>dhieru</dc:creator>
      <dc:date>2019-08-18T09:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: replacing blank lines in a file using a efficeint approach</title>
      <link>https://community.cloudera.com/t5/Support-Questions/replacing-blank-lines-in-a-file-using-a-efficeint-approach/m-p/179595#M141841</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/20255/dheeruksingh.html" nodeid="20255" target="_blank"&gt;@dhieru singh&lt;/A&gt;&lt;P&gt;I think just add capture all after $ as shown below screenshot will work.&lt;/P&gt;&lt;P&gt;Search Value
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;^ &lt;BR /&gt;$(.*)&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P&gt;Replacement Value
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;$1&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;Replacement Strategy
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;Regex Replace&lt;/PRE&gt;
&lt;/DIV&gt;&lt;P&gt;Evaluation Mode
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;Line-by-Line&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Replace Text Configs:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="47435-replacetext.png" style="width: 1728px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19366iA578CFB163B69DD3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="47435-replacetext.png" alt="47435-replacetext.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 09:18:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/replacing-blank-lines-in-a-file-using-a-efficeint-approach/m-p/179595#M141841</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T09:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: replacing blank lines in a file using a efficeint approach</title>
      <link>https://community.cloudera.com/t5/Support-Questions/replacing-blank-lines-in-a-file-using-a-efficeint-approach/m-p/179596#M141842</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929" target="_blank"&gt;@Shu&lt;/A&gt; Thanks for the response. However it still did not removed the blank lines. Attached is the image,&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="47436-befroe1.png" style="width: 258px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19364i2C817B20517C6A35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="47436-befroe1.png" alt="47436-befroe1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and after applying replacetext processor it still looked the same&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="47437-after1.png" style="width: 257px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19365i6AB0DE2CFDCE369E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="47437-after1.png" alt="47437-after1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any idea or help?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dheeru&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 09:18:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/replacing-blank-lines-in-a-file-using-a-efficeint-approach/m-p/179596#M141842</guid>
      <dc:creator>dhieru</dc:creator>
      <dc:date>2019-08-18T09:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: replacing blank lines in a file using a efficeint approach</title>
      <link>https://community.cloudera.com/t5/Support-Questions/replacing-blank-lines-in-a-file-using-a-efficeint-approach/m-p/179597#M141843</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/20255/dheeruksingh.html" nodeid="20255" target="_blank"&gt;@dhieru singh&lt;/A&gt;&lt;P&gt;Can you once make sure the &lt;STRONG&gt;search value property having no spaces in it&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Search Value&lt;/P&gt;&lt;PRE&gt;^//no space&lt;BR /&gt;$(.*)//no space&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Configs:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="47441-replacetext.png" style="width: 1114px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19363i307AB206BFA6A52A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="47441-replacetext.png" alt="47441-replacetext.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Compare your Replace Text processor configs with above screenshot configs and don't keep any spaces after&lt;STRONG&gt; ^ and $(.*) &lt;/STRONG&gt;in search value property and Rerun the processor.&lt;/P&gt;&lt;P&gt;If you are still having issues please attach your input file contents...!!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 09:18:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/replacing-blank-lines-in-a-file-using-a-efficeint-approach/m-p/179597#M141843</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T09:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: replacing blank lines in a file using a efficeint approach</title>
      <link>https://community.cloudera.com/t5/Support-Questions/replacing-blank-lines-in-a-file-using-a-efficeint-approach/m-p/179598#M141844</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt; it worked Thanks a lot appreciate your help!!!. Apologies for the silly mistake, there was a space on the first line&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:28:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/replacing-blank-lines-in-a-file-using-a-efficeint-approach/m-p/179598#M141844</guid>
      <dc:creator>dhieru</dc:creator>
      <dc:date>2018-01-04T12:28:58Z</dc:date>
    </item>
  </channel>
</rss>

