Ignite与Spark集成时,ClassNotFoundException问题解决
参考文章:https://apacheignite-fs.readme.io/docs/installation-deployment
Spark application deployment model allows dynamic jar distribution during application start. This model, however, has some drawbacks:
- Spark dynamic class loader does not implement
getResourcemethods, so you will not be able to access resources located in jar files. - Java logger uses application class loader (not the context class loader) to load log handlers which results in
ClassNotFoundExceptionwhen using Java logging in Ignite.
There is a way to alter default Spark classpath for each launched application (this should be done on each machine of the Spark cluster, including master, worker and driver nodes).
- Locate the
$SPARK_HOME/conf/spark-env.shfile. If this file does not exist, create it from template using$SPARK_HOME/conf/spark-env.sh.template - Add the following lines to the end of the
spark-env.shfile (uncomment the line settingIGNITE_HOMEin case if you do not have it globally set):
# Optionally set IGNITE_HOME here.
# IGNITE_HOME=/path/to/ignite IGNITE_LIBS="${IGNITE_HOME}/libs/*" for file in ${IGNITE_HOME}/libs/*
do
if [ -d ${file} ] && [ "${file}" != "${IGNITE_HOME}"/libs/optional ]; then
IGNITE_LIBS=${IGNITE_LIBS}:${file}/*
fi
done export SPARK_CLASSPATH=$IGNITE_LIBS
You can verify that the Spark classpath is changed by running bin/spark-shell and typing a simple import statement:
scala> import org.apache.ignite.configuration._
import org.apache.ignite.configuration._
官方给出的以上解决方案,在spark2.1上是可以的,但是在spark2.2中不起作用,对比了一下spark2.1和spark2.2中的spark-env.sh脚本,发现其中一些变量,在spark2.2中不存在了:

Ignite与Spark集成时,ClassNotFoundException问题解决的更多相关文章
- Ignite(三): Ignite VS Spark
参考:https://www.itcodemonkey.com/article/9613.html gnite 和 Spark,如果笼统归类,都可以归于内存计算平台,然而两者功能上虽然有交集,并且 I ...
- Spark集成
一.Spark 架构与优化器 1.Spark架构 (重点) 2.Spark优化器 二.Spark+SQL的API (重点) 1.DataSet简介 2.DataFrame简介 3.RDD与DF/DS的 ...
- Spark:利用Eclipse构建Spark集成开发环境
前一篇文章“Apache Spark学习:将Spark部署到Hadoop 2.2.0上”介绍了如何使用Maven编译生成可直接运行在Hadoop 2.2.0上的Spark jar包,而本文则在此基础上 ...
- EhCache WebCache 与 SpringMVC集成时 CacheManager冲突的问题
转自:点击打开链接 http://www.cnblogs.com/daxin/p/3560989.html EhCache WebCache 与 SpringMVC集成时 CacheManager冲突 ...
- spark集成hive遭遇mysql check失败的问题
问题: spark集成hive,启动spark-shell或者spark-sql的时候,报错: INFO MetaStoreDirectSql: MySQL check failed, assumin ...
- struts2与spring集成时action的class属性值意义
struts2单独使用时action由struts2自己负责创建:与spring集成时,action实例由spring负责创建(依赖注入).这导致在两种情况下struts.xml配置文件的略微差异. ...
- eclipse运行spark程序时日志颜色为黑色的解决办法
自从开始学习spark计算框架以来,我们老师教的是local模式下用eclipse运行spark程序,然后我在运行spark程序时,发现控制台的日志颜色总是显示为黑色,哇,作为程序猿总有一种强迫症,发 ...
- Spark启动时的master参数以及Spark的部署方式
我们在初始化SparkConf时,或者提交Spark任务时,都会有master参数需要设置,如下: conf = SparkConf().setAppName(appName).setMaster(m ...
- 持续集成时 travis 和 codecov 等 yaml 文件的配置
最近在项目中在配置CodeCov 以及Travis 和 AppVeyor做持续集成时,遇到了一些问题,也解决了一些问题.顺便拿来分享一下. 首先时Travis,这个主要是来跑基于 Linux 环境下的 ...
随机推荐
- [转载] KAFKA分布式消息系统
转载自http://blog.chinaunix.net/uid-20196318-id-2420884.html Kafka[1]是linkedin用于日志处理的分布式消息队列,linkedin的日 ...
- django作业2
管理后台 1.登陆Form 2.Session (用装饰器实现) 3.装饰器 4.主机,主机组 添加(主机,主机组) 删除 修改 查询
- Zabbix 3.0 从入门到精通(zabbix使用详解)
第1章 zabbix监控 1.1 为什么要监控 在需要的时刻,提前提醒我们服务器出问题了 当出问题之后,可以找到问题的根源 网站/服务器 的可用性 1.1.1 网站可用性 在软件系统的高可靠性(也 ...
- phpcms v9 前台getshell脚本
phpcms v9 前台getshell脚本 用法:python phpcmsv9getshell.py http://baidu.com # -*- coding:utf-8 -*- ''' --- ...
- 向maven中添加本地jar包
<dependency> <groupId>org.csource</groupId> <artifactId>fastdfs-client-java& ...
- 内存泄漏监测-LeakCanary
内存泄漏监测方法之使用LeakCanary LeakCanary出处: github:https://github.com/square/leakcanary/issues square 公司 这个公 ...
- 九、VueJs 填坑日记之在项目中使用jQuery
很多人学习 js 都是从 jQuery 开始的,我也不例外.有时候进行一些操作的时候,还是感觉 jQuery 比较好用,那么,我们如何在项目中使用 jQuery 呢?这篇博文带你实践. 引用 jQue ...
- 加密代理和Retrofit解密Converter
最近在研究安卓的Retrofit框架,服务器的数据全部用加密算法加密了,发现无法使用"com.squareup.retrofit2:converter-gson:2.1.0"Jar ...
- 学习爬虫的day01
反扒 1.浏览器伪装加一个协议头(即浏览器的协议头) 火狐的浏览器协议头='User-Agent':'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; r ...
- 揭秘 HashMap 实现原理(Java 8)
HashMap 作为一种容器类型,无论你是否了解过其内部的实现原理,它的大名已经频频出现在各种互联网面试中了.从基本的使用角度来说,它很简单,但从其内部的实现来看(尤其是 Java 8 的改进以来), ...