Hi, If Spark 2.0 supports a format, use it. For CSV it's csv() or format("csv"). It should be supported by Scala and Java. If the API's broken for Java (but works for Scala), you'd have to create a "bridge" yourself or report an issue in Spark's JIRA @ https://issues.apache.org/jira/browse/SPARK.
Have you run into any issues with CSV and Java? Share the code. Pozdrawiam, Jacek Laskowski ---- https://medium.com/@jaceklaskowski/ Mastering Apache Spark 2.0 http://bit.ly/mastering-apache-spark Follow me at https://twitter.com/jaceklaskowski On Sat, Sep 10, 2016 at 7:30 AM, Muhammad Asif Abbasi <asif.abb...@gmail.com> wrote: > Hi, > > I would like to know what is the most efficient way of reading tsv in Scala, > Python and Java with Spark 2.0. > > I believe with Spark 2.0 CSV is a native source based on Spark-csv module, > and we can potentially read a "tsv" file by specifying > > 1. Option ("delimiter","\t") in Scala > 2. sep declaration in Python. > > However I am unsure what is the best way to achieve this in Java. > Furthermore, are the above most optimum ways to read a tsv file? > > Appreciate a response on this. > > Regards. --------------------------------------------------------------------- To unsubscribe e-mail: user-unsubscr...@spark.apache.org