- Mastering Machine Learning with Spark 2.x
- Alex Tellez Max Pumperla Michal Malohlava
- 225字
- 2021-07-02 18:46:04
Working with big data
What happens when the dataset in question is so vast that it cannot fit into the memory of a single computer and must be distributed across a number of nodes in a large computing cluster? Can't we just rewrite some R code, for example, and extend it to account for more than a single-node computation? If only things were that simple! There are many reasons why the scaling of algorithms to more machines is difficult. Imagine a simple example of a file containing a list of names:
B
D
X
A
D
A
We would like to compute the number of occurrences of individual words in the file. If the file fits into a single machine, you can easily compute the number of occurrences by using a combination of the Unix tools, sort and uniq:
bash> sort file | uniq -c
The output is as shown ahead:
2 A
1 B
1 D
1 X
However, if the file is huge and distributed over multiple machines, it is necessary to adopt a slightly different computation strategy. For example, compute the number of occurrences of individual words for every part of the file that fits into the memory and merge the results together. Hence, even simple tasks, such as counting the occurrences of names, in a distributed environment can become more complicated.
- 編程的修煉
- 算法精粹:經典計算機科學問題的Java實現
- 基于差分進化的優化方法及應用
- Java Web應用開發技術與案例教程(第2版)
- Banana Pi Cookbook
- Unity Shader入門精要
- Java EE 8 Application Development
- Unity 2018 Augmented Reality Projects
- 自學Python:編程基礎、科學計算及數據分析(第2版)
- Practical GIS
- Python機器學習與量化投資
- 高性能PHP 7
- Java 11 and 12:New Features
- ArcPy and ArcGIS(Second Edition)
- Learning ECMAScript 6