SlideShare ist ein Scribd-Unternehmen logo
1 von 276
Downloaden Sie, um offline zu lesen
大數據 LOG 收集與分析實作
徐 凡 耘
2017-07-15
1
About me
• Education
– NCU (MIS)
– NCCU (CS)
• Experience
– Raritan, TWM, FET, CHT
• Teaching
– III
• Community
– TW Spark User Group
– TW Hadoop User Group
• Research
– III MIC - special columnist
– A.I. robot
– Big Data & Machine learning
• Team Group
– 聯瞻資訊顧問、慶騰資訊顧問
2
課 程 總 覽
課程大綱 – 第一天
• 網站 Log 分析
• 數據池導入
– 延伸資料探討
• Hadoop相關技術與實作
– 以 ETL Hive 實作
– 批次資料、資料模型、資料查詢、視覺化
經營網站 Log
開 場
• 取自商周財富網
– http://wealth.businessweekly.com.tw/m/
GArticle.aspx?id=ARTL000091875
網站 Log 分析
• 網站數據蒐集
• 網站數據報告
• 網站數據分析
網 站 數 據 蒐 集
• 原理是透過在網站的網頁上預先埋好需要的 JavaScript 程
式,我們也會把添加 JS 監測程式的動作叫做【埋 Code】
• Google Analytics(GA)
• 百度統計
– https://tongji.baidu.com/web/welcome/login
• 友盟統計
– http://www.umeng.com/
• Adobe Analytics
– https://helpx.adobe.com/tw/support/analytics.html
網 站 數 據 蒐 集
• 監測用戶造訪網頁的所有行為記錄,包含細節的行為
也能記錄,比如點擊了那一個按鈕、哪個下拉選項。
• 基本的【埋Code】問題不大,當然,若需要對很詳細
的行為記錄去做監測,就比較費工夫;尤其是網頁經
常性的調整、修改時,那就要重新設計【埋Code】的
程式碼。
• 過去我們常用網站log蒐集數據,稱為 【Server-Side
log】
網 站 數 據 蒐 集
• Server-Side log 長相
• 不用預先【埋 Code】,但無法記錄所有用戶詳細的行為
12.118.22.10 – – [21/Nov/2016:11:17:55 -0400] “GET / HTTP/1.1″ 200
10801 “http://www.google.com/search?q=taiwan+seo&ie=utf-
8&oe=utf-8 &aq=t&rls=org.mozilla:en-US:official&client=firefox-a”
“Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.7)
Gecko/20160914 Firefox /2.0.0.7″
網 站 數 據 蒐 集
• 以電商為例,我們在乎的資料:
– 訂單號碼、訂單金額
– 商品名稱、單號(SKU)、單價、數量
– 造訪數(Session)、瀏覽數(Page-View)、跳出
率(Bounce-Rate)、訪問時間、裝置、地區
• 結合其他資料源
網 站 數 據 報 告
• 透視數據下的商機
http://www.chinatimes.com/realtimenews/20131016002007-260412
網 站 數 據 報 告
• 報表總覽
• 顯示成效概況
• 顯示顯著的異常事件
• 看看現在正在發生的事
• 了解訪客
• 訪客們做了什麼事
• 網站經營狀況並進行改善
• 先關注轉換率 (Conversion, CV)、不重複用戶 (Unique-
Visitor, UV)、瀏覽數 (Page-View, PV)
網 站 數 據 報 告
https://www.smartm.com.tw/article/363938cea3
網 站 數 據 報 告
• 常用的數據分析
– RFM模型:用戶再次造訪率
– 用戶貼標模型:用戶標籤
– 用戶分群模型:產品推薦
– 用戶喜好模型:喜好強弱
延伸閱讀 (1)
• 如何打造自己的電商網站
– Google Analytics 註冊開設GA帳號
– Linode 開啟一台虛擬主機
– Godaddy.com註冊網域名稱
– 下載 WordPress CMS 安裝於該主機上
https://simular.co/knowledge/site-build/38-how-to-choose-your-own-content-
management-system-cms.html
延伸閱讀 (2)
常見的系統架構
資 料 溫 度 (1)
• Hadoop 的特色是批次數據處理,但對於大規模網路
上的近即時數據處理卻是複雜且困難的
• Lambda Architecture
– Nathan Marz 說任何數據系統都可定義為
Query = functional(all data)
– 採用 Hadoop 與 Strom 等系統建構
• Lambda 架構由下列元件組成
資 料 溫 度 (2)
資 料 溫 度 (3)
資 料 溫 度 (4)
• Hadoop 相容檔案系統 (HCFS)
– CephFS
• CEP 應用
– Storm 套件
• HDP 練習區
– https://hortonworks.com/downloads/#sandbox
延伸閱讀 (1)
數據池 vs 資料倉儲
資 料 倉 儲 (1)
• 資料倉儲是一個主題導向的、整合的、
時變的與非揮發性的
• 參考 Inmon、kimball 資料倉儲大師相
關著作(包含 data model)
27
http://www.kimballgroup.com/wp-content/uploads/2013/08/2013.09-Kimball-
Dimensional-Modeling-Techniques11.pdf
資 料 倉 儲 (2)
28
Pre-
stage
Stage Pdata
Pmart
資 料 處 理 的 階 段
搭配自動化 ETL 工具完成
1. Informatica
2. Oracle Data Integrator (ODI)
3. Trinity
4. Pentaho Data Integration (Kettle)
5. Nifi
6. Linux shell
資 料 倉 儲 (3)
• Magic Quadrant for
EDW and Data
Management
【Gartner 2016】
數 據 池 (1)
• 與 Enterprise Data-Warehosue (EDW) 的差別
• 拜 Hadoop 成長繼續成長,根據 Gartner 2015 調查
26% 企業考慮採用
• Hadoop 在 availability、scalability、performance、
and security 四個面向符合企業 SLAs
• Hadoop API 支援多數 ETL 工具,讓企業使用上更容易
【Gartner Survey Highlights Challenges to Hadoop Adoption.” May 13, 2015】
數 據 池 (2)
• 更大型的資料倉儲
• 儲存的數據為主,分散式儲存與運算
• 無論是結構、非結構(Schemaless)的數據都可
• 支援 Streaming 資料型態
• 支援多種資料型態 (parquet、avro等)
• 多元介面與其他系統整合
數 據 池 (3)
• 與 EDW 的差別
數 據 池 (4)
• Hadoop 當基礎打造
– HDFS:Hadoop 3.0 (Erasure Coding)
– YARN:支援多計算框架
• Date Store
– Hive、Hbase、Kylin、Elasticsearch
• Data Process
– MapReduce (Hive)、Spark、Storm、Drill
• Data Access
– Qlik、Tableau、Spotfire、Restful、Kafka
34
https://www.zaloni.com/platform/bedrock/
35
https://www.zaloni.com/platform/bedrock/
數 據 池 (7)
• On-Premise Data-Lake
– Hadoop + Hive (OLAP)
– Hadoop + Hive (OLAP) + RDB (OLTP)
– Hadoop + Hive (OLAP) + Elasticsearch (Index Query)
– Hadoop + Hive (OLAP) + in-memory DB (Interactive Query)
• Cloud Data-Lake
– Microsoft Azure
– AWS
• 新版 Hadoop 3 邁向新的里程碑
– 包括 Erasure Coding (Hadoop的儲存空間將可
減少一半,減少企業建構Hadoop cluster 硬體成本)
– 更強的HDFS NameNode HA功能
– YARN federation(可支援超過1萬個計算節點)
– YARN SharedCache(減少job submission的啟動
時間還有網路流量)
• 隨著 Hadoop 3即將來臨,基於Hadoop的各個下游系
統也將使用 Hadoop 3 帶來的新功能
延伸閱讀
準備 HDP 環境
HDP (1)
• 2011年成立 (從Yahoo分割出來)
– 台灣有代理廠商
• Hadoop核心主要貢獻者
• 100%開源與免費
• Hontonworks Sandbox (HDP 2.6)
• 有 Windows 版本 (Azure)
39
HDP (2)
40
HDP (3)
• HDP 在各行業的解決方案
https://hortonworks.com/solutions/
HDP (4)
• Apache Atlas 是一個可伸縮和可擴展的核心功能資料
治理服務,企業可以利用它高效的管理 Hadoop 及整
個企業的資料管理生態所需
• 核心功能包含: data stage、mart、整合、查詢、安全、
策略引擎
42
HDP (5) - Ambari
• 管理更容易
• 更容易安裝系統套件
• YARN Resource Scheduler
• 客製化儀表板 (系統叢集狀況)
• 可直接操作 View (Hive、Pig、HDFS)
43
HDP (6)
• Hortonworks Data Platform
44
https://hortonworks.com/products/data-center/hdp/
HDP (7)
• 安裝測試版 VMware Workstation
– http://www.vmware.com/products/workstation
/workstation-evaluation.html
• 調整記憶體 (最少 20GB)、CPU核心 (4核心以上)
• 開啟 Hortonworks Docker Sandbox HDP09.ova
• 選擇 NAT
• 開啟後,參考 Page 144
HDP (8)
• 登入 HDP Sandbox 系統,先取得 IP [外層]
– ssh root@IP [帳密: root/ Hadoop]
• 修改密碼
– sudo passwd root
• 取得 container ID
– docker ps
• Putty 登入 Sandbox [內層]
– ssh root@localhost -p 2222
– 系統會要求修改密碼
HDP (9)
• 修改 Ambari 登入密碼
– 在內層 => ambari-admin-password-reset
• 登入 Ambari 網頁
– http://IP:8080
• 啟動 HDFS 服務
– 【Maintenance Mode】關掉
– Secondary Namenode
延伸閱讀
• 何謂 Docker? 建置 Docker 平台
• 參考附件1: 手動安裝 HDP
– 請注意,系統至少需有 20+ GB 以上記憶體與 4 Vcores 核心
• 參考附件2: 如何設定使用 LLAP
• 資料安全
– Ranger、Knox 套件
• 資料治理
– Altas 套件
Hive 介紹
Hive 介紹 – (1)
• 可以透過客戶端程式或網頁存取
• Facebook 所開發
• SQL Like 語言
• 搭配 UDF 強化功能
• 需要使用 Metastore
– (例如使用Derby/ MySQL) 存儲體
• 支援 Text、ORC 等格式
• 支援壓縮 (ZLIB、Snappy)
50
Hive 介紹 – (2)
Hive 介紹 – (3)
• LLAP 是新一代分布式計算架構,它能夠智能地將資料
緩存到多台機器內存中,並允許所有客戶端共享這些
緩存的數據,同時保留了彈性伸縮能力
• 可快速啟動查詢計算作業並避免無需的磁碟 I/O 操作
• 完全整合 Hive SQL 與 Hive tools
關鍵字:Persistent query、Share memory caches、
Fine-grained、preemption
52
Hive 介紹 – (4)
與底層無關,可以是 HCFS 儲存平台
53
Hive 介紹 – (5)
具有記憶體的 Hive
54
延伸閱讀 (1)
延伸閱讀 (2)
HDP Hive 練習
HDP Hive 練習 – 上傳資料
• 以 admin 登入 Ambari 平台
– http://IP:8080
• 進入 Files View 並建立 HDFS
– /tmp/data
• 上傳本地檔案
– drivers.csv
– drivers_tmp.csv
– timesheet.csv
•
• 點選 data 目錄後,按下 Permission,設定權限
HDP Hive 練習 – DDL
• 到 Hive View,建立 drivers 表格 [預設在 default 資料庫]
CREATE TABLE DRIVERS (
DRIVERID INT
,NAME STRING
,SSN BIGINT
,LOCATION STRING
,CERTIFIED STRING
,WAGEPLAN STRING
)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS TEXTFILE
TBLPROPERTIES("skip.header.line.count"="1");
HDP Hive 練習 – DDL
• 建立 drivers 臨時表格 [預設在 default 資料庫]
CREATE TABLE TEMP_DRIVERS (COL_VALUE STRING);
HDP Hive 練習 – DDL
• 建立 timesheet 表格 [預設在 default 資料庫]
CREATE TABLE TIMESHEET (
DRIVERID INT
,WEEK INT
,HOURS_LOGGED INT
,MILES_LOGGED INT
) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS TEXTFILE TBLPROPERTIES("skip.header.line.count"="1");
HDP Hive 練習 – DDL
• 讀取 HDFS 資料,並寫入表格
LOAD DATA INPATH '/tmp/data/drivers.csv' OVERWRITE INTO TABLE drivers;
LOAD DATA INPATH '/tmp/data/drivers_tmp.csv' OVERWRITE INTO TABLE
TEMP_DRIVERS;
LOAD DATA INPATH '/tmp/data/timesheet.csv' OVERWRITE INTO TABLE timesheet;
HDP Hive 練習 – DDL
• 設定 hive.execution.engine => mr
LLAP 目前版本需要額外設定
HDP Hive 練習 – DDL
• 設定 hive.auto.convert.join => false
• Shuffle join
• Broadcast join
• Sort-Merge-Bucket join
HDP Hive 練習 – DDL
• 設定 hive.tez.container.size => 8096
HDP Hive 練習 – DML
• 進行 table join
SELECT
D.*
,T.HOURS_LOGGED
,T.MILES_LOGGED
FROM DRIVERS D
JOIN TIMESHEET T
ON D.DRIVERID = T.DRIVERID;
HDP Hive 練習 – DML
• 進行 table join SELECT
D.DRIVERID
,D.NAME
,T.TOTAL_HOURS
,T.TOTAL_MILES
FROM DEFAULT.DRIVERS D
JOIN (
SELECT
DRIVERID
,SUM(HOURS_LOGGED)TOTAL_HOURS
,SUM(MILES_LOGGED)TOTAL_MILES
FROM DEFAULT.TIMESHEET
GROUP BY DRIVERID
) T
ON (D.DRIVERID = T.DRIVERID);
HDP Hive 練習 – DCL
• 執行
• 執行 ANALYZE 的好處
– 使用 TEZ (CBO) 時,將有更可靠的 table 資料,執行計畫時
會更準確,一般系統會自動進行,也可手動進行
ANALYZE TABLE DRIVERS COMPUTE STATISTICS;
DESCRIBE EXTENDED DRIVERS;
• Directed Acyclic Graph (DAG)
– 由 Tez 執行 job 時建立
– 如何分散到不同叢集上、計數器
(例如工作及頂點所使用的記憶體),
以及錯誤訊息
– 簡單的 Hive 查詢通常不用 Tez 就
能解決,但更複雜的查詢 (進行篩
選、分組、排序、 聯結等)
延伸閱讀 (1)
• 何謂 Stats & Cost Based Optimization (CBO)?
– 統計表格之欄位分布,常用於產生更好的查詢方式
– 提高叢集資料查詢效率
• 常見的 CBO 模式
– Table Stats
– Column Stats
• 如何確保 Hive 啟動 CBO?
– 使用 explain 查看
– 表格執行過 ANALYZE TABLE
– CBO 有開啟
– 表格設有 partition
– 有時 join 條件不複雜,系統不會啟動
延伸閱讀 (2)
ANALYZE TABLE table [partition(key)]
COMPUTE STATISTICS;
ANALYZE TABLE table [partition(key)]
COMPUTE STATISTICS FOR COLUMNS col1,col2,...;
HDP Hive 練習–系統函數
• 執行
SELECT
REGEXP_EXTRACT(COL_VALUE, '^(?:([^,]*),?){1}', 1) DRIVERID
,REGEXP_EXTRACT(COL_VALUE, '^(?:([^,]*),?){2}', 1) NAME
,REGEXP_EXTRACT(COL_VALUE, '^(?:([^,]*),?){3}', 1) SSN
,REGEXP_EXTRACT(COL_VALUE, '^(?:([^,]*),?){4}', 1) LOCATION
,REGEXP_EXTRACT(COL_VALUE, '^(?:([^,]*),?){5}', 1) CERTIFIED
,REGEXP_EXTRACT(COL_VALUE, '^(?:([^,]*),?){6}', 1) WAGEPLAN
FROM TEMP_DRIVERS;
• 某晶圓製造廠商之機台 log
– 7700 萬 rows * 50 columns
– 12 台機器,每台 32 Gb 記憶體
• 執行查詢結果,用 where 條件過濾
– Spark SQL = 240 秒
– Hive ORC + Tez + Llap = 20 秒
延伸閱讀 (1)
• 壓縮格式
– high level compression (one of NONE, ZLIB,
SNAPPY)
• 建立表格
– create table Addresses ( name string, street
string, city string, state string, zip int ) stored as
orc tblproperties ("orc.compress"="NONE");
• 知識層
延伸閱讀 (2)
系統實作
資 料 模 型
• Prestage
– 資料初始
• Stage
– 資料整理
• Pdata
– 各主要表格
• Pmart
– 特定商用目的、資料大表、視覺化圖表
環 境 介 紹
• 外層
– 原始 Linux 作業系統
• 內層
– docker 應用程式 (HDP2.6)
• 內外交換目錄
– 外: /var/lib/docker/volumes/hadoop/_data
– 內: /hadoop
準 備 環 境
• 登入內層,下載測試程式
– cd /hadoop
– yum install git
– git clone
https://github.com/orozcohsu/weblog.git
– cd weblog
• 與 ES 交換目錄
– /hadoop/hadoop-log
調 整 系 統 時 間
• 調整外、內層系統時間
– ln -sf /usr/share/zoneinfo/Asia/Taipei
/etc/localtime
– yum install -y ntpdate
– ntpdate time.stdtime.gov.tw
• 檢查
– date
其他 Code Table
建立 profile 表格
• 在 Hive view 建立資料庫
– create database pdata;
• 建立 mysql profile 資料表
– mysql -u root -p [預設: hadoop]
– create database weblog;
– use weblog;
– create table profile (id int not null
auto_increment, uuid varchar(50), name
varchar(50), primary key(id) );
匯入 profile 資料
• 在內層中,匯入資料
– mysql -uroot weblog -p -e "LOAD DATA LOCAL
INFILE '/hadoop/weblog/hivename.csv' INTO TABLE
profile FIELDS TERMINATED BY ',' OPTIONALLY
ENCLOSED BY '"' LINES TERMINATED BY 'n' "
[預設:hadoop]
• 查看資料
– select * from weblog.profile;
Sqoop Import 資料到 Hive
• 在內層中,import 資料
– sqoop import --connect
jdbc:mysql://localhost/weblog --username root --
password hadoop --driver com.mysql.jdbc.Driver --
table profile --hive-import --hive-table pdata.profile
• 查看資料 (Hive view)
– SELECT * FROM pdata.profile LIMIT 100;
上傳 URL 麵包屑
• 在 Hive view 中,點選本地檔案
– host_url.csv
– 輸入欄位名稱、選擇欄位型態、資料庫
自 動 產 生 Weblog
• 在內層,執行產生 log 程式
– python realtime_data.py -t "2017-07-15 09:00:00" -p
"/hadoop/weblog/log"
• 觀察 log 格式
– head 20170711071217.csv
– 分隔符號 |
日期 Page view User agent Uuid
簡單 ETL 程式
• 上傳到 HDFS (/user/hive/prestage/weblog)
– bash /hadoop/weblog/SH/moveETL.sh &
• 檢查 Files View
執 行 Log 批 次 作 業 (1)
• 執行 stage 程式 (模擬多做幾批)
– sudo -u hive beeline -u
"jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDis
coveryMode=zooKeeper;zooKeeperNamespace=hiveser
ver2" --hivevar MDATE='20170711' --hivevar
SDATE='06' -f '/hadoop/weblog/SQL/stage.sql';
• 查看資料
– SELECT * FROM stage.s_weblog LIMIT 100;
執 行 Log 批 次 作 業 (2)
• 執行 pdata 程式 (模擬多做幾批)
– sudo -u hive beeline -u
"jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDi
scoveryMode=zooKeeper;zooKeeperNamespace=hives
erver2" --hivevar MDATE='20170711' --hivevar
SDATE='06' -f '/hadoop/weblog/SQL/pdata.sql';
• 查看資料
– SELECT * FROM pdata.p_weblog LIMIT 100;
執 行 Log 批 次 作 業
• 執行 pmart 程式 (模擬多做幾批)
– sudo -u hive beeline -u
"jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDi
scoveryMode=zooKeeper;zooKeeperNamespace=hives
erver2" --hivevar CDATE='2017-07-11' -f
'/hadoop/weblog/SQL/pmart.sql';
• 查看資料
– SELECT * FROM pmart.m_weblog LIMIT 100;
這些都是 Tez 執行的
資 料 分 析
• 客戶取數
– 找一群喜歡香水香氛的用戶
– 找一群關注營養補給與商業理財
SELECT NAME FROM PMART.M_WEBLOG
WHERE CAT3 LIKE '%香水香氛%';
SELECT NAME FROM PMART.M_WEBLOG
WHERE CAT2 LIKE '%營養補給%'
AND CAT3 LIKE '%商業理財%';
觀察自己的資料狀況,決定查詢條件
或用 beeline 查詢(非中文):
sudo -u hive beeline -u "jdbc:hive2://sandbox.hortonworks.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2"
• 手動完成 6 月份歷史資料
– 歷史資料: /hadoop/weblog/history-log
• 如何要做月檔,有甚麼函數?
– 參考函數: trunc(dt,'MM')
延伸閱讀 (1)
• 到內層,用 Python 存取 hive 資料
– yum install gcc-c++ python-devel.x86_64
cyrus-sasl-devel.x86_64
– easy_install pip
– pip install sasl
– pip install thrift
– pip install thrift-sasl
– pip install PyHive
– pip install pyhs2
– pip install woothee
延伸閱讀 (2)
• 到內層,用 Python 存取 hive 資料
延伸閱讀 (4)
import pyhs2
import woothee
conn = pyhs2.connect(host='localhost', port=10000,authMechanism='PLAIN',
user='hive', password='',database='pmart')
with conn.cursor() as cur:
cur.execute("select * from m_weblog limit 10")
for i in cur.fetch():
print i[5].decode('utf-8')
with conn.cursor() as cur:
cur.execute("select ua from m_weblog limit 10")
for i in cur.fetch():
print woothee.parse(i[2])
資料視覺化
資 料 視 覺 化 (1)
• 開啟 Zeppelin,建立一個新的 note
– http://IP:9995
資 料 視 覺 化 (2)
• 用戶總瀏覽紀錄
• 熱門商品分類
%jdbc(hive)
SELECT NAME, COUNT(*) AS CNT FROM PMART.M_WEBLOG
GROUP BY NAME;
%jdbc(hive)
SELECT CAT2, COUNT(*) AS CNT FROM PMART.M_weblog
GROUP BY CAT2;
資 料 視 覺 化 (3)
• 用戶瀏覽次數
• 觀察特殊商品次數
%jdbc(hive)
SELECT DATE_SUB(DT,0) AS DT, NAME, COUNT(*) AS CNT
FROM PMART.M_WEBLOG
GROUP BY DATE_SUB(DT,0), NAME
ORDER BY CNT DESC;
%jdbc(hive)
SELECT DT, TYPE, COUNT(*) FROM (
SELECT CASE
WHEN (CAT3 LIKE '%男%') THEN '男'
WHEN (CAT3 LIKE '%女%') THEN '女'
ELSE '無' END
AS TYPE, DATE_SUB(DT,0) AS DT
FROM PMART.M_WEBLOG
)A GROUP BY TYPE, DT;
• Zeppelin 參考結果
資 料 視 覺 化 (4)
• 如何準備 hive UDF
– 將檔案丟到 HDFS
(/user/admin/jars/hiveUDF_fat.jar)
• 執行 UDF 程式,先登入 hive console
– sudo -u hive beeline -u
"jdbc:hive2://sandbox.hortonworks.com:2181/;servi
ceDiscoveryMode=zooKeeper;zooKeeperNamespac
e=hiveserver2"
延伸閱讀 (1)
• 註冊 UDF 程式
– create function test as
'com.example.hive.udf.LowerCase' using jar
'hdfs:///user/admin/jars/hiveUDF_fat.jar';
• 刪除已註冊 UDF 程式 (需登出才生效)
– drop function test;
– !quit
• 查看已註冊的 jar
– list jar;
延伸閱讀 (2)
• 執行英文名字大寫轉換
– SELECT NAME FROM PDATA.PROFILE LIMIT 10;
• 套用 UDF 結果
– SELECT TEST(NAME) AS NAME FROM PDATA.PROFILE LIMIT 10;
延伸閱讀 (3)
結論
冷熱資料常用的工具
102
SparkSQL Good for iterative processing, access existing Hive
tables, given results fits in memory
HAWQ Good for traditional BI-like queries, star schemas,
cubes OLAP
HIVE(LLAP) Good for petabyte scale mixed with smaller tables
requiring sub-second queries
Phoenix Good way to interact with HBase tables, good with
time series, good indexing
Drill、Presto Query federation-like capabilities but limited SQL
syntax. Performance varies quite a bit.
總結討論 (1)
大數據主要架構策略
• Shared Nothing Architecture (SN)
– 是一種分散式計算架構,這種架構中不存在集
中儲存,整個系統中没有資源競爭,這種架構
具有高度擴張性,例如: 各節點的MapReduce
• Massively Parallel Processing (MPP)
– 多台主機透過網路進行大量資料平行運算
• Scale-out architecture
– 解決 SPOF 問題
– 容易透過增加主機叢集提高運算效率
103
總結討論(2) – 各層面探討
• 系統層面考量:
– Scalability
– Reliability
– Throughput
– Latency
– Hardware
– Monitoring
– Capacity Estimation
– Log Management
• 資料層面考量:
– 資料收集
– 資料格式
– 資料結構
– 資料儲存
– 資料查詢
104
• 分析層面考量:
– 探索性資料
– 批次資料探勘
– 批次資料降維
– 批次資料特征
– 資料視覺化
• 使用層面考量:
– 安全性
– 系統間接
– 資料治理
– 資料池
– 記憶體資料庫
總結討論(3) – 系統面探討
• 問對問題, 將重點放在高價值的業務問題
• 授權版本成本考量,是否過高?
• 尋求與擷取正確的資料源
• 資料清洗是個繁複又昂貴的過程
• 清楚的定義每個資料的意義, 並寫下他們與業務問題的
關聯,通常會叫做元數據(Metadata)與數據血緣圖
• 提供視覺化的報告與儀表板
• 產生預測模型與業務規則, 以利後續之業務預測與洞見
• 將儀表板,預測模型, 與業務規則公布給所有跨部門的相
關人員使用
• 定期地將資料更新,以便及時反應業務之需求
• 設定即時警告與通知機制以即時因應隨時可能發生的
機會與威脅
105
附件1 – 手動安裝 HDP
HDP 安裝與實作 (1)
• 安裝 Vmware 虛擬主機
– 安裝一台主機
– 名稱: master
– 密碼: 1234
– 網路: NAT
– 核心: 4+ (建議)
– 記憶體: 24GB+ (建議)
– OS: CentOS 6.9 (64位元)
• 參考叢集安裝
– 安裝三台主機
– 一台為 master,另外兩台為 slaver
• 可用IP或FQDN當作每台主機的識別
107
HDP 安裝與實作 (2)
SSH 連線到 master
• 使用 Putty 連入 master
– 帳號: root
– 密碼: xxxx
• 產生master一組ssh公私鑰
– ssh-keygen
• 複製自己master公鑰給自己
– cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
• 測試master到自己
– ssh IP
– ssh localhost
108
HDP 安裝與實作 (3)
• 編輯 hosts
– vi /etc/hosts
109
示意
HDP 安裝與實作 (4)
• ssh 到 master
– hostname master
• 檢查 hostname
– hostname -f
110
HDP 安裝與實作 (5)
• 於安裝主機啟動 NTP
– chkconfig ntpd on
– service ntpd start
111
HDP 安裝與實作 (6)
• 上傳 jdk 檔案
– 請先利用 WinScp 上傳 jdk-8u131-linux-
x64.rpm 到 /tmp 目錄
• 安裝 Java
– rpm -ivh /tmp/jdk-8u131-linux-x64.rpm
112
HDP 安裝與實作 (7)
• 於安裝主機上建立軟連結
– ln -s /usr/java/jdk1.8.0_131 /usr/java/java
• 於安裝主機設定環境變數
– vi /etc/profile
• 立即更新
– source /etc/profile
• 檢查
– java -version
113
export JAVA_HOME=/usr/java/java
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib/rt.jar
export PATH=$PATH:$JAVA_HOME/bin
HDP 安裝與實作 (8)
• 於安裝主機關閉防火牆
– chkconfig iptables off
– service iptables stop
• 於安裝主機設定 SELlinux
– vi /etc/selinux/config 將
SELINUX=disabled
– setenforce 0
114
HDP 安裝與實作 (9)
• HDP建議關閉 Transparent Huge Pages,
於安裝主機上執行
– echo never >
/sys/kernel/mm/redhat_transparent_hugepage/enabled
– echo never >
/sys/kernel/mm/redhat_transparent_hugepage/defrag
115
• 確定登入帳號為 root
• 在 master 上執行
– cd /tmp
– wget -nv http://public-repo-
1.hortonworks.com/ambari/centos6/2.x/
updates/2.5.0.3/ambari.repo -O
/etc/yum.repos.d/ambari.repo
– yum repolist
– yum install ambari-server
HDP 安裝與實作 (10)
116
HDP 安裝與實作 (11)
• 調整 Ambari 記憶體
– vi /var/lib/ambari-server/ambari-env.sh
117
找到 AMBARI_JVM_ARGS
-Xmx4096m -XX:PermSize=256m -XX:MaxPermSize=256m
HDP 安裝與實作 (12)
• 執行 Ambari Server
– ambari-server setup
118
[root@master tmp]# ambari-server setup
Using python /usr/bin/python2
Setup ambari-server
Checking SELinux...
SELinux status is 'enabled'
SELinux mode is 'permissive'
WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
OK to continue [y/n] (y)? y
Customize user account for ambari-server daemon [y/n] (n)? n
Adjusting ambari-server permissions and ownership...
Checking firewall status...
Checking JDK...
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
[3] Custom JDK
====================================================================
Enter choice (1): 3
WARNING: JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts.
WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength
Jurisdiction Policy Files are valid on all hosts.
Path to JAVA_HOME: /usr/java/java
Validating JDK on Ambari Server...done.
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? Y
Configuring database...
==============================================================================
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL / MariaDB
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
[7] - BDB
==============================================================================
Enter choice (1): 1
Database admin user (postgres):
Database name (ambari):
Postgres schema (ambari):
Username (ambari):
Enter Database Password (bigdata):
Default properties detected. Using built-in database.
Configuring ambari database...
Checking PostgreSQL...
Running initdb: This may take up to a minute.
About to start PostgreSQL
Configuring local database...
Configuring PostgreSQL...
Backup for pg_hba found, reconfiguration not required
Creating schema and user...
done.
Creating tables...
done.
Extracting system views...
..........ambari-admin-2.5.0.3.7.jar
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.
[root@master tmp]#
HDP 安裝與實作 (13)
• tail -F /var/log/yum.log
119
HDP 安裝與實作 (14)
• 啟動
– ambari-server start
• 開啟網頁 (建議使用 Chrome 或 Firefox)
– http://192.168.214.140:8080
– 預設帳號: admin
– 預設密碼: admin
• 選擇 Launch Install Wizard 進行安裝
120
當整個系統重開時,登入 Ambari 網頁需要點時間
請注意! admin登入後,新增 hdfs 帳號,並改由 hdfs 登入
請用 hdfs 登入
121
HDP 安裝與實作 (15)
• 取個名稱,例如: hdp
122
HDP 安裝與實作 (16)
• 選擇 HDP 版本,我們選擇 HDP-2.6
123
HDP 安裝與實作 (17)
• 輸入各主機IP資訊與上傳master的私鑰
124
HDP 安裝與實作 (18)
• 確定每個主機狀態都成功
125
HDP 安裝與實作 (19)
• 選擇需要的服務
126
只勾選我們要的 (HDFS、YARN+MapReduce2、Tez、
Hive、Pig、Slider、Oozie、Zookeeper、Mahout、
Ambari Metrics、SmartSense[預設])
HDP 安裝與實作 (20)
• 選擇需要的服務
127
HDP 安裝與實作 (21)
• 檢視各主機的配置
128
HDP 安裝與實作 (22)
• 建立 Hive
資料庫密碼
129
HDP 安裝與實作 (23)
• 建立
Oozie 資
料庫密碼
130
• 建立 Ambari
Metrics 資料
庫密碼
131
HDP 安裝與實作 (24)
• 建立
SmartSense
資料庫密碼
132
HDP 安裝與實作 (25)
HDP 安裝與實作 (26)
• 於 HDFS 頁
籤中,將
Block
replication
設定為 1
133
134
HDP 安裝與實作 (27)
HDP 安裝與實作 (28)
• 確定各主機的配置
135
HDP 安裝與實作 (29)
• 安裝進行中
136
靜待
觀察安裝log
HDP 安裝與實作 (30)
• 如果中途失敗,可多試幾次(re-run)
137
HDP 安裝與實作 (31)
• 確定安裝成功
138
大概要一小時,安裝過程中,請勿關機
HDP 安裝與實作 (32)
• 確定安裝成功
139
HDP 安裝與實作 (33)
• 確定服務都開啟之後(綠燈),以 Putty 登入系統
– su - hdfs
– hadoop dfsadmin -safemode leave
• 為方便 Ambari admin 帳號登入操作 View
– su - hdfs
– hadoop fs -mkdir /user/hdfs
• 當中如果遇到 Ambari 當掉
– ambari-server stop
– ambari-server start
140
HDP 安裝與實作 (34)
141
Ambari view 也可以執行 Hive、Pig、HDFS 等操作,記憶體需求較大
HDP 安裝與實作 (35)
• 確保每個服務都啟動 (Service Check)
142
HDP 安裝與實作 (36)
• 建立 anonymous 目錄 (方便日後使用 hiveserver2)
– sudo -u hdfs hadoop fs -mkdir /user/anonymous
– sudo –u hdfs Hadoop fs –chmod –R 777 /user/anonymous
143
HDP 安裝與實作 (37)
• 調整 Tez 資源設定 (-Xmx8192m –Xms8192m)
(否則 hive on Tez 查詢 join 會發生 OOM)
• 重啟服務
144
附件2 – 如何設定使用 LLAP
如何設定使用 LLAP – (1)
• 關掉 Sandbox
– 停止 HDP 服務
– 登入系統關機 (init 0)
• [選] Putty 登入 Sandbox,下載 TPC-H benchmark 測試
資料
– su - hive
– cd /tmp; wget https://github.com/cartershanklin/sandbox-
datagen/blob/master/datagen.tgz?raw=true
– tar -zxf /tmp/datagen.tgz?raw=true
如何設定使用 LLAP – (2)
• 增加記憶體,盡可能增加,最少 24 Gb
– 開機
– 檢查 HDP 服務 (確定都是綠燈)
如何設定使用 LLAP – (3)
• 調整 Yarn Memory
– Memory 增加到 8192 MB
– Container
• 調整 Yarn CPU
– Percentage of physical CPU => 100%
– 4 cores
• 儲存後,先需要重啟 Yarn
– 接下來才 Restart All Affected
如何設定使用 LLAP – (4)
• 於 Tez 調整啟動記憶體、儲存
• 於 Hive 啟動 Interactive Query
• 繼續調整 cluster Capacity、Concurrent、Heap Size
如何設定使用 LLAP – (5)
• 調整 Map join
• 儲存,重啟所有服務
• 到 Config 頁籤內調整
• 儲存,重啟需要重啟的服務
• 確定服務是正常的
如何設定使用 LLAP – (6)
如果一直無法開啟,可嘗試重開 Yarn
如何設定使用 LLAP – (7)
• 關閉不需要的服務
– Oozie、Flume、Zeppelin Notebook
• 下載 Hortonwork Hive ODBC Driver
– HortonworksHiveODBC64.msi
• 設定 ODBC (按下設定)
如何設定使用 LLAP – (8)
• LLAP 為 10500
• 預設帳密
– hive/hive
如何設定使用 LLAP – (9)
• 透過 Excel 抓取資料
亦可利用 Tableau 資料視覺化
如何設定使用 LLAP – (10)
• 如果要用 Hive View 查詢,需要設定名稱
大數據與 ELK 實戰
Justin.Lee
2017/07/16
講師介紹
Justin.Lee
經歷:
• 很會賣書的 EC 網站
• 遠傳電信大數據部門
• 癮科技數據分析師
課程大綱 – 第二天
•ELK 與大數據
•介紹 Elasticsearch 與實作
•介紹 Logstash 與實作
•介紹 Kibana 與實作
•資料分析實戰
–介紹相關 beats、XPack 套件
大數據
• 指傳統資料處理應用軟體不足以處理它們的大或複雜的資料集的
術語
➔ 不足:空間不足、時間不夠、
運算能量不夠
➔ 大:資料容量大,所需的空間大
➔ 傳統資料處理應用軟體:一般
關聯式資料庫、Excel
➔ 複雜:資料格式(樣式),含有結
構化與非結構化資料
數據儲存單位
CD: 650MB ~ 900MB
DVD: 4.3GB( 6x CD )
BD: 25GB( 單層 )
目前常用的從500G ~ 8T 不等
Life of Big Data Technologies
Life of Big Data Technologies
生 流 蒐 存 取 算 析 用 看
資料源 協定 前處理 儲存 取用 資料處理 分析 報表 解讀
Log
html
xml
json
影片
照片
聲音
FTP
syslog
自訂
Flume
Scribe
Fluentd
logstash
[結構]
RDB
(SQL)
HBase
ES
[非結構]
HDFS
ES
NO-SQL
HDFSAPI
Thrift
SQL UI
Hue
Map
reduce
Hive
Pig
Mahout
Apache
Spark
Apache
Spark
R
SAS
SPSS
R
Tableau
QlikView
D3.js
[Dashboard]
Kibana
取自Jazz Yao-Tsung Wang 的Facebook https://www.facebook.com/photo.php?fbid=10205093563953081&set=gm.679837385458973&type=3&theater
Life of Big Data Technologies
ELK 與大數據
• 大數據技術上要處理的問題:
– 資料量大,但處理時間有限
• ES近乎即時的索引,可以短時間處理大量資料
– 資料樣式多:結構化 / 非結構化資料混合
• ES提供schema-less 儲存結構化 / 非結構化資料
– 處理速度要快,相對computing power 要高,才能在有限的時間處理龐
大的資料
• 利用ES cluster,方便處理大量的資料
Elasticsearch
誰用了ES
Team Foundation Server
question-and-answer site
question-and-answer websites
Wikimedia
from wikipedia
Elasticsearch 特性
• Near Realtime(NRT)
• Document base NO-SQL
• RESTful API
• Fast installation
• Easy build cluster
Speed
Scalability
Easy
use
NRT
Document
based
RESTful
Cluster
Before Elasticsearch…...
•搜尋資料庫 (直接翻書)
•雖然沒有Elasticsearch,但我們還有
Apache Sol (建索引)
•雖然沒有Elasticsearch,但我們還有
Apache Lucene (建索引)
•ES vs Solr vs Lucene
Apache vs Elasticsearch
ES的核心原理
[ES是甚麼? ES不是甚麼?]
• Elasticsearch(簡稱ES) 核心為Apache Lucene
• Apache Lucene 是很成熟、高效的全文檢索器
• ES中的儲存結構就是從Apache Lucene來的,例如 document、
field(key/value)、term and token 等等
• ES也直接採用了Apache Lucene的查詢語法
– ex: title:"The Right Way" AND text:go
• ES不是關聯式資料庫
• ES沒有資料正規化
• 結構化資料可以交由關聯式資料庫來收容
資料並提供快速查詢
• 如何處理半結構 / 非結構化資料?
• 搜尋引擎處裡半結構化與非結構化資料
• 對於半結構 / 非結構化資料,可以利用搜
尋引擎將資料做索引,方便後續查詢
結構化資料
半結構化資料
非結構化資料
RDB
?
?
結構化/非結構化資料
⚫ 在linux中,有個好用的指令:grep
⚫ 以網頁 Air Force: Pilot ejects safely
before F-16 crashes near DC 為例:
⚫ 利用指令grep --color -i 'f-16' news.html,
可以找出帶有f-16的所有文章
⚫ grep 的速度不算慢,但若文檔愈來愈多,
grep 查詢的時間就愈來愈長,並且單靠
grep本身無法美化查詢結果
查詢 半結構化 / 非結構化資料
• 將文本資料做進行:
– 詞條化(tokenization):將文本中的每
個原始字元轉化為詞項(term),英文可
利用空白,中文要進行拆字
• 每個詞項出現在哪個文章可以建立"詞
項-文章"的關聯矩陣,就可以方便的找
出詞出現
• 詞項-文章關聯矩陣是稀疏矩陣,在使
用上會消耗大量記憶體
詞條化
詞項
詞項-文章
協同矩陣
查詢 半結構化 / 非結構化資料
詞條化
詞項
Inverted
index
文本資料 查詢條件
淺談搜尋引擎
Elasticsearch 的工作流程 :: 啟動
Elasticsearch cluster
ES node 1
ES node 2
DB
AP server
ES node 3
廣播
Elasticsearch 的工作流程 :: 索引
Elasticsearch cluster
ES node 1
ES node 2
AP server
進行索引
分片1
主節點
分片2
主節點
分片1
副本
分片2
副本轉發
Elasticsearch 的工作流程 :: 查詢
Elasticsearch cluster
ES node 1
ES node 2
AP
進行查詢
分片1
主節點
分片2
主節點
分片1
副本
分片2
副本
查詢結果
安裝 Elasticsearch
安裝流程
系統工具
安裝
ES安裝
流程
Elasticsearch
環境準
備
安裝
CentOS6.9
下載
CentOS
1. yum install wget
安裝wget
1. yum install net-tools
安裝net-tools
建立工作目錄
1. mkdir -p /homt/es_tools
Elasticsearch 相關檔案下載
1. wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-
securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-
b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
2. wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.4.0.rpm
1. 下載JDK8
2. 下載 elasticsearch 5.4.0
安裝 Elasticsearch
1. sudo rpm -Uvh jdk-8u131-linux-x64.rpm
2. sudo rpm -Uvh elasticsearch-5.4.0.rpm
3. java -version
1. 安裝(升級) Java8
2. 安裝(升級)elasticsearch 5.4.0
3. 看java 版本
安裝 Elasticsearch
1. sudo systemctl daemon-reload
2. sudo systemctl enable elasticsearch.service
3. sudo systemctl start elasticsearch.service
1. daemon reload
2. elasticsearch 服務 enable
3. elasticsearch 服務啟動
設定 Elasticsearch
1. vi /etc/sysconfig/elasticsearch
1. JAVA_HOME=/usr/bin/java
2. ES_JAVA_OPTS="-Xms2g -Xmx2g"
3. MAX_OPEN_FILES=65536
1. 設定JAVA_HOME
2. 設定ES使用的記憶體為2G
3. 設定系統最大檔案開啟數為65536
設定 Elasticsearch
1. cluster.name: es-lab
2. network.host: 0.0.0.0
3. bootstrap.memory_lock: false
4. bootstrap.system_call_filter: false
1. vi /etc/elasticsearch/elasticsearch.yml
1. ES叢集名稱
2. ES服務綁IP
3. bootstrap.memory_lock: false &
4. bootstrap.system_call_filter: false
⚫ 因為CentOS6不支援setComp,但ES5.2.0後
bootstrap.system_call_filter預設為true,會導致ES啟動
失敗
⚫ 設定為false
設定 Elasticsearch
1. elasticsearch - nofile 65536
2. elasticsearch - nproc 2048
1. vi /etc/security/limits.conf
帳號 限制類型 限制項目 限制值
user account soft,hard和-,
soft是警告設定。
hard是嚴格設定。
soft的值不能比
hard大。用-表示
同時設定了soft和
hard
參考資料
nofile 是最大開檔
數量
nproc 是最大的
process數量
限制數量
elasticsearch - nofile 65536
elasticsearch - nproc 2048
啟動 Elasticsearch
1. sudo service elasticsearch restart
2. sudo service elasticsearch status
3. sudo chkconfig --add elasticsearch
Elasticsearch 啟動後檢查
1. sudo tail -20 /var/log/elasticsearch/es-lab.log
2. sudo service elasticsearch status
Elasticsearch 啟動後檢查
1. netstat -an | more
Elasticsearch 啟動後檢查
1. curl -XGET 'http://localhost:9200'
Elasticsearch 啟動後檢查
JSON 描述format
⚫ JSON(JavaScript Object Notation)屬於
Javascript的一個子集,但格式定義方便使
用,目前大部分程式語言都有支援JSON格
式文件的讀寫
⚫ JSON用於描述資料結構,有以下形式存在:
⚫ 物件(object):一個物件以{開始,並以}結
束。一個物件包含一系列非排序的名稱/值對,
每個名稱/值對之間使用,分割。
⚫ 名稱/值(collection):名稱和值之間使用:
隔開,一般的形式是:
{name:value}
一個 ES 查詢的 JSON
{
"query": {
"bool": {
"must": [
{ "match": { "title":
"Search" }},
{ "match": { "content":
"Elasticsearch" }}
],
"filter": [
{ "term": { "status":
"published" }},
{ "range": { "publish_date":
{ "gte": "2015-01-01" }}}
]
}
}
}
Elasticsearch 查詢
• Query DSL: based on JSON
• QueryDSL分為 Query & filter
• Query 會打分數
• Filter 只看是否在要查的內容中
• full-text 需要analyzer,將查詢的關鍵字
做斷字斷詞
index
• ES將收到的資料存在index中
• 從RDB的角度來看,index就像database
• ES的index可能由一個或多個Lucene index 構成
type
• document可以用type區分,不同的type
可以個別定義自己的mapping
Elasticsearch
index: my_index
type:my_type_1 type:my_type_2
logical
layout
Elasticsearch 重要概念
document
• 在ES中,每一筆資料就是一個document
• document 由 field構成( key : value )
• document 是 JSON 物件
mapping
• 映射,可以對應到RDB的table schema
GET index_name/type_name/document_id
Elasticsearch 重要概念
node
• ES的服務實例(instance)就是一個node。
cluster
• 目前(5.x)版的 ES 可以應付大多數簡單的應
用,如果資料量相當大,或者是考慮到資料
的安全性時,可以啟動多個ES 的實例
(instance)在不同的主機上,形成
elasticsearch cluster,提供相對穩定的數據
存放環境。
node 1
my_index
shard 0
primary
my_index
shard 1
replica
node 2
my_index
shard 0
primary
my_index
shard 1
replica
node 3
my_index
shard 0
primary
my_index
shard 1
replica
Elasticsearch 重要概念
Logstash
Logstash
• Good tool for ETL
• Easy configuration
• Schema data
• Enrich data
ETL
easy
config
schema
enrich
Logstash 的角色
https://www.elastic.co/guide/en/logstash/current/introduction.html
Logstash 架構
INPUT
從各種來源
取得資料
FILTER
轉換、加工
資料
OUTPUT
放到適當的
儲存體
Input filter output
Apache
log4j
syslog
Windows事件日誌
Filebeat
TCP
UDP
Logstash 常見應用::Logs
Twitter
HTTP requests
input filter output Watcher
Logstash 常見應用::Web
Logstash 常見應用::Data, Streams
input filter output
JDBC
Kafka
RabbitMQ
AmazonSQS
TCP
UDP ZeroMQ
下載 Logstash
1. wget https://artifacts.elastic.co/downloads/logstash/logstash-5.4.0.rpm
Logstash 安裝
1. sudo rpm -Uvh logstash-5.4.0.rpm
2. sudo initctl start logstash
Logstash 安裝後測試
1. cd /usr/share/logstash
2. bin/logstash -e 'input { stdin { } } output { stdout {} }'
除了Logstash 還有Beats
Kibana
Kibana
• Very good tool for knowing your data
• Debug for ES RESTful API
• Dashboard
data
discovery
Dashboard
dev
tool
data
visualize
index
mgt
time
series
embedded
graph
Kibana :: Dashboard
https://www.elastic.co/products/kibana
Kibana :: Geo data in Maps
https://www.elastic.co/products/kibana
Kibana :: Time series
https://www.elastic.co/products/kibana
Kibana :: Dev Tools
https://www.elastic.co/products/kibana
Kibana 如何與 ES 協同
https://www.elastic.co/products/kibana
https://www.elastic.co/guide/en/logstash/current/introduction.html
下載 Kibana
1. wget https://artifacts.elastic.co/downloads/kibana/kibana-5.4.0-x86_64.rpm
Kibana 安裝
1. sudo rpm -Uvh kibana-5.4.0-x86_64.rpm
Kibana 設定
1. vi /etc/kibana/kibana.yml
elasticsearch.url: "http://localhost:9200"
啟動 Kibana
1. sudo service kibana restart
2. 在瀏覽器輸入 http://localhost:5601
Kibana UI :: Management
Kibana UI :: Dev Tools
Windows installers for the
Elastic stack
Windows installers for the
Elastic stack
資料來源:https://github.com/elastic/windows-installers
資料分析實戰
資料 & 來源
Page view 紀錄產生器
2017-07-07 17:00:09|http://www.books.com.tw/12219.html|Mozilla/5.0 (Windows NT 6.1; rv:21.0)
Gecko/20130328 Firefox/21.0|129a9022-28b7-11e7-93ae-92361f002671
2017-07-07 17:00:09|http://www.books.com.tw/8291.html|Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393|9b1fc809-
2060-446a-8ffd-f7f33be0fde0
2017-07-07 17:00:09|http://www.books.com.tw/13062.html|Mozilla/5.0 (Linux; U; Android 2.3.3; ko-kr; LG-
LU3000 Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1|12992afc-
28b7-11e7-93ae-92361f002671
2017-07-07 17:00:09|http://www.books.com.tw/4663.html|Mozilla/5.0 (Windows NT 5.1; rv:21.0)
Gecko/20130331 Firefox/21.0|c1b7b656-92da-44cc-91f1-ca23a0eeaa30
2017-07-07 17:00:09|http://www.books.com.tw/467.html|Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0)
Gecko/20130331 Firefox/21.0|1b5b56f9-db4b-451f-bada-5f5abfbc45dc
資料 & 來源
1. 2017-07-07 17:00:09
2. http://www.books.com.tw/12219.html
3. Mozilla/5.0 (Windows NT 6.1; rv:21.0)
Gecko/20130328 Firefox/21.0
4. 129a9022-28b7-11e7-93ae-92361f002671
1. 日期與時間
2. 目的網址
3. user agent
4. uuid
目標 & 流程
Page view 資料
Logstash設定
並啟動
開始抓取資料
利用Kibana
觀察資料
製作
Dashboard
實作架構
Logstash Elasticsearch Kibana
設定INPUT、
FILTER、
OUTPUT
寫入後檢查ES
利用Kibana製作
Dashboard
PageVie資料
Logstash conf
1. cd /etc/logstash
2. mkdir example
3. cd example
4. vi etl.conf
啟動 Logstash
1. cd /home/es_tools
2. bin/logstash -f/home/es_tools/etl.conf
利用 Kibana 檢查資料匯入
利用 Kibana 檢查資料匯入
建立 Kibana Index Patterns
鍵入etc
選start_time
建立 Kibana Index Patterns
使用 Kibana 觀察數據
注意時間的選擇
使用 Kibana 製作Dashboard
Kibana的Dashboard 是由一個以上的圖表組合而成的,在製作Dashboard之前,
必須先做好Dashboard中要出現的圖表
Kibana 建立圖表 (Visualize)
可用的圖表
圓餅圖
柱狀圖 (Vertical Bar)
數值計算
組合 Dashboard
組合 Dashboard
三個各點一下,下方就會出現該圖表
調整 Dashboard
可經由拖拉的方式調整圖表大小與位置,調好後紀錄即可
調整 Dashboard
加入M06A的discover 表格後記錄起來
完成 Dashboard
延伸閱讀
Timelion
Timelion
• 資料以時間序列的方式呈現
• 利用簡單的表示式來操作數據
安裝 Metricbeat
⚫ Metricbeat helps you
monitor your servers and
the services they host by
collecting metrics from the
operating system and
services.
⚫ 蒐集伺服器與服務的指標數
據,例如 CPU 使用率
安裝 Metricbeat
1. 在windows環境中安裝:
2. 下載檔案
3. 解壓縮
4. 放到c:Program Files
5. 改名 metricbeat-<version>-windows --> metricbeat.
6. 以Administrator身分執行install-service-metricbeat.ps1
安裝 Metricbeat
• 如果無法執行.install-service-metricbeat.ps1
• 請執行PowerShell.exe -ExecutionPolicy UnRestricted -File .install-service-metricbeat.ps1
安裝 Metricbeat
metricbeat.modules:
- module: system
metricsets:
- cpu
- filesystem
- fsstat
- memory
- network
- process
enabled: true
period: 10s
processes: ['.*']
output.elasticsearch:
hosts: ["192.168.33.40:9200"]
username: "elastic"
password: "zaxscdvf"
template.name: "metricbeat"
template.path: "metricbeat.template.json"
template.overwrite: false
1. vi metricbeat.yml
安裝 Metricbeat
在Window 的服務中看到metricbeat 裝好的情況
檢查資料是否寫到 Elasticsearch
Kibana 中建立 Index Patterns
建立時間序列視覺化
按下timelion後會
出現所有資料的
時間序列圖 .es(*)
建立時間序列視覺化
.es(index=metricbeat-*, timefield='@timestamp', metric='avg:system.cpu.user.pct')
建立時間序列視覺化
.es(index=metricbeat-*, timefield='@timestamp',
metric='avg:system.cpu.user.pct'), .es(offset=-1m,index=metricbeat-*,
timefield='@timestamp', metric='avg:system.cpu.user.pct')
兩個 .es() 中間用逗號","隔開
建立時間序列視覺化
.es(offset=-1m,index=metricbeat-*, timefield='@timestamp',
metric='avg:system.cpu.user.pct').label('last min'), .es(index=metricbeat-*,
timefield='@timestamp', metric='avg:system.cpu.user.pct').label('current min')
加label後的效果
客製視覺化效果
.es(offset=-1m,index=metricbeat-*, timefield='@timestamp',
metric='avg:system.cpu.user.pct').label('last min'), .es(index=metricbeat-*,
timefield='@timestamp', metric='avg:system.cpu.user.pct').label('current
min').title('CPU usage over time')
客製視覺化效果
.es(offset=-1m,index=metricbeat-*, timefield='@timestamp',
metric='avg:system.cpu.user.pct').label('last
min').lines(fill=1,width=0.5), .es(index=metricbeat-*, timefield='@timestamp',
metric='avg:system.cpu.user.pct').label('current min').title('CPU usage over
time')
客製視覺化效果
.es(offset=-1m,index=metricbeat-*, timefield='@timestamp',
metric='avg:system.cpu.user.pct').label('last
min').lines(fill=1,width=0.5).color(gray), .es(index=metricbeat-*,
timefield='@timestamp', metric='avg:system.cpu.user.pct').label('current
min').title('CPU usage over time').color(#1E90FF)
客製視覺化效果
.es(offset=-1m,index=metricbeat-*, timefield='@timestamp',
metric='avg:system.cpu.user.pct').label('last
min').lines(fill=1,width=0.5).color(gray), .es(index=metricbeat-*,
timefield='@timestamp', metric='avg:system.cpu.user.pct').label('current
min').title('CPU usage over time').color(#1E90FF).legend(columns=2,
position=nw)
使用函數
.es(index=metricbeat*, timefield=@timestamp, metric=max:system.network.in.bytes)
使用函數
.es(index=metricbeat*, timefield=@timestamp,
metric=max:system.network.in.bytes).derivative(), .es(index=metricbeat*,
timefield=@timestamp,
metric=max:system.network.out.bytes).derivative().multiply(-1)
最大值的變化量
乘 -1 後換方
向
使用函數
.es(index=metricbeat*, timefield=@timestamp,
metric=max:system.network.in.bytes).derivative().divide(1048576), .es(index
=metricbeat*, timefield=@timestamp,
metric=max:system.network.out.bytes).derivative().multiply(-
1).divide(1048576)
除1024 * 1024
使用函數
.es(index=metricbeat*, timefield=@timestamp,
metric=max:system.network.in.bytes).derivative().divide(1048576).lines(fill=2,
width=1).color(green).label("Inbound traffic").title("Network traffic
(MB/s)"), .es(index=metricbeat*, timefield=@timestamp,
metric=max:system.network.out.bytes).derivative().multiply(-
1).divide(1048576).lines(fill=2, width=1).color(blue).label("Outbound
traffic").legend(columns=2, position=nw)
邏輯判斷
.es(index=metricbeat-*, timefield='@timestamp', metric='max:system.memory.actual.used.bytes')
邏輯判斷
.es(index=metricbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes'), .es(index=metricbeat-*,
timefield='@timestamp',
metric='max:system.memory.actual.used.bytes').if(gt,12500000000,.es(index=metri
cbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes'),null).label('warning').color('#FFCC1
1'), .es(index=metricbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes').if(gt,15000000000,.es(index=metri
cbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes'),null).label('severe').color('red')
邏輯判斷
.es(index=metricbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes'), .es(index=metricbeat-*,
timefield='@timestamp',
metric='max:system.memory.actual.used.bytes').if(gt,12500000000,.es(index=metri
cbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes'),null).label('warning').color('#FFCC1
1'), .es(index=metricbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes').if(gt,15000000000,.es(index=metri
cbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes'),null).label('severe').color('red'), .es(
index=metricbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes').mvavg(10)
邏輯判斷
.es(index=metricbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes').label('max memory').title('Memory
consumption over time'), .es(index=metricbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes').if(gt,12500000000,.es(index=metri
cbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes'),null).label('warning').color('#FFCC1
1').lines(width=5), .es(index=metricbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes').if(gt,15000000000,.es(index=metri
cbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes'),null).label('severe').color('red').lines
(width=5), .es(index=metricbeat-*, timefield='@timestamp',
metric='max:system.memory.actual.used.bytes').mvavg(10).label('mvavg').lines(widt
h=2).color(#5E5E5E).legend(columns=4, position=nw)
加入 Dashboard
函數功能介紹
.abs() .elasticsearch() .label() .multiply() .range() .value()
.add() .es() .legend() .mvavg() .scale_interval() .wb()
.bars() .first() .lines() .mvstd() .static() .wbi()
.color() .fit() .log() .plus() .subtract() .worldbank()
.condition() .graphite() .max() .points() .sum() .worldbank_indicators()
.cusum() .hide() .min() .precision() .title() .yaxis()
.derivative() .holt() .movingaverage() .props() .trend()
.divide() .if() .movingstd() .quandl() .trim()
結論
項目 說明
Elasticsearch Near realtime search engine
RESTful API
Logstash Collection data
Parse data
Transform data
Kibana Data discovery
Data visualize
Dashboard
Time series(Timelion)
Q & A讓我們知道你的想法,慶騰資訊
http://dataservice.com.tw

Weitere ähnliche Inhalte

Was ist angesagt?

HDFS與MapReduce架構研討
HDFS與MapReduce架構研討HDFS與MapReduce架構研討
HDFS與MapReduce架構研討Billy Yang
 
2016-07-12 Introduction to Big Data Platform Security
2016-07-12 Introduction to Big Data Platform Security2016-07-12 Introduction to Big Data Platform Security
2016-07-12 Introduction to Big Data Platform SecurityJazz Yao-Tsung Wang
 
Distributed Data Analytics at Taobao
Distributed Data Analytics at TaobaoDistributed Data Analytics at Taobao
Distributed Data Analytics at TaobaoMin Zhou
 
淘宝Hadoop数据分析实践
淘宝Hadoop数据分析实践淘宝Hadoop数据分析实践
淘宝Hadoop数据分析实践Min Zhou
 
Hadoop 簡介 教師 許智威
Hadoop 簡介 教師 許智威Hadoop 簡介 教師 許智威
Hadoop 簡介 教師 許智威Awei Hsu
 
Hadoop 設定與配置
Hadoop 設定與配置Hadoop 設定與配置
Hadoop 設定與配置鳥 藍
 
Spark 巨量資料處理基礎教學
Spark 巨量資料處理基礎教學Spark 巨量資料處理基礎教學
Spark 巨量資料處理基礎教學NUTC, imac
 
Hadoop 與 SQL 的甜蜜連結
Hadoop 與 SQL 的甜蜜連結Hadoop 與 SQL 的甜蜜連結
Hadoop 與 SQL 的甜蜜連結James Chen
 
准实时海量数据分析系统架构探究
准实时海量数据分析系统架构探究准实时海量数据分析系统架构探究
准实时海量数据分析系统架构探究Min Zhou
 
Hadoop 2.0 之古往今來
Hadoop 2.0 之古往今來Hadoop 2.0 之古往今來
Hadoop 2.0 之古往今來Wei-Yu Chen
 
Track A-3 Enterprise Data Lake in Action - 搭建「活」的企業 Big Data 生態架構
Track A-3 Enterprise Data Lake in Action - 搭建「活」的企業 Big Data 生態架構Track A-3 Enterprise Data Lake in Action - 搭建「活」的企業 Big Data 生態架構
Track A-3 Enterprise Data Lake in Action - 搭建「活」的企業 Big Data 生態架構Etu Solution
 
推薦系統實作
推薦系統實作推薦系統實作
推薦系統實作FEG
 
Bigdata 大資料分析實務 (進階上機課程)
Bigdata 大資料分析實務 (進階上機課程)Bigdata 大資料分析實務 (進階上機課程)
Bigdata 大資料分析實務 (進階上機課程)家雋 莊
 
Hadoop大数据实践经验
Hadoop大数据实践经验Hadoop大数据实践经验
Hadoop大数据实践经验Hanborq Inc.
 
Apache hadoop and cdh(cloudera distribution) introduction 基本介紹
Apache hadoop and cdh(cloudera distribution) introduction 基本介紹Apache hadoop and cdh(cloudera distribution) introduction 基本介紹
Apache hadoop and cdh(cloudera distribution) introduction 基本介紹Anna Yen
 
Zh Tw Introduction To H Base
Zh Tw Introduction To H BaseZh Tw Introduction To H Base
Zh Tw Introduction To H Basekevin liao
 
Zh Tw Introduction To Map Reduce
Zh Tw Introduction To Map ReduceZh Tw Introduction To Map Reduce
Zh Tw Introduction To Map Reducekevin liao
 
Hadoop大数据实践经验
Hadoop大数据实践经验Hadoop大数据实践经验
Hadoop大数据实践经验Schubert Zhang
 

Was ist angesagt? (20)

HDFS與MapReduce架構研討
HDFS與MapReduce架構研討HDFS與MapReduce架構研討
HDFS與MapReduce架構研討
 
2016-07-12 Introduction to Big Data Platform Security
2016-07-12 Introduction to Big Data Platform Security2016-07-12 Introduction to Big Data Platform Security
2016-07-12 Introduction to Big Data Platform Security
 
Distributed Data Analytics at Taobao
Distributed Data Analytics at TaobaoDistributed Data Analytics at Taobao
Distributed Data Analytics at Taobao
 
淘宝Hadoop数据分析实践
淘宝Hadoop数据分析实践淘宝Hadoop数据分析实践
淘宝Hadoop数据分析实践
 
Hadoop 簡介 教師 許智威
Hadoop 簡介 教師 許智威Hadoop 簡介 教師 許智威
Hadoop 簡介 教師 許智威
 
Hadoop 設定與配置
Hadoop 設定與配置Hadoop 設定與配置
Hadoop 設定與配置
 
Spark 巨量資料處理基礎教學
Spark 巨量資料處理基礎教學Spark 巨量資料處理基礎教學
Spark 巨量資料處理基礎教學
 
Hadoop 與 SQL 的甜蜜連結
Hadoop 與 SQL 的甜蜜連結Hadoop 與 SQL 的甜蜜連結
Hadoop 與 SQL 的甜蜜連結
 
准实时海量数据分析系统架构探究
准实时海量数据分析系统架构探究准实时海量数据分析系统架构探究
准实时海量数据分析系统架构探究
 
Hadoop 2.0 之古往今來
Hadoop 2.0 之古往今來Hadoop 2.0 之古往今來
Hadoop 2.0 之古往今來
 
Track A-3 Enterprise Data Lake in Action - 搭建「活」的企業 Big Data 生態架構
Track A-3 Enterprise Data Lake in Action - 搭建「活」的企業 Big Data 生態架構Track A-3 Enterprise Data Lake in Action - 搭建「活」的企業 Big Data 生態架構
Track A-3 Enterprise Data Lake in Action - 搭建「活」的企業 Big Data 生態架構
 
Hadoop 介紹 20141024
Hadoop 介紹 20141024Hadoop 介紹 20141024
Hadoop 介紹 20141024
 
推薦系統實作
推薦系統實作推薦系統實作
推薦系統實作
 
Bigdata 大資料分析實務 (進階上機課程)
Bigdata 大資料分析實務 (進階上機課程)Bigdata 大資料分析實務 (進階上機課程)
Bigdata 大資料分析實務 (進階上機課程)
 
Tachyon 2015 08 China
Tachyon 2015 08 ChinaTachyon 2015 08 China
Tachyon 2015 08 China
 
Hadoop大数据实践经验
Hadoop大数据实践经验Hadoop大数据实践经验
Hadoop大数据实践经验
 
Apache hadoop and cdh(cloudera distribution) introduction 基本介紹
Apache hadoop and cdh(cloudera distribution) introduction 基本介紹Apache hadoop and cdh(cloudera distribution) introduction 基本介紹
Apache hadoop and cdh(cloudera distribution) introduction 基本介紹
 
Zh Tw Introduction To H Base
Zh Tw Introduction To H BaseZh Tw Introduction To H Base
Zh Tw Introduction To H Base
 
Zh Tw Introduction To Map Reduce
Zh Tw Introduction To Map ReduceZh Tw Introduction To Map Reduce
Zh Tw Introduction To Map Reduce
 
Hadoop大数据实践经验
Hadoop大数据实践经验Hadoop大数据实践经验
Hadoop大数据实践经验
 

Ähnlich wie Log collection

Hadoop con 2015 hadoop enables enterprise data lake
Hadoop con 2015   hadoop enables enterprise data lakeHadoop con 2015   hadoop enables enterprise data lake
Hadoop con 2015 hadoop enables enterprise data lakeJames Chen
 
Hadoop与数据分析
Hadoop与数据分析Hadoop与数据分析
Hadoop与数据分析George Ang
 
線上埋碼資料收集實作
線上埋碼資料收集實作線上埋碼資料收集實作
線上埋碼資料收集實作FEG
 
Qcon2013 罗李 - hadoop在阿里
Qcon2013 罗李 - hadoop在阿里Qcon2013 罗李 - hadoop在阿里
Qcon2013 罗李 - hadoop在阿里li luo
 
罗李:构建一个跨机房的Hadoop集群
罗李:构建一个跨机房的Hadoop集群罗李:构建一个跨机房的Hadoop集群
罗李:构建一个跨机房的Hadoop集群hdhappy001
 
百度系统部分布式系统介绍 马如悦 Sacc2010
百度系统部分布式系统介绍 马如悦 Sacc2010百度系统部分布式系统介绍 马如悦 Sacc2010
百度系统部分布式系统介绍 马如悦 Sacc2010Chuanying Du
 
云梯的多Namenode和跨机房之路
云梯的多Namenode和跨机房之路云梯的多Namenode和跨机房之路
云梯的多Namenode和跨机房之路li luo
 
賽門鐵克 Storage Foundation 6.0 簡報
賽門鐵克 Storage Foundation 6.0 簡報賽門鐵克 Storage Foundation 6.0 簡報
賽門鐵克 Storage Foundation 6.0 簡報Wales Chen
 
Azure Data Lake 簡介
Azure Data Lake 簡介Azure Data Lake 簡介
Azure Data Lake 簡介Herman Wu
 
Build 1 trillion warehouse based on carbon data
Build 1 trillion warehouse based on carbon dataBuild 1 trillion warehouse based on carbon data
Build 1 trillion warehouse based on carbon databoxu42
 
COSCUP 2019 - 開源大數據引擎 Greenplum
COSCUP 2019 - 開源大數據引擎 GreenplumCOSCUP 2019 - 開源大數據引擎 Greenplum
COSCUP 2019 - 開源大數據引擎 GreenplumOmni-Alex Chen
 
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...acelyc1112009
 
Nosql三步曲
Nosql三步曲Nosql三步曲
Nosql三步曲84zhu
 
Hadoop作业调度研究V0.1
Hadoop作业调度研究V0.1Hadoop作业调度研究V0.1
Hadoop作业调度研究V0.1YongqiangHe
 
淘宝分布式数据处理实践
淘宝分布式数据处理实践淘宝分布式数据处理实践
淘宝分布式数据处理实践isnull
 
2015-05-20 製造業生產歷程全方位整合查詢與探勘的規劃心法
2015-05-20 製造業生產歷程全方位整合查詢與探勘的規劃心法2015-05-20 製造業生產歷程全方位整合查詢與探勘的規劃心法
2015-05-20 製造業生產歷程全方位整合查詢與探勘的規劃心法Jazz Yao-Tsung Wang
 
Hadoop基础及hive入门
Hadoop基础及hive入门Hadoop基础及hive入门
Hadoop基础及hive入门haiwang
 
Etu DW Offload 解放資料倉儲的運算效能
Etu DW Offload 解放資料倉儲的運算效能Etu DW Offload 解放資料倉儲的運算效能
Etu DW Offload 解放資料倉儲的運算效能Etu Solution
 

Ähnlich wie Log collection (20)

Hadoop con 2015 hadoop enables enterprise data lake
Hadoop con 2015   hadoop enables enterprise data lakeHadoop con 2015   hadoop enables enterprise data lake
Hadoop con 2015 hadoop enables enterprise data lake
 
Hadoop与数据分析
Hadoop与数据分析Hadoop与数据分析
Hadoop与数据分析
 
線上埋碼資料收集實作
線上埋碼資料收集實作線上埋碼資料收集實作
線上埋碼資料收集實作
 
Qcon2013 罗李 - hadoop在阿里
Qcon2013 罗李 - hadoop在阿里Qcon2013 罗李 - hadoop在阿里
Qcon2013 罗李 - hadoop在阿里
 
罗李:构建一个跨机房的Hadoop集群
罗李:构建一个跨机房的Hadoop集群罗李:构建一个跨机房的Hadoop集群
罗李:构建一个跨机房的Hadoop集群
 
百度系统部分布式系统介绍 马如悦 Sacc2010
百度系统部分布式系统介绍 马如悦 Sacc2010百度系统部分布式系统介绍 马如悦 Sacc2010
百度系统部分布式系统介绍 马如悦 Sacc2010
 
Spark tutorial
Spark tutorialSpark tutorial
Spark tutorial
 
云梯的多Namenode和跨机房之路
云梯的多Namenode和跨机房之路云梯的多Namenode和跨机房之路
云梯的多Namenode和跨机房之路
 
賽門鐵克 Storage Foundation 6.0 簡報
賽門鐵克 Storage Foundation 6.0 簡報賽門鐵克 Storage Foundation 6.0 簡報
賽門鐵克 Storage Foundation 6.0 簡報
 
Azure Data Lake 簡介
Azure Data Lake 簡介Azure Data Lake 簡介
Azure Data Lake 簡介
 
Build 1 trillion warehouse based on carbon data
Build 1 trillion warehouse based on carbon dataBuild 1 trillion warehouse based on carbon data
Build 1 trillion warehouse based on carbon data
 
COSCUP 2019 - 開源大數據引擎 Greenplum
COSCUP 2019 - 開源大數據引擎 GreenplumCOSCUP 2019 - 開源大數據引擎 Greenplum
COSCUP 2019 - 開源大數據引擎 Greenplum
 
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
 
Nosql三步曲
Nosql三步曲Nosql三步曲
Nosql三步曲
 
Hadoop作业调度研究V0.1
Hadoop作业调度研究V0.1Hadoop作业调度研究V0.1
Hadoop作业调度研究V0.1
 
Why use MySQL
Why use MySQLWhy use MySQL
Why use MySQL
 
淘宝分布式数据处理实践
淘宝分布式数据处理实践淘宝分布式数据处理实践
淘宝分布式数据处理实践
 
2015-05-20 製造業生產歷程全方位整合查詢與探勘的規劃心法
2015-05-20 製造業生產歷程全方位整合查詢與探勘的規劃心法2015-05-20 製造業生產歷程全方位整合查詢與探勘的規劃心法
2015-05-20 製造業生產歷程全方位整合查詢與探勘的規劃心法
 
Hadoop基础及hive入门
Hadoop基础及hive入门Hadoop基础及hive入门
Hadoop基础及hive入门
 
Etu DW Offload 解放資料倉儲的運算效能
Etu DW Offload 解放資料倉儲的運算效能Etu DW Offload 解放資料倉儲的運算效能
Etu DW Offload 解放資料倉儲的運算效能
 

Mehr von FEG

Sequence Model pytorch at colab with gpu.pdf
Sequence Model pytorch at colab with gpu.pdfSequence Model pytorch at colab with gpu.pdf
Sequence Model pytorch at colab with gpu.pdfFEG
 
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdfFEG
 
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdfFEG
 
Pytorch cnn netowork introduction 20240318
Pytorch cnn netowork introduction 20240318Pytorch cnn netowork introduction 20240318
Pytorch cnn netowork introduction 20240318FEG
 
2023 Decision Tree analysis in business practices
2023 Decision Tree analysis in business practices2023 Decision Tree analysis in business practices
2023 Decision Tree analysis in business practicesFEG
 
2023 Clustering analysis using Python from scratch
2023 Clustering analysis using Python from scratch2023 Clustering analysis using Python from scratch
2023 Clustering analysis using Python from scratchFEG
 
2023 Data visualization using Python from scratch
2023 Data visualization using Python from scratch2023 Data visualization using Python from scratch
2023 Data visualization using Python from scratchFEG
 
2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratch2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratchFEG
 
2023 Supervised_Learning_Association_Rules
2023 Supervised_Learning_Association_Rules2023 Supervised_Learning_Association_Rules
2023 Supervised_Learning_Association_RulesFEG
 
202312 Exploration Data Analysis Visualization (English version)
202312 Exploration Data Analysis Visualization (English version)202312 Exploration Data Analysis Visualization (English version)
202312 Exploration Data Analysis Visualization (English version)FEG
 
202312 Exploration of Data Analysis Visualization
202312 Exploration of Data Analysis Visualization202312 Exploration of Data Analysis Visualization
202312 Exploration of Data Analysis VisualizationFEG
 
Transfer Learning (20230516)
Transfer Learning (20230516)Transfer Learning (20230516)
Transfer Learning (20230516)FEG
 
Image Classification (20230411)
Image Classification (20230411)Image Classification (20230411)
Image Classification (20230411)FEG
 
Google CoLab (20230321)
Google CoLab (20230321)Google CoLab (20230321)
Google CoLab (20230321)FEG
 
Supervised Learning
Supervised LearningSupervised Learning
Supervised LearningFEG
 
UnSupervised Learning Clustering
UnSupervised Learning ClusteringUnSupervised Learning Clustering
UnSupervised Learning ClusteringFEG
 
Data Visualization in Excel
Data Visualization in ExcelData Visualization in Excel
Data Visualization in ExcelFEG
 
6_Association_rule_碩士班第六次.pdf
6_Association_rule_碩士班第六次.pdf6_Association_rule_碩士班第六次.pdf
6_Association_rule_碩士班第六次.pdfFEG
 
5_Neural_network_碩士班第五次.pdf
5_Neural_network_碩士班第五次.pdf5_Neural_network_碩士班第五次.pdf
5_Neural_network_碩士班第五次.pdfFEG
 
4_Regression_analysis.pdf
4_Regression_analysis.pdf4_Regression_analysis.pdf
4_Regression_analysis.pdfFEG
 

Mehr von FEG (20)

Sequence Model pytorch at colab with gpu.pdf
Sequence Model pytorch at colab with gpu.pdfSequence Model pytorch at colab with gpu.pdf
Sequence Model pytorch at colab with gpu.pdf
 
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
 
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
 
Pytorch cnn netowork introduction 20240318
Pytorch cnn netowork introduction 20240318Pytorch cnn netowork introduction 20240318
Pytorch cnn netowork introduction 20240318
 
2023 Decision Tree analysis in business practices
2023 Decision Tree analysis in business practices2023 Decision Tree analysis in business practices
2023 Decision Tree analysis in business practices
 
2023 Clustering analysis using Python from scratch
2023 Clustering analysis using Python from scratch2023 Clustering analysis using Python from scratch
2023 Clustering analysis using Python from scratch
 
2023 Data visualization using Python from scratch
2023 Data visualization using Python from scratch2023 Data visualization using Python from scratch
2023 Data visualization using Python from scratch
 
2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratch2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratch
 
2023 Supervised_Learning_Association_Rules
2023 Supervised_Learning_Association_Rules2023 Supervised_Learning_Association_Rules
2023 Supervised_Learning_Association_Rules
 
202312 Exploration Data Analysis Visualization (English version)
202312 Exploration Data Analysis Visualization (English version)202312 Exploration Data Analysis Visualization (English version)
202312 Exploration Data Analysis Visualization (English version)
 
202312 Exploration of Data Analysis Visualization
202312 Exploration of Data Analysis Visualization202312 Exploration of Data Analysis Visualization
202312 Exploration of Data Analysis Visualization
 
Transfer Learning (20230516)
Transfer Learning (20230516)Transfer Learning (20230516)
Transfer Learning (20230516)
 
Image Classification (20230411)
Image Classification (20230411)Image Classification (20230411)
Image Classification (20230411)
 
Google CoLab (20230321)
Google CoLab (20230321)Google CoLab (20230321)
Google CoLab (20230321)
 
Supervised Learning
Supervised LearningSupervised Learning
Supervised Learning
 
UnSupervised Learning Clustering
UnSupervised Learning ClusteringUnSupervised Learning Clustering
UnSupervised Learning Clustering
 
Data Visualization in Excel
Data Visualization in ExcelData Visualization in Excel
Data Visualization in Excel
 
6_Association_rule_碩士班第六次.pdf
6_Association_rule_碩士班第六次.pdf6_Association_rule_碩士班第六次.pdf
6_Association_rule_碩士班第六次.pdf
 
5_Neural_network_碩士班第五次.pdf
5_Neural_network_碩士班第五次.pdf5_Neural_network_碩士班第五次.pdf
5_Neural_network_碩士班第五次.pdf
 
4_Regression_analysis.pdf
4_Regression_analysis.pdf4_Regression_analysis.pdf
4_Regression_analysis.pdf
 

Log collection