• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Big Data and Hadoop in Cloud - Leveraging Amazon EMR
 

Big Data and Hadoop in Cloud - Leveraging Amazon EMR

on

  • 4,967 views

I did a talk on "Big Data and Hadoop in Cloud" at Barcamp Bangalore.

I did a talk on "Big Data and Hadoop in Cloud" at Barcamp Bangalore.

Statistics

Views

Total Views
4,967
Views on SlideShare
4,777
Embed Views
190

Actions

Likes
4
Downloads
121
Comments
5

10 Embeds 190

http://amnigos.com 135
http://flavors.me 36
http://www.linkedin.com 7
http://www.twylah.com 5
https://www.chatwork.com 2
http://www.google.com 1
http://amnigos.tumblr.com 1
http://pinterest.com 1
http://webcache.googleusercontent.com 1
https://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

15 of 5 previous next Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Awesome Presentation.

    I had come to know about your website from my friend Vinod, Hyderabad. Your blog gives the best and the most interesting information. This is just the kind of information that i had been looking for, I’m already your rss reader now and i would regularly watch out for the new posts, once again hats off to you! Thanks a lot. Regards, hadoop online training hyderabad
    Are you sure you want to
    Your message goes here
    Processing…
  • @sureshsambandam True that consumers wont mind if its MySQL or Cassandra which powers their data. But in my opinion, when tech ppl start a company, its better to choose the best scalable/dev open option. Reason being, when one chooses MySQL, and so all your schemas are based on columnar which makes it a bit difficult to change all the queries in your code in case you want to switch to any NoSQL for eg.
    And its good to know that you are based in Chennai :)
    Are you sure you want to
    Your message goes here
    Processing…
  • sir,
    im doing my final yr engg project on cloud computing and im facing some difficulties in installing hadoop ........acc to d slides shown in barcamp .......
    Are you sure you want to
    Your message goes here
    Processing…
  • Thanks Suresh...I agree - CODE is not BUSINESS......one of the points I mentioned was focus on solving your business problem not on infrastructure while describing why you should use Amazon EMR instead of building your Hadoop clusters :)
    Are you sure you want to
    Your message goes here
    Processing…
  • Very good presentation Vijay.

    But the real problem with startups is not choosing the right technology when you are starting out, so that it would scale when the growth happens, but really addressing the growth. Esp. in the consumer space no one cares about whether you use BigData or MySQL.

    On the other hand, if teams can start out with whatever technology they are already familiar without wasting time in using new techonology and then when the growth happens they can rewrite the product/platform as they go - that is best things for business. That is called inflight technology upgradation. While I understand that this may not be the right thing for all cases - but for most end-user apps this would be true . My view is hit the first 100,000 users. PHP may not the best programming langauge - but facebook users don't care!
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • http://stayinfront.com/Portals/0/SIF_Analytics_graphs.jpghttp://www.hiero.com/images/web-analytics.jpg
  • http://www.thriveanalytics.com/Thrive%20Analytics%20Data%20Analysis.jpg
  • http://siliconangle.com/files/2011/11/love-big-data-300x300.jpg
  • http://pictures.brafton.com/liveimages/Approach-of-big-data-means-cloud-computing-remains-popular_16000823_800695886_0_0_14029890_300.jpg
  • http://z4webhosting.com/blog/wp-content/uploads/2011/10/325da1195fephant.jpg.jpg
  • http://www.thriveanalytics.com/Thrive%20Analytics%20Data%20Analysis.jpg
  • http://www.thriveanalytics.com/Thrive%20Analytics%20Data%20Analysis.jpg
  • http://www.thriveanalytics.com/Thrive%20Analytics%20Data%20Analysis.jpg
  • http://www.thriveanalytics.com/Thrive%20Analytics%20Data%20Analysis.jpg
  • http://www.cloverquotes.com/images/picture_quotes/0/20_main.jpg?1321395710
  • http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/Introduction_EMRArch.html

Big Data and Hadoop in Cloud - Leveraging Amazon EMR Big Data and Hadoop in Cloud - Leveraging Amazon EMR Presentation Transcript

  • Big Data and Hadoop in Cloud Vijay Rayapati @amnigos 1
  • Follow Barcamp Rules!
  • What is Big Data?Datasets that grow so large that they becomeawkward to work with using on-hand databasemanagement tools. Difficulties includecapture, storage, search, sharing, analytics,and visualizing - WikipediaHigh volume of data (storage) + speed of data(scale) + variety of data (diff types) - Gartner
  • World is ON = Content + Interactions = More Data (Social and Mobile)
  • Tons of data is generated by each one of us! (We moved from GB to ZB and from Millions to Zillions)
  • Big Data - Intelligence
  • Big Data - Usefulness
  • Big Data - There is so much more you can do!
  • Everybody has this problem – Not just Amazon, Google, Facebook and Twitter!
  • How can we work with Big Data?
  • Why Cloud and Big Data?Cloud has democratized access to largescale infrastructure for masses!You can store, process and manage bigdata sets without worrying about IT! **http://wiki.apache.org/hadoop/PoweredBy
  • Hadoop – The data elephant
  • Hadoop makes it easier tostore, process and analyze lot of data on commodity hardware!
  • Who uses Hadoop and How?Everybody (from A to Z ) toSolve complex problems **http://wiki.apache.org/hadoop/PoweredBy
  • Big Data and Hadoop - It’s Fun
  • Task Tracker Task Tracker Task TrackerMap Reduce(processing) Job Tracker Name NodeHDFS Layer (storage) Data Node Data Node Data Node Master Node
  • Map Reduce Paradigm
  • Map Reduce - Explained
  • Hadoop – Getting Started• Download latest stable version - http://hadoop.apache.org/common/releases.html• Install Java ( > 1.6.0_20 ) and set your JAVA_HOME• Install rsync and ssh• Follow instructions - http://hadoop.apache.org/common/docs/r0.20.2/quickstart.html• Hadoop Modes – Local, Pseudo-distributed and Fully distributed• Run in pseudo-distributed mode for your testing and development• Assign a decent jvm heapsize through mapred.child.java.opts if you notice task errors or GC overhead or OOM• Play with samples – WordCount, TeraSort etc• Good for learning - http://www.cloudera.com/hadoop-training-virtual-machine
  • Why Amazon EMR?I am interested in using Hadoopto solve problems and not inbuilding and managing HadoopInfrastructure!
  • Amazon EMR – Setup• Install Ruby 1.8.X and use EMR Ruby CLI for managing EMR.• Just create credentials.json file in your EMR Ruby CLI installation directory and provide your accesskey & private key.• Bootstrapping is a great way to install required components or perform custom actions in your EMR cluster.• Default bootstrap action is available to control the configuration of Hadoop and MapReduce.• Bootstrap with Ganglia during your development and tuning phase – provides monitoring metrics across your cluster.• Minor bugs in EMR Ruby CLI but pretty cool for your needs.
  • Amazon EMR – Setup• Launching a 500 node and fully configured cluster is as simple as firing one command > elastic-mapreduce --create --alive --plain-output --master-instance-type m1.xlarge --slave-instance-type m2.2xlarge --num-instances 500 --name "Site Analytics Cluster" --bootstrap-action s3://com.bcb11.emr/scripts/bootstrap-custom.sh --bootstrap-action s3://elasticmapreduce/bootstrap-actions/install-ganglia - -bootstrap-action s3://elasticmapreduce/bootstrap-actions/configure- hadoop --args "--mapred-config-file, s3://com.bcb11.emr/conf/custom- mapred-site.xml" > elastic-mapreduce -j ${jobflow} --stream --step-name “Profile Analyzer" -- jobconf mapred.task.timeout=0 --mapper s3://com.bcb11.emr/code/mapper.rb --reducer s3://com.bcb11.emr/bin/reducer.rb --cache s3://com.bcb11.emr/cache/customdata.dat#data.txt --input s3://com.bcb11.emr/input/ --output s3://com.bcb11.emr/output
  • Amazon EMR - Service Architecture
  • EMR CLI – What you need to know?• elastic-mapreduce -j <jobflow id> --describe• elastic-mapreduce --list --active• elastic-mapreduce -j <jobflow id> --terminate• elastic-mapreduce --jobflow <jobflow id> --ssh• Look into your logs directory in the S3 if you need any other information on cluster setup, hadoop logs, Job step logs, Task attempt logs etc.
  • EMR Map Reduce Jobs• Amazon EMR supports – streaming, custom jar, cascading, pig and hive. So you can write jobs in a you want without worrying about managing the underlying infrastructure including hadoop.• Streaming – Write Map Reduce jobs in any scripting language.• Custom Jar – Write using Java and good for speed/control.• Cascading, Hive and Pig – Higher level of abstraction.• Use a good S3 explorer, FoxyProxy and ElasticFox.• Leverage aws emr forum if you need help.
  • EMR – Debugging and Performance Tuning
  • Hadoop – Debugging and Profiling• Run hadoop in local mode for debugging so mapper and reducer tasks run in a single JVM instead of separate JVMs.• Configure Hadoop_Opts to enable debugging. (export HADOOP_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8008“)• Configure fs.default.name value in core-site.xml to file:/// from hdfs://• Configure mapred.job.tracker value in mapred-site.xml to local• Create debug configuration for Eclipse and set the port to 8008.• Run your hadoop job and launch Eclipse with your Java code so you can start debugging.• Use your favorite profiler to understand code level hotspots.
  • EMR – Good, Bad and Ugly• Great for bootstrapping large clusters and very cost-effective if you need once in a while infrastructure to run your Hadoop jobs.• Don’t need to worry about underlying Hadoop cluster setup and management. Most patches are applied and Amazon creates new AMI’s with improvements.• Doesn’t have a fall back (secondary name node) – only one master node.• Intermittent Network Issues – Sometimes could cause serious degradation of performance.• Network IO is variable and streaming jobs will be much sluggish on EMR compared to dedicated setup.• Disk IO is terrible across instance families and types – Please fix it.
  • Hadoop – High Level Tuning Small files problem – avoid too Tune your settings – JVM many small files and tune your Reuse, Sort Buffer, Sort Factor, block size. Map/Reduce Tasks, Parallel Copies, MapRed Output Compression etc Good thing is that you canKnow what is limiting you at a use small cluster and samplenode level – CPU, Memory, input size for tuningDISK IO or Network IN/OUT
  • Hadoop – What effects your jobs performance?• GC Overhead - memory and reduce the jvm reuse tasks.• Increase dfs block size (default 128MB in EMR) for large files.• Avoid read contention at S3 – have equal or more files in S3 compared to available mappers.• Use mapred output compression to save storage, processing time and bandwidth costs.• Set mapred task timeout to 0 if you have long running jobs (> 10 mins) and can disable speculative execution time.• Increase sort buffer and sort factor based on map tasks output.
  • Understand – EMR Cluster Metrics
  • Understand – EMR Cluster Metrics
  • Common Bottlenecks – Monitor Matters
  • Hadoop and EMR – What I have learned?• Code is god – If you have severe performance issues then look at your code 100 times, understand third party libraries used and rewrite in Java if required.• Streaming jobs are slow compared to Custom Jar jobs – Over head and scripting is good for adhoc-analysis.• Disk IO and Network IO effects your processing time.• Be ready to face variable performance in Cloud.• Monitor everything once in a while and keep benchmarking with data points.• Default settings are seldom optimal in EMR – unless you run simple jobs.• Focus on optimization as it’s the only way to save Cost and Time.
  • Hadoop and EMR – Performance Tuning Example• Streaming : Map reduce jobs were written using Ruby. Input dataset was 150 GB and output was around 4000 GB. Complex processing, highly CPU bound and Disk IO.• Time taken to complete job processing : 4000 m1.xlarge nodes and 180 minutes.• Rewrote the code in Java – job processing time was reduced to 70 minutes on just 400 m1.xlarge nodes.• Tuning EMR configuration has further reduced it to 32 minutes.• Focus on code first and then focus on configuration.
  • Q&A
  • Like what we do? – connect with me Kuliza.com | vijay.rayapati@kuliza.com | @kuliza vijay.rayapati@kuliza.com @amnigos