我在此行中遇到n = len(A)
res = [A[i]*A[j] for i in range(n) for j in range(i, n)]
异常(在aws emr上以群集模式(yarn)运行spark)但在客户端模式下运行正常(master作为本地)
nullpointer
这是执行者的堆栈跟踪:
Map<String, Object> json = (Map<String, Object>) mapper.readValue(line, Map.class);
我使用以下依赖项:
18/04/17 12:33:16 ERROR executor.Executor: Exception in task 0.2 in stage 0.0 (TID 4)
java.lang.NullPointerException
at com.fasterxml.jackson.databind.util.LRUMap.get(LRUMap.java:47)
at com.fasterxml.jackson.databind.type.TypeFactory._fromClass(TypeFactory.java:707)
at com.fasterxml.jackson.databind.type.TypeFactory._constructType(TypeFactory.java:387)
at com.fasterxml.jackson.databind.type.TypeFactory.constructType(TypeFactory.java:354)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2161)
答案 0 :(得分:0)
com.fasterxml.jackson.databind.ObjectMapper
代替com.cloudera.com.fasterxml.jackson.databind.ObjectMapper