我试图在Spark 2.1中使用ignite 2.4。
我在spark-shell
--conf spark.diver.extraClassPath=/home/sshuser/apache-ignite-fabric-2.4.0-bin/libs/*:/home/sshuser/apache-ignite-fabric-2.4.0-bin/libs/optional/*:/home/sshuser/apache-ignite-fabric-2.4.0-bin/libs/ignite-indexing/*:/home/sshuser/apache-ignite-fabric-2.4.0-bin/libs/ignite-spring/* --conf spark.executor.extraClassPath=/home/sshuser/apache-ignite-fabric-2.4.0-bin/libs/*:/home/sshuser/apache-ignite-fabric-2.4.0-bin/libs/optional/*:/home/sshuser/apache-ignite-fabric-2.4.0-bin/libs/ignite-indexing/*:/home/sshuser/apache-ignite-fabric-2.4.0-bin/libs/ignite-spring/*
但是,我无法导入任何lib,例如
import org.apache.ignite.configuration._
error: object ignite is not a member of package org.apache
我该如何解决这个问题?
答案 0 :(得分:0)
/home/sshuser/apache-ignite-fabric-2.4.0-bin/libs/optional/*:
- Ignite在optional
中包含许多子文件夹,但java不包含子路径到classpath中。要包含火花罐,您应该将/home/sshuser/apache-ignite-fabric-2.4.0-bin/libs/optional/ignite-spark/*
添加到类路径中。
请阅读官方文档 - https://apacheignite-fs.readme.io/v2.4/docs/installation-deployment