<?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 Re: Cannot read sequence file which was created by NiFi CreateHadoopSequenceFile processor. in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-read-sequence-file-which-was-created-by-NiFi/m-p/213945#M74522</link>
    <description>&lt;P&gt;It is totally my fault! I have used wrong method (getBytes method) to get bytes from BytesWritable class object. There is copyBytes method for that purpose. &lt;/P&gt;</description>
    <pubDate>Fri, 16 Feb 2018 14:18:00 GMT</pubDate>
    <dc:creator>rfatkullin</dc:creator>
    <dc:date>2018-02-16T14:18:00Z</dc:date>
    <item>
      <title>Cannot read sequence file which was created by NiFi CreateHadoopSequenceFile processor.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-read-sequence-file-which-was-created-by-NiFi/m-p/213944#M74521</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I have a dataflow in which I create a sequence file from multiple files and load it to hdfs.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="60522-nifi-hdfs.png" style="width: 884px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16464iC95CF220D7DF8D07/image-size/medium?v=v2&amp;amp;px=400" role="button" title="60522-nifi-hdfs.png" alt="60522-nifi-hdfs.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Unfortunately I cannot correctly read the generated file in Spark.&lt;/P&gt;&lt;P&gt;For example, I generate 5 txt files:&lt;/P&gt;&lt;PRE&gt;1.txt
1
2.txt
2
22
3.txt
3
33
333
4.txt
4
44
444
4444
5.txt
5
55
555
5555
55555&lt;/PRE&gt;&lt;P&gt;and create from those files the new sequence file.&lt;/P&gt;&lt;P&gt;After that I try to read the resulting file:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="60523-nifi-hdfs2.png" style="width: 1880px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16465i41E07BBDE9D59663/image-size/medium?v=v2&amp;amp;px=400" role="button" title="60523-nifi-hdfs2.png" alt="60523-nifi-hdfs2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We can see there are corrupted or trash characters in output (they are zero bytes).&lt;/P&gt;&lt;P&gt;How I can get rid from those unnecessary bytes?&lt;/P&gt;&lt;P&gt;Some additional screenshots are attached.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="60521-nifi-hdfs5.png" style="width: 802px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16466i5858D659216507C9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="60521-nifi-hdfs5.png" alt="60521-nifi-hdfs5.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="60520-nifi-hdfs4.png" style="width: 803px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16467iF927C764A70A0157/image-size/medium?v=v2&amp;amp;px=400" role="button" title="60520-nifi-hdfs4.png" alt="60520-nifi-hdfs4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="60519-nifi-hdfs3.png" style="width: 802px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16468i013AFC20063D30DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="60519-nifi-hdfs3.png" alt="60519-nifi-hdfs3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="60518-nifi-hdfs2.png" style="width: 1880px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16469i3C6DCCAEBFF4992B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="60518-nifi-hdfs2.png" alt="60518-nifi-hdfs2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 03:35:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-read-sequence-file-which-was-created-by-NiFi/m-p/213944#M74521</guid>
      <dc:creator>rfatkullin</dc:creator>
      <dc:date>2019-08-18T03:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot read sequence file which was created by NiFi CreateHadoopSequenceFile processor.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-read-sequence-file-which-was-created-by-NiFi/m-p/213945#M74522</link>
      <description>&lt;P&gt;It is totally my fault! I have used wrong method (getBytes method) to get bytes from BytesWritable class object. There is copyBytes method for that purpose. &lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 14:18:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-read-sequence-file-which-was-created-by-NiFi/m-p/213945#M74522</guid>
      <dc:creator>rfatkullin</dc:creator>
      <dc:date>2018-02-16T14:18:00Z</dc:date>
    </item>
  </channel>
</rss>

