<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Apache_Spark</id>
	<title>Apache Spark - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Apache_Spark"/>
	<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Apache_Spark&amp;action=history"/>
	<updated>2026-07-12T09:06:00Z</updated>
	<subtitle>在这个wiki上该页的修订历史</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://arolstar52-zhtest.hf.space/index.php?title=Apache_Spark&amp;diff=2574010&amp;oldid=prev</id>
		<title>imported&gt;Jimmy-bot：​机器人: 尚未清空的已重定向分类（Cat:加利福尼亞大學柏克萊分校→Cat:加州大學柏克萊分校）</title>
		<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Apache_Spark&amp;diff=2574010&amp;oldid=prev"/>
		<updated>2024-04-01T07:34:07Z</updated>

		<summary type="html">&lt;p&gt;机器人: 尚未清空的已重定向分类（&lt;a href=&quot;/index.php?title=Cat:%E5%8A%A0%E5%88%A9%E7%A6%8F%E5%B0%BC%E4%BA%9E%E5%A4%A7%E5%AD%B8%E6%9F%8F%E5%85%8B%E8%90%8A%E5%88%86%E6%A0%A1&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Cat:加利福尼亞大學柏克萊分校（页面不存在）&quot;&gt;Cat:加利福尼亞大學柏克萊分校&lt;/a&gt;→&lt;a href=&quot;/index.php?title=Cat:%E5%8A%A0%E5%B7%9E%E5%A4%A7%E5%AD%B8%E6%9F%8F%E5%85%8B%E8%90%8A%E5%88%86%E6%A0%A1&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Cat:加州大學柏克萊分校（页面不存在）&quot;&gt;Cat:加州大學柏克萊分校&lt;/a&gt;）&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{NoteTA&lt;br /&gt;
| G1 = IT&lt;br /&gt;
| G2 = FL&lt;br /&gt;
}}&lt;br /&gt;
{{Infobox Software&lt;br /&gt;
| name                   = Apache Spark&lt;br /&gt;
| logo                   = [[File:Spark-logo-192x100px.png|frameless|Spark Logo]]&lt;br /&gt;
| caption                =&lt;br /&gt;
| developer              = [[Apache軟體基金會]], [[加州大學柏克萊分校]]AMPLab, [[Databricks]]&lt;br /&gt;
| operating system       = [[Linux]], [[Mac OS]], [[Microsoft Windows]]&lt;br /&gt;
| size                   = &lt;br /&gt;
| programming language   = [[Scala]], [[Java]], [[Python]]&lt;br /&gt;
| genre                  = [[數據分析]], [[機器學習]]演算法&lt;br /&gt;
| license                = [[Apache许可证|Apache授權條款]] 2.0 &lt;br /&gt;
| website                = {{URL|https://spark.apache.org}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Apache Spark&amp;#039;&amp;#039;&amp;#039;是一個[[開源]]叢集運算框架，最初是由加州大學柏克萊分校AMPLab所開發。相對於[[Apache Hadoop|Hadoop]]的[[MapReduce]]會在執行完工作後將中介資料存放到磁碟中，Spark使用了記憶體內運算技術，能在資料尚未寫入硬碟時即在記憶體內分析運算。Spark在記憶體內執行程式的運算速度能做到比Hadoop MapReduce的運算速度快上100倍，即便是執行程式於硬碟時，Spark也能快上10倍速度。&amp;lt;ref&amp;gt;{{cite paper| first1=Reynold| last1=Xin| first2=Josh| last2=Rosen| first3=Matei| last3=Zaharia| first4=Michael| last4=Franklin| first5=Scott| last5=Shenker| first6=Ion| last6=Stoica| title=Shark: SQL and Rich Analytics at Scale| conference=SIGMOD 2013| date=June 2013| url=https://amplab.cs.berkeley.edu/wp-content/uploads/2013/02/shark_sigmod2013.pdf| journal=| access-date=2015-05-30| archive-date=2017-08-09| archive-url=https://web.archive.org/web/20170809050056/https://amplab.cs.berkeley.edu/wp-content/uploads/2013/02/shark_sigmod2013.pdf| dead-url=no}}&amp;lt;/ref&amp;gt;Spark允許用戶將資料加載至叢集記憶體，並多次對其進行查詢，非常適合用於[[機器學習]]演算法。&amp;lt;ref&amp;gt;{{cite AV media|url=http://www.youtube.com/watch?v=qLvLg-sqxKc|location=Invited Talk at NIPS 2011 Big Learning Workshop: Algorithms, Systems, and Tools for Learning at Scale|people=Matei Zaharia|title=Spark: In-Memory Cluster Computing for Iterative and Interactive Applications|access-date=2015-05-30|archive-date=2015-11-13|archive-url=https://web.archive.org/web/20151113033741/https://www.youtube.com/watch?v=qLvLg-sqxKc|dead-url=no}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
使用Spark需要搭配叢集管理員和分散式儲存系統。Spark支援獨立模式（本地Spark叢集）、[[Apache Hadoop|Hadoop YARN]]或[[Apache Mesos]]的叢集管理。&amp;lt;ref&amp;gt;{{cite web |url=https://spark.apache.org/docs/1.2.0/cluster-overview.html#cluster-manager-types |title=Cluster Mode Overview - Spark 1.2.0 Documentation - Cluster Manager Types |author=&amp;lt;!--Staff writer(s); no by-line.--&amp;gt; |date=2014-12-18 |website=apache.org |publisher=Apache Foundation |accessdate=2015-01-18 |archive-date=2015-01-19 |archive-url=https://web.archive.org/web/20150119080215/https://spark.apache.org/docs/1.2.0/cluster-overview.html#cluster-manager-types |dead-url=no }}&amp;lt;/ref&amp;gt;  在分散式儲存方面，Spark可以和 [[Alluxio]]、[[Apache Hadoop|HDFS]]&amp;lt;ref&amp;gt;{{Cite web |url=https://amplab.cs.berkeley.edu/software/ |title=Figure showing Spark in relation to other open-source Software projects including Hadoop |accessdate=2015-05-30 |archive-date=2015-03-24 |archive-url=https://web.archive.org/web/20150324111910/https://amplab.cs.berkeley.edu/software/ |dead-url=no }}&amp;lt;/ref&amp;gt;、 [[Apache Cassandra|Cassandra]]&amp;lt;ref&amp;gt;{{cite mailing list |url=http://mail-archives.apache.org/mod_mbox/cassandra-user/201409.mbox/%3CCABNXB2DE5Apmvn1nNg79+VdPCSZiCsGdt=ZB4s4OF_5JzS60iA@mail.gmail.com%3E |title=Re: cassandra + spark / pyspark |date=2014-09-10 |accessdate=2014-11-21 |mailinglist=Cassandra User |last=Doan |first=DuyHai |archive-date=2015-05-30 |archive-url=https://web.archive.org/web/20150530182941/http://mail-archives.apache.org/mod_mbox/cassandra-user/201409.mbox/%3CCABNXB2DE5Apmvn1nNg79+VdPCSZiCsGdt=ZB4s4OF_5JzS60iA@mail.gmail.com%3E |dead-url=no }}&amp;lt;/ref&amp;gt; 、[[OpenStack#Object Storage (Swift)|OpenStack Swift]]和[[Amazon S3]]等介面搭配。 Spark也支援偽分散式（pseudo-distributed）本地模式，不過通常只用於開發或測試時以本機檔案系統取代分散式儲存系統。在這樣的情況下，Spark僅在一台機器上使用每個CPU核心執行程序。&lt;br /&gt;
&lt;br /&gt;
在2014年有超過465位貢獻者投入Spark開發&amp;lt;ref&amp;gt;{{Cite web |url=https://www.openhub.net/p/apache-spark |title=Open HUB Spark development activity |accessdate=2015-05-30 |archive-date=2014-12-07 |archive-url=https://web.archive.org/web/20141207194200/https://www.openhub.net/p/apache-spark |dead-url=no }}&amp;lt;/ref&amp;gt;，讓其成為[[Apache軟體基金會]]以及[[巨量資料]]眾多開源專案中最為活躍的專案。&lt;br /&gt;
&lt;br /&gt;
==歷史==&lt;br /&gt;
Spark在2009年由{{le|Matei Zaharia|Matei Zaharia}}在[[加州大學柏克萊分校]]AMPLab開創，2010年透過[[BSD授權條款]]開源釋出。2013年，該專案被捐贈給[[Apache軟體基金會]]並切換授權條款至Apache2.0。&amp;lt;ref&amp;gt;{{cite web |url=https://blogs.apache.org/foundation/entry/the_apache_software_foundation_announces50 |title=The Apache Software Foundation Announces Apache&amp;amp;#8482 Spark&amp;amp;#8482 as a Top-Level Project |author=&amp;lt;!--Staff writer(s); no by-line.--&amp;gt; |date=27 February 2014 |website=apache.org |publisher=Apache Software Foundation |accessdate=4 March 2014 |archive-date=2015-03-17 |archive-url=https://web.archive.org/web/20150317210246/https://blogs.apache.org/foundation/entry/the_apache_software_foundation_announces50 |dead-url=no }}&amp;lt;/ref&amp;gt;。2014年2月，Spark成為Apache的頂級專案。2014年11月，Databricks團隊使用Spark 刷新資料排序世界記錄。&amp;lt;ref&amp;gt;{{Cite web |url=http://databricks.com/blog/2014/11/05/spark-officially-sets-a-new-record-in-large-scale-sorting.html |title=Spark officially sets a new record in large-scale sorting |accessdate=2015-05-30 |archive-date=2015-05-15 |archive-url=https://web.archive.org/web/20150515145909/http://databricks.com/blog/2014/11/05/spark-officially-sets-a-new-record-in-large-scale-sorting.html |dead-url=no }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==專案構成要素==&lt;br /&gt;
Spark專案包含下列幾項:&lt;br /&gt;
&lt;br /&gt;
===Spark核心和彈性分散式資料集（RDDs）===&lt;br /&gt;
Spark核心是整個專案的基礎，提供了分散式任務調度，排程和基本的I／O功能。而其基礎的程序抽象則稱為[[彈性分散式資料集]]（RDDs），是一個可以并行操作、有容錯機制的資料集合。 RDDs可以透過引用外部存儲系統的資料集建立（例如：共享文件系統、HDFS、HBase或其他 Hadoop 資料格式的資料來源）。或者是通過在現有RDDs的轉換而創建（比如：map、filter、reduce、join等等）。&lt;br /&gt;
&lt;br /&gt;
RDD抽象化是經由一個以[[Scala]]、[[Java]]、[[Python]]的語言集成API所呈現，簡化了編程複雜性，應用程序操縱RDDs的方法類似於操縱本地端的資料集合。&lt;br /&gt;
&lt;br /&gt;
以 RDD 為中心的函數式編程的一個典型示例是以下 Scala 程序，它計算一組文本文件中出現的所有單詞的頻率並打印最常見的單詞。 每個 map、flatMap（map 的變體）和 reduceByKey 都採用匿名函數對單個數據項（或一對項）執行簡單操作，並應用其參數將 RDD 轉換為新的 RDD。&amp;lt;ref&amp;gt;{{cite book|url=https://qualified.one/books/taming-big-data-with-apache-spark-and-python/|title=Taming Big Data with Apache Spark and Python|author=Frank Kane|ISBN=978-1787287945|publisher=Packt|year=2017|access-date=2021-11-09|archive-date=2021-11-09|archive-url=https://web.archive.org/web/20211109233622/https://qualified.one/books/taming-big-data-with-apache-spark-and-python/}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Citation|title=dotnet/spark|date=2020-09-14|url=https://github.com/dotnet/spark|publisher=.NET Platform|access-date=2020-09-14|archive-date=2022-04-29|archive-url=https://web.archive.org/web/20220429003731/https://github.com/dotnet/spark}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;scala&amp;quot;&amp;gt;&lt;br /&gt;
val conf = new SparkConf().setAppName(&amp;quot;wiki_test&amp;quot;) &lt;br /&gt;
val sc = new SparkContext(conf) &lt;br /&gt;
val data = sc.textFile(&amp;quot;/path/to/somedir&amp;quot;) &lt;br /&gt;
val tokens = data.flatMap(_.split(&amp;quot; &amp;quot;)) &lt;br /&gt;
val wordFreq = tokens.map((_, 1)).reduceByKey(_ + _) &lt;br /&gt;
wordFreq.sortBy(s =&amp;gt; -s._2).map(x =&amp;gt; (x._2, x._1)).top(10) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Spark SQL===&lt;br /&gt;
Spark SQL在Spark核心上帶出一種名為SchemaRDD的資料抽象化概念，提供結構化和半結構化資料相關的支援。Spark SQL提供了領域特定語言，可使用Scala、Java或Python來操縱SchemaRDDs。它還支援使用使用命令行界面和ODBC／JDBC伺服器操作SQL語言。在Spark 1.3版本，SchemaRDD被重新命名為DataFrame。&lt;br /&gt;
&lt;br /&gt;
===Spark Streaming===&lt;br /&gt;
Spark Streaming充分利用Spark核心的快速排程能力來執行串流分析。它擷取小批量的資料並對之執行RDD轉換。這種設計使串流分析可在同一個引擎內使用同一組為批次分析編寫而撰寫的應用程序代碼。&lt;br /&gt;
&lt;br /&gt;
===MLlib===&lt;br /&gt;
MLlib是Spark上分散式機器學習框架。Spark分散式記憶體式的架構比Hadoop磁碟式的[[Apache Mahout]]快上10倍，擴充性甚至比{{le|Vowpal Wabbit|Vowpal Wabbit}}要好。&amp;lt;ref&amp;gt;{{cite web |url=http://www.slideshare.net/chaochen5496/mlllib-sparkmeetup8613finalreduced |title=Spark Meetup: MLbase, Distributed Machine Learning with Spark |last1=Sparks |first1=Evan |last2=Talwalkar |first2=Ameet |date=2013-08-06 |website=slideshare.net |publisher=Spark User Meetup, San Francisco, California |accessdate=10 February 2014 |archive-date=2015-06-26 |archive-url=https://web.archive.org/web/20150626122507/http://www.slideshare.net/chaochen5496/mlllib-sparkmeetup8613finalreduced |dead-url=no }}&amp;lt;/ref&amp;gt; MLlib可使用許多常見的機器學習和統計演算法，簡化大規模機器學習時間，其中包括：&lt;br /&gt;
*匯總統計、相關性、分層抽樣、假設檢定、隨機數據生成&lt;br /&gt;
*分類與回歸：[[支持向量機]]、[[回歸]]、[[線性回歸]]、[[邏輯斯諦迴歸]]、[[決策樹]]、[[樸素貝葉斯分類器|樸素貝葉斯]]&lt;br /&gt;
*[[協同過濾]]：ALS&lt;br /&gt;
*分群：[[K-平均算法|k-平均演算法]]&lt;br /&gt;
*維度约减：[[奇異值分解]]（SVD），[[主成分分析]]（PCA）&lt;br /&gt;
*特徵提取和轉換：TF-IDF、Word2Vec、StandardScaler&lt;br /&gt;
*最优化：隨機梯度下降法（SGD）、L-BFGS&lt;br /&gt;
&lt;br /&gt;
===GraphX===&lt;br /&gt;
GraphX是Spark上的分散式圖形處理框架。它提供了一組API，可用於表達圖表計算並可以模擬Pregel抽象化。GraphX還對這種抽象化提供了優化運行。&lt;br /&gt;
&lt;br /&gt;
GraphX最初為[[加州大學柏克萊分校]]AMPLab和Databricks的研究專案，後來捐贈給Spark專案。&amp;lt;ref&amp;gt;{{cite paper| first1=Joseph| last1=Gonzalez| first2=Reynold| last2=Xin| first3=Ankur| last3=Dave| first4=Daniel| last4=Crankshaw| first5=Michael| last5=Franklin| first6=Ion| last6=Stoica| title=GraphX: Graph Processing in a Distributed Dataflow Framework| conference=OSDI 2014| date=Oct 2014| url=https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-gonzalez.pdf| journal=| access-date=2015-05-30| archive-date=2014-12-07| archive-url=https://web.archive.org/web/20141207172944/https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-gonzalez.pdf| dead-url=no}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==特色==&lt;br /&gt;
*Java、Scala、Python和R APIs。&lt;br /&gt;
*可擴展至超過8000個結點。&amp;lt;ref&amp;gt;{{cite web |url=https://spark.apache.org/faq.html |title=Apache Spark FAQ |author=&amp;lt;!--Staff writer(s); no by-line.--&amp;gt; |website=apache.org |publisher=Apache Software Foundation |accessdate=5 December 2014 |archive-url=https://web.archive.org/web/20150520060625/http://spark.apache.org/faq.html |archive-date=2015-05-20 |dead-url=yes }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
*能夠在記憶體內緩存資料集以進行交互式資料分析。&lt;br /&gt;
*Scala或Python中的互動式命令列介面可降低橫向擴展資料探索的反應時間。&lt;br /&gt;
*Spark Streaming對即時資料串流的處理具有可擴充性、高吞吐量、可容錯性等特點。&lt;br /&gt;
*Spark SQL支援結構化和關聯式查詢處理（SQL）。&lt;br /&gt;
*MLlib機器學習演算法和Graphx圖形處理演算法的高階函式庫。&lt;br /&gt;
&lt;br /&gt;
==參考資料==&lt;br /&gt;
{{Reflist|30em}}&lt;br /&gt;
&lt;br /&gt;
==外部連結==&lt;br /&gt;
*{{Official website|https://spark.apache.org}}{{En}}&lt;br /&gt;
*[https://spark.apache.org/sql/ Spark SQL] {{Wayback|url=https://spark.apache.org/sql/ |date=20150519040940 }}&lt;br /&gt;
*[https://spark.apache.org/streaming/ Spark Streaming] {{Wayback|url=https://spark.apache.org/streaming/ |date=20150519040945 }}&lt;br /&gt;
*[https://spark.apache.org/mllib/ MLlib機器學習] {{Wayback|url=https://spark.apache.org/mllib/ |date=20150531031024 }}&lt;br /&gt;
*[https://spark.apache.org/graphx/ GraphX 圖形處理] {{Wayback|url=https://spark.apache.org/graphx/ |date=20150603052740 }}&lt;br /&gt;
&lt;br /&gt;
{{Apache}}&lt;br /&gt;
&lt;br /&gt;
[[Category:叢集計算]]&lt;br /&gt;
[[Category:Hadoop]]&lt;br /&gt;
[[Category:加州大學柏克萊分校]]&lt;br /&gt;
[[Category:Apache軟體基金會]]&lt;br /&gt;
[[Category:Scala平台軟體]]&lt;br /&gt;
[[Category:Java平台]]&lt;br /&gt;
[[Category:使用Apache許可證的軟體]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Jimmy-bot</name></author>
	</entry>
</feed>