ES 2.4.2
引用了查询es总条数:
SearchResponse response = client.prepareSearch(config.get(ConstUtil.ES_INDEX_NAME))
.setTypes(config.get(ConstUtil.ES_INDEX_TYPE))
.setSearchType(SearchType.COUNT)
.setQuery(queryDSL)
.execute()
.actionGet();
return response.getHits().getTotalHits();
==打包后执行报错:
17/11/23 16:08:45 INFO elasticsearch.plugins: [Strobe] modules [], plugins [], sites []
Exception in thread "main" java.lang.NoSuchFieldError: FAIL_ON_SYMBOL_HASH_OVERFLOW
at org.elasticsearch.common.xcontent.smile.SmileXContent.<clinit>(SmileXContent.java:46)
at org.elasticsearch.common.xcontent.XContentFactory.contentBuilder(XContentFactory.java:124)
at org.elasticsearch.action.support.ToXContentToBytes.buildAsBytes(ToXContentToBytes.java:62)
at org.elasticsearch.action.search.SearchRequest.source(SearchRequest.java:250)
at org.elasticsearch.action.search.SearchRequestBuilder.beforeExecute(SearchRequestBuilder.java:1027)
at org.elasticsearch.action.search.SearchRequestBuilder.beforeExecute(SearchRequestBuilder.java:50)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:86)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:56)
at com.test.util.EsUtil.countQuery(EsUtil.java:64)
at com.test.top.old.HFileAllJob.main(HFileAllJob.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
网上的方法都试过了,还是报这个jacksonxi相关的冲突
引用了查询es总条数:
SearchResponse response = client.prepareSearch(config.get(ConstUtil.ES_INDEX_NAME))
.setTypes(config.get(ConstUtil.ES_INDEX_TYPE))
.setSearchType(SearchType.COUNT)
.setQuery(queryDSL)
.execute()
.actionGet();
return response.getHits().getTotalHits();
==打包后执行报错:
17/11/23 16:08:45 INFO elasticsearch.plugins: [Strobe] modules [], plugins [], sites []
Exception in thread "main" java.lang.NoSuchFieldError: FAIL_ON_SYMBOL_HASH_OVERFLOW
at org.elasticsearch.common.xcontent.smile.SmileXContent.<clinit>(SmileXContent.java:46)
at org.elasticsearch.common.xcontent.XContentFactory.contentBuilder(XContentFactory.java:124)
at org.elasticsearch.action.support.ToXContentToBytes.buildAsBytes(ToXContentToBytes.java:62)
at org.elasticsearch.action.search.SearchRequest.source(SearchRequest.java:250)
at org.elasticsearch.action.search.SearchRequestBuilder.beforeExecute(SearchRequestBuilder.java:1027)
at org.elasticsearch.action.search.SearchRequestBuilder.beforeExecute(SearchRequestBuilder.java:50)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:86)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:56)
at com.test.util.EsUtil.countQuery(EsUtil.java:64)
at com.test.top.old.HFileAllJob.main(HFileAllJob.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
网上的方法都试过了,还是报这个jacksonxi相关的冲突
0 个回复