overview of hadoop and spark service at cern · overview of hadoop and spark service at cern...

26
Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7 th , 2018 1

Upload: others

Post on 23-Mar-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Overview of Hadoop and Spark service at CERN

Zbigniew Baranowski, IT-DB Hadoop and Spark ServiceMay 7th, 2018

1

Page 2: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

3

Infrastructure data and metadata• For a long time traditional RDBMS was up to the task

• Evolution of systems and new processing use cases greatly

increased requirements for data store backend

• More data generated (more sensors, higher frequencies)

• > 100 GB/day

• New use cases appeared – e.g. analytics, machine learning

• The initial design of the systems is not optimal for that

• Result -> Hard to scale RBDMS to the new big data use

cases

Page 3: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Why Hadoop?

• Already well establish in the industry and open source

• Distributed systems for data processing

• Can operate at scale by design (shared nothing)

• Typically on clusters of commodity-type servers/cloud

• Many solutions target data analytics and data warehousing

• Can do much more: data ingestion, streaming, machine learning

4

Page 4: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Hadoop Service at CERN

Page 5: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Hadoop Service at CERN IT (since 2013)

• Setup and run the infrastructure

• Provide consultancy

• Support user community

• Running for more than 4 years

Page 6: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Hadoop at CERN - Timeline

Adoption of

Hadoop 2

(YARN)

Start of

Hadoop pilot

service

2013

First secured

cluster

deployed

First projects

by ATLAS

and

CASTOR

2014

Central IT

Monitoring

project

moves to

Hadoop

Adoption of

SQL-based

solutions (Hive,

Impala)

2015

Second

cluster

installed

Third cluster

installed

Started R&D

with other

RDBMS-

based

projects

Starting Kafka

pilot

Rolling out HDFS

backups and

XRD connector.

2016

LHC critical

projects

commits

to use the

service

Start as

production

service

2017

High

availability

deployed

IT Security

project

moves to

Hadoop

CERN

Hadoop

distribution

Adoption of

Jupyter

Notebooks

(SWAN)

2018

Start of

CMS Big

Data

project

Forth cluster

installed

(first with CERN

distribution)

Page 7: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Hadoop production deployment @CERN• Production systems deployed on bare-metal• Development and QA deployed on VMs

• OS and Hadoop stack installation and configuration done with Puppet• CentOS 7• we use our custom puppet module to install Hadoop machines

• Hadoop distribution• Cloudera (CDH5) rpms (on 3 clusters)• CERN custom (based on Apache) distribution (on new 3 clusters)• we are in process of migration fully to our custom distribution

• HDFS, YARN and HBase in high availability mode• Enables online/rolling service operations (do not require full showdown of the service)

• All clusters run in a secure mode• Authentication with Kerberos• Authorization based on e-group membership

• New custom monitoring done with ElasticSearch + Grafana• Previously we were using Ganglia• OS-level monitoring done with the CERN IT monitoring system

• Alerting – custom scripts with sensors• Checking availability and usability of Hadoop components• OS-level alerting done with the CERN IT monitoring system

• HDFS Backups to Castor (CERN Storage) done with MapReduce (metadata stored in RDBMS)

8

Page 8: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Hadoop production clusters at CERN• 4 production clusters

• 2 development

Cluster Name Configuration Primary Usage

lxhadoop 18 nodes(Cores – 288,Mem – 912GB,Storage – 1.29 PB)

Experiment activities

analytix 42 nodes(Cores – 524,Mem – 6.9TB,Storage – 6 PB)

General Purpose

hadalytic 14 nodes(Cores – 196,Mem – 768GB,Storage – 2.15 PB)

SQL-oriented engines and data warehouse workloads

nxcals 20 nodes(Cores 480, Mem - 8 TB, Storage – 5 PB, 96GB in SSD)

Accelerator logging (NXCALS)project dedicated cluster

9

Page 9: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Overview of Available Components

Kafka:

streaming

and ingestion

Page 10: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Data volume (from backup stats July2017) Application Current Size Daily Growth

IT Monitoring 420.5 TB 140 GB

IT Security 125.0 TB 2048 GB

NxCALS 10.0 TB 500 GB

ATLAS Rucio 125.0 TB ~200 GB

AWG 90.0 TB ~10 GB

CASTOR Logs 163.1 TB ~50 GB

WinCC OA 10.0 TB 25 GB

ATLAS EventIndex 250.0 TB 200 GB

USER HOME 150.0 TB 20 GB

Total 1.5 PB 4 TB

Page 11: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

CERN Apache Hadoop distribution• For core components

• HDFS and YARN

• Spark

• HBase

• Better control of the core software stack• In-house compilation

• Enabling non default features (compression algorithms, R for Spark)

• Adding critical patches (that are not ported in upstream)

• Streamlined development• Available on Maven Central

• RPMs-based – similarly to Cloudera or Hortonworks

Page 12: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

(Selected)

Big data projects/use cases

Page 13: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

New CERN IT Monitoring infrastructure

Kafka cluster

(buffering) *

Processing

Data enrichment

Data aggregation

Batch Processing

Transport

Flume

Kafka

sink

Flume

sinks

FTS

Data

Sources

Rucio

XRootD

Jobs

Lemon

syslog

app log

DB

HTTP

feed

AMQFlume

AMQ

Flume

DB

Flume

HTTP

Flume

Log GW

Flume

Metric

GW

Logs

Lemon

metrics

HDFS

Elastic

Search

Storage &

Search

Others

(influxdb)

Data

Access

CLI, API

• Data now 200 GB/day, 200M events/day

• At scale 500 GB/day

• Proved effective in several occasions

Credits: Alberto Aimar, IT-CM-MM

Critical for CC operations and WLCG

14

Page 14: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Next Gen. Archiver for Accelerator LogsCritical system for running LHC - 700 TB today, growing 200 TB/yearChallenge: service level for critical production

Credit: Jakub Wozniak, BE-CO-DS 15

Page 15: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

The ATLAS EventIndex

• Catalogue of all collisions in the ATLAS detector

• Over 120 billion of records, 150TB of data

• Current ingestion rates 5kHz, 60TB/year

16

Events

metadata

extraction

WLCG CERNG

rid jo

b

MetaFileObject

Store

Data

enrichment

Hadoop

Mapfiles

+ HBase

Analytics Web

UI

Data file

Event

extraction Web

UI

RDBMS

Table

Page 16: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

SWAN – Jupyter Notebooks On Demand

• Service for web based analysis (SWAN)• Developed at CERN, initially for physics analysis

• A web-based interactive interface and platform that combines code, equations, text and visualisations• Ideal for exploration, reproducibility, collaboration

• Fully Integrated with Spark and Hadoop at CERN• Python on Spark (PySpark) at scale

• Modern, powerful and scalable platform for data analysis

17

Page 17: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Text

Code

Monitoring

Visualizations

18

Page 18: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Thoughts and trends observed

Page 19: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Data ingestion – is a challange

• Apache Kafka becomes a standard for modern scalable architectures

StreamingSource

Staging area

Flush periodically

HDFS

Big Files

Events

Indexed data

Flush immediately

Batch processing

Fast data access

Real time stream

processing

StreamingSource

Streaming Sources

20

Page 20: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Visualization• Nothing unified provided by for the ecosystem the open source

community ecosystem

• Some efforts with Hue are being done

• Analytics

• Jupyter Notebooks (pySpark)

• Zeppelin (Scala Spark)

• Live data• ElasticSearch or InfluxDB + Grafana/Kibana (data stored for limited duration) 21

Page 21: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Apache Parquet – an efficient columnar file format for HDFS

• Internal schema with multiple data types including nested ones

• Multiple encoding applicable on per column-bases• RLE, Dictionary, Delta, Bit packing

• Compressions supported• Snappy, gzip, LZO

• Column-level statistics per each block/rowgroup

• Advantages• Very compact – up 10x smaller than a text-based file

• Column (vertical) pruning –> less IO

• Rows group (horizontal) pruning -> less IO

• Supported by most of modern big data processing frameworks

• Recommended for analytic workloads

22

Page 22: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Data packing by various formats• and compressions

919 900

2819

1591

869

137187

538

296

17970 98

314220

92104

0

500

1000

1500

2000

2500

3000

kudu parquet hbase avro sorted parquet

Avg

row

len

gth

[B

ytes

]

No compression Snappy GZip-like LZ4

length in CSV

ATLAS EventIndex56 columns (strings, ints and floats )

All compression

algorithms provide a

lot of savings23

Page 23: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Measured insertion speed• Per client thread (the higher the better)

22

86

5.3

124

65

21

117

4.4

7471

19

39

4.9

49

34

20

0

20

40

60

80

100

120

140

kudu parquet hbase avro sorted parquet

Inse

rtio

n s

pee

d (

kHz)

No compression Snappy GZip-like LZ4

ATLAS

EventIndex

24

Page 24: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Data scanning efficiency (using Impala)

• By non-PK column per scanner thread (higher the better)

• With filter predicate push down

472 381538

71339

8250

2807

505354

3680

2551

1127

441142

1981

4222

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

kudu parquet hbase avro sorted parquet

Scan

sp

eed

(kH

z)

No compression Snappy GZip-like LZ4 ATLAS EventIndexgetting events with exact

tags (equal predicate)

Avro does not

support FPPD

25

Page 25: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Hadoop and Spark on a private cloud?

• Appears to be a good solution when storage locality is not

needed• Functional test and development

• Non-IO intensive workloads

• Reading from external storages (AFS, EOS, foreign HDFS)

• Spark clusters (without HDFS and YARN) - on containers

(Kubernetes)• possible candidates for Spark clusters for physics data processing reading from

EOS (or from remote HDFS)

• Streaming jobs reading from Kafka

26

Page 26: Overview of Hadoop and Spark service at CERN · Overview of Hadoop and Spark service at CERN Zbigniew Baranowski, IT-DB Hadoop and Spark Service May 7th, 2018 1. 3 Infrastructure

Conclusions

• Hadoop, Spark, Kafka services at CERN IT• Analytics, streaming, logging/controls

• BigData is growing at CERN• Many projects started and running

• The service is evolving

• Experience and community

• The technologies evolves rapidly on that field• Opportunities and challenges

27