SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
Danairat T., 2013, danairat@gmail.comBig Data Hadoop – Hands On Workshop 1
Analyse Tweets using Flume 1.4,
Hadoop 2.7 and Hive
May 2015
Dr.Thanachart Numnonda
Certified Java Programmer
thanachart@imcinstitute.com
Danairat T.
Certified Java Programmer, TOGAF – Silver
danairat@gmail.com
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
Lecture: Understanding Flume
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
Introduction
Apache Flume is:
●
A distributed data transport and aggregation system for
event- or log-structured data
●
Principally designed for continuous data ingestion into
Hadoop… But more flexible than that
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
Architecture Overview
odiago
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
Flume terminology
●
Every machine in Flume is a node
●
Each node has a source and a sink
●
Some sinks send data to collector nodes, which
aggregate data from many agents before writing to HDFS
●
All Flume nodes heartbeat to/receive config from master
●
Events enter Flume within seconds of generation
Odiago
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
Flume isn’t an analytic system
●
No ability to inspect
message bodies
●
No notion of aggregates,
rolling counters, etc
Odiago
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
Hands-On: Loading Twitter Data to
Hadoop HDFS
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
Exercise Overview
Hive.apache.org
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
1. Installing Flume
$ wget
http://apache.mirrors.hoobly.com/flume/1.4.0/apache
-flume-1.4.0-bin.tar.gz
$ tar -xvzf apache-flume-1.4.0-bin.tar.gz
$ sudo mv apache-flume-1.4.0-bin flume
$ sudo mv flume /usr/local
$ rm apache-flume-1.4.0-bin.tar.gz
Install Flume binary file
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
1. Installing Flume (cont.)
Edit $HOME ./bashrc
$ sudo vi $HOME/.bashrc
$ exec bash
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
2. Installing a jar file
$ wget http://files.cloudera.com/samples/flume-sources-1.0-
SNAPSHOT.jar
$ sudo mv flume-sources-1.0-SNAPSHOT.jar
/usr/local/flume/lib/
$ cd /usr/local/flume/conf/
$ sudo cp flume-env.sh.template flume-env.sh
$ sudo vi flume-env.sh
Copy a jar file and edit conf file
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
3. Create a new Twitter App
Login to your Twitter @ twitter.com
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
3. Create a new Twitter App (cont.)
Create a new Twitter App @ apps.twitter.com
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
3. Create a new Twitter App (cont.)
Enter all the details in the application:
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
3. Create a new Twitter App (cont.)
Your application will be created:
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
3. Create a new Twitter App (cont.)
Click on Keys and Access Tokens:
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
3. Create a new Twitter App (cont.)
Click on Keys and Access Tokens:
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
3. Create a new Twitter App (cont.)
Your Access token got created:
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
4. Configuring the Flume Agent
Copy the flume.conf file from the following url:
https://github.com/cloudera/cdh-twitter-
example/blob/master/flume-sources/flume.conf
$ vi /usr/local/flume/conf/flume.conf
flume.conf file
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
Fixing Bug for running Flume1.4 on Hadoop 2.x
Need to remove file guava-10.0.1.jar and
protobuf-java-2.4.1.jar
$ cd /usr/local/flume/rm
$ rm guava-10.0.1.jar
$ rm protobuf-java-2.4.1.jar
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
5. Fetching the data from twitter
$ flume-ng agent -n TwitterAgent -c conf -f
/usr/local/flume/conf/flume.conf
Wait for 60-90 seconds and let flume stream the data on
HDFS, then press Ctrl-c to break the command and stop the
streaming. (Ignore the exceptions)
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
6. View the straming data
$ hdfs dfs -ls /user/flume/tweets
$ hdfs dfs -cat /user/flume/tweets/FlumeData.1431058050787
$ hdfs dfs -rm /user/flume/tweets/*.tmp
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
7. Analyse data using Hive
$ wget
http://files.cloudera.com/samples/hive-serdes-1.0-SNAPSHOT.jar
$ mv hive-serdes-1.0-SNAPSHOT.jar /usr/local/apache-hive-
1.1.0-bin/lib/
$ hive
hive> ADD JAR /usr/local/apache-hive-1.1.0-bin/lib/hive-
serdes-1.0-SNAPSHOT.jar;
Get a Serde Jar File for parsing JSON file
Register the Jar file.
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
7. Analyse data using Hive (cont.)
Running the following hive command
http://www.thecloudavenue.com/2013/03/analyse-tweets-using-flume-hadoop-and.html
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
7. Analyse data using Hive (cont)
hive> elect user.screen_name, user.followers_count c from
tweets order by c desc;
Finding user who has the most number of followers
Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop
Thank you
www.imcinstitute.com
www.facebook.com/imcinstitute

Weitere ähnliche Inhalte

Was ist angesagt?

One Grid to rule them all: Building a Multi-tenant Data Cloud with YARN
One Grid to rule them all: Building a Multi-tenant Data Cloud with YARNOne Grid to rule them all: Building a Multi-tenant Data Cloud with YARN
One Grid to rule them all: Building a Multi-tenant Data Cloud with YARN
DataWorks Summit
 

Was ist angesagt? (20)

Big data processing using Cloudera Quickstart
Big data processing using Cloudera QuickstartBig data processing using Cloudera Quickstart
Big data processing using Cloudera Quickstart
 
Thailand Hadoop Big Data Challenge #1
Thailand Hadoop Big Data Challenge #1Thailand Hadoop Big Data Challenge #1
Thailand Hadoop Big Data Challenge #1
 
Analyse Tweets using Flume, Hadoop and Hive
Analyse Tweets using Flume, Hadoop and HiveAnalyse Tweets using Flume, Hadoop and Hive
Analyse Tweets using Flume, Hadoop and Hive
 
Big Data Hadoop using Amazon Elastic MapReduce: Hands-On Labs
Big Data Hadoop using Amazon Elastic MapReduce: Hands-On LabsBig Data Hadoop using Amazon Elastic MapReduce: Hands-On Labs
Big Data Hadoop using Amazon Elastic MapReduce: Hands-On Labs
 
Hadoop Hand-on Lab: Installing Hadoop 2
Hadoop Hand-on Lab: Installing Hadoop 2Hadoop Hand-on Lab: Installing Hadoop 2
Hadoop Hand-on Lab: Installing Hadoop 2
 
Setting up Hadoop YARN Clustering
Setting up Hadoop YARN ClusteringSetting up Hadoop YARN Clustering
Setting up Hadoop YARN Clustering
 
Linux intermediate level
Linux intermediate levelLinux intermediate level
Linux intermediate level
 
Realtimeanalyticsattwitter strata2011-110204123031-phpapp02
Realtimeanalyticsattwitter strata2011-110204123031-phpapp02Realtimeanalyticsattwitter strata2011-110204123031-phpapp02
Realtimeanalyticsattwitter strata2011-110204123031-phpapp02
 
Interview questions on Apache spark [part 2]
Interview questions on Apache spark [part 2]Interview questions on Apache spark [part 2]
Interview questions on Apache spark [part 2]
 
Reproducible datascience [with Terraform]
Reproducible datascience [with Terraform]Reproducible datascience [with Terraform]
Reproducible datascience [with Terraform]
 
API analytics with Redis and Google Bigquery. NoSQL matters edition
API analytics with Redis and Google Bigquery. NoSQL matters editionAPI analytics with Redis and Google Bigquery. NoSQL matters edition
API analytics with Redis and Google Bigquery. NoSQL matters edition
 
Apache Arrowフォーマットはなぜ速いのか
Apache Arrowフォーマットはなぜ速いのかApache Arrowフォーマットはなぜ速いのか
Apache Arrowフォーマットはなぜ速いのか
 
Aws r
Aws rAws r
Aws r
 
One Grid to rule them all: Building a Multi-tenant Data Cloud with YARN
One Grid to rule them all: Building a Multi-tenant Data Cloud with YARNOne Grid to rule them all: Building a Multi-tenant Data Cloud with YARN
One Grid to rule them all: Building a Multi-tenant Data Cloud with YARN
 
New developments in open source ecosystem spark3.0 koalas delta lake
New developments in open source ecosystem spark3.0 koalas delta lakeNew developments in open source ecosystem spark3.0 koalas delta lake
New developments in open source ecosystem spark3.0 koalas delta lake
 
Data 360 Conference: Introduction to Big Data, Hadoop and Big Data Analytics
Data 360 Conference: Introduction to Big Data, Hadoop and Big Data AnalyticsData 360 Conference: Introduction to Big Data, Hadoop and Big Data Analytics
Data 360 Conference: Introduction to Big Data, Hadoop and Big Data Analytics
 
Apache Storm
Apache StormApache Storm
Apache Storm
 
How does that PySpark thing work? And why Arrow makes it faster?
How does that PySpark thing work? And why Arrow makes it faster?How does that PySpark thing work? And why Arrow makes it faster?
How does that PySpark thing work? And why Arrow makes it faster?
 
Big Data Step-by-Step: Using R & Hadoop (with RHadoop's rmr package)
Big Data Step-by-Step: Using R & Hadoop (with RHadoop's rmr package)Big Data Step-by-Step: Using R & Hadoop (with RHadoop's rmr package)
Big Data Step-by-Step: Using R & Hadoop (with RHadoop's rmr package)
 
Hadoop or Spark: is it an either-or proposition? By Slim Baltagi
Hadoop or Spark: is it an either-or proposition? By Slim BaltagiHadoop or Spark: is it an either-or proposition? By Slim Baltagi
Hadoop or Spark: is it an either-or proposition? By Slim Baltagi
 

Andere mochten auch

Cloud Computing สำหรับ ผู้บริหารเพื่อรองรับเศรษฐกิจดิจิทัล
Cloud Computing สำหรับ ผู้บริหารเพื่อรองรับเศรษฐกิจดิจิทัลCloud Computing สำหรับ ผู้บริหารเพื่อรองรับเศรษฐกิจดิจิทัล
Cloud Computing สำหรับ ผู้บริหารเพื่อรองรับเศรษฐกิจดิจิทัล
IMC Institute
 

Andere mochten auch (19)

Introduction to Data Mining, Business Intelligence and Data Science
Introduction to Data Mining, Business Intelligence and Data ScienceIntroduction to Data Mining, Business Intelligence and Data Science
Introduction to Data Mining, Business Intelligence and Data Science
 
Big Data Maturity Model and Governance
Big Data Maturity Model and GovernanceBig Data Maturity Model and Governance
Big Data Maturity Model and Governance
 
Big Data Analytics
Big Data AnalyticsBig Data Analytics
Big Data Analytics
 
Big Data as a Service
Big Data as a ServiceBig Data as a Service
Big Data as a Service
 
Mobile User and App Analytics in China
Mobile User and App Analytics in ChinaMobile User and App Analytics in China
Mobile User and App Analytics in China
 
Cloud Computing in Thailand Readiness Survey 2015 & IT Trends Prediction 2016
Cloud Computing in Thailand Readiness Survey 2015 & IT Trends Prediction 2016Cloud Computing in Thailand Readiness Survey 2015 & IT Trends Prediction 2016
Cloud Computing in Thailand Readiness Survey 2015 & IT Trends Prediction 2016
 
Big data project management
Big data project managementBig data project management
Big data project management
 
Thai Software & Software Market Survey 2015
Thai Software & Software Market Survey 2015Thai Software & Software Market Survey 2015
Thai Software & Software Market Survey 2015
 
Machine Learning using Apache Spark MLlib
Machine Learning using Apache Spark MLlibMachine Learning using Apache Spark MLlib
Machine Learning using Apache Spark MLlib
 
เทคโนโลยี Cloud Computing สำหรับงานสถาบันการศึกษา
เทคโนโลยี  Cloud Computing  สำหรับงานสถาบันการศึกษาเทคโนโลยี  Cloud Computing  สำหรับงานสถาบันการศึกษา
เทคโนโลยี Cloud Computing สำหรับงานสถาบันการศึกษา
 
ITSS Overview
ITSS OverviewITSS Overview
ITSS Overview
 
บทความ Big Data School ใน IMC e-Magazine
บทความ Big Data School ใน IMC e-Magazineบทความ Big Data School ใน IMC e-Magazine
บทความ Big Data School ใน IMC e-Magazine
 
Big Data Programming Using Hadoop Workshop
Big Data Programming Using Hadoop WorkshopBig Data Programming Using Hadoop Workshop
Big Data Programming Using Hadoop Workshop
 
บทที่ 6 ความปลอดภัยบนระบบคอมพิวเตอร์และเครือข่าย
บทที่ 6 ความปลอดภัยบนระบบคอมพิวเตอร์และเครือข่ายบทที่ 6 ความปลอดภัยบนระบบคอมพิวเตอร์และเครือข่าย
บทที่ 6 ความปลอดภัยบนระบบคอมพิวเตอร์และเครือข่าย
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big Data
 
Cloud Computing สำหรับ ผู้บริหารเพื่อรองรับเศรษฐกิจดิจิทัล
Cloud Computing สำหรับ ผู้บริหารเพื่อรองรับเศรษฐกิจดิจิทัลCloud Computing สำหรับ ผู้บริหารเพื่อรองรับเศรษฐกิจดิจิทัล
Cloud Computing สำหรับ ผู้บริหารเพื่อรองรับเศรษฐกิจดิจิทัล
 
Big Data on Public Cloud
Big Data on Public CloudBig Data on Public Cloud
Big Data on Public Cloud
 
การบริหารจัดการระบบ Cloud Computing สำหรับองค์กรธุรกิจ SME
การบริหารจัดการระบบ  Cloud Computing  สำหรับองค์กรธุรกิจ SMEการบริหารจัดการระบบ  Cloud Computing  สำหรับองค์กรธุรกิจ SME
การบริหารจัดการระบบ Cloud Computing สำหรับองค์กรธุรกิจ SME
 
Mahout Workshop on Google Cloud Platform
Mahout Workshop on Google Cloud PlatformMahout Workshop on Google Cloud Platform
Mahout Workshop on Google Cloud Platform
 

Ähnlich wie Analyse Tweets using Flume 1.4, Hadoop 2.7 and Hive

HDFS tiered storage: mounting object stores in HDFS
HDFS tiered storage: mounting object stores in HDFSHDFS tiered storage: mounting object stores in HDFS
HDFS tiered storage: mounting object stores in HDFS
DataWorks Summit
 
Moon soo Lee – Data Science Lifecycle with Apache Flink and Apache Zeppelin
Moon soo Lee – Data Science Lifecycle with Apache Flink and Apache ZeppelinMoon soo Lee – Data Science Lifecycle with Apache Flink and Apache Zeppelin
Moon soo Lee – Data Science Lifecycle with Apache Flink and Apache Zeppelin
Flink Forward
 
Big data Big Analytics
Big data Big AnalyticsBig data Big Analytics
Big data Big Analytics
Ajay Ohri
 
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Anne Nicolas
 
Presentation distro recipes-2013
Presentation distro recipes-2013Presentation distro recipes-2013
Presentation distro recipes-2013
olberger
 
10 cosas que un firewall debería hacer
10 cosas que un firewall debería hacer10 cosas que un firewall debería hacer
10 cosas que un firewall debería hacer
aloscocco
 
HDFS & MapReduce
HDFS & MapReduceHDFS & MapReduce
HDFS & MapReduce
Skillspeed
 

Ähnlich wie Analyse Tweets using Flume 1.4, Hadoop 2.7 and Hive (20)

Big Data Hadoop Local and Public Cloud (Amazon EMR)
Big Data Hadoop Local and Public Cloud (Amazon EMR)Big Data Hadoop Local and Public Cloud (Amazon EMR)
Big Data Hadoop Local and Public Cloud (Amazon EMR)
 
Hadoop installation, Configuration, and Mapreduce program
Hadoop installation, Configuration, and Mapreduce programHadoop installation, Configuration, and Mapreduce program
Hadoop installation, Configuration, and Mapreduce program
 
HDFS tiered storage: mounting object stores in HDFS
HDFS tiered storage: mounting object stores in HDFSHDFS tiered storage: mounting object stores in HDFS
HDFS tiered storage: mounting object stores in HDFS
 
Hadoop tools with Examples
Hadoop tools with ExamplesHadoop tools with Examples
Hadoop tools with Examples
 
Open Source - NOVALUG January 2019
Open Source  - NOVALUG January 2019Open Source  - NOVALUG January 2019
Open Source - NOVALUG January 2019
 
Ubuntu And Parental Controls
Ubuntu And Parental ControlsUbuntu And Parental Controls
Ubuntu And Parental Controls
 
Terraform: Tales from the Trenches
Terraform: Tales from the TrenchesTerraform: Tales from the Trenches
Terraform: Tales from the Trenches
 
Upgrading hadoop
Upgrading hadoopUpgrading hadoop
Upgrading hadoop
 
Massively Parallel Process with Prodedural Python by Ian Huston
Massively Parallel Process with Prodedural Python by Ian HustonMassively Parallel Process with Prodedural Python by Ian Huston
Massively Parallel Process with Prodedural Python by Ian Huston
 
Moon soo Lee – Data Science Lifecycle with Apache Flink and Apache Zeppelin
Moon soo Lee – Data Science Lifecycle with Apache Flink and Apache ZeppelinMoon soo Lee – Data Science Lifecycle with Apache Flink and Apache Zeppelin
Moon soo Lee – Data Science Lifecycle with Apache Flink and Apache Zeppelin
 
Sentiment Analysis using Big Data
Sentiment Analysis using Big Data Sentiment Analysis using Big Data
Sentiment Analysis using Big Data
 
Django firebird project
Django firebird projectDjango firebird project
Django firebird project
 
Velocity London - Chaos Engineering Bootcamp
Velocity London - Chaos Engineering Bootcamp Velocity London - Chaos Engineering Bootcamp
Velocity London - Chaos Engineering Bootcamp
 
Big data Big Analytics
Big data Big AnalyticsBig data Big Analytics
Big data Big Analytics
 
Django Deployment-in-AWS
Django Deployment-in-AWSDjango Deployment-in-AWS
Django Deployment-in-AWS
 
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
 
Presentation distro recipes-2013
Presentation distro recipes-2013Presentation distro recipes-2013
Presentation distro recipes-2013
 
10 cosas que un firewall debería hacer
10 cosas que un firewall debería hacer10 cosas que un firewall debería hacer
10 cosas que un firewall debería hacer
 
HDFS & MapReduce
HDFS & MapReduceHDFS & MapReduce
HDFS & MapReduce
 
Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12
 

Mehr von IMC Institute

Mehr von IMC Institute (20)

นิตยสาร Digital Trends ฉบับที่ 14
นิตยสาร Digital Trends ฉบับที่ 14นิตยสาร Digital Trends ฉบับที่ 14
นิตยสาร Digital Trends ฉบับที่ 14
 
Digital trends Vol 4 No. 13 Sep-Dec 2019
Digital trends Vol 4 No. 13  Sep-Dec 2019Digital trends Vol 4 No. 13  Sep-Dec 2019
Digital trends Vol 4 No. 13 Sep-Dec 2019
 
บทความ The evolution of AI
บทความ The evolution of AIบทความ The evolution of AI
บทความ The evolution of AI
 
IT Trends eMagazine Vol 4. No.12
IT Trends eMagazine  Vol 4. No.12IT Trends eMagazine  Vol 4. No.12
IT Trends eMagazine Vol 4. No.12
 
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformationเพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
 
IT Trends 2019: Putting Digital Transformation to Work
IT Trends 2019: Putting Digital Transformation to WorkIT Trends 2019: Putting Digital Transformation to Work
IT Trends 2019: Putting Digital Transformation to Work
 
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรมมูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
 
IT Trends eMagazine Vol 4. No.11
IT Trends eMagazine  Vol 4. No.11IT Trends eMagazine  Vol 4. No.11
IT Trends eMagazine Vol 4. No.11
 
แนวทางการทำ Digital transformation
แนวทางการทำ Digital transformationแนวทางการทำ Digital transformation
แนวทางการทำ Digital transformation
 
บทความ The New Silicon Valley
บทความ The New Silicon Valleyบทความ The New Silicon Valley
บทความ The New Silicon Valley
 
นิตยสาร IT Trends ของ IMC Institute ฉบับที่ 10
นิตยสาร IT Trends ของ  IMC Institute  ฉบับที่ 10นิตยสาร IT Trends ของ  IMC Institute  ฉบับที่ 10
นิตยสาร IT Trends ของ IMC Institute ฉบับที่ 10
 
แนวทางการทำ Digital transformation
แนวทางการทำ Digital transformationแนวทางการทำ Digital transformation
แนวทางการทำ Digital transformation
 
The Power of Big Data for a new economy (Sample)
The Power of Big Data for a new economy (Sample)The Power of Big Data for a new economy (Sample)
The Power of Big Data for a new economy (Sample)
 
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
 
IT Trends eMagazine Vol 3. No.9
IT Trends eMagazine  Vol 3. No.9 IT Trends eMagazine  Vol 3. No.9
IT Trends eMagazine Vol 3. No.9
 
Thailand software & software market survey 2016
Thailand software & software market survey 2016Thailand software & software market survey 2016
Thailand software & software market survey 2016
 
Developing Business Blockchain Applications on Hyperledger
Developing Business  Blockchain Applications on Hyperledger Developing Business  Blockchain Applications on Hyperledger
Developing Business Blockchain Applications on Hyperledger
 
Digital transformation @thanachart.org
Digital transformation @thanachart.orgDigital transformation @thanachart.org
Digital transformation @thanachart.org
 
บทความ Big Data จากบล็อก thanachart.org
บทความ Big Data จากบล็อก thanachart.orgบทความ Big Data จากบล็อก thanachart.org
บทความ Big Data จากบล็อก thanachart.org
 
กลยุทธ์ 5 ด้านกับการทำ Digital Transformation
กลยุทธ์ 5 ด้านกับการทำ Digital Transformationกลยุทธ์ 5 ด้านกับการทำ Digital Transformation
กลยุทธ์ 5 ด้านกับการทำ Digital Transformation
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Analyse Tweets using Flume 1.4, Hadoop 2.7 and Hive

  • 1. Danairat T., 2013, danairat@gmail.comBig Data Hadoop – Hands On Workshop 1 Analyse Tweets using Flume 1.4, Hadoop 2.7 and Hive May 2015 Dr.Thanachart Numnonda Certified Java Programmer thanachart@imcinstitute.com Danairat T. Certified Java Programmer, TOGAF – Silver danairat@gmail.com
  • 2. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop Lecture: Understanding Flume
  • 3. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop Introduction Apache Flume is: ● A distributed data transport and aggregation system for event- or log-structured data ● Principally designed for continuous data ingestion into Hadoop… But more flexible than that
  • 4. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop Architecture Overview odiago
  • 5. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop Flume terminology ● Every machine in Flume is a node ● Each node has a source and a sink ● Some sinks send data to collector nodes, which aggregate data from many agents before writing to HDFS ● All Flume nodes heartbeat to/receive config from master ● Events enter Flume within seconds of generation Odiago
  • 6. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop Flume isn’t an analytic system ● No ability to inspect message bodies ● No notion of aggregates, rolling counters, etc Odiago
  • 7. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop Hands-On: Loading Twitter Data to Hadoop HDFS
  • 8. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop Exercise Overview Hive.apache.org
  • 9. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 1. Installing Flume $ wget http://apache.mirrors.hoobly.com/flume/1.4.0/apache -flume-1.4.0-bin.tar.gz $ tar -xvzf apache-flume-1.4.0-bin.tar.gz $ sudo mv apache-flume-1.4.0-bin flume $ sudo mv flume /usr/local $ rm apache-flume-1.4.0-bin.tar.gz Install Flume binary file
  • 10. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 1. Installing Flume (cont.) Edit $HOME ./bashrc $ sudo vi $HOME/.bashrc $ exec bash
  • 11. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 2. Installing a jar file $ wget http://files.cloudera.com/samples/flume-sources-1.0- SNAPSHOT.jar $ sudo mv flume-sources-1.0-SNAPSHOT.jar /usr/local/flume/lib/ $ cd /usr/local/flume/conf/ $ sudo cp flume-env.sh.template flume-env.sh $ sudo vi flume-env.sh Copy a jar file and edit conf file
  • 12. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 3. Create a new Twitter App Login to your Twitter @ twitter.com
  • 13. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 3. Create a new Twitter App (cont.) Create a new Twitter App @ apps.twitter.com
  • 14. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 3. Create a new Twitter App (cont.) Enter all the details in the application:
  • 15. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 3. Create a new Twitter App (cont.) Your application will be created:
  • 16. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 3. Create a new Twitter App (cont.) Click on Keys and Access Tokens:
  • 17. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 3. Create a new Twitter App (cont.) Click on Keys and Access Tokens:
  • 18. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 3. Create a new Twitter App (cont.) Your Access token got created:
  • 19. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 4. Configuring the Flume Agent Copy the flume.conf file from the following url: https://github.com/cloudera/cdh-twitter- example/blob/master/flume-sources/flume.conf $ vi /usr/local/flume/conf/flume.conf flume.conf file
  • 20. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop Fixing Bug for running Flume1.4 on Hadoop 2.x Need to remove file guava-10.0.1.jar and protobuf-java-2.4.1.jar $ cd /usr/local/flume/rm $ rm guava-10.0.1.jar $ rm protobuf-java-2.4.1.jar
  • 21. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 5. Fetching the data from twitter $ flume-ng agent -n TwitterAgent -c conf -f /usr/local/flume/conf/flume.conf Wait for 60-90 seconds and let flume stream the data on HDFS, then press Ctrl-c to break the command and stop the streaming. (Ignore the exceptions)
  • 22. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 6. View the straming data $ hdfs dfs -ls /user/flume/tweets $ hdfs dfs -cat /user/flume/tweets/FlumeData.1431058050787 $ hdfs dfs -rm /user/flume/tweets/*.tmp
  • 23. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 7. Analyse data using Hive $ wget http://files.cloudera.com/samples/hive-serdes-1.0-SNAPSHOT.jar $ mv hive-serdes-1.0-SNAPSHOT.jar /usr/local/apache-hive- 1.1.0-bin/lib/ $ hive hive> ADD JAR /usr/local/apache-hive-1.1.0-bin/lib/hive- serdes-1.0-SNAPSHOT.jar; Get a Serde Jar File for parsing JSON file Register the Jar file.
  • 24. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 7. Analyse data using Hive (cont.) Running the following hive command http://www.thecloudavenue.com/2013/03/analyse-tweets-using-flume-hadoop-and.html
  • 25. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop 7. Analyse data using Hive (cont) hive> elect user.screen_name, user.followers_count c from tweets order by c desc; Finding user who has the most number of followers
  • 26. Danairat T., , danairat@gmail.com: Thanachart Numnonda, thanachart@imcinstitute.com Apr 2015Big Data using Hadoop workshop Thank you www.imcinstitute.com www.facebook.com/imcinstitute