Please follow the style of the existing codebase when you make a change. Apache Spark follows the official Scala style guide, but with the following changes:
Limit lines to 100 characters.
Always import packages using absolute paths (e.g. scala.util.Random) instead of relative ones (e.g. util.Random).
In addition, sort imports in the following order:
java.* and javax.*scala.*org.*, com.*, etc)org.apache.spark.*)Don't use infix notation for methods that aren't operators. For example, instead of list map func, use list.map(func), or instead of string contains "foo", use string.contains("foo"). This is to improve familiarity to developers coming from other languages.
Put curly braces even around one-line if, else or loop statements:
// Correct:
if (true) {
println("Wow!")
}
// Wrong:
if (true)
println("Wow!")
|