Apache Spark has its architectural foundation in the resilient distributed dataset (RDD), a read-only multiset of data items distributed over a cluster of machines, that is maintained in a fault-tolerant way.[2] The Dataframe API was released as an abstraction on top of the RDD, followed by the Dataset API. In Spark 1.x, the RDD was the primary application programming interface (API), but as of Spark 2.x use of the Dataset API is encouraged[3] even though the RDD API is not deprecated.[4][5] The RDD technology still underlies the Dataset API.[6][7]
Spark and its RDDs were developed in 2012 in response to limitations in the MapReduce cluster computing paradigm, which forces a particular linear dataflow structure on distributed programs: MapReduce programs read input data from disk, map a function across the data, reduce the results of the map, and store reduction results on disk. Spark's RDDs function as a working set for distributed programs that offers a (deliberately) restricted form of distributed shared memory.[8]
Inside Apache Spark the workflow is managed as a directed acyclic graph (DAG). Nodes represent RDDs while edges represent the operations on the RDDs.
Spark facilitates the implementation of both iterative algorithms, which visit their data set multiple times in a loop, and interactive/exploratory data analysis, i.e., the repeated database-style querying of data. The latency of such applications may be reduced by several orders of magnitude compared to Apache Hadoop MapReduce implementation.[2][9]
Among the class of iterative algorithms are the training algorithms for machine learning systems, which formed the initial impetus for developing Apache Spark.[10]
Apache Spark requires a cluster manager and a distributed storage system. For cluster management, Spark supports standalone native Spark, Hadoop YARN, Apache Mesos or Kubernetes.[11] A standalone native Spark cluster can be launched manually or by the launch scripts provided by the install package. It is also possible to run the daemons on a single machine for testing. For distributed storage Spark can interface with a wide variety of distributed systems, including Alluxio, Hadoop Distributed File System (HDFS),[12]MapR File System (MapR-FS),[13]Cassandra,[14]OpenStack Swift, Amazon S3, Kudu, Lustre file system,[15] or a custom solution can be implemented. Spark also supports a pseudo-distributed local mode, usually used only for development or testing purposes, where distributed storage is not required and the local file system can be used instead; in such a scenario, Spark is run on a single machine with one executor per CPU core.
Spark Core
Spark Core is the foundation of the overall project. It provides distributed task dispatching, scheduling, and basic I/O functionalities, exposed through an application programming interface (for Java, Python, Scala, .NET[16] and R) centered on the RDD abstraction (the Java API is available for other JVM languages, but is also usable for some other non-JVM languages that can connect to the JVM, such as Julia[17]). This interface mirrors a functional/higher-order model of programming: a "driver" program invokes parallel operations such as map, filter or reduce on an RDD by passing a function to Spark, which then schedules the function's execution in parallel on the cluster.[2] These operations, and additional ones such as joins, take RDDs as input and produce new RDDs. RDDs are immutable and their operations are lazy; fault-tolerance is achieved by keeping track of the "lineage" of each RDD (the sequence of operations that produced it) so that it can be reconstructed in the case of data loss. RDDs can contain any type of Python, .NET, Java, or Scala objects.
Besides the RDD-oriented functional style of programming, Spark provides two restricted forms of shared variables: broadcast variables reference read-only data that needs to be available on all nodes, while accumulators can be used to program reductions in an imperative style.[2]
A typical example of RDD-centric functional programming is the following Scala program that computes the frequencies of all words occurring in a set of text files and prints the most common ones. Each map, flatMap (a variant of map) and reduceByKey takes an anonymous function that performs a simple operation on a single data item (or a pair of items), and applies its argument to transform an RDD into a new RDD.
valconf=newSparkConf().setAppName("wiki_test")// create a spark config objectvalsc=newSparkContext(conf)// Create a spark contextvaldata=sc.textFile("/path/to/somedir")// Read files from "somedir" into an RDD of (filename, content) pairs.valtokens=data.flatMap(_.split(" "))// Split each file into a list of tokens (words).valwordFreq=tokens.map((_,1)).reduceByKey(_+_)// Add a count of one to each token, then sum the counts per word type.wordFreq.sortBy(s=>-s._2).map(x=>(x._2,x._1)).top(10)// Get the top 10 words. Swap word and count to sort by count.
Spark SQL
Spark SQL is a component on top of Spark Core that introduced a data abstraction called DataFrames,[a] which provides support for structured and semi-structured data. Spark SQL provides a domain-specific language (DSL) to manipulate DataFrames in Scala, Java, Python or .NET.[16] It also provides SQL language support, with command-line interfaces and ODBC/JDBC server. Although DataFrames lack the compile-time type-checking afforded by RDDs, as of Spark 2.0, the strongly typed DataSet is fully supported by Spark SQL as well.
importorg.apache.spark.sql.SparkSessionvalurl="jdbc:mysql://yourIP:yourPort/test?user=yourUsername;password=yourPassword"// URL for your database server.valspark=SparkSession.builder().getOrCreate()// Create a Spark session objectvaldf=spark.read.format("jdbc").option("url",url).option("dbtable","people").load()df.printSchema()// Looks at the schema of this DataFrame.valcountsByAge=df.groupBy("age").count()// Counts people by age//or alternatively via SQL://df.createOrReplaceTempView("people")//val countsByAge = spark.sql("SELECT age, count(*) FROM people GROUP BY age")
Spark Streaming
Spark Streaming uses Spark Core's fast scheduling capability to perform streaming analytics. It ingests data in mini-batches and performs RDD transformations on those mini-batches of data. This design enables the same set of application code written for batch analytics to be used in streaming analytics, thus facilitating easy implementation of lambda architecture.[19][20] However, this convenience comes with the penalty of latency equal to the mini-batch duration. Other streaming data engines that process event by event rather than in mini-batches include Storm and the streaming component of Flink.[21] Spark Streaming has support built-in to consume from Kafka, Flume, Twitter, ZeroMQ, Kinesis, and TCP/IP sockets.[22]
In Spark 2.x, a separate technology based on Datasets, called Structured Streaming, that has a higher-level interface is also provided to support streaming.[23]
Spark MLlib is a distributed machine-learning framework on top of Spark Core that, due in large part to the distributed memory-based Spark architecture, is as much as nine times as fast as the disk-based implementation used by Apache Mahout (according to benchmarks done by the MLlib developers against the alternating least squares (ALS) implementations, and before Mahout itself gained a Spark interface), and scales better than Vowpal Wabbit.[25] Many common machine learning and statistical algorithms have been implemented and are shipped with MLlib which simplifies large scale machine learning pipelines, including:
GraphX is a distributed graph-processing framework on top of Apache Spark. Because it is based on RDDs, which are immutable, graphs are immutable and thus GraphX is unsuitable for graphs that need to be updated, let alone in a transactional manner like a graph database.[27] GraphX provides two separate APIs for implementation of massively parallel algorithms (such as PageRank): a Pregel abstraction, and a more general MapReduce-style API.[28] Unlike its predecessor Bagel, which was formally deprecated in Spark 1.6, GraphX has full support for property graphs (graphs where properties can be attached to edges and vertices).[29]
Like Apache Spark, GraphX initially started as a research project at UC Berkeley's AMPLab and Databricks, and was later donated to the Apache Software Foundation and the Spark project.[30]
Language support
Apache Spark has built-in support for Scala, Java, SQL, R, and Python with 3rd party support for the .NET CLR,[31] Julia,[32] and more.
History
Spark was initially started by Matei Zaharia at UC Berkeley's AMPLab in 2009, and open sourced in 2010 under a BSD license.[33]
In 2013, the project was donated to the Apache Software Foundation and switched its license to Apache 2.0. In February 2014, Spark became a Top-Level Apache Project.[34]
In November 2014, Spark founder M. Zaharia's company Databricks set a new world record in large scale sorting using Spark.[35][33]
Spark had in excess of 1000 contributors in 2015,[36] making it one of the most active projects in the Apache Software Foundation[37] and one of the most active open source big data projects.
Spark 3.5.2 is based on Scala 2.13 (and thus works with Scala 2.12 and 2.13 out-of-the-box), but it can also be made to work with Scala 3.[45]
Developers
Apache Spark is developed by a community. The project is managed by a group called the "Project Management Committee" (PMC).[46]
Maintenance releases and EOL
Feature release branches will, generally, be maintained with bug fix releases for a period of 18 months. For example, branch 2.3.x is no longer considered maintained as of September 2019, 18 months after the release of 2.3.0 in February 2018. No more 2.3.x releases should be expected after that point, even for bug fixes.
The last minor release within a major a release will typically be maintained for longer as an “LTS” release. For example, 2.4.0 was released on November 2, 2018, and had been maintained for 31 months until 2.4.8 was released in May 2021. 2.4.8 is the last release and no more 2.4.x releases should be expected even for bug fixes.[47]
^"Spark Release 2.0.0". MLlib in R: SparkR now offers MLlib APIs [..] Python: PySpark now offers many more MLlib algorithms"
^ abcdZaharia, Matei; Chowdhury, Mosharaf; Franklin, Michael J.; Shenker, Scott; Stoica, Ion. Spark: Cluster Computing with Working Sets(PDF). USENIX Workshop on Hot Topics in Cloud Computing (HotCloud).
^"Spark 2.2.0 Quick Start". apache.org. 2017-07-11. Retrieved 2017-10-19. we highly recommend you to switch to use Dataset, which has better performance than RDD
^Chambers, Bill (2017-08-10). "12". Spark: The Definitive Guide. O'Reilly Media. virtually all Spark code you run, where DataFrames or Datasets, compiles down to an RDD[permanent dead link]
^Wang, Yandong; Goldstone, Robin; Yu, Weikuan; Wang, Teng (May 2014). "Characterization and Optimization of Memory-Resident MapReduce on HPC Systems". 2014 IEEE 28th International Parallel and Distributed Processing Symposium. IEEE. pp. 799–808. doi:10.1109/IPDPS.2014.87. ISBN978-1-4799-3800-1. S2CID11157612.
^Shapira, Gwen (29 August 2014). "Building Lambda Architecture with Spark Streaming". cloudera.com. Cloudera. Archived from the original on 14 June 2016. Retrieved 17 June 2016. re-use the same aggregates we wrote for our batch application on a real-time data stream
^Chintapalli, Sanket; Dagit, Derek; Evans, Bobby; Farivar, Reza; Graves, Thomas; Holderbaugh, Mark; Liu, Zhuo; Nusbaum, Kyle; Patil, Kishorkumar; Peng, Boyang Jerry; Poulosky, Paul (May 2016). "Benchmarking Streaming Computation Engines: Storm, Flink and Spark Streaming". 2016 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW). IEEE. pp. 1789–1792. doi:10.1109/IPDPSW.2016.138. ISBN978-1-5090-3682-0. S2CID2180634.
^Kharbanda, Arush (17 March 2015). "Getting Data into Spark Streaming". sigmoid.com. Sigmoid (Sunnyvale, California IT product company). Archived from the original on 15 August 2016. Retrieved 7 July 2016.
^Malak, Michael (1 July 2016). Spark GraphX in Action. Manning. p. 89. ISBN9781617292521. Pregel and its little sibling aggregateMessages() are the cornerstones of graph processing in GraphX. ... algorithms that require more flexibility for the terminating condition have to be implemented using aggregateMessages()
Don DeLillo, luglio 1988 Don DeLillo, ufficialmente Donald Richard DeLillo (New York, 20 novembre 1936), è uno scrittore, drammaturgo e sceneggiatore statunitense. Indice 1 Biografia 2 Tematica 3 Opere 3.1 Romanzi 3.2 Racconti 3.3 Saggi 3.4 Drammaturgie 3.5 Sceneggiature 4 Studi critici 5 Note 6 Voci correlate 7 Altri progetti 8 Collegamenti esterni Biografia DeLillo nasce e cresce a Belmont, nei pressi di Arthur Avenue[1], un quartiere del Bronx (New York), figlio di modesti immigra...
Darko Čurlinov Nazionalità Macedonia del Nord Altezza 180 cm Calcio Ruolo Centrocampista Squadra Schalke 04 Carriera Giovanili ????-???? LSG Elmenhorst????-2015 Hansa Rostock2015-2016 Magdeburgo2016-2019 Colonia Squadre di club1 2018-2019 Colonia II10 (6)2019-2020 Colonia1 (0)2020-2021 Stoccarda20 (1)2021-2022→ Schalke 0422 (2)2022 Stoccarda1 (0)2022-2024 Burnley7 (0)2024-→ Schalke 048 (1) Nazionale 2015-2016 Macedonia U-1...
يفتقر محتوى هذه المقالة إلى الاستشهاد بمصادر. فضلاً، ساهم في تطوير هذه المقالة من خلال إضافة مصادر موثوق بها. أي معلومات غير موثقة يمكن التشكيك بها وإزالتها. (نوفمبر 2019) كأس الكؤوس الأوروبية 1985–86 تفاصيل الموسم كأس الكؤوس الأوروبية النسخة 26 التاريخ بداية:18 سبتمبر 1985...
Agus Mulyadi Penjabat Wali Kota CirebonPetahanaMulai menjabat 13 Desember 2023PresidenJoko WidodoGubernurBey Machmudin (Pj.)PendahuluEti HerawatiPenggantiPetahana Informasi pribadiLahir17 November 1968 (umur 55)Karawang, Jawa BaratAlma materInstitut Pemerintahan Dalam NegeriUniversitas Gadjah MadaProfesiBirokratSunting kotak info • L • B Drs. H. Agus Mulyadi, M.Si. (lahir 17 Mei 1968) adalah seorang birokrat Indonesia yang sejak 13 Desember 2023 dilantik sebagai Penjaba...
County in Pennsylvania, United States County in PennsylvaniaLycoming CountyCountyThe Lycoming County courthouse in Williamsport FlagSealLocation within the U.S. state of PennsylvaniaPennsylvania's location within the U.S.Coordinates: 41°21′N 77°04′W / 41.35°N 77.06°W / 41.35; -77.06Country United StatesState PennsylvaniaFoundedApril 13, 1795Named forLycoming CreekSeatWilliamsportLargest cityWilliamsportArea • Total1,244 sq mi (3,...
American video game programmer For other people named Robert Duffy, see Robert Duffy (disambiguation). Robert DuffyDuffy at QuakeCon 2006Born1963 (1963)Occupation(s)CTO, id SoftwareSpouseMillie Kautz Duffy Robert Allen Duffy[1] is an American video game programmer who has been working for id Software since 1999.[2] In 1999, Duffy created the map editor for Quake III Arena. Since 2013, Duffy has been serving as the Chief Technology Officer of id Software. Credits Robert Du...
Voce principale: Dopolavoro Aziendale S.G.E.M. Villafranca. Questa voce sull'argomento stagioni delle società calcistiche italiane è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Segui i suggerimenti del progetto di riferimento. Dopolavoro Aziendale S.G.E.M. VillafrancaStagione 1942-1943Sport calcio Squadra SGEM Villafranca Serie C8º posto nel girone F. 1941-1942 1945-1946 Si invita a seguire il modello di voce Questa voce raccoglie le informaz...
Coordinate: 46°31′21″N 6°34′46″E / 46.5225°N 6.579444°E46.5225; 6.579444 Questa voce sull'argomento università della Svizzera è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Université de Lausanne (UNIL)(LA) Schola Lausannensis(FR) Université de Lausanne UbicazioneStato Svizzera CittàLosanna Dati generaliMottoLe savoir vivant Fondazione1537 Tipouniversità pubblica RettoreFrédéric Herman Studenti12 ...
Untuk tempat lain yang bernama sama, lihat Kalideres. KalideresDesaNegara IndonesiaProvinsiJawa BaratKabupatenCirebonKecamatanKaliwediKode Kemendagri32.09.29.2001 Luas... km²Jumlah penduduk3.575 jiwa (1997)Kepadatan... jiwa/km² Kalideres adalah sebuah desa di kecamatan Kaliwedi, Cirebon, Jawa Barat, Indonesia. Sejarah Bab atau bagian ini tidak memiliki referensi atau sumber tepercaya sehingga isinya tidak bisa dipastikan. Tolong bantu perbaiki artikel ini dengan menambahkan referensi y...
مباريات الجوعشعار الفيلممعلومات عامةالتصنيف سلسلة أفلام — الرباعية الصنف الفني فيلم مقتبس من رواية تاريخ الصدور 2012 مأخوذ عن مباريات الجوع البلد الولايات المتحدة موقع الويب thehungergamesmovie.com (الإنجليزية) الطاقمالمخرج غاري روس السيناريو سوزان كولنز صناعة سينمائيةالشركة ا�...
Abdalla Hamdokعبدالله حمدوكAbdalla Hamdok pada tahun 2019 Perdana Menteri Sudan ke-15Masa jabatan21 November 2021 – 2 Januari 2022PresidenAbdel Fattah al-BurhanPendahuluLowongPenggantiPetahanaMasa jabatan21 Agustus 2019[1] – 25 Oktober 2021PresidenAbdel Fattah al-Burhan[1]PendahuluMohamed Tahir AyalaPenggantiLowongWakil Sekretaris Eksekutif United Nations Economic Commission for AfricaMasa jabatanNovember 2011 – 30 Oktober 2018Execu...
هذه المقالة تحتاج للمزيد من الوصلات للمقالات الأخرى للمساعدة في ترابط مقالات الموسوعة. فضلًا ساعد في تحسين هذه المقالة بإضافة وصلات إلى المقالات المتعلقة بها الموجودة في النص الحالي. (يوليو 2023) يفتقر محتوى هذه المقالة إلى الاستشهاد بمصادر. فضلاً، ساهم في تطوير هذه المقالة ...
Ahmad Sukendro Ahmad Sukendro (16 November 1923 – 11 Mei 1984)[1] adalah seorang jenderal intelijen di Angkatan Darat Indonesia. Lahir di Banyumas, ia dikenal sebagai tangan kanan Jenderal AH Nasution. Sukendro pernah menjabat sebagai Kepala Intelijen Markas Besar Angkatan Darat. Karir militernya dimulai di zaman pendudukan Jepang, ia memilih mendaftar menjadi anggota Pembela Tanah Air (PETA). Pada masa Revolusi Nasional Indonesia, Sukendro bergabung dengan BKR (cikal ...
The Monastery of Saint George of Skyros (Greek: Άη-Γώργης Σκυριανός) is a Byzantine monastery on the Greek island of Skyros. The monastery was founded in AD 962 by Saint Athanasius the Athonite.[1] See also Saint George: Devotions, traditions and prayers References ^ EVOIA ISLAND This article on an Eastern Orthodox church building in Greece is a stub. You can help Wikipedia by expanding it.vte This article about a Greek Christian monastery, abbey, priory or other reli...