暗能星系

    • 登录
    • 搜索

    GenoStack对大数据分析的支持

    大数据
    1
    5
    26
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • A
      anneng 最后由 anneng 编辑

      整体架构:
      1.底层基于k8s+ceph
      2.将spark部署到k8s 使用apache livy提供spark rest api(需要验证其必要性)
      使用argo跑流程?(待定)
      3.部署验证adam、glow、hail、gatk等大数据分析流程 特别是对parquet、delta的支持
      重点验证:cromwell 自动化调度到spark上是否可行
      4.jupyter 支持pyspark sparkR sparksql等api
      百万级单细胞数据的处理 https://github.com/asif7adil/scSparkl
      https://github.com/martaccmoreno/gexp-ml-dask
      5.ui支持 mango、superset、redash、rath 等可视化分析工具
      6.GPU支持 使用RAPIDS来加速spark

      1 条回复 最后回复 回复 引用 0
      • A
        anneng 最后由 anneng 编辑

        https://spark.apache.org/docs/latest/running-on-kubernetes.html
        在k8s之上运行spark
        一,安全问题
        二,前提
        Kubernetes >= 1.22
        kubectl可用
        Kubernetes DNS 可用
        三,运行逻辑
        28c41dac-24cf-4c79-8b77-863999d92465-image.png
        Spark-submit可直接用于将Spark应用程序提交到Kubernetes集群。 提交机制的工作原理如下:Spark 创建一个在 Kubernetes pod 中运行的 Spark 驱动程序。 驱动程序创建也在 Kubernetes Pod 中运行的执行器并连接到它们,并执行应用程序代码。 当应用程序完成时,执行程序 Pod 终止并被清理,但驱动程序 Pod 会保留日志并在 Kubernetes API 中保持“已完成”状态,直到最终被垃圾收集或手动清理。

        四,应用镜像
        运行spark任务前 先要构建spark镜像 spark自己提供了命令可以自动进行构建
        kubernetes/dockerfiles/
        bin/docker-image-tool.sh(默认是JVM应用)
        提交任务:

        local是镜像里面的路径 可以使用--conf spark.kubernetes.file.upload.path配置一个上传路径  然后使用file://上传本地文件 这些文件和UI层怎么配合?包括app、jupyter、流程 后面都会向spark提交文件  另外就是kube-system等才有 cannot get resource "pods" in API group "" in the namespace "spark-demo" 权限  权限这一块怎么设计?
        ./bin/spark-submit     --master k8s://192.168.39.6:8443     --deploy-mode cluster     --name spark-pi     --class org.apache.spark.examples.SparkPi     --conf spark.executor.instances=5     --conf spark.kubernetes.container.image=spark --conf spark.kubernetes.namespace=kube-system  local:///opt/spark/examples/jars/spark-examples_2.12-3.4.1.jar
        

        client模式和集群模式的对比:
        https://sparkbyexamples.com/spark/spark-submit-command/?expand_article=1
        五,存储
        hostPath: mounts a file or directory from the host node’s filesystem into a pod.
        emptyDir: an initially empty volume created when a pod is assigned to a node.
        nfs: mounts an existing NFS(Network File System) into a pod.
        persistentVolumeClaim: mounts a PersistentVolume into a pod.

        1 条回复 最后回复 回复 引用 0
        • A
          anneng 最后由 anneng 编辑

          a3d39aff-297b-48af-a309-4cab543e7a66-image.png
          https://medium.com/empathyco/running-apache-spark-on-kubernetes-2e64c73d0bb2
          Spark Submit is sent from a client to the Kubernetes API server in the master node.
          Kubernetes will schedule a new Spark Driver pod.
          Spark Driver pod will communicate with Kubernetes to request Spark executor pods.
          The new executor pods will be scheduled by Kubernetes.
          Once the new executor pods are running, Kubernetes will notify Spark Driver pod that new Spark executor pods are ready.
          Spark Driver pod will schedule tasks on the new Spark executor pods.

          另外一个是Spark Operator项目
          几种运行方式的对比
          https://blog.cellenza.com/en/data/using-spark-with-kubernetes-k8s/
          c24f80a3-ffdd-441e-8ac7-60ab0ce81c27-image.png
          https://aws.amazon.com/cn/about-aws/whats-new/2023/06/amazon-emr-eks-spark-operator-submit/ 亚马逊两个都支持 看来这两个各有应用场景
          使用argo跑流程
          e83edabe-2eb0-4900-8e87-d3e3cffa2ca1-image.png

          1 条回复 最后回复 回复 引用 0
          • A
            anneng 最后由 编辑

            https://dev.to/stack-labs/my-journey-with-spark-on-kubernetes-in-python-1-3-4nl3
            一个spark+k8s+python教程

            1 条回复 最后回复 回复 引用 0
            • A
              anneng 最后由 编辑

              运行spark-shell
              ./bin/spark-shell --master k8s://192.168.39.6:8443 --conf spark.kubernetes.container.image=spark --conf spark.kubernetes.context=minikube --conf spark.kubernetes.namespace=spark-demo --verbose

              1 条回复 最后回复 回复 引用 0
              • First post
                Last post
              Powered by 暗能星系