zoukankan      html  css  js  c++  java
  • Jupyter配置Spark开发环境

    兄弟连大数据培训和大家一起探究Jupyter配置

    Spark

    开发环境

    简介

      为Jupyter配置Spark开发环境,可以安装全家桶–Spark Kernel或Toree,也可按需安装相关组件。

      考虑到一般人更喜欢一步到位,并且Toree将会代替Spark Kernel,故直接且仅需安装Toree即可,不过下面还是给出了所有的安装方法。

      Spark Kernel的安装

      参照Spark Kernel支持的语言,安装好Spark Kernel后,其默认可以支持Scala,Python,R,SQL,对应的Spark实现分别是Scala with Spark,Python with PySpark,R With SparkR,Spark SQL。

      参照上述链接,要切换语言时,只需简单的在语句前面加上%%scala/%%pyspark即可。当然,什么都不加时,默认语言为Scala。

      另外,启动Jupyter后,可直接在http://localhost:4040/jobs/监控所有作业。

      Spark Kernel(旧的项目)

      参照下面的安装步骤进行即可,就是有些繁琐。

      Getting Started with theSpark Kernel

      Guide to Integrating theSpark Kernel with Jupyter

      Toree(新项目)

      根据Spark Kernel的介绍,自从Spark Kernel变成Apache的孵化项目后,其最新仓库已经 迁移到了incubator-toree。

      安装时,参照Quick Start What isApache Toree ,仅需两条命令即可完成安装。

      pip install toree

      jupyter toree install--spark_home=your-spark-home12

      值得注意的是:

      Toree虽然还在孵化中,但已经能完成上述Spark Kernel的全部功能,即可支持PySpark,Spark SQL等。

      该kernel安装在/usr/local/share/jupyter/kernels/apache_toree_scala目录下

      Spark组件单独安装

      除了安装上面的方法安装Spark的全家桶外,还可以按需对各组件进行安装。

      Scala Kernel的安装

      参照jupyter-scala安装即可。

      PySpark的安装

      PySpark: How to install andIntegrate with the Jupyter Notebook

      Integrate Apache Spark withlatest IPython Notebook (Jupyter 4.x)

      Running Spark ApplicationsUsing IPython and Jupyter Notebooks

     

     

  • 相关阅读:
    APP内跳转链接用INTENT,但是用系统浏览器,在内部还是要webview
    MNIST练习
    Trigger_word_detection_v1a
    Neural_machine_translation_with_attention_v4a
    Operations_on_word_vectors_v2a
    Improvise_a_Jazz_Solo_with_an_LSTM_Network_v3a-2
    Dinosaurus_Island_Character_level_language_model_final_v3b
    Building_a_Recurrent_Neural_Network_Step_by_Step_v3b
    Sequence model
    Face_Recognition_v3a
  • 原文地址:https://www.cnblogs.com/xdlltao/p/5941413.html
Copyright © 2011-2022 走看看