打開一瞧:50G的文件!html
- emptystacks
- jobstacks
- jobtickets
- stackrequests
- worker
大數據加數據分析,須要以python+scikit,sql做爲基礎,大數據框架做爲載體。java
Please note that Worker (worker parquet files) has one or more job tickets (jobticket parquet files) associated with it.node
Using these parquet files: python
1. Is there a co-relation between jobticket.jobTicketState, jobticket.clickedCalloff and jobticket.assignedBySwipeJobs values across workers.mysql
2. Looking at Worker.profileLastUpdatedDate values, calculate an estimation for workers who will update their profile in the next two weeks.linux
Sol: Spark2.0入門:讀寫Parquet(DataFrame)github
part-00178-88b459d7-0c3a-4b84-bb5c-dd099c0494f2.c000.snappy.parquet
如何操做:面試
Sol: Spark2.0入門:讀寫Parquet(DataFrame)算法
Ref: Spark SQL 官方文檔-中文翻譯 【有讀取文件的例子】
什麼原理:
Ref: Parquet
Ref: [翻譯] Dremel made simple with Parquet
Ref: 深刻分析Parquet列式存儲格式
結論:
Hive集羣搭建,而後生成Parquet文件,以後才談得上分析。
讓咱們再瞧一個實際的「不得不大數據"的例子。
市場需求:
最近在作一我的羣標籤的項目,也就是根據客戶的一些交易行爲自動給客戶打標籤,而這些標籤更有利於咱們作商品推薦,目前打上標籤的數據已達5億+,
用戶量大概1億+,項目需求就是根據各類組合條件尋找標籤和人羣信息。
舉個例子:
集合A: ( 購買過「牙膏「的人交易金額在10-500元而且交易次數在5次的客戶而且平均訂單價在20 -200元) 。
集合B: (購買過「牙刷」的人交易金額在5-50 而且交易次數在3次的客戶而且平均訂單價在10-30元)。
求:<1> 獲取集合A 交 集合B 客戶數 和 客戶的具體信息,但願時間最好不要超過15s。
上面這種問題若是你用mysql作的話,基本上是算不出來的,時間上更沒法知足項目需求。
方案選擇:
分佈式的Elasticsearch集羣?
查詢中相關的Nick,AvgPrice,TradeCount,TradeAmont字段能夠用keyword模式存儲,避免出現fieldData字段沒法查詢的問題:
基於以上緣由,決定用spark試試看。
環境搭建:
搭建spark集羣,須要hadoop + spark + java + scala,搭建以前必定要注意各自版本的對應關係!!!
採用的組合是:
使用3臺虛擬機:
一臺【namenode +resourceManager + spark master node】
二臺 【datanode + nodeManager + spark work data】
192.168.2.227 hadoop-spark-master
192.168.2.119 hadoop-spark-salve1
192.168.2.232 hadoop-spark-salve2
使用python對spark進行操做:
以前使用scala對spark進行操做,使用maven進行打包,用起來不大方便;
採用python仍是很方便的,你們先要下載一個pyspark 的安裝包,必定要和spark的版本對應起來。 pypy官網:https://pypi.org/project/pyspark/2.2.1/
/* 能夠考慮一下 */
有沒有什麼全棧的解決方案呢?
基於大數據平臺技術開發的統一監控平臺Amas開源項目核心開發者。
GitHub: https://github.com/amas-eye/amas
技術棧
編程語言:
(Backend)Python
(Web)Javascript
Web服務:
Vue, ECharts, Webpack
Express(NodeJS)
後臺服務:
HBase, OpenTSDB, MongoDB, Redis
Spark, Kafka...
Jagger, Tornado
Pandas, Scikit-learn
Docker, Swarm
相關公司:https://matrix.ai/consulting/
Matrix AI doesn't just build the machine learning models, we also build the underlying big data cloud infrastructure!
We use Docker to encapsulate software components called microservices. These microservices are composed together into a data processing pipeline which feeds data from production systems to our machine learning training and inference architecture. This data processing pipeline gets orchestrated via distributed cluster computing systems like Dask and Kubernetes. Tensorflow is used to train our neural network models. The entire architecture is then deployed onto cloud platforms like AWS.
具體詳情,參見:[DE] Pipeline for Data Engineering
看過以上的例子,天然便引出一個問題,如何系統地掌握數據分析的技能?
Link: 大數據學習路線圖
至於另外一個問題,data science and machine learning什麼區別?
我的的一個感受,前者更加註重實踐性,後者偏重理論。
在數據量不大的狀況下(幾個G),單機上就能夠很好跑機器學習的程序。
這時,Python的用途就很大,不只有已經實現好的算法,也能夠實現爬蟲,從網上獲取數據。
對於大數據處理來講,尤爲是幾十個G的數據,Spark和Scala結合是如今的大趨勢。
Ref: 大數據分析基礎博文
4. 使用 Spark MLlib 作 K-means 聚類分析
從官方文檔來看,Spark ML Pipeline 雖然是被推薦的機器學習方式,
可是並不會在短時間內替代原始的 MLlib 庫,
由於 MLlib 已經包含了豐富穩定的算法實現,而且部分 ML Pipeline 實現基於 MLlib。
看到這裏,仍是廈門大學的這個資料比較全,學習系統,因此,走起!
課程:大數據技術原理與應用
教材:《大數據技術原理與應用》
1.受衆對象
具有必定的大數據基礎知識,好比,已經學習過林子雨編著的《大數據技術原理與應用》教材;
2.資源列表
(1)紙質教材:《Spark編程基礎》(官網)
(2)在線教程:《Spark入門教程(Scala版)》(訪問)
(3)在線教程:《Spark入門教程(Python版)》(訪問)
(4)視頻:《Spark編程基礎》MOOC視頻(2018年2月和紙質教材同步發佈)
(5)案例1:淘寶雙11數據分析與預測(訪問)
(6)案例2: Spark+Kafka構建實時分析Dashboard(訪問)
3.學習路線
(1)步驟一:參照《Spark編程基礎》紙質教材(官網),或者參照《Spark入門教程(Scala版)》在線教程(訪問),並觀看《Spark編程基礎》MOO視頻(2018年2月發佈),完成Spark技術原理與編程方法的學習。
(2)步驟二:完成《Spark編程基礎》全書內容學習之後,能夠練習Spark課程實驗「案例1:淘寶雙11數據分析與預測」(訪問)和「案例2: Spark+Kafka構建實時分析Dashboard」(訪問),對所學知識進行體統「串聯」,融會貫通。
4.其餘說明
(1)若是讀者是教師,能夠訪問《Spark編程基礎》教材官網(訪問),裏面提供了講義PPT、實驗題目答案、教學大綱等資源的下載。
(2)《Spark編程基礎》教材官網(訪問)裏面提供了不少紙質教材上沒有的上機實驗指導內容。
數據可視化(遠程):在PyTorch中使用 Visdom 可視化工具
實踐資源:kaggle, LeetCode, HackerRank, ProjectEuler, Sciket-learn.
My client wants to reward a high performing Software Data Engineer proficient on Spark and Scala and Hadoop with experience coding on R or Python or Java. You will be working in a fast paced environment. You will be joining and existing team environment as a project kicks off.
Your Benefits:
Immediate full time contract role
Melbourne CBD location close to public transport
3 months + 3 month extension
Your Role:
Data modelling, analysis and machine learning.
Relate data to analytical questions and frame the data engineering work to solve those business problems
Experience with at least 1 of the following for transforming data in scala, python or R
Experience with source control, automated testing and continuous integration/deployment
Designing and building relational and non-relational data stores (such as HDFS or Cassandra)
You will need to have:
Demonstrated experience working on big data tools such as Spark is essential.
Other ideal experience in SQL, Hadoop, HBase, Cassandra, Kafka, Nifi
Proven experience programming in Scala using RDDs, Dataframe and API’s for building the spark application
Experience manipulating and analysing complex, high-volume, high dimensionality data from varying sources
Excellent communication and stakeholder management skills
Proven experience managing a team and holding leadership roles.
Proven experience across data warehousing and reporting platforms
Hadoop or Spark certification (preferred but not essential)
Proven experience working in an agile environment
Current full Australian working rights (no sponsorship)
Must be available immediately
You will need to draw on your strong coding skills in this professional, intelligent data-driven environment.