목차
What is Apache Spark?
Apache Spark at eBay
The Future of Spark at eBay
데이터 베이스 MySQL 튜토리얼 Using Spark to Ignite Data Analytics

Using Spark to Ignite Data Analytics

Jun 07, 2016 pm 04:34 PM
data ignite spark using

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.

spark_logo

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.

spark_example_diagram

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.

spark_hadoop_diagram

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.

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

AI 알고리즘에 일반적으로 사용되는 10가지 라이브러리 Java 버전 AI 알고리즘에 일반적으로 사용되는 10가지 라이브러리 Java 버전 Jun 13, 2023 pm 04:33 PM

ChatGPT는 올해 반년 넘게 인기를 끌었고, 그 인기는 전혀 줄어들지 않았습니다. 딥러닝과 NLP도 모두의 관심을 끌었습니다. 회사의 몇몇 친구들이 자바 개발자인 나에게 인공지능을 어떻게 시작해야 하는지 묻는다. 이제 AI 학습을 위해 숨겨진 자바 라이브러리를 꺼내서 모두에게 소개할 차례다. 이러한 라이브러리와 프레임워크는 기계 학습, 딥 러닝, 자연어 처리 등을 위한 광범위한 도구와 알고리즘을 제공합니다. AI 프로젝트의 특정 요구 사항에 따라 가장 적합한 라이브러리 또는 프레임워크를 선택하고 다양한 알고리즘을 실험하여 AI 솔루션을 구축할 수 있습니다. 1.Deeplearning4j Java 및 Scala용 오픈소스 분산 딥러닝 라이브러리입니다. 딥러닝

빅 데이터 분야에서 Java 적용 살펴보기: Hadoop, Spark, Kafka 및 기타 기술 스택에 대한 이해 빅 데이터 분야에서 Java 적용 살펴보기: Hadoop, Spark, Kafka 및 기타 기술 스택에 대한 이해 Dec 26, 2023 pm 02:57 PM

Java 빅데이터 기술 스택: Hadoop, Spark, Kafka 등 빅데이터 분야에서 Java의 응용을 이해합니다. 데이터의 양이 지속적으로 증가함에 따라 오늘날 인터넷 시대에 빅데이터 기술이 화두가 되고 있습니다. 빅데이터 분야에서 우리는 하둡(Hadoop), 스파크(Spark), 카프카(Kafka) 등의 기술 이름을 자주 듣습니다. 이러한 기술은 매우 중요한 역할을 하며, 널리 사용되는 프로그래밍 언어인 Java는 빅데이터 분야에서도 큰 역할을 합니다. 이 기사에서는 Java의 대규모 애플리케이션에 중점을 둘 것입니다.

Go 언어에서 Spark를 사용하여 효율적인 데이터 처리 달성 Go 언어에서 Spark를 사용하여 효율적인 데이터 처리 달성 Jun 16, 2023 am 08:30 AM

빅데이터 시대가 도래하면서 데이터 처리의 중요성이 더욱 커지고 있습니다. 다양한 데이터 처리 작업을 위해 다양한 기술이 등장했습니다. 그 중 스파크(Spark)는 대규모 데이터 처리에 적합한 기술로 다양한 분야에서 널리 활용되고 있다. 또한 효율적인 프로그래밍 언어인 Go 언어도 최근 몇 년간 점점 더 많은 주목을 받고 있습니다. 이 기사에서는 Go 언어에서 Spark를 사용하여 효율적인 데이터 처리를 달성하는 방법을 살펴보겠습니다. 먼저 스파크의 기본 개념과 원리를 소개하겠습니다.

PHP 시작하기: PHP와 스파크 PHP 시작하기: PHP와 스파크 May 20, 2023 am 08:41 AM

PHP는 배우기 쉽고 오픈 소스이며 크로스 플랫폼이기 때문에 매우 인기 있는 서버 측 프로그래밍 언어입니다. 현재 많은 대기업에서는 PHP 언어를 사용하여 Facebook 및 WordPress와 같은 애플리케이션을 구축하고 있습니다. Spark는 웹 애플리케이션 구축을 위한 빠르고 가벼운 개발 프레임워크입니다. JVM(Java Virtual Machine)을 기반으로 하며 PHP와 함께 작동합니다. 이 기사에서는 PHP와 Spark를 사용하여 웹 애플리케이션을 구축하는 방법을 소개합니다. PHP란 무엇입니까? PH

데이터 폴더에는 어떤 데이터가 있나요? 데이터 폴더에는 어떤 데이터가 있나요? May 05, 2023 pm 04:30 PM

데이터 폴더에는 소프트웨어 설정 및 설치 패키지와 같은 시스템 및 프로그램 데이터가 포함되어 있습니다. 데이터 폴더의 각 폴더는 데이터 파일이 파일 이름인 Data 또는 명명된 데이터를 참조하는지 여부에 관계없이 다양한 유형의 데이터 저장 폴더를 나타냅니다. , 모두 시스템이나 프로그램에 의해 사용자 정의된 데이터 파일입니다. 데이터는 데이터 저장을 위한 백업 파일입니다. 일반적으로 meidaplayer, 메모장 또는 워드로 열 수 있습니다.

mysql 로드 데이터가 왜곡되면 어떻게 해야 합니까? mysql 로드 데이터가 왜곡되면 어떻게 해야 합니까? Feb 16, 2023 am 10:37 AM

잘못된 mysql 로드 데이터에 대한 해결 방법: 1. 잘못된 문자가 있는 SQL 문을 찾습니다. 2. 문을 "LOAD DATA LOCAL INFILE "employee.txt" INTO TABLE EMPLOYEE 문자 집합 utf8;"으로 수정합니다.

PHP의 데이터 처리 엔진(Spark, Hadoop 등) PHP의 데이터 처리 엔진(Spark, Hadoop 등) Jun 23, 2023 am 09:43 AM

현재 인터넷 시대에 대용량 데이터의 처리는 모든 기업과 기관이 직면한 문제입니다. 널리 사용되는 프로그래밍 언어인 PHP는 데이터 처리 속도도 따라잡아야 합니다. 대용량 데이터를 보다 효율적으로 처리하기 위해 PHP 개발에는 Spark 및 Hadoop과 같은 몇 가지 빅 데이터 처리 도구가 도입되었습니다. Spark는 대규모 데이터 세트의 분산 처리에 사용할 수 있는 오픈 소스 데이터 처리 엔진입니다. Spark의 가장 큰 특징은 빠른 데이터 처리 속도와 효율적인 데이터 저장입니다.

Pagoda Panel을 사용하여 Hadoop 및 Spark와 같은 빅 데이터 플랫폼 구축 Pagoda Panel을 사용하여 Hadoop 및 Spark와 같은 빅 데이터 플랫폼 구축 Jun 21, 2023 am 10:34 AM

최근 빅데이터 기술이 다양한 분야에서 활용되고 있다. 기존 데이터베이스 및 데이터 분석 도구와 비교하여 Hadoop 및 Spark와 같은 빅 데이터 플랫폼은 확장성, 사용 용이성, 내결함성, 실시간 성능 및 효율성이 더 뛰어납니다. 빅데이터 플랫폼을 구축하려면 일정한 기술 수준이 필요하지만, 파고다 패널을 사용하면 빅데이터 플랫폼 구축의 어려움과 복잡성을 크게 줄일 수 있습니다. 1. Pagoda 패널 소개 Pagoda 패널은 사용자가 신속하게 도움을 받을 수 있는 무료이며 사용하기 쉽고 강력한 서버 관리 패널입니다.

See all articles