livy提交任务报错com.cloudera.livy.shaded.kryo.kryo.KryoException: Unable to find class: GATest.ConJob
今天在测试的时候,出现这个错误,找了好久网上找不到,最近尝试多次终于成功了。
问题就在于:Unable to find class
你要把你已经uploadJar的jar包中包含的类,引入工程。
我用spring-boot+livy+spark的一个例子:
public class Contains extends Kryo{@RequestMapping("/contains")@ResponseBody public String contains(@RequestParam(value="path1", defaultValue="") String path1,@RequestParam(value="path2", defaultValue="") String path2) {double sum=0;if (path1.length() == 0 || path2.length() == 0) {return "path is null";}else {try{LivyClient client = new LivyClientBuilder().setURI(new URI("http://master.esri.local:8998/")).build();System.out.println("this is the client"+ "*******************************************");client.uploadJar(new File("/usr/local/jarsubmit/EsriGA.jar")).get();System.out.println("this is the uploadJar"+ "*******************************************");//client.uploadJar(new File("C:\\testGA\\GATest2.jar")).get(); sum = client.submit(new GATest.ConJob(10)).get();//sum = client.submit(com.esrichina.gaextension.app.IntersectApp).get(); System.out.println("the client is submitted "+ "*******************************************");client.stop(true);System.out.println("the client is stopped "+ "*******************************************");}catch (Exception e){e.printStackTrace();}}return Double.toString(sum);}public static void main(String[] args) throws Exception {SpringApplication.run(Contains.class, args);} }
ConJob的源码: package GATest;import com.cloudera.livy.Job; import com.cloudera.livy.JobContext;/*** Created by xiao on 2017/8/4.*/ public class ConJob implements Job<Double> {private final int samples;public ConJob(int samples) {this.samples = samples;}int num = 0;@Overridepublic Double call(JobContext ctx) throws Exception {for (int i = 0; i < samples; i++) {System.out.println("this is the number"+ i);num+=i;}double dnum=num;System.out.println("this is the number"+ dnum);return dnum;} }
livy提交任务报错com.cloudera.livy.shaded.kryo.kryo.KryoException: Unable to find class: GATest.ConJob相关推荐
- 【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 )
文章目录 一.报错信息 二.解决方案 一.报错信息 在 Android Studio 中首次向 GitHub 提交代码 , 报错 : Push failed: Failed with error: C ...
- 【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read from remote )
文章目录 一.报错信息 二.解决方案 一.报错信息 在 Android Studio 中首次向 GitHub 提交代码 , 报错 : Push failed: Failed with error: C ...
- SVN提交代码报错:svnlook: E000002:不能打开文件
SVN提交代码时报错: Commit failed (details follow): Commit blocked by pre-commit hook (exit code 1) with out ...
- 使用git push命令提交更改报错 fatal: unable to access ‘http://github.com/xxxxxx/‘: OpenSSL SSL_read: Connection
使用git push命令提交更改报错 fatal: unable to access 'http://github.com/xxxxxx/': OpenSSL SSL_read: Connection ...
- Idea提交代码报错:Push rejected: Push master to origin/master was rejected by remote
问题描述 Idea提交代码报错:Push rejected: Push master to origin/master was rejected by remote 问题分析 网上找了一些帖子,但是对 ...
- SVN提交代码报错,怎么破?
目录 SVN提交代码报错 1. SVN提交被锁定(locked) 2. SVN提交已存在版本控制信息(is already under version control) SVN提交代码报错 1. SV ...
- npm install报错 npm ERR,code ERESOLVE npm ERR,ERESOLVE unable to resolve dependency tree
文章目录 前言 问题分析 解决方法 转载于 前言 在下载npm时报错npm ERR! code ERESOLVE npm ERR! ERESOLEVE unable to resolve depend ...
- 报错:org.springframework.cloud.gateway.support.NotFoundException: Unable to find instance for localhos
微服务报错:org.springframework.cloud.gateway.support.NotFoundException: Unable to find instance for local ...
- docker中安装nacos报错 com.alibaba.nacos.shaded.io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
docker中安装nacos报错 com.alibaba.nacos.shaded.io.grpc.StatusRuntimeException: UNAVAILABLE: io exception ...
最新文章
- 6、单机运行环境搭建之 --CentOS-6.4安装MySQL 5.6.10并修改MySQL的root用户密码
- linux控制台单人五子棋简书,Java控制台版五子棋的简单实现方法
- Leetcode--304. 二维区域和检索
- 系统维护好帮手—Starter
- 细说linux视频,Shell变量-细说linux配套视频
- 业界资讯:adobe creative suite 5.5你准备好了吗?
- 什么是编译性语言、解释性语言和脚本语言
- 【软件笔记------Orcad Capture CIS 17.2/pads vx2.7】------ orcadpads PCB设计简要教程
- 使用二维数组打印一个 10 行杨辉三角
- Samsung ML-1640/1641/1645/2240/2241/2245/scx4200/4300/4623/4824/4828免费清零软件2.1.2完全版
- 面试记录-KPMG(毕马威)
- MySQL8 设置远程访问授权
- acm算法之三大背包问题
- 公众号用聊天式万用查询系统多用户后台版
- 状态压缩:对动态规划进行降维打击
- 拥有数据报表模板,不再愁如何制作数据报表
- charts中各种图演示
- 计算机更改用户密码,教你怎么修改电脑开机密码
- 2018 Android开发面试经历
- PTA新生训练赛----3
热门文章
- php中mysql和mysqli_PHP中mysql和mysqli的区别
- 传统公司部署OpenStack(t版)简易介绍(九)——控制台部署
- Java:用POI读写Excel
- oracle学习数据,oracle学习中的一些心得
- 优朋普乐大数据_优朋普乐黑维炜:互动电视市场已进入成熟发展期
- 查看mysql数据库版本_MySQL数据库之查看MySQL版本的四种方法
- build 之前执行task_Android Gradle新增buildtypes以及编译前执行自定义task
- python正则表达式匹配模式屠夫之桥_Python 编程快速上手 第 7章 模式匹配与正则表达式...
- android分辨率hdpi,Android资源 - 哪些分辨率应该进入hdpi,ldpi,mdpi和xhdpi目录
- 安徽大学计算机语言学考研真题,安徽大学外国语言学及应用语言学考研经验考研真题考研参考书复试分数线...