Use Spark Java APIs