SlideShare una empresa de Scribd logo
1 de 81
Descargar para leer sin conexión
a library to simplify and unify the lower layers
of big data systems on modern resource managers.
• One cluster used by all workloads
(interactive, batch, streaming, …)
• Resources are handed out as
containers
Container is slice of a machine
Fixed RAM, CPU, I/O, …
• Examples:
Apache Hadoop YARN
Apache Mesos
Google Borg
Resource
Managers
Resource
Managers
Enable true multi-tenancy…
Many workloads:
Streaming, Batch, Interactive…
Many users:
Production, Ad-Hoc, Experiments…
…but, only for sophisticated apps
Resource
Managers
Enable true multi-tenancy…
Many workloads:
Streaming, Batch, Interactive…
Many users:
Production, Ad-Hoc, Experiments…
…but, only for sophisticated apps
Fault tolerance
Resource
Managers
Enable true multi-tenancy…
Many workloads:
Streaming, Batch, Interactive…
Many users:
Production, Ad-Hoc, Experiments…
…but, only for sophisticated apps
Fault tolerance
Resource
Managers
Enable true multi-tenancy…
Many workloads:
Streaming, Batch, Interactive…
Many users:
Production, Ad-Hoc, Experiments…
…but, only for sophisticated apps
Fault tolerance
Preemption
Resource
Managers
Enable true multi-tenancy…
Many workloads:
Streaming, Batch, Interactive…
Many users:
Production, Ad-Hoc, Experiments…
…but, only for sophisticated apps
Fault tolerance
Preemption
Elasticity
Example 1:
SQL / MapReduce
Elasticity
Fault tolerance
σ
π
⋈
Example 1:
SQL / MapReduce
Elasticity
Fault tolerance
σ
π
⋈ ⋈⋈ ⋈⋈
Example 1:
SQL / MapReduce
Elasticity
Fault tolerance
π
⋈ ⋈⋈ ⋈⋈
Example 2:
Machine learning
Fault tolerance
Elasticity
Iterative computations
Example 3:
Graph processing
Fault tolerance
Elasticity
Iterative computations
Low latency communication
Silos
Silos are hard to build
Each duplicates the same
mechanisms under the hood
In practice, silos form pipelines
• In each step:
Read from and write to HDFS
• Synchronize on complete data
between steps
 Slow!
σ
π
⋈
Fun new problems,
boring old ones
Control flow setup
Master / Slave
Membership
Via heartbeats
Task Submission
Inter-Task Messaging
…
σ
π
⋈
REEF
Breadth
Mechanism over Policy
Avoid silos
Recognize the need
for different models
But: allow them to be composed
RM portability
Make app independent from low-
level Resource Manager APIs.
Bridge the JVM/CLR/… divide
Different parts of the computation
can be in either of them.
Resource Manager and DFS := Cluster OS
REEF := stdlib
REEF Control Flow
Yarn ( ) handles resource
management (security, quotas,
priorities)
Per-job Drivers ( ) request
resources, coordinate computations,
and handle events: faults,
preemption, etc…
+ 3
REEF Control Flow
Yarn ( ) handles resource
management (security, quotas,
priorities)
Per-job Drivers ( ) request
resources, coordinate computations,
and handle events: faults,
preemption, etc.
+ 3
REEF Control Flow
Yarn ( ) handles resource
management (security, quotas,
priorities)
Per-job Drivers ( ) request
resources, coordinate computations,
and handle events: faults,
preemption, etc…
REEF Evaluators ( ) hold hardware
resources, allowing multiple Tasks
( , , , , , , etc…) to
use the same cached state.
πσ
+ 3
REEF Control Flow
Yarn ( ) handles resource
management (security, quotas,
priorities)
Per-job Drivers ( ) request
resources, coordinate computations,
and handle events: faults,
preemption, etc…
REEF Evaluators ( ) hold hardware
resources, allowing multiple Tasks
( , , , , , , etc…) to
use the same cached state.
πσ
REEF Control Flow
Yarn ( ) handles resource
management (security, quotas,
priorities)
Per-job Drivers ( ) request
resources, coordinate computations,
and handle events: faults,
preemption, etc…
REEF Evaluators ( ) hold hardware
resources, allowing multiple Tasks
( , , , , , , etc…) to
use the same cached state.
πσ
REEF Control Flow
Yarn ( ) handles resource
management (security, quotas,
priorities)
Per-job Drivers ( ) request
resources, coordinate computations,
and handle events: faults,
preemption, etc…
REEF Evaluators ( ) hold hardware
resources, allowing multiple Tasks
( , , , , , , etc…) to
use the same cached state.
πσ
REEF Control Flow
Yarn ( ) handles resource
management (security, quotas,
priorities)
Per-job Drivers ( ) request
resources, coordinate computations,
and handle events: faults,
preemption, etc…
REEF Evaluators ( ) hold hardware
resources, allowing multiple Tasks
( , , , , , , etc…) to
use the same cached state.
πσ
σ σ
σ
REEF Control Flow
Yarn ( ) handles resource
management (security, quotas,
priorities)
Per-job Drivers ( ) request
resources, coordinate computations,
and handle events: faults,
preemption, etc…
REEF Evaluators ( ) hold hardware
resources, allowing multiple Tasks
( , , , , , , etc…) to
use the same cached state.
πσ
Hello World
1. Client submits the Driver
allocation request to the
Resource Manager ( )
$…
Hello World
1. Client submits the Driver
allocation request to the
Resource Manager ( )
2. Once started, Driver ( )
requests one Evaluator
container from YARN
$…
Hello World
1. Client submits the Driver
allocation request to the
Resource Manager ( )
2. Once started, Driver ( )
requests one Evaluator
container from YARN
3. Driver submits HelloWorld
Task to the newly allocated
Evaluator
$…
Hello World
1. Client submits the Driver
allocation request to the
Resource Manager ( )
2. Once started, Driver ( )
requests one Evaluator
container from YARN
3. Driver submits a HelloWorld
Task to the newly allocated
Evaluator
4. HelloWorld Task prints a
greeting to the log and quits
$…
LOG.log(Level.INFO, "Hello REEF!");
Hello World
1. Client submits the Driver
allocation request to the
Resource Manager ( )
2. Once started, Driver ( )
requests one Evaluator
container from YARN
3. Driver submits a HelloWorld
Task to the newly allocated
Evaluator
4. HelloWorld Task prints a
greeting to the log and quits
5. Driver receives CompletedTask
notification, releases the
Evaluator and quits $…
public final class HelloTask implements Task {
@Inject
private HelloTask() {}
@Override
public byte[] call(final byte[] memento) {
LOG.log(Level.INFO, "Hello REEF!");
return null;
}
}
public final class StartHandler implements EventHandler<StartTime> {
@Override
public void onNext(final StartTime startTime) {
requestor.submit(EvaluatorRequest.newBuilder()
.setNumber(1).setMemory(64).setNumberOfCores(1).build());
}
}
public final class EvaluatorAllocatedHandler
implements EventHandler<AllocatedEvaluator> {
@Override
public void onNext(final AllocatedEvaluator allocatedEvaluator) {
allocatedEvaluator.submitTask(TaskConfiguration.CONF
.set(TaskConfiguration.IDENTIFIER, "HelloREEFTask")
.set(TaskConfiguration.TASK, HelloTask.class)
.build();
}
}
final Configuration runtimeConfig = YarnRuntimeConfiguration.CONF.build();
final Configuration driverConfig = DriverConfiguration.CONF
.set(DriverConfiguration.DRIVER_IDENTIFIER, "HelloREEF")
.set(DriverConfiguration.GLOBAL_LIBRARIES,
EnvironmentUtils.getClassLocation(HelloDriver.class))
.set(DriverConfiguration.ON_DRIVER_STARTED, HelloDriver.StartHandler.class)
.set(DriverConfiguration.ON_EVALUATOR_ALLOCATED,
HelloDriver.EvaluatorAllocatedHandler.class)
.build();
DriverLauncher
.getLauncher(runtimeConfig)
.run(driverConfig, JOB_TIMEOUT);
Tang
Command = ‘ls’
Error:
container-487236457-02.stderr:
NullPointerException at:
java…eval():1234
ShellTask.helper():546
ShellTask.onNext():789
YarnEvaluator.onNext():12
Configuration is hard
- Errors often show up at runtime only
- State of receiving process is
unknown to the configuring process
Tang
Command = ‘ls’
Error:
Unknown parameter "Command"
Missing required parameter "cmd"
Configuration is hard
- Errors often show up at runtime only
- State of receiving process is
unknown to the configuring process
Our approach:
- Use Dependency Injection
- Configuration is pure data
 Early static and dynamic checks
Tang
cmd = ‘ls’
ShellTask
Evaluator
Error:
Required instanceof Evaluator
Got ShellTask
Configuration is hard
- Errors often show up at runtime only
- State of receiving process is
unknown to the configuring process
Our approach:
- Use Dependency Injection
- Configuration is pure data
 Early static and dynamic checks
Tang
cmd = ‘ls’
ShellTask
Task
YarnEvaluator
Evaluator
Configuration is hard
- Errors often show up at runtime only
- State of receiving process is
unknown to the configuring process
Our approach:
- Use Dependency Injection
- Configuration is pure data
 Early static and dynamic checks
Wake:
Events + I/O
Event-based
programming and remoting
API: A static subset of Rx
- Static checking of event flows
- Aggressive JVM event inlining
Implementation: “SEDA++”
- Global thread pool
- Thread sharing where possible
Distributed Shell
1. Client submits Driver configuration
to YARN runtime. Configuration
has cmd shell command, and n
number of Evaluators to run it on
$…
Distributed Shell
1. Client submits Driver configuration
to YARN runtime. Configuration
has cmd shell command, and n
number of Evaluators to run it on
2. Once started, Driver requests n
Evaluators from YARN
$…
Distributed Shell
1. Client submits Driver configuration
to YARN runtime. Configuration
has cmd shell command, and n
number of Evaluators to run it on
2. Once started, Driver requests n
Evaluators from YARN
3. Driver submits ShellTask with cmd
to each Evaluator
#!
$…
#!
#!
Distributed Shell
1. Client submits Driver configuration
to YARN runtime. Configuration
has cmd shell command, and n
number of Evaluators to run it on
2. Once started, Driver requests n
Evaluators from YARN
3. Driver submits ShellTask with cmd
to each Evaluator
4. Each ShellTask runs the command,
logs its stdout, and quits
#!
$…
#!
#!
Distributed Shell
1. Client submits Driver configuration
to YARN runtime. Configuration
has cmd shell command, and n
number of Evaluators to run it on
2. Once started, Driver requests n
Evaluators from YARN
3. Driver submits ShellTask with cmd
to each Evaluator
4. Each ShellTask runs the command,
logs its stdout, and quits
5. Driver receives CompletedTask
notifications, releases Evaluators
and quits when all Evaluators are
gone
$…
@Inject
private ShellTask(@Parameter(Command.class) final String command) {
this.command = command;
}
@Override
public byte[] call(final byte[] memento) {
final String result = CommandUtils.runCommand(this.command);
LOG.log(Level.INFO, result);
return CODEC.encode(result);
}
@NamedParameter(doc="Number of evaluators", short_name="n", default_value="1")
public final class NumEvaluators implements Name<Integer> {}
@NamedParameter(doc="The shell command", short_name="cmd")
public final class Command implements Name<String> {}
public final class EvaluatorAllocatedHandler
implements EventHandler<AllocatedEvaluator> {
@Override
public void onNext(final AllocatedEvaluator allocatedEvaluator) {
final JavaConfigurationBuilder taskConfigBuilder =
tang.newConfigurationBuilder(TaskConfiguration.CONF
.set(TaskConfiguration.IDENTIFIER, "ShellTask")
.set(TaskConfiguration.TASK, ShellTask.class)
.build());
taskConfigBuilder.bindNamedParameter(Command.class, command);
allocatedEvaluator.submitTask(taskConfigBuilder.build());
}
}
final JavaConfigurationBuilder driverConfig =
tang.newConfigurationBuilder(DriverConfiguration.CONF
.set(DriverConfiguration.DRIVER_IDENTIFIER, "DistributedShell")
.set(DriverConfiguration.GLOBAL_LIBRARIES,
EnvironmentUtils.getClassLocation(ShellDriver.class))
.set(DriverConfiguration.ON_DRIVER_STARTED, ShellDriver.StartHandler.class)
.set(DriverConfiguration.ON_EVALUATOR_ALLOCATED,
ShellDriver.EvaluatorAllocatedHandler.class)
.build());
new CommandLine(driverConfigBuilder)
.registerShortNameOfClass(Command.class)
.registerShortNameOfClass(NumEvaluators.class)
.processCommandLine(args);
DriverLauncher.getLauncher(runtimeConfig).run(driverConfig.build(), JOB_TIMEOUT);
YARN Example: 1333 lines of code
YARN Example: 1333 lines of code
Simple REEF Application: 83 lines
94%
YARN Example: 1333 lines of code
Simple REEF Application: 83 lines
Interactive Fault-Tolerant
Web Application on REEF: 361 lines
27%
•
•
•
•
•
Group
Communication
Also: Collective Communication
Communications with many
participants
Contrast: Peer-to-peer communication
Most commonly used interface: MPI
Broadcast
Mechanism
The sender (S) sends a value
All receivers (R) receive the identical value
Use case
Distribute a model
Distribute a descent direction for line search
Optimizations
Trees to distribute the data
Be mindful of the topology of machines
Do peer-to-peer sends
…
S
Reduce
Mechanism
The senders (S) each send a value
Those values are aggregated
The receiver (R) receives the aggregate total
Use case
Aggregate gradients, losses
Optimizations
Aggregation trees
Pipelining
// We can send and receive any Java serializable data, e.g. jBLAS matrices
private final Broadcast.Sender<DoubleMatrix> modelSender;
private final Broadcast.Receiver<DoubleMatrix[]> resultReceiver;
// Broadcast the model, collect the results, repeat.
do {
this.modelSender.send(modelSlice);
// ...
final DoubleMatrix[] result = this.resultReceiver.reduce();
} while (notConverged(modelSlice, prevModelSlice));
http://reef.apache.org
http://github.com/cmssnu/dolphin
http://github.com/Microsoft-CISL/TensorFactorization-LDA
Contact dev@reef.apache.org
Website http://reef.apache.org
Start with a random 𝑤0
Until convergence:
Compute the gradient
𝜕 𝑤 = ෍
𝑥,𝑦 𝜖 𝑋
𝑤, 𝑥 − 𝑦
Apply gradient and regularizer to the model
𝑤𝑡+1 = 𝑤𝑡 − 𝜂 𝜕 𝑤 + 𝜆
Data parallel in X
 Reduce
Needed by Partitions
 Broadcast
On REEF
Driver requests Evaluators
On REEF
Driver requests Evaluators
Driver sends Tasks to load & parse
data
On REEF
Driver requests Evaluators
Driver sends Tasks to load & parse
data
Driver sends ComputeGradient and
master Tasks
On REEF
Driver requests Evaluators
Driver sends Tasks to load & parse
data
Driver sends ComputeGradient and
master Tasks
Computation commences in
sequence of Broadcast and Reduce

Start with a random 𝑤0
Until convergence:
Compute the gradient
𝜕 𝑤 = ෍
𝑥,𝑦 𝜖 𝑋
2 𝑤, 𝑥 − 𝑦
Apply gradient to the model
𝑤𝑡+1 = 𝑤𝑡 − 𝜕 𝑤
Not having some machines means
training on a (random) subset of X
On REEF
First iteration
On REEF
Second Iteration
On REEF
End state
Apache REEF - stdlib for big data

Más contenido relacionado

La actualidad más candente

Building Scalable Data Pipelines - 2016 DataPalooza Seattle
Building Scalable Data Pipelines - 2016 DataPalooza SeattleBuilding Scalable Data Pipelines - 2016 DataPalooza Seattle
Building Scalable Data Pipelines - 2016 DataPalooza SeattleEvan Chan
 
Mercury: Hybrid Centralized and Distributed Scheduling in Large Shared Clusters
Mercury: Hybrid Centralized and Distributed Scheduling in Large Shared ClustersMercury: Hybrid Centralized and Distributed Scheduling in Large Shared Clusters
Mercury: Hybrid Centralized and Distributed Scheduling in Large Shared ClustersDataWorks Summit
 
Apache storm vs. Spark Streaming
Apache storm vs. Spark StreamingApache storm vs. Spark Streaming
Apache storm vs. Spark StreamingP. Taylor Goetz
 
Real time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache SparkReal time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache SparkRahul Jain
 
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)Helena Edelson
 
Reactive app using actor model & apache spark
Reactive app using actor model & apache sparkReactive app using actor model & apache spark
Reactive app using actor model & apache sparkRahul Kumar
 
Recipes for Running Spark Streaming Applications in Production-(Tathagata Das...
Recipes for Running Spark Streaming Applications in Production-(Tathagata Das...Recipes for Running Spark Streaming Applications in Production-(Tathagata Das...
Recipes for Running Spark Streaming Applications in Production-(Tathagata Das...Spark Summit
 
Spark stream - Kafka
Spark stream - Kafka Spark stream - Kafka
Spark stream - Kafka Dori Waldman
 
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...Helena Edelson
 
Running Non-MapReduce Big Data Applications on Apache Hadoop
Running Non-MapReduce Big Data Applications on Apache HadoopRunning Non-MapReduce Big Data Applications on Apache Hadoop
Running Non-MapReduce Big Data Applications on Apache Hadoophitesh1892
 
Emerging technologies /frameworks in Big Data
Emerging technologies /frameworks in Big DataEmerging technologies /frameworks in Big Data
Emerging technologies /frameworks in Big DataRahul Jain
 
Near Real Time Indexing Kafka Messages into Apache Blur: Presented by Dibyend...
Near Real Time Indexing Kafka Messages into Apache Blur: Presented by Dibyend...Near Real Time Indexing Kafka Messages into Apache Blur: Presented by Dibyend...
Near Real Time Indexing Kafka Messages into Apache Blur: Presented by Dibyend...Lucidworks
 
Spark Streaming Recipes and "Exactly Once" Semantics Revised
Spark Streaming Recipes and "Exactly Once" Semantics RevisedSpark Streaming Recipes and "Exactly Once" Semantics Revised
Spark Streaming Recipes and "Exactly Once" Semantics RevisedMichael Spector
 
A Container-based Sizing Framework for Apache Hadoop/Spark Clusters
A Container-based Sizing Framework for Apache Hadoop/Spark ClustersA Container-based Sizing Framework for Apache Hadoop/Spark Clusters
A Container-based Sizing Framework for Apache Hadoop/Spark ClustersDataWorks Summit/Hadoop Summit
 
Spark Summit 2014: Spark Job Server Talk
Spark Summit 2014:  Spark Job Server TalkSpark Summit 2014:  Spark Job Server Talk
Spark Summit 2014: Spark Job Server TalkEvan Chan
 
Spark Kernel Talk - Apache Spark Meetup San Francisco (July 2015)
Spark Kernel Talk - Apache Spark Meetup San Francisco (July 2015)Spark Kernel Talk - Apache Spark Meetup San Francisco (July 2015)
Spark Kernel Talk - Apache Spark Meetup San Francisco (July 2015)Robert "Chip" Senkbeil
 

La actualidad más candente (20)

Building Scalable Data Pipelines - 2016 DataPalooza Seattle
Building Scalable Data Pipelines - 2016 DataPalooza SeattleBuilding Scalable Data Pipelines - 2016 DataPalooza Seattle
Building Scalable Data Pipelines - 2016 DataPalooza Seattle
 
Mercury: Hybrid Centralized and Distributed Scheduling in Large Shared Clusters
Mercury: Hybrid Centralized and Distributed Scheduling in Large Shared ClustersMercury: Hybrid Centralized and Distributed Scheduling in Large Shared Clusters
Mercury: Hybrid Centralized and Distributed Scheduling in Large Shared Clusters
 
Apache storm vs. Spark Streaming
Apache storm vs. Spark StreamingApache storm vs. Spark Streaming
Apache storm vs. Spark Streaming
 
Real time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache SparkReal time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache Spark
 
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
Streaming Big Data with Spark, Kafka, Cassandra, Akka & Scala (from webinar)
 
Spark+flume seattle
Spark+flume seattleSpark+flume seattle
Spark+flume seattle
 
Reactive app using actor model & apache spark
Reactive app using actor model & apache sparkReactive app using actor model & apache spark
Reactive app using actor model & apache spark
 
Recipes for Running Spark Streaming Applications in Production-(Tathagata Das...
Recipes for Running Spark Streaming Applications in Production-(Tathagata Das...Recipes for Running Spark Streaming Applications in Production-(Tathagata Das...
Recipes for Running Spark Streaming Applications in Production-(Tathagata Das...
 
Spark stream - Kafka
Spark stream - Kafka Spark stream - Kafka
Spark stream - Kafka
 
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...
Delivering Meaning In Near-Real Time At High Velocity In Massive Scale with A...
 
Running Non-MapReduce Big Data Applications on Apache Hadoop
Running Non-MapReduce Big Data Applications on Apache HadoopRunning Non-MapReduce Big Data Applications on Apache Hadoop
Running Non-MapReduce Big Data Applications on Apache Hadoop
 
The Future of Apache Storm
The Future of Apache StormThe Future of Apache Storm
The Future of Apache Storm
 
Meetup ml spark_ppt
Meetup ml spark_pptMeetup ml spark_ppt
Meetup ml spark_ppt
 
Emerging technologies /frameworks in Big Data
Emerging technologies /frameworks in Big DataEmerging technologies /frameworks in Big Data
Emerging technologies /frameworks in Big Data
 
Near Real Time Indexing Kafka Messages into Apache Blur: Presented by Dibyend...
Near Real Time Indexing Kafka Messages into Apache Blur: Presented by Dibyend...Near Real Time Indexing Kafka Messages into Apache Blur: Presented by Dibyend...
Near Real Time Indexing Kafka Messages into Apache Blur: Presented by Dibyend...
 
Spark Streaming Recipes and "Exactly Once" Semantics Revised
Spark Streaming Recipes and "Exactly Once" Semantics RevisedSpark Streaming Recipes and "Exactly Once" Semantics Revised
Spark Streaming Recipes and "Exactly Once" Semantics Revised
 
A Container-based Sizing Framework for Apache Hadoop/Spark Clusters
A Container-based Sizing Framework for Apache Hadoop/Spark ClustersA Container-based Sizing Framework for Apache Hadoop/Spark Clusters
A Container-based Sizing Framework for Apache Hadoop/Spark Clusters
 
Spark Summit 2014: Spark Job Server Talk
Spark Summit 2014:  Spark Job Server TalkSpark Summit 2014:  Spark Job Server Talk
Spark Summit 2014: Spark Job Server Talk
 
Streaming SQL
Streaming SQLStreaming SQL
Streaming SQL
 
Spark Kernel Talk - Apache Spark Meetup San Francisco (July 2015)
Spark Kernel Talk - Apache Spark Meetup San Francisco (July 2015)Spark Kernel Talk - Apache Spark Meetup San Francisco (July 2015)
Spark Kernel Talk - Apache Spark Meetup San Francisco (July 2015)
 

Similar a Apache REEF - stdlib for big data

Web Sphere Problem Determination Ext
Web Sphere Problem Determination ExtWeb Sphere Problem Determination Ext
Web Sphere Problem Determination ExtRohit Kelapure
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container EraSadayuki Furuhashi
 
Cdcr apachecon-talk
Cdcr apachecon-talkCdcr apachecon-talk
Cdcr apachecon-talkAmrit Sarkar
 
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...DevOpsDays Tel Aviv
 
Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Viral Solani
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetAchieve Internet
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShellBoulos Dib
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAkshaya Mahapatra
 
The Integration of Laravel with Swoole
The Integration of Laravel with SwooleThe Integration of Laravel with Swoole
The Integration of Laravel with SwooleAlbert Chen
 
Everything you wanted to know about writing async, concurrent http apps in java
Everything you wanted to know about writing async, concurrent http apps in java Everything you wanted to know about writing async, concurrent http apps in java
Everything you wanted to know about writing async, concurrent http apps in java Baruch Sadogursky
 
Building Distributed Systems in Scala
Building Distributed Systems in ScalaBuilding Distributed Systems in Scala
Building Distributed Systems in ScalaAlex Payne
 
Hive Anatomy
Hive AnatomyHive Anatomy
Hive Anatomynzhang
 
Velocity 2018 preetha appan final
Velocity 2018   preetha appan finalVelocity 2018   preetha appan final
Velocity 2018 preetha appan finalpreethaappan
 
OGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's ViewOGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's ViewBartosz Dobrzelecki
 
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"Daniel Bryant
 
Flink Forward SF 2017: Joe Olson - Using Flink and Queryable State to Buffer ...
Flink Forward SF 2017: Joe Olson - Using Flink and Queryable State to Buffer ...Flink Forward SF 2017: Joe Olson - Using Flink and Queryable State to Buffer ...
Flink Forward SF 2017: Joe Olson - Using Flink and Queryable State to Buffer ...Flink Forward
 
Running Microservices on AWS Elastic Beanstalk
Running Microservices on AWS Elastic BeanstalkRunning Microservices on AWS Elastic Beanstalk
Running Microservices on AWS Elastic BeanstalkAmazon Web Services
 
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Amazon Web Services
 

Similar a Apache REEF - stdlib for big data (20)

Web Sphere Problem Determination Ext
Web Sphere Problem Determination ExtWeb Sphere Problem Determination Ext
Web Sphere Problem Determination Ext
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container Era
 
Cdcr apachecon-talk
Cdcr apachecon-talkCdcr apachecon-talk
Cdcr apachecon-talk
 
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...
 
Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
 
The Integration of Laravel with Swoole
The Integration of Laravel with SwooleThe Integration of Laravel with Swoole
The Integration of Laravel with Swoole
 
Everything you wanted to know about writing async, concurrent http apps in java
Everything you wanted to know about writing async, concurrent http apps in java Everything you wanted to know about writing async, concurrent http apps in java
Everything you wanted to know about writing async, concurrent http apps in java
 
YARN Services
YARN ServicesYARN Services
YARN Services
 
Building Distributed Systems in Scala
Building Distributed Systems in ScalaBuilding Distributed Systems in Scala
Building Distributed Systems in Scala
 
Hive Anatomy
Hive AnatomyHive Anatomy
Hive Anatomy
 
Velocity 2018 preetha appan final
Velocity 2018   preetha appan finalVelocity 2018   preetha appan final
Velocity 2018 preetha appan final
 
OGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's ViewOGSA-DAI DQP: A Developer's View
OGSA-DAI DQP: A Developer's View
 
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
 
Flink Forward SF 2017: Joe Olson - Using Flink and Queryable State to Buffer ...
Flink Forward SF 2017: Joe Olson - Using Flink and Queryable State to Buffer ...Flink Forward SF 2017: Joe Olson - Using Flink and Queryable State to Buffer ...
Flink Forward SF 2017: Joe Olson - Using Flink and Queryable State to Buffer ...
 
Running Microservices on AWS Elastic Beanstalk
Running Microservices on AWS Elastic BeanstalkRunning Microservices on AWS Elastic Beanstalk
Running Microservices on AWS Elastic Beanstalk
 
Apache Flink Hands On
Apache Flink Hands OnApache Flink Hands On
Apache Flink Hands On
 
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
 

Último

Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 

Último (20)

Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 

Apache REEF - stdlib for big data

  • 1.
  • 2. a library to simplify and unify the lower layers of big data systems on modern resource managers.
  • 3. • One cluster used by all workloads (interactive, batch, streaming, …) • Resources are handed out as containers Container is slice of a machine Fixed RAM, CPU, I/O, … • Examples: Apache Hadoop YARN Apache Mesos Google Borg Resource Managers
  • 4. Resource Managers Enable true multi-tenancy… Many workloads: Streaming, Batch, Interactive… Many users: Production, Ad-Hoc, Experiments… …but, only for sophisticated apps
  • 5. Resource Managers Enable true multi-tenancy… Many workloads: Streaming, Batch, Interactive… Many users: Production, Ad-Hoc, Experiments… …but, only for sophisticated apps Fault tolerance
  • 6. Resource Managers Enable true multi-tenancy… Many workloads: Streaming, Batch, Interactive… Many users: Production, Ad-Hoc, Experiments… …but, only for sophisticated apps Fault tolerance
  • 7. Resource Managers Enable true multi-tenancy… Many workloads: Streaming, Batch, Interactive… Many users: Production, Ad-Hoc, Experiments… …but, only for sophisticated apps Fault tolerance Preemption
  • 8. Resource Managers Enable true multi-tenancy… Many workloads: Streaming, Batch, Interactive… Many users: Production, Ad-Hoc, Experiments… …but, only for sophisticated apps Fault tolerance Preemption Elasticity
  • 9. Example 1: SQL / MapReduce Elasticity Fault tolerance σ π ⋈
  • 10. Example 1: SQL / MapReduce Elasticity Fault tolerance σ π ⋈ ⋈⋈ ⋈⋈
  • 11. Example 1: SQL / MapReduce Elasticity Fault tolerance π ⋈ ⋈⋈ ⋈⋈
  • 12. Example 2: Machine learning Fault tolerance Elasticity Iterative computations
  • 13. Example 3: Graph processing Fault tolerance Elasticity Iterative computations Low latency communication
  • 14. Silos Silos are hard to build Each duplicates the same mechanisms under the hood In practice, silos form pipelines • In each step: Read from and write to HDFS • Synchronize on complete data between steps  Slow! σ π ⋈
  • 15. Fun new problems, boring old ones Control flow setup Master / Slave Membership Via heartbeats Task Submission Inter-Task Messaging … σ π ⋈
  • 16. REEF Breadth Mechanism over Policy Avoid silos Recognize the need for different models But: allow them to be composed RM portability Make app independent from low- level Resource Manager APIs. Bridge the JVM/CLR/… divide Different parts of the computation can be in either of them. Resource Manager and DFS := Cluster OS REEF := stdlib
  • 17.
  • 18.
  • 19.
  • 20. REEF Control Flow Yarn ( ) handles resource management (security, quotas, priorities) Per-job Drivers ( ) request resources, coordinate computations, and handle events: faults, preemption, etc… + 3
  • 21. REEF Control Flow Yarn ( ) handles resource management (security, quotas, priorities) Per-job Drivers ( ) request resources, coordinate computations, and handle events: faults, preemption, etc. + 3
  • 22. REEF Control Flow Yarn ( ) handles resource management (security, quotas, priorities) Per-job Drivers ( ) request resources, coordinate computations, and handle events: faults, preemption, etc… REEF Evaluators ( ) hold hardware resources, allowing multiple Tasks ( , , , , , , etc…) to use the same cached state. πσ + 3
  • 23. REEF Control Flow Yarn ( ) handles resource management (security, quotas, priorities) Per-job Drivers ( ) request resources, coordinate computations, and handle events: faults, preemption, etc… REEF Evaluators ( ) hold hardware resources, allowing multiple Tasks ( , , , , , , etc…) to use the same cached state. πσ
  • 24. REEF Control Flow Yarn ( ) handles resource management (security, quotas, priorities) Per-job Drivers ( ) request resources, coordinate computations, and handle events: faults, preemption, etc… REEF Evaluators ( ) hold hardware resources, allowing multiple Tasks ( , , , , , , etc…) to use the same cached state. πσ
  • 25. REEF Control Flow Yarn ( ) handles resource management (security, quotas, priorities) Per-job Drivers ( ) request resources, coordinate computations, and handle events: faults, preemption, etc… REEF Evaluators ( ) hold hardware resources, allowing multiple Tasks ( , , , , , , etc…) to use the same cached state. πσ
  • 26. REEF Control Flow Yarn ( ) handles resource management (security, quotas, priorities) Per-job Drivers ( ) request resources, coordinate computations, and handle events: faults, preemption, etc… REEF Evaluators ( ) hold hardware resources, allowing multiple Tasks ( , , , , , , etc…) to use the same cached state. πσ σ σ σ
  • 27. REEF Control Flow Yarn ( ) handles resource management (security, quotas, priorities) Per-job Drivers ( ) request resources, coordinate computations, and handle events: faults, preemption, etc… REEF Evaluators ( ) hold hardware resources, allowing multiple Tasks ( , , , , , , etc…) to use the same cached state. πσ
  • 28.
  • 29.
  • 30. Hello World 1. Client submits the Driver allocation request to the Resource Manager ( ) $…
  • 31. Hello World 1. Client submits the Driver allocation request to the Resource Manager ( ) 2. Once started, Driver ( ) requests one Evaluator container from YARN $…
  • 32. Hello World 1. Client submits the Driver allocation request to the Resource Manager ( ) 2. Once started, Driver ( ) requests one Evaluator container from YARN 3. Driver submits HelloWorld Task to the newly allocated Evaluator $…
  • 33. Hello World 1. Client submits the Driver allocation request to the Resource Manager ( ) 2. Once started, Driver ( ) requests one Evaluator container from YARN 3. Driver submits a HelloWorld Task to the newly allocated Evaluator 4. HelloWorld Task prints a greeting to the log and quits $… LOG.log(Level.INFO, "Hello REEF!");
  • 34. Hello World 1. Client submits the Driver allocation request to the Resource Manager ( ) 2. Once started, Driver ( ) requests one Evaluator container from YARN 3. Driver submits a HelloWorld Task to the newly allocated Evaluator 4. HelloWorld Task prints a greeting to the log and quits 5. Driver receives CompletedTask notification, releases the Evaluator and quits $…
  • 35. public final class HelloTask implements Task { @Inject private HelloTask() {} @Override public byte[] call(final byte[] memento) { LOG.log(Level.INFO, "Hello REEF!"); return null; } }
  • 36. public final class StartHandler implements EventHandler<StartTime> { @Override public void onNext(final StartTime startTime) { requestor.submit(EvaluatorRequest.newBuilder() .setNumber(1).setMemory(64).setNumberOfCores(1).build()); } } public final class EvaluatorAllocatedHandler implements EventHandler<AllocatedEvaluator> { @Override public void onNext(final AllocatedEvaluator allocatedEvaluator) { allocatedEvaluator.submitTask(TaskConfiguration.CONF .set(TaskConfiguration.IDENTIFIER, "HelloREEFTask") .set(TaskConfiguration.TASK, HelloTask.class) .build(); } }
  • 37. final Configuration runtimeConfig = YarnRuntimeConfiguration.CONF.build(); final Configuration driverConfig = DriverConfiguration.CONF .set(DriverConfiguration.DRIVER_IDENTIFIER, "HelloREEF") .set(DriverConfiguration.GLOBAL_LIBRARIES, EnvironmentUtils.getClassLocation(HelloDriver.class)) .set(DriverConfiguration.ON_DRIVER_STARTED, HelloDriver.StartHandler.class) .set(DriverConfiguration.ON_EVALUATOR_ALLOCATED, HelloDriver.EvaluatorAllocatedHandler.class) .build(); DriverLauncher .getLauncher(runtimeConfig) .run(driverConfig, JOB_TIMEOUT);
  • 38. Tang Command = ‘ls’ Error: container-487236457-02.stderr: NullPointerException at: java…eval():1234 ShellTask.helper():546 ShellTask.onNext():789 YarnEvaluator.onNext():12 Configuration is hard - Errors often show up at runtime only - State of receiving process is unknown to the configuring process
  • 39. Tang Command = ‘ls’ Error: Unknown parameter "Command" Missing required parameter "cmd" Configuration is hard - Errors often show up at runtime only - State of receiving process is unknown to the configuring process Our approach: - Use Dependency Injection - Configuration is pure data  Early static and dynamic checks
  • 40. Tang cmd = ‘ls’ ShellTask Evaluator Error: Required instanceof Evaluator Got ShellTask Configuration is hard - Errors often show up at runtime only - State of receiving process is unknown to the configuring process Our approach: - Use Dependency Injection - Configuration is pure data  Early static and dynamic checks
  • 41. Tang cmd = ‘ls’ ShellTask Task YarnEvaluator Evaluator Configuration is hard - Errors often show up at runtime only - State of receiving process is unknown to the configuring process Our approach: - Use Dependency Injection - Configuration is pure data  Early static and dynamic checks
  • 42. Wake: Events + I/O Event-based programming and remoting API: A static subset of Rx - Static checking of event flows - Aggressive JVM event inlining Implementation: “SEDA++” - Global thread pool - Thread sharing where possible
  • 43.
  • 44. Distributed Shell 1. Client submits Driver configuration to YARN runtime. Configuration has cmd shell command, and n number of Evaluators to run it on $…
  • 45. Distributed Shell 1. Client submits Driver configuration to YARN runtime. Configuration has cmd shell command, and n number of Evaluators to run it on 2. Once started, Driver requests n Evaluators from YARN $…
  • 46. Distributed Shell 1. Client submits Driver configuration to YARN runtime. Configuration has cmd shell command, and n number of Evaluators to run it on 2. Once started, Driver requests n Evaluators from YARN 3. Driver submits ShellTask with cmd to each Evaluator #! $… #! #!
  • 47. Distributed Shell 1. Client submits Driver configuration to YARN runtime. Configuration has cmd shell command, and n number of Evaluators to run it on 2. Once started, Driver requests n Evaluators from YARN 3. Driver submits ShellTask with cmd to each Evaluator 4. Each ShellTask runs the command, logs its stdout, and quits #! $… #! #!
  • 48. Distributed Shell 1. Client submits Driver configuration to YARN runtime. Configuration has cmd shell command, and n number of Evaluators to run it on 2. Once started, Driver requests n Evaluators from YARN 3. Driver submits ShellTask with cmd to each Evaluator 4. Each ShellTask runs the command, logs its stdout, and quits 5. Driver receives CompletedTask notifications, releases Evaluators and quits when all Evaluators are gone $…
  • 49. @Inject private ShellTask(@Parameter(Command.class) final String command) { this.command = command; } @Override public byte[] call(final byte[] memento) { final String result = CommandUtils.runCommand(this.command); LOG.log(Level.INFO, result); return CODEC.encode(result); }
  • 50. @NamedParameter(doc="Number of evaluators", short_name="n", default_value="1") public final class NumEvaluators implements Name<Integer> {} @NamedParameter(doc="The shell command", short_name="cmd") public final class Command implements Name<String> {}
  • 51. public final class EvaluatorAllocatedHandler implements EventHandler<AllocatedEvaluator> { @Override public void onNext(final AllocatedEvaluator allocatedEvaluator) { final JavaConfigurationBuilder taskConfigBuilder = tang.newConfigurationBuilder(TaskConfiguration.CONF .set(TaskConfiguration.IDENTIFIER, "ShellTask") .set(TaskConfiguration.TASK, ShellTask.class) .build()); taskConfigBuilder.bindNamedParameter(Command.class, command); allocatedEvaluator.submitTask(taskConfigBuilder.build()); } }
  • 52. final JavaConfigurationBuilder driverConfig = tang.newConfigurationBuilder(DriverConfiguration.CONF .set(DriverConfiguration.DRIVER_IDENTIFIER, "DistributedShell") .set(DriverConfiguration.GLOBAL_LIBRARIES, EnvironmentUtils.getClassLocation(ShellDriver.class)) .set(DriverConfiguration.ON_DRIVER_STARTED, ShellDriver.StartHandler.class) .set(DriverConfiguration.ON_EVALUATOR_ALLOCATED, ShellDriver.EvaluatorAllocatedHandler.class) .build()); new CommandLine(driverConfigBuilder) .registerShortNameOfClass(Command.class) .registerShortNameOfClass(NumEvaluators.class) .processCommandLine(args); DriverLauncher.getLauncher(runtimeConfig).run(driverConfig.build(), JOB_TIMEOUT);
  • 53. YARN Example: 1333 lines of code
  • 54. YARN Example: 1333 lines of code Simple REEF Application: 83 lines 94%
  • 55. YARN Example: 1333 lines of code Simple REEF Application: 83 lines Interactive Fault-Tolerant Web Application on REEF: 361 lines 27%
  • 57.
  • 58. Group Communication Also: Collective Communication Communications with many participants Contrast: Peer-to-peer communication Most commonly used interface: MPI
  • 59. Broadcast Mechanism The sender (S) sends a value All receivers (R) receive the identical value Use case Distribute a model Distribute a descent direction for line search Optimizations Trees to distribute the data Be mindful of the topology of machines Do peer-to-peer sends … S
  • 60. Reduce Mechanism The senders (S) each send a value Those values are aggregated The receiver (R) receives the aggregate total Use case Aggregate gradients, losses Optimizations Aggregation trees Pipelining
  • 61.
  • 62.
  • 63. // We can send and receive any Java serializable data, e.g. jBLAS matrices private final Broadcast.Sender<DoubleMatrix> modelSender; private final Broadcast.Receiver<DoubleMatrix[]> resultReceiver; // Broadcast the model, collect the results, repeat. do { this.modelSender.send(modelSlice); // ... final DoubleMatrix[] result = this.resultReceiver.reduce(); } while (notConverged(modelSlice, prevModelSlice));
  • 65.
  • 68.
  • 69.
  • 70. Start with a random 𝑤0 Until convergence: Compute the gradient 𝜕 𝑤 = ෍ 𝑥,𝑦 𝜖 𝑋 𝑤, 𝑥 − 𝑦 Apply gradient and regularizer to the model 𝑤𝑡+1 = 𝑤𝑡 − 𝜂 𝜕 𝑤 + 𝜆 Data parallel in X  Reduce Needed by Partitions  Broadcast
  • 72. On REEF Driver requests Evaluators Driver sends Tasks to load & parse data
  • 73. On REEF Driver requests Evaluators Driver sends Tasks to load & parse data Driver sends ComputeGradient and master Tasks
  • 74. On REEF Driver requests Evaluators Driver sends Tasks to load & parse data Driver sends ComputeGradient and master Tasks Computation commences in sequence of Broadcast and Reduce
  • 75.
  • 76.
  • 77. Start with a random 𝑤0 Until convergence: Compute the gradient 𝜕 𝑤 = ෍ 𝑥,𝑦 𝜖 𝑋 2 𝑤, 𝑥 − 𝑦 Apply gradient to the model 𝑤𝑡+1 = 𝑤𝑡 − 𝜕 𝑤 Not having some machines means training on a (random) subset of X