0x90e's Blog

Chase Excellence,
Sucess will follow.


  • Home

  • Tags

  • Categories

  • Archives

Flink Task Lifecycle

Posted on 2020-02-05 | In Big data

Basic information

  • Flink version: 1.9

Task Lifecycle

此篇依序說明Flink從JobMaster創建ExecutionGraph到提交至TaskExector的流程,以及Task與StreamTask的生命週期

Read more »

Java Memory Model

Posted on 2019-12-01 | In Java

Java Memory Model(JMM)

本篇文章說明Java memory model(JMM)為什麼會存在,其是為了解決什麼問題而產生的,以及其如何克服問題。

Read more »

Flink Execution Graph

Posted on 2019-10-20 | In Big data

Flink Execution Graph

延續上篇Job Graph產生,此篇說明Execution Graph生成的過程與目的

Client Submit Job Graph

在ClusterClient的程序中,取得JobGraph後,會呼叫其實現類RestClusterClient<T>的submitJob(…),在此方法中會透過HTTP POST的方式將JobGraph提交給Dispatcher

Read more »

Flink Job Graph

Posted on 2019-07-21 | In Big data

延續上篇Stream Graph產生,此篇說明Job Graph生成的過程與目的
透過下方的連續調用會到Job Graph的生成主要邏輯代碼StreamingJobGraphGenerator的createJobGraph()@org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java

Read more »

Flink Stream Graph

Posted on 2019-06-26 | In Big data

Basic information

  • Flink version: 1.8

Flink Stream Graph

此篇依序說明從使用者的Flink job如何生成Stream Graph。
首先以SocketWindowWordCount示例代表使用者開發的Flink job

Read more »

Run Flink Application by Bash Script Source Code Trace

Posted on 2019-06-09 | In Big data

Run Flink Application by Bash Script Source Code Trace

Basic information

  • Flink version: 1.8

Run Flink Application by Bash Script

在使用Bash Script時,可以使用下面方式Submit一個SocketWindowWordCount的Flink application至JobManager

1
./flink run ../examples/streaming/SocketWindowWordCount.jar --port 9000

  • 此時會調用CliFrontend Class 的main @org/apache/flink/client/cli/CliFrontend.java
    主要分成兩個主要步驟:
    1. 創建CliFrontend object
    2. 調用CliFrontend object的parseParameters,將使用者實作的Flink application邏輯Submit至JobManager
  • 創建CliFrontend object時,會先構造其所需的參數,當中customCommandLines是透過Static function loadCustomCommandLines(…)構造,回傳的List當中,包含FlinkYarnSessionCli與DefaultCLI
Read more »

Flink Streaming Source Code Trace Introduction

Posted on 2019-06-02 | In Big data

Flink Streaming Source Code Trace Introduction

Flink Official Streaming Example

  • 參考Flink Local Setup Tutorial可以將SocketWindowWordCount示例運行起來
    Read more »

Django ORM

Posted on 2019-03-30 | In Django

Django ORM

Basic information

  • Django version: 2.1

Introduction

下述是一個例子,查詢在User table中所有User的資訊

1
2
3
4
5
6
7
8
9
10
11
12
13
14
from django.contrib.auth import get_user_model
from django.http import HttpResponse
from django.views.generic import View
User = get_user_model()
class MyView(View):
def get(self, request, *args, **kwargs):
users = User.objects.all()
for user in users:
print("id: {}, username: {}".format(user.id, user.username))
return HttpResponse(status=200)

Read more »

Python Class and Instance Instantiation Behavior

Posted on 2019-03-10 | In Python

Python Class and Instance Instantiation Behavior

__new__ and __init__ Function

  • __new__
    • Official document
    • 為Class function
      • 用了特殊方法,所以實現時不用特別寫上@classmethod裝飾器
    • 主要用途: 構建Instance
    • return:
      • 自身Class對應的Instance,並作為__init__的第一個參數,及為self
      • 其他Class對應的Instance,會呼叫對應的__init__
  • __init__
    • Official document
    • 為Object function
    • 主要用途: 初始化Object變量
    • return: 不允許返回任何值
Read more »

Django View Types

Posted on 2019-02-19 | In Django

Django View Types

Basic information

  • Django version: 2.1

Introduction

當一個 HTTP request被WSGI server接收時,在WSGIHandler中會根據url.py配置,找到對應的view function
相應代碼在WSGIHandler父類BaseHandler @django/core/handlers/base.py

Read more »
12…7
0x90e

0x90e

64 posts
8 categories
25 tags
E-Mail GitHub
© 2016 — 2020 0x90e
Powered by Hexo
|
Theme — NexT.Pisces v5.1.3
Unique Visitor Page View