Top "Scala" questions

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

How to pass -D parameter or environment variable to Spark job?

I want to change Typesafe config of a Spark job in dev/prod environment. It seems to me that the …

scala apache-spark
Converting a Java collection into a Scala collection

Related to Stack Overflow question Scala equivalent of new HashSet(Collection) , how do I convert a Java collection (java.util.…

java scala scala-collections scala-2.7
What's the best way to inverse sort in scala?

What is the best way to do an inverse sort in scala? I imagine the following is somewhat slow. list.…

scala
how to use Regexp_replace in spark

I am pretty new to spark and would like to perform an operation on a column of a dataframe so …

scala apache-spark apache-spark-sql regexp-replace
How to convert a scala.List to a java.util.List?

How to convert Scala's scala.List into Java's java.util.List?

java scala scala-java-interop
How to avoid duplicate columns after join?

I have two dataframes with the following columns: df1.columns // Array(ts, id, X1, X2) and df2.columns // Array(ts, …

scala apache-spark apache-spark-sql
SparkSQL - Read parquet file directly

I am migrating from Impala to SparkSQL, using the following code to read a table: my_data = sqlContext.read.parquet(…

scala apache-spark hive apache-spark-sql hdfs
How do I get around type erasure on Scala? Or, why can't I get the type parameter of my collections?

It's a sad fact of life on Scala that if you instantiate a List[Int], you can verify that your …

scala type-erasure
How to read from standard input line by line?

What's the Scala recipe for reading line by line from the standard input ? Something like the equivalent java code : import …

java scala io java.util.scanner
Is asynchronous jdbc call possible?

I wonder if there is a way to make asynchronous calls to a database? For instance, imagine that I've a …

java scala jdbc asynchronous nonblocking