Stealing the API from Spark.