title: Reading .tar files in Spark and loading to Hive
body: <p>I am trying to read .tar files that were located ona linux machine.</p>
  
  <p>tar files had .gz files and text files with in that.</p>
  
  <p>I want to write a spark program to pick the tar file and load the .gz files or underlying text files to Hive table.</p>
  
  <p>the Spark APIs were very confusing. some are using binaryFiels, TextFiles and WholeTextFile API.</p>
  
  <p>Can someone recommed a good example and API for my requirement.</p>
  
  <p>Update: Spark Version: 2.0.2</p>