运行不了hadoop,一直报错
不知道哪个地方有问题,我按照老师的模板写的啊
不知道哪个地方有问题,我按照老师的模板写的啊
2020-02-05
求大神指点
现在把代码按照老师讲解重写了一遍,但是运行的时候报获取字段方法错误:
String id = jsonObj.getString("uid"); 但是通过System.out.println(id);能在日志中打印出来,真的不知道怎么办了 2020-02-06 17:20:56,950 INFO mapreduce.Job: Task Id : attempt_1580976866673_0005_m_000000_2, Status : FAILEDError: java.lang.NullPointerException at com.hadoop.dataclean.datacleanmap.map(datacleanmap.java:27) at com.hadoop.dataclean.datacleanmap.map(datacleanmap.java:13) at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:146) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:799) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:347) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:174) 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:1730) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:168)
举报