Top "Scala" questions

Scala is a general-purpose programming language principally targeting the Java Virtual Machine.

Array initializing in Scala

I'm new to Scala ,just started learning it today.I would like to know how to initialize an array in …

scala array-initialization
Scala: join an iterable of strings

How do I "join" an iterable of strings by another string in Scala? val thestrings = Array("a","b","c") val …

string scala
I want to get the type of a variable at runtime

I want to get the type of a variable at runtime. How do I do this?

scala reflection
Scala check if element is present in a list

I need to check if a string is present in a list, and call a function which accepts a boolean …

string list scala find
How to create a DataFrame from a text file in Spark

I have a text file on HDFS and I want to convert it to a Data Frame in Spark. I …

scala apache-spark dataframe apache-spark-sql rdd
Best way to parse command-line parameters?

What's the best way to parse command-line parameters in Scala? I personally prefer something lightweight that does not require external …

scala command-line command-line-parsing
How do I check for equality using Spark Dataframe without SQL Query?

I want to select a column that equals to a certain value. I am doing this in scala and having …

scala apache-spark dataframe apache-spark-sql
How to parse JSON in Scala using standard Scala classes?

I am using the build in JSON class in Scala 2.8 to parse JSON code. I don't want to use the …

json scala
Apache Spark: map vs mapPartitions?

What's the difference between an RDD's map and mapPartitions method? And does flatMap behave like map or like mapPartitions? Thanks. (…

performance scala apache-spark rdd
Add jars to a Spark Job - spark-submit

True ... it has been discussed quite a lot. However there is a lot of ambiguity and some of the answers …

java scala apache-spark jar spark-submit