title: How to read Spark log files? .Iz4 or .snappy
body: <p>I want to read some logs but I cannot. So far, I've tried:</p>
  
  <ul>
  <li><code>hadoop fs -text &lt;file&gt;</code> </li>
  </ul>
  
  <p>But the only thing I get is:  <code>INFO compress.CodecPool: Got brand-new decompressor [.lz4]</code> (same for .snappy)</p>
  
  <ul>
  <li><code>val rawRdd = spark.sparkContext.sequenceFile[BytesWritable, String](&lt;file&gt;)</code> </li>
  </ul>
  
  <p>It returns me <code>&lt;file&gt; is not a SequenceFile</code></p>
  
  <ul>
  <li><code>val rawRdd = spark.read.textFile(&lt;file&gt;)</code></li>
  </ul>
  
  <p>In this case <code>java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy()Z</code></p>
  
  <ul>
  <li><p>download the file to a local filesystem and then use <code>lz4 -d &lt;file&gt;</code> to decompress and try to see the content</p></li>
  <li><p>I followed <a href="https://stackoverflow.com/a/48029807/5081366">this SO post</a>: </p></li>
  </ul>
  
  <p><code>with open (snappy_file, "r") as input_file:
    data = input_file.read()
    decompressor = snappy.hadoop_snappy.StreamDecompressor()
    uncompressed = decompressor.decompress(data)</code></p>
  
  <p>but when I want to <code>print(uncompressed)</code>, I only get <code>' 'b</code></p>