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 环境下的 ...
随机推荐
- OpenTSDB - 分布式可扩展的监控系统
OpenTSDB - A Distributed, Scalable Monitoring System http://opentsdb.net/getting-started.html http:/ ...
- 阿里Dubbo疯狂更新,关Spring Cloud什么事?
最近,开源社区发生了一件大事,那个全国 Java 开发者使用最广的开源服务框架 Dubbo 低调重启维护,并且 3 个月连续发布了 4 个维护版本. 我上次在写放弃Dubbo,选择最流行的Spring ...
- CocoaPods 安装及使用
1.开启 terminal 2.移除现有 Ruby 默认源 $ gem sources --remove https://rubygems.org/ 3.使用新的源 $ gem sources -a ...
- 使用mysql5.7新特性(虚拟列)解决使用前通配符性能问题
众所周知,在mysql里的后通配符可以使用索引查找,前通配查询却无法使用到索引,即使是使用到了索引,也是使用了索引全扫描,效率依然不高,再MySQL5.7之前,一直都没有好的办法解决,但是到了MySQ ...
- 开始python成长之路
因为某种特殊原因很不幸的得了脱髓鞘 正要去实习 大展身手 甚至公司都选好了 可就在这个节骨眼..得了传说中的脱髓鞘.经过一年的修养 我决定还是要站起来 毕竟一生的时间很长 这一段时间 我都在玩游戏赚钱 ...
- Linux上安装和卸载mysql数据库 (一)
一.前言 第一次写博客,很激动同时有点畏惧,激动是我可以将我的经验进行分享,畏惧是我怕我写的东西,大家借鉴的时候,有些步骤不能成功.不过,我还是很有信息的,我分享的经验都是我搭建成功以后才分享出来.这 ...
- 模块化编程node
众所周知,Node.js 的出现造就了全栈工程师,因为它让 JavaScript 的舞台从浏览器扩大到了服务端 而 Node.js 的强大也得益于它庞大的模块库,所以学习 Node.js 第一步还得从 ...
- 搭建一个属于自己的webpack config(-)
搭建一个属于自己的webpack config(-) 前期准备 环境说明 mac 10.12.6 node v8.8.1 npm 5.4.2 全局安装下webpack.webpack-dev-serv ...
- Spring Cloud Ribbon 整合 Hystrix
在前面随笔 Spring Cloud 之 Ribbon 的ribbon工程基础上进行改造 1.pom.xml 加入依赖 <dependency> <groupId>org.sp ...
- C++课程设计2
PS:大一下学期C++课程设计 1.成绩管理系统 #include<stdio.h> #include<string> #include<iostream> #in ...