Skip to content

Chapter 22: The T-Test

Programs of chapter 22 of the book Data Algorithms (O'Reilly, 2015), running on Spark 4.3.0.

Chapter notes: chap22 · chap22/scala

Sample input: data/chap22/biosets1.txt · data/chap22/biosets2.txt · data/chap22/biosets_files.txt · data/chap22/timetable.txt

Run the commands from the repository folder after building the jar (Running the programs).

Spark (Java)

chap22.spark.SparkTtest

Source: SparkTtest.java

scripts/run_spark.sh org.dataalgorithms.chap22.spark.SparkTtest data/chap22/timetable.txt data/chap22/biosets_files.txt "local[*]"
  • Writes to ttest/ in the current directory; delete it first if it exists: rm -r ttest

Spark (Java 8 lambdas)

chap22.sparkwithlambda.SparkTtest

Source: SparkTtest.java

scripts/run_spark.sh org.dataalgorithms.chap22.sparkwithlambda.SparkTtest data/chap22/timetable.txt data/chap22/biosets_files.txt "local[*]"
  • Writes to ttest/ in the current directory; delete it first if it exists: rm -r ttest

Spark (Scala)

chap22.scala.Ttest

Source: Ttest.scala

scripts/run_spark.sh org.dataalgorithms.chap22.scala.Ttest data/chap22/timetable.txt "data/chap22/biosets[12].txt" /tmp/data-algorithms/chap22.scala.Ttest/output