# How to search ES data in java spark's mapPartitionsToPair

**URL:** <https://discuss.elastic.co/t/how-to-search-es-data-in-java-sparks-mappartitionstopair/106281>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [November 3, 2017, 8:15am UTC](https://discuss.elastic.co/t/how-to-search-es-data-in-java-sparks-mappartitionstopair/106281 "2017-11-03T08:15:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyitclj](https://avatars.discourse-cdn.com/v4/letter/h/cab0a1/32.png) [@hyitclj](https://discuss.elastic.co/u/hyitclj)\
**Post date:** [November 3, 2017, 8:15am UTC](https://discuss.elastic.co/t/how-to-search-es-data-in-java-sparks-mappartitionstopair/106281/1 "2017-11-03T08:15:01Z")

</div>

in my code  
imsiRdd.mapPartitionsToPair(new PairFlatMapFunction\<Iterator, String, List\>() {  
@Override  
public Iterator\<Tuple2\<String, List\>\> call(Iterator rowIterator) throws Exception {

```
                             xxxxxxxxxxxx
                // I want search ES data in here

        }

```

})

in my business,imsiRdd NMDS ， but ES data is vary big

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 1, 2017, 8:15am UTC](https://discuss.elastic.co/t/how-to-search-es-data-in-java-sparks-mappartitionstopair/106281/2 "2017-12-01T08:15:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
