Apache Spark 2.0 Beta Now Available for CDH

Categories: Hadoop Spark

Today, Cloudera announced the availability of an Apache Spark 2.0 Beta release for users of the Cloudera platform.

Apache Spark 2.0 is tremendously exciting (read this post for more background) because (among other things):

  • The Dataset API further enhances Spark’s claim as the best tool for data engineering by providing compile-time type safety along with the benefits of a query-optimization engine.
  • The Structured Streaming API enables the modeling of streaming data as a continuous DataFrame and expresses operations on that data with a SQL-like API.
  • It offers a richer collection of ML algorithms, as well as the ability to persist models and pipelines.

The Spark 2.0 Beta is available in the form of a Cloudera Manager add-on service. Add-on services are separate, standalone components from Cloudera or its ISV partners that can utilize Cloudera Manager’s distribution, configuration, monitoring, resource-management, and lifecycle-management features. Thus, on any Cloudera Manager-managed cluster with the CDH parcel installed, the beta can be deployed “side-by-side” with Spark 1.6 and treated like any other service. This initial beta release (2.0 Beta 1) is compatible with the CDH 5.7.x line, 5.8.x line, and soon-to be-released 5.9.x line (and requires Scala 2.11); see the docs for more details.

To activate the beta, you should simply upload the Spark 2.0 Beta Custom Service Descriptor (CSD) file, which is available here, to Cloudera Manager. The CSD file contains all the configuration metadata needed to describe and manage the Spark 2.0 Beta in Cloudera Manager, including the URL of the relevant repository for parcel installation and deployment.

Installing the Spark Beta 2.0 CSD

  1. Download and save the Spark 2.0 Beta CSD file to your desktop.
  2. Login to the Cloudera Manager Server host, and upload the CSD file to /opt/cloudera/csd (or to whatever other location you may have configured for CSD files).
  3. Set the file ownership to cloudera-scm:cloudera-scm with permission 644.
  4. Restart the Cloudera Manager Server with service cloudera-scm-server restart
  5. Login to the Cloudera Manager Admin Console and restart the Cloudera Management Service.
    1. Do either of the following:
      1. Select Clusters -> Cloudera Management Service -> Cloudera Management Service, and then select Actions -> Restart. Or:
      2. On the Home -> Status tab, open the dropdown menu to the right of “Cloudera Management Service” and select Restart.
    2. The Command Details window shows the progress of stopping and then starting the roles. When the message “Command completed with n/n successful subcommands” appears, the task is complete. Click Close.
  6. You should now see the Spark 2.0 Beta in your “Parcels” list, and from there, it can be downloaded, distributed, and activated/deactivated as needed.parcels-with-spark2
  7. After deploying the parcel, create a “spark2 service” from the Cluster dropdown.

Fired Up and Ready to Go

With that, you’re now ready to explore the Spark 2.0 Beta. With the beta installed on your CDH cluster, you can run Spark 2.0 jobs as well as Spark 1.6 jobs simultaneously on the cluster.

Keep in mind, although no support is provided for beta releases, we strongly encourage you to test early and often in preparation for the upcoming GA release because there are significant differences between Spark 2.0 and the Spark 1.x line. As usual, please provide any and all feedback about the beta via the Cloudera Community’s Beta Releases forum.

Anand Iyer is a Director of Product Management at Cloudera.

Mark Grover is a Software Engineer working on the Spark team at Cloudera. He is a committer and PMC member on Apache Sentry and has also contributed to Apache Hadoop, Apache Hive, Apache Sqoop, and Apache Flume.

Facebooktwittergoogle_pluslinkedinmailFacebooktwittergoogle_pluslinkedinmail

17 responses on “Apache Spark 2.0 Beta Now Available for CDH

  1. Ruslan

    That’s awesome. Thanks a lot!

    When I pulled and installed that Spark2-beta CSD in our CDH 5.8.2 cluster, it activates 2.0.0.cloudera.beta1-1.cdh5.7.0.p0.108015 parcel.
    Notice “cdh5.7.0” in the middle.. Do you have a separate CSD/parcel for a CDH 5.8 cluster?

    Ruslan

  2. Phil

    HI,

    when i try to activate spark2 i get the following error:
    CDH (lower than 5.11) parcel required for SPARK2 (2.0.0.cloudera.beta2-1.cdh5.7.0.p0.110234) is not available.

    Cluster is running 5.8.3-1.cdh5.8.3.p0.2 where can i get CDH 5.11 ;)

    Cheers
    Phil

    1. Victor

      I am using the latest training VM, with CDH 5.8 and Cloudera Manager 5.8
      downloaded CSD, downloaded parcel, and sees it under /opt/cloudera/parcels
      but also getting the following when I click on activate
      CDH (lower than 5.11) parcel required for SPARK2 (2.0.0.cloudera.beta2-1.cdh5.7.0.p0.110234) is not available.
      the release note says it should be compatible with 5.7+

      1. Victor

        figured it out, under parcel configurations, if I uncheck
        Validate Parcel Relations

        Spark 2 installs successfully against CDH 5.8 training VM

  3. Mingzhou Zhuang

    Hi, when I try to list tables in Hive, it shows nothing.
    import org.apache.spark.sql.SparkSession
    val spark = SparkSession.builder().appName(“Spark2 Hive Example”).config(“spark.sql.warehouse.dir”, “hdfs://quickstart.cloudera/user/hive/warehouse”).enableHiveSupport().getOrCreate()
    spark.catalog.listTables(“default”).show()
    Could you show me how to load and save dataframe from / into Hive. Thanks.

  4. Karan

    I can’t see the spark2 listed in availble parcels. I followed the documentation word by word still it doesn’t show up. Although i think i might have made some mistake in setting permission to 644. I don’t know how to do it. Does anyone have any idea how to set the file ownership permission to 644 using command line and how to check if it’s already there or not? Please help.
    Regards
    Karan

  5. Razi AHmed

    I followed all the steps as instructed. The Spark2 is listed in the parcels list but there is error showing there in red text. Below is the text

    “Error when distributing to quickstart.cloudera : [Errno 20] Not a directory: u’/opt/cloudera/parcels/SPARK2_ON_YARN-2.0.0.cloudera.beta2.jar/meta/parcel.json’.”

    Any pointers?
    Regards,
    Razi

Leave a Reply

Your email address will not be published. Required fields are marked *

Prove you're human! *