Spark IMF legendary action 16th lesson on Rdd Combat summary

Source: Internet
Author: User

Tonight listen to Liaoliang's spark IMF legendary action 16th course Rdd, class notes are as follows:

Rdd operation type: Transformation, action, Contoller

Reduce must conform to the Exchange law and the binding law

Val textlines = Linecount.reducebykey (_+_,1) TextLines.collect.foreach (pair=> println (pair._1 + "=" +pair._2)) def Collect (): array[t] = withscope {    val results = Sc.runjob (this, (iter:iterator[t]) = Iter.toarray)    Array.con Cat (Results: _*)  }

You can see that the array returned by Collect is a series of elements of tuple

If the degree of parallelism is not set, it is determined by the number of original files and the file size.

Two stages are likely to be executed on different nodes.

One of the drawings:

Follow-up courses can be referred to Sina Weibo Liaoliang _dt Big Data Dream Factory: Http://weibo.com/ilovepains

Liaoliang China Spark First person, public number Dt_spark

Forward please specify the source.

Spark IMF legendary action 16th lesson on Rdd Combat summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.