# Load data into HDFS using ES-Spark

**URL:** <https://discuss.elastic.co/t/load-data-into-hdfs-using-es-spark/23577>\
**Category:** Elasticsearch\
**Created:** [May 6, 2015, 2:22pm UTC](https://discuss.elastic.co/t/load-data-into-hdfs-using-es-spark/23577 "2015-05-06T14:22:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucas\_Weissert](https://avatars.discourse-cdn.com/v4/letter/l/22d042/32.png) [@Lucas\_Weissert](https://discuss.elastic.co/u/Lucas_Weissert)\
**Post date:** [May 6, 2015, 2:22pm UTC](https://discuss.elastic.co/t/load-data-into-hdfs-using-es-spark/23577/1 "2015-05-06T14:22:27Z")

</div>

Hello,

I am reading data from elasticsearch using spark (ES-Spark). After i get  
the data using sc.esRDD(".../...") I want to store everything in HDFS so I  
use the saveAsTextFile method but it is very slow ...  
Am I doing the right things ? It takes 15min to save (and it is saving 11Go)

Best regards

## -- Please update your bookmarks! We moved to [https://discuss.elastic.co/](https://discuss.elastic.co/)

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3fb6d71e-ec3d-4ecf-a293-a1ffb23cd04a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3fb6d71e-ec3d-4ecf-a293-a1ffb23cd04a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [May 14, 2015, 6:57am UTC](https://discuss.elastic.co/t/load-data-into-hdfs-using-es-spark/23577/2 "2015-05-14T06:57:49Z")

</div>

Hi,

I replied over at Discuss [1].

Thanks,

[1] [Load data into HDFS using ES-Spark - #2 by costin](https://discuss.elastic.co/t/load-data-into-hdfs-using-es-spark/297/2)  
On 5/6/15 5:22 PM, Lucas Weissert wrote:

> Hello,
> 
> I am reading data from elasticsearch using spark (ES-Spark). After i get the data using sc.esRDD(".../...") I want to  
> store everything in HDFS so I use the saveAsTextFile method but it is very slow ...  
> Am I doing the right things ? It takes 15min to save (and it is saving 11Go)
> 
> Best regards
> 
> ## -- Please update your bookmarks! We moved to [https://discuss.elastic.co/](https://discuss.elastic.co/)
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/3fb6d71e-ec3d-4ecf-a293-a1ffb23cd04a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3fb6d71e-ec3d-4ecf-a293-a1ffb23cd04a%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/3fb6d71e-ec3d-4ecf-a293-a1ffb23cd04a%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/3fb6d71e-ec3d-4ecf-a293-a1ffb23cd04a%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Costin

## -- Please update your bookmarks! We have moved to [https://discuss.elastic.co/](https://discuss.elastic.co/)

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5554476D.1070005%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/5554476D.1070005%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:14am UTC](https://discuss.elastic.co/t/load-data-into-hdfs-using-es-spark/23577/3 "2017-07-06T00:14:08Z")

</div>


