At eBay we want our customers to have the best experience possible. We use data analytics to improve user experiences, provide relevant offers, optimize performance, and create many, many other kinds of value. One way eBay supports this va
At eBay we want our customers to have the best experience possible. We use data analytics to improve user experiences, provide relevant offers, optimize performance, and create many, many other kinds of value. One way eBay supports this value creation is by utilizing data processing frameworks that enable, accelerate, or simplify data analytics. One such framework is Apache Spark. This post describes how Apache Spark fits into eBay’s Analytic Data Infrastructure.
What is Apache Spark?
The Apache Spark web site?describes Spark as “a fast and general engine for large-scale data processing.” Spark is a framework that enables parallel, distributed data processing. It offers a simple programming abstraction that provides powerful cache and persistence capabilities. The Spark framework can be deployed through Apache Mesos, Apache Hadoop via Yarn, or Spark’s own cluster manager. Developers can use the Spark framework via several programming languages including Java, Scala, and Python. Spark also serves as a foundation for additional data processing frameworks such as Shark, which provides SQL functionality for Hadoop.
Spark is an excellent tool for iterative processing of large datasets. One way Spark is suited for this type of processing is through its Resilient Distributed Dataset (RDD). In the paper titled Resilient Distributed Datasets: A Fault-Tolerant Abstraction for In-Memory Cluster Computing, RDDs are described as “…fault-tolerant, parallel data structures that let users explicitly persist intermediate results in memory, control their partitioning to optimize data placement, and manipulate them using a rich set of operators.” By using RDDs, ?programmers can pin their large data sets to memory, thereby supporting high-performance, iterative processing. Compared to reading a large data set from disk for every processing iteration, the in-memory solution is obviously much faster.
The diagram below shows a simple example of using Spark to read input data from HDFS, perform a series of iterative operations against that data using RDDs, and write the subsequent output back to HDFS.
In the case of the first map operation into RDD(1), not all of the data could fit within the memory space allowed for RDDs. In such a case, the programmer is able to specify what should happen to the data that doesn’t fit. The options include spilling the computed data to disk and recreating it upon read. We can see in this example how each processing iteration is able to leverage memory for the reading and writing of its data. This method of leveraging memory is likely to be 100X faster than other methods that rely purely on disk storage for intermittent results.
Apache Spark at eBay
Today Spark is most commonly leveraged at eBay through Hadoop via Yarn. Yarn manages the Hadoop cluster’s resources and allows Hadoop to extend beyond traditional map and reduce jobs by employing Yarn containers to run generic tasks. Through the Hadoop Yarn framework, eBay’s Spark users are able to leverage clusters approaching the range of 2000 nodes, 100TB of RAM, and 20,000 cores.
The following example illustrates Spark on Hadoop via Yarn.
The user submits the Spark job to Hadoop. The Spark application master starts within a single Yarn container, then begins working with the Yarn resource manager to spawn Spark executors – as many as the user requested. These Spark executors will run the Spark application using the specified amount of memory and number of CPU cores. In this case, the Spark application is able to read and write to the cluster’s data residing in HDFS. This model of running Spark on Hadoop illustrates Hadoop’s growing ability to provide a singular, foundational platform for data processing over shared data.
The eBay analyst community includes a strong contingent of Scala users. Accordingly, many of eBay’s Spark users are writing their jobs in Scala. These jobs are supporting discovery through interrogation of complex data, data modelling, and data scoring, among other use cases. Below is a code snippet from a Spark Scala application. This application uses Spark’s machine learning library, MLlib, to cluster eBay’s sellers via KMeans. The seller attribute data is stored in HDFS.
/** * read input files and turn into usable records */ var table = new SellerMetric() val model_data = sc.sequenceFile[Text,Text]( input_path ,classOf[Text] ,classOf[Text] ,num_tasks.toInt ).map( v => parseRecord(v._2,table) ).filter( v => v != null ).cache .... /** * build training data set from sample and summary data */ val train_data = sample_data.map( v => Array.tabulate[Double](field_cnt)( i => zscore(v._2(i),sample_mean(i),sample_stddev(i)) ) ).cache /** * train the model */ val model = KMeans.train(train_data,CLUSTERS,ITERATIONS) /** * score the data */ val results = grouped_model_data.map( v => ( v._1 ,model.predict( Array.tabulate[Double](field_cnt)( i => zscore(v._2(i),sample_mean(i),sample_stddev(i)) ) ) ) ) results.saveAsTextFile(output_path) |
In addition to ?Spark Scala users, several folks at eBay have begun using Spark with Shark to accelerate their Hadoop SQL performance. Many of these Shark queries are easily running 5X faster than their Hive counterparts. While Spark at eBay is still in its early stages, usage is in the midst of expanding from experimental to everyday as the number of Spark users at eBay continues to accelerate.
The Future of Spark at eBay
Spark is helping eBay create value from its data, and so the future is bright for Spark at eBay. Our Hadoop platform team has started gearing up to formally support Spark on Hadoop. Additionally, we’re keeping our eyes on how Hadoop continues to evolve in its support for frameworks like Spark, how the community is able to use Spark to create value from data, and how companies like Hortonworks and Cloudera are incorporating Spark into their portfolios. Some groups within eBay are looking at spinning up their own Spark clusters outside of Hadoop. These clusters would either leverage more specialized hardware or be application-specific. Other folks are working on incorporating eBay’s already strong data platform language extensions into the Spark model to make it even easier to leverage eBay’s data within Spark. In the meantime, we will continue to see adoption of Spark increase at eBay. This adoption will be driven by chats in the hall, newsletter blurbs, product announcements, industry chatter, and Spark’s own strengths and capabilities.
原文地址:Using Spark to Ignite Data Analytics, 感谢原作者分享。

MySQL sesuai untuk pemula untuk mempelajari kemahiran pangkalan data. 1. Pasang alat pelayan dan klien MySQL. 2. Memahami pertanyaan SQL asas, seperti SELECT. 3. Operasi data induk: Buat jadual, masukkan, kemas kini, dan padam data. 4. Belajar Kemahiran Lanjutan: Fungsi Subquery dan Window. 5. Debugging dan Pengoptimuman: Semak sintaks, gunakan indeks, elakkan pilih*, dan gunakan had.

MySQL dengan cekap menguruskan data berstruktur melalui struktur jadual dan pertanyaan SQL, dan melaksanakan hubungan antara meja melalui kunci asing. 1. Tentukan format data dan taip apabila membuat jadual. 2. Gunakan kunci asing untuk mewujudkan hubungan antara jadual. 3. Meningkatkan prestasi melalui pengindeksan dan pengoptimuman pertanyaan. 4. Secara kerap sandaran dan memantau pangkalan data untuk memastikan pengoptimuman keselamatan data dan prestasi.

MySQL adalah sistem pengurusan pangkalan data sumber terbuka yang digunakan secara meluas dalam pembangunan web. Ciri -ciri utamanya termasuk: 1. Menyokong pelbagai enjin penyimpanan, seperti InnoDB dan Myisam, sesuai untuk senario yang berbeza; 2. Menyediakan fungsi replikasi master-hamba untuk memudahkan pengimbangan beban dan sandaran data; 3. Meningkatkan kecekapan pertanyaan melalui pengoptimuman pertanyaan dan penggunaan indeks.

SQL digunakan untuk berinteraksi dengan pangkalan data MySQL untuk merealisasikan penambahan data, penghapusan, pengubahsuaian, pemeriksaan dan reka bentuk pangkalan data. 1) SQL Melaksanakan operasi data melalui Pilih, Masukkan, Kemas kini, Padam Penyataan; 2) Gunakan pernyataan membuat, mengubah, drop untuk reka bentuk dan pengurusan pangkalan data; 3) Pertanyaan kompleks dan analisis data dilaksanakan melalui SQL untuk meningkatkan kecekapan membuat keputusan perniagaan.

Operasi asas MySQL termasuk membuat pangkalan data, jadual, dan menggunakan SQL untuk melakukan operasi CRUD pada data. 1. Buat pangkalan data: createdatabasemy_first_db; 2. Buat Jadual: CreateTableBooks (Idintauto_IncrementPrimaryKey, Titlevarchar (100) NotNull, Authorvarchar (100) NotNull, Published_yearint); 3. Masukkan Data: InsertIntoBooks (Tajuk, Pengarang, Published_year) VA

Peranan utama MySQL dalam aplikasi web adalah untuk menyimpan dan mengurus data. 1.MYSQL dengan cekap memproses maklumat pengguna, katalog produk, rekod urus niaga dan data lain. 2. Melalui pertanyaan SQL, pemaju boleh mengekstrak maklumat dari pangkalan data untuk menghasilkan kandungan dinamik. 3.MYSQL berfungsi berdasarkan model klien-pelayan untuk memastikan kelajuan pertanyaan yang boleh diterima.

Langkah -langkah untuk membina pangkalan data MySQL termasuk: 1. Buat pangkalan data dan jadual, 2. Masukkan data, dan 3. Pertama, gunakan pernyataan CreatedataBase dan createtable untuk membuat pangkalan data dan jadual, kemudian gunakan pernyataan InsertInto untuk memasukkan data, dan akhirnya gunakan pernyataan PILIH untuk menanyakan data.

MySQL sesuai untuk pemula kerana mudah digunakan dan berkuasa. 1.MYSQL adalah pangkalan data relasi, dan menggunakan SQL untuk operasi CRUD. 2. Ia mudah dipasang dan memerlukan kata laluan pengguna root untuk dikonfigurasi. 3. Gunakan Masukkan, Kemas kini, Padam, dan Pilih untuk Melaksanakan Operasi Data. 4. Orderby, di mana dan menyertai boleh digunakan untuk pertanyaan yang kompleks. 5. Debugging memerlukan memeriksa sintaks dan gunakan Jelaskan untuk menganalisis pertanyaan. 6. Cadangan pengoptimuman termasuk menggunakan indeks, memilih jenis data yang betul dan tabiat pengaturcaraan yang baik.


Alat AI Hot

Undresser.AI Undress
Apl berkuasa AI untuk mencipta foto bogel yang realistik

AI Clothes Remover
Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.

Undress AI Tool
Gambar buka pakaian secara percuma

Clothoff.io
Penyingkiran pakaian AI

AI Hentai Generator
Menjana ai hentai secara percuma.

Artikel Panas

Alat panas

SecLists
SecLists ialah rakan penguji keselamatan muktamad. Ia ialah koleksi pelbagai jenis senarai yang kerap digunakan semasa penilaian keselamatan, semuanya di satu tempat. SecLists membantu menjadikan ujian keselamatan lebih cekap dan produktif dengan menyediakan semua senarai yang mungkin diperlukan oleh penguji keselamatan dengan mudah. Jenis senarai termasuk nama pengguna, kata laluan, URL, muatan kabur, corak data sensitif, cangkerang web dan banyak lagi. Penguji hanya boleh menarik repositori ini ke mesin ujian baharu dan dia akan mempunyai akses kepada setiap jenis senarai yang dia perlukan.

SublimeText3 versi Cina
Versi Cina, sangat mudah digunakan

Hantar Studio 13.0.1
Persekitaran pembangunan bersepadu PHP yang berkuasa

Muat turun versi mac editor Atom
Editor sumber terbuka yang paling popular

MinGW - GNU Minimalis untuk Windows
Projek ini dalam proses untuk dipindahkan ke osdn.net/projects/mingw, anda boleh terus mengikuti kami di sana. MinGW: Port Windows asli bagi GNU Compiler Collection (GCC), perpustakaan import yang boleh diedarkan secara bebas dan fail pengepala untuk membina aplikasi Windows asli termasuk sambungan kepada masa jalan MSVC untuk menyokong fungsi C99. Semua perisian MinGW boleh dijalankan pada platform Windows 64-bit.