Error: java.lang.NullPointerException
at outputformat.MysqlOutputFormat.getRecordWriter(MysqlOutputFormat.java:27)
at org.apache.hadoop.mapred.ReduceTask$NewTrackingRecordWriter.<init>(ReduceTask.java:540)
at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:614)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:389)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)

去yarn服务器查看本次mapreduce 任务的日志http://linux02:8088/proxy/application_1536674553441_0007/

方案: 查找代码 一定是密码出问题了

有时候没有加载到mysql驱动也报同样的错误 这样就是在执行的时候 加上  -libjars  例如:

~/modules/hadoop-2.7.2/bin/yarn jar ct_analysis-1.0-SNAPSHOT.jar mr.CountDurationRunner -libjars ./mysqlLib/mysql-connector-java-5.1.46-bin.jar

心得:1:不同的代码错误可能会导致同样的报错

    2,排查的方式就是让任务执行完毕(就算是错误的)这样去看日志才能有全部的报错信息

Error: java.lang.NullPointerException at outputformat.MysqlOutputFormat.getRecordWriter(MysqlOutputFormat.java:27)的更多相关文章

  1. java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.yunweather.app.db.YunWeatherDB.loadProvinces()' on a null object reference

    NullPointerException:查看自己的什么地方是否对空指针进行了操作 Attempt to invoke virtual method 'java.util.List com.yunwe ...

  2. Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.catherine.forrealm.about_utils.RealmHelper.findAllStudent()' on a null object reference

    报错: 解决方法: private RealmHelper realm_search = new RealmHelper(); 进而发现在写RecyclerView时,遗漏如下代码: recy_sea ...

  3. 给内部类对象数组属性赋值时报错:Exception in thread "main" java.lang.NullPointerException

    前言 1255: 打怪升级(Java),写这个题目程序的时候,控制台提示如下错误: Exception in thread "main" java.lang.NullPointer ...

  4. FCKEditor报java.lang.NullPointerException

    1.需要在 加value=“ ” <FCK:editor instanceName="replycontent" basePath="/fckeditor" ...

  5. java.lang.NullPointerException的可能原因及处理

    java.lang.NullPointerException的可能原因及处理 java.lang.NullPointerException具体意思是空指针异常,最常见的问题就是没有初始化. 字符串等数 ...

  6. java.lang.NullPointerException错误分析

    java.lang.NullPointerException是什么错误 你使用了空的指针.在java中虽然号称抛弃了C++中不安全的指针,但其实他所有的东西你都可以理解为指针.这种情况一般发生在你使用 ...

  7. java使用类数组 报错Exception in thread "main" java.lang.NullPointerException

    源代码如下: Point[] points=new Point[n];//Point是一个类 for(int i=0;i<n;i++) { System.out.print("请输入x ...

  8. 安卓小程序的一次bug调试,报错:java.lang.NullPointerException,logcat学习

    做实验的时候,调试了很久后模拟器执行后,app还是会崩溃并停止运行,错误如下. 因为初学,所以也不知道怎么使用调试工具,也不懂看日志,经过学习后尝试这查看了LogCat日志上面有这样的提示: 其中引起 ...

  9. solr定时更新索引遇到的问题(SolrDataImportProperties Error loading DataImportScheduler properties java.lang.NullPointerException)

    问题描述 报如下错误,很显然,问题原因:空指针异常: ERROR (localhost-startStop-1) [   ] o.a.s.h.d.s.SolrDataImportProperties ...

随机推荐

  1. UVa 11992 Fast Matrix Operations (线段树,区间修改)

    题意:给出一个row*col的全0矩阵,有三种操作 1 x1 y1 x2 y2 v:将x1 <= row <= x2, y1 <= col <= y2里面的点全部增加v: 2 ...

  2. Ubuntu安装教程(双系统)

    经常要重装还不如写个安装教程省的每次都要查 Ubuntu安装教程: win7下安装Linux实现双系统全攻略:https://jingyan.baidu.com/article/c275f6bacc3 ...

  3. Windows10+Python3+BeautifulSoup4 安装

    用正则表达式来提取网页中的内容是相当麻烦的,这里介绍一个可以从HTML或XML文件中提取数据的Python库:Beautiful Soup.它能够通过你喜欢的转换器实现惯用的文档导航,查找,修改文档的 ...

  4. Node.js最新Web技术栈(2015年5月)

    https://cnodejs.org/topic/55651bf07d4c64752effb4b1

  5. iterm2 学习笔记

    itrem 笔记 选中即复制,有两种方式. 在新Tab中自动使用前一Tab路径,该怎么用? 系统热键:option+space 自动完成:输入打头几个字母,然后输入command+“;” iterm2 ...

  6. Icicle partition

    <!DOCTYPE html> <html> <head> <title>Icicle</title> <script type=&q ...

  7. Android-fragment的替换

    fragment的替换:是指一个Activity加载多个Fragment,当某些动作的时候在Activity替换Fragment显示: 昨天写的这几篇博客,Android-fragment简介-fra ...

  8. azkaban作业参数使用介绍

    azkaban作业参数使用介绍 参数传递是调度系统工作流运行时非常重要的一部分,工作流的执行,单个作业的执行,多个工作流之间的依赖执行,历史任务重算,都涉及参数传递和同步. azkaban的工作流中的 ...

  9. 反射导出 Excel

    /// <summary> /// List 数据导出Excel /// </summary> /// <param name="list">数 ...

  10. vs2017新建.netcore相关项目提示"未检测到任何.NET Core SDK"或打开.net core 相关项目Web层总是未能正常加载

    近来vs2017出现一个非常怪的现象,之前新建.net core相关项目好好的,现在出现问题,如下: 解决办法,是更新vs2017,界面如下: