Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Apache Flink 둘러보기
이문수
NFLabs
moon@nflabs.com
Spark 사용자를 위한
Apache Flink
Streaming dataflow 엔진을 기반으로 한
스트리밍 & 배치 프로세싱 플랫폼
Flink 구성 요소를 살펴보면
Python
Spark 과 비슷
Flink Spark
Data DataSet RDD
DataFrame Table DataFrame
Machine Learning Flink ML MLlib
Graph Gelly Graphx
SQL - SparkSQL
S...
DataSet
DataSet Spark 의 RDD에 해당
은 RDD 변환하고, 변환이 끝나면 또 변환하고, 이
과정을 반복
RDD Operator RDD Operator ….
Operator Operator Operator
Data
...
Iteration
Operator Operator Operator
Data
Source
Data
Sink
Operator
Spark 처럼 Operator 와 RDD 를 끊임없이 생성하지 않고 수행가능
10000
Fault Tolerance
Spark 은 Lineage 을 이용해 전체 과정을 다시 계산
(persistance 된 RDD 가 있으면 그 이후로 계산)
RDD Operator RDD Operator ….
Operato...
Checkpoint
Operator Operator
Data
Source
Data
Sink
barrier barrier
안전한 데이터다시 계산될
수도 있는 데이터
1. 레코드 개별이 아니고, 어느정도 레
코드 묶음단위로...
DataSet API
DataSet 을 만들 때
val text = env.readTextFile("file:///path/to/file")
val text = env.fromElements(“hello”, “world”)
val data ...
DataSet 을 저장 할때
data.output(OutputFormat<T> outputFormat)
val text = data.writeAsText(“file:///…”)
파일로 저장하거나
사용자가 지정한 Outp...
Transformations
map
flatMap
mapPartition
filter
reduce
reduceGroup
aggregate
join
coGroup
cross
union
hashPartition
sortPart...
DataStream API
DataStream 을 만들 때
val dataStream = env.readFileStream(String path, long
checkFrequencyMillis, WatchType watchType)
val dat...
DataStream 을 저장 할 때
dataStream.writeAsText(parameters)
dataStream.addSink(sinkFunction)
파일로 저장하거나
사용자가 구현한 Sink를 사용
dataSt...
Windowing
policy
• Count
• Time
• Delta
DataStream API 예
Table API
Spark, R 의 DataFrame, Python 의
Pandas 와 비슷한 API 제공
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.t...
Memory Management
val counts = text
.flatMap {_.toLowerCase.split("W+") }
.map { (_, 1) }
.groupBy(0)
.sum(1)
Spark에서는 Tungsten 으로
이제하려고 시도하는 것
Architecture
감사합니다
이문수
http://zeppelin.incubator.apache.org
moon@apache.org
스사모 테크톡 - Apache Flink 둘러보기
Upcoming SlideShare
Loading in …5
×

스사모 테크톡 - Apache Flink 둘러보기

9,579 views

Published on

스사모 (스파크 사용자 모임) 테크톡 발표 자료입니다.
https://www.facebook.com/groups/sparkkoreauser

Published in: Technology
  • If u need a hand in making your writing assignments - visit ⇒ www.HelpWriting.net ⇐ for more detailed information.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Follow the link, new dating source: ❶❶❶ http://bit.ly/369VOVb ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ❶❶❶ http://bit.ly/369VOVb ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • If you want to download or read this book, copy link or url below in the New tab ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • ACCESS that WEBSITE Over for All Ebooks (Unlimited) ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... DOWNLOAD FULL EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M }
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

스사모 테크톡 - Apache Flink 둘러보기

  1. 1. Apache Flink 둘러보기 이문수 NFLabs moon@nflabs.com Spark 사용자를 위한
  2. 2. Apache Flink Streaming dataflow 엔진을 기반으로 한 스트리밍 & 배치 프로세싱 플랫폼
  3. 3. Flink 구성 요소를 살펴보면 Python
  4. 4. Spark 과 비슷
  5. 5. Flink Spark Data DataSet RDD DataFrame Table DataFrame Machine Learning Flink ML MLlib Graph Gelly Graphx SQL - SparkSQL Streaming DataStream SparkStreaming 비교해보면
  6. 6. DataSet
  7. 7. DataSet Spark 의 RDD에 해당 은 RDD 변환하고, 변환이 끝나면 또 변환하고, 이 과정을 반복 RDD Operator RDD Operator …. Operator Operator Operator Data Source 는 Operator 들 사이로 데이터를 흘려보냄 RDD Data Sink -> Data centric -> Operator centric
  8. 8. Iteration Operator Operator Operator Data Source Data Sink Operator Spark 처럼 Operator 와 RDD 를 끊임없이 생성하지 않고 수행가능 10000
  9. 9. Fault Tolerance Spark 은 Lineage 을 이용해 전체 과정을 다시 계산 (persistance 된 RDD 가 있으면 그 이후로 계산) RDD Operator RDD Operator …. Operator Operator Operator Data Source Flink 는 마지막 checkpoint 이후로 DataSource 에서 Replay RDD Data Sink X X
  10. 10. Checkpoint Operator Operator Data Source Data Sink barrier barrier 안전한 데이터다시 계산될 수도 있는 데이터 1. 레코드 개별이 아니고, 어느정도 레 코드 묶음단위로 Data source 에서 data stream 중간에 barrier 을 끼워 넣는다 2. Data sink 에 barrier 가 도착하면 해당 부분까지 계산이 완료 된것으로 본다. 3. Sink 에서는 Source 에 barrier 도착을 알 려 Source 에서 필요없는 데이터를 지우도록 한다.
  11. 11. DataSet API
  12. 12. DataSet 을 만들 때 val text = env.readTextFile("file:///path/to/file") val text = env.fromElements(“hello”, “world”) val data = env.createInput(InputFormat<X, ?> inputFormat) 메모리에 있는 collection으로 부터 생성하거나 val env = ExecutionEnvironment.getExecutionEnvironment SparkContext 에 해당하는 ExecutionEnvironment 를 통해 만들 수 있다. 파일로 부터 생성하거나 사용자가 지정한 InputFormt 으로부터
  13. 13. DataSet 을 저장 할때 data.output(OutputFormat<T> outputFormat) val text = data.writeAsText(“file:///…”) 파일로 저장하거나 사용자가 지정한 OutputFormat 으로 내보내거나 data.print() 화면에 뿌리거나
  14. 14. Transformations map flatMap mapPartition filter reduce reduceGroup aggregate join coGroup cross union hashPartition sortPartition val text = env.fromElements( "Who's there?", "I think I hear them. Stand, ho! Who's there?”) val counts = text .flatMap {_.toLowerCase.split("W+") } .map { (_, 1) } .groupBy(0) .sum(1)
  15. 15. DataStream API
  16. 16. DataStream 을 만들 때 val dataStream = env.readFileStream(String path, long checkFrequencyMillis, WatchType watchType) val dataStream = env.socketTextStream(“localhost”, “9999”) val dataStream = env.addSource(sourceFunction) 소켓으로 부터 생성하거나 val env = StreamExecutionEnvironment.getExecutionEnvironment SparkContext 에 해당하는 ExecutionEnvironment 를 통해 만들 수 있다. 디렉토리에 추가/변경되는 파일을 모니터링 사용자가 지정한 Source 으로부터 Kafka, RabbitMQ, Flume
  17. 17. DataStream 을 저장 할 때 dataStream.writeAsText(parameters) dataStream.addSink(sinkFunction) 파일로 저장하거나 사용자가 구현한 Sink를 사용 dataStream.print() 화면에 뿌리거나
  18. 18. Windowing policy • Count • Time • Delta DataStream API 예
  19. 19. Table API
  20. 20. Spark, R 의 DataFrame, Python 의 Pandas 와 비슷한 API 제공 import org.apache.flink.api.scala._ import org.apache.flink.api.scala.table._ case class WC(word: String, count: Int) val input = env.fromElements(WC("hello", 1), WC("hello", 1), WC("ciao", 1)) val expr = input.toTable val result = expr.groupBy('word).select('word, 'count.sum as 'count).toSet[WC]
  21. 21. Memory Management val counts = text .flatMap {_.toLowerCase.split("W+") } .map { (_, 1) } .groupBy(0) .sum(1)
  22. 22. Spark에서는 Tungsten 으로 이제하려고 시도하는 것
  23. 23. Architecture
  24. 24. 감사합니다 이문수 http://zeppelin.incubator.apache.org moon@apache.org

×