1. 程式人生 > >是由於elasticsearch和jackson不符合造成的,需要根據elasticsearch版本下載對應的jackson

是由於elasticsearch和jackson不符合造成的,需要根據elasticsearch版本下載對應的jackson

2018-11-21 11:46:41 WARN TaskSetManager:66 - Lost task 4.0 in stage 0.0 (TID 4, 192.168.1.140, executor 1): java.lang.NoSuchFieldError: NO_INTS
at com.fasterxml.jackson.dataformat.smile.SmileParserBase.(SmileParserBase.java:185)
at com.fasterxml.jackson.dataformat.smile.SmileParser.(SmileParser.java:128)
at com.fasterxml.jackson.dataformat.smile.SmileParserBootstrapper.constructParser(SmileParserBootstrapper.java:104)
at com.fasterxml.jackson.dataformat.smile.SmileFactory._createParser(SmileFactory.java:401)
at com.fasterxml.jackson.dataformat.smile.SmileFactory.createParser(SmileFactory.java:315)
at org.elasticsearch.common.xcontent.smile.SmileXContent.createParser(SmileXContent.java:87)
at org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:140)
at org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:114)
at org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:92)
at org.elasticsearch.search.lookup.SourceLookup.sourceAsMapAndType(SourceLookup.java:89)
at org.elasticsearch.search.lookup.SourceLookup.sourceAsMap(SourceLookup.java:93)
at org.elasticsearch.search.SearchHit.getSourceAsMap(SearchHit.java:347)
at org.elasticsearch.search.SearchHit.sourceAsMap(SearchHit.java:333)
at org.elasticsearch.search.SearchHit.getSource(SearchHit.java:301)
at
at scala.collection.Iterator c

l a s s . f o r e a c
h ( I t e r a t o r .
s c a l a : 893 ) a t s c a l a . c o l l e c t i o n . A b s t r a c t I t e r a t o r . f o r e a c h ( I t e r a t o r . s c a l a : 1336 ) a t o r g . a p a c h e . s p a r k . r d d . R D D class.foreach(Iterator.scala:893) at scala.collection.AbstractIterator.foreach(Iterator.scala:1336) at org.apache.spark.rdd.RDD a n o n f u n anonfun foreach 1 1 a n o n f u n anonfun apply 28. a p p l y ( R D D . s c a l a : 921 ) a t o r g . a p a c h e . s p a r k . r d d . R D D 28.apply(RDD.scala:921) at org.apache.spark.rdd.RDD a n o n f u n anonfun foreach 1 1 a n o n f u n anonfun apply 28. a p p l y ( R D D . s c a l a : 921 ) a t o r g . a p a c h e . s p a r k . S p a r k C o n t e x t 28.apply(RDD.scala:921) at org.apache.spark.SparkContext a n o n f u n anonfun runJob 5. a p p l y ( S p a r k C o n t e x t . s c a l a : 2074 ) a t o r g . a p a c h e . s p a r k . S p a r k C o n t e x t 5.apply(SparkContext.scala:2074) at org.apache.spark.SparkContext a n o n f u n anonfun runJob 5. a p p l y ( S p a r k C o n t e x t . s c a l a : 2074 ) a t o r g . a p a c h e . s p a r k . s c h e d u l e r . R e s u l t T a s k . r u n T a s k ( R e s u l t T a s k . s c a l a : 87 ) a t o r g . a p a c h e . s p a r k . s c h e d u l e r . T a s k . r u n ( T a s k . s c a l a : 109 ) a t o r g . a p a c h e . s p a r k . e x e c u t o r . E x e c u t o r 5.apply(SparkContext.scala:2074) at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:87) at org.apache.spark.scheduler.Task.run(Task.scala:109) at org.apache.spark.executor.Executor TaskRunner.run(Executor.scala:345)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
出現該異常時,是由於elasticsearch和jackson不符合造成的,需要根據elasticsearch版本下載對應的jackson,我用的elasticsearch5.6.2所以對應的版本是jackson版本是2.8.6