Showing posts with label Misc. Show all posts
Showing posts with label Misc. Show all posts

Wednesday, July 29, 2015

Hadoop Notes

Hadoop Install directory - /usr/lib/hadoop-0.20/

The port number for Namenode is ’70′, for job tracker is ’30′ and for task tracker is ’60′.

3 config files: core-site, mapred-site.xml, hdfs-site.xml
Spill factor is the size after which your files move to the temp file. Hadoop-temp directory is used for this.
Hdfs-site.xml properties:
dfs.name.dir, dfs.data.dir and fs.checkpoint.dir
Fsck – file system check
Jps – to check if hadoop daemons are running
Restart hadoop daemons
start-yarn.sh, stop-yarn.sh
start-all.sh, stop-all.sh
Slaves and Masters  file are used by the startup and the shutdown commands.
Slaves consist of a list of hosts, one per line, that host datanode and task tracker servers.
Masters contain a list of hosts, one per line, that are to host secondary namenode servers.
hadoop-env.sh provides the environment for Hadoop to run. JAVA_HOME is set over here.
The command mapred.job.tracker lists out which of your nodes is acting as a job tracker.
/etc /init.d specifies where daemons (services) are placed or to see the status of these daemons. It is very LINUX specific, and nothing to do with Hadoop.


Which are the three modes in which Hadoop can be run?

1. standalone (local) mode – no daemons, all on single JVM, no dfs, only local file system.
2. Pseudo-distributed mode -
3. Fully distributed mode – daemons running on clusters.


How can we check whether Namenode is working or not?
To check whether Namenode is working or not, use the command /etc/init.d/hadoop-0.20-namenode status or as simple as jps
Default Ports
SSH – 22
The port number for Namenode is ’70′, for job tracker is ’30′ and for task tracker is ’60′.
  http://Hadoopmaster:50070/ – web UI of the NameNode daemon
http://Hadoopmaster:50030/ – web UI of the JobTracker daemon
http://Hadoopmaster:50060/ – web UI of the TaskTracker daemon


Quickly switching hadoop modes

hadoop@computer:~$ cd /your/hadoop/installation/
hadoop@computer:~$ cp -R conf conf.standalone
hadoop@computer:~$ cp -R conf conf.pseudo
hadoop@computer:~$ cp -R conf conf.distributed
hadoop@computer:~$ rm -R conf

ln- to create a link for a folder.
Switching to standalone modehadoop@computer:~$ ln -s conf.standalone conf
Switching to pseudo-distributed modehadoop@computer:~$ ln -s conf.pseudo conf
Switching to fully distributed modehadoop@computer:~$ ln -s conf.distributed conf
Map and reduce slots are controled in mapred-site.xml
mapreduce.tasktracker.map.
mapreduce.tasktracker.reduce.
Important: If you change these settings, restart all of the TaskTracker nodes.


What are the network requirements for Hadoop?

The Hadoop core uses Shell (SSH) to launch the server processes on the slave nodes. It requires password-less SSH connection between the master and all the slaves and the secondary machines.
SSH is a password-less secure communication where data packets are sent across the slave
SSH is nothing but a secure shell communication, it is a kind of a protocol that works on a Port No. 22, and when you do an SSH, what you really require is a password.

What happens to job tracker when Namenode is down?

When Namenode is down, your cluster is OFF, this is because Namenode is the single point of failure in HDFS.


What happens to a Namenode, when job tracker is down?

 

When a job tracker is down, it will not be functional but Namenode will be present. So, cluster is accessible if Namenode is working, even if the job tracker is not working.

 

Does the HDFS client decide the input split or Namenode?

No, the Client does not decide. It is already specified in one of the configurations through which input split is already configured

Sunday, May 31, 2015

Hadoop Learning Resources - updated as on 26-Jul-2015

http://ercoppa.github.io/HadoopInternals/AnatomyMapReduceJob.html#maptask-spilling

HDFS Architecture:
https://hadoop.apache.org/docs/current2/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html
http://www.edureka.co/blog/hadoop-interview-questions-hdfs-2/
http://blog.cloudera.com/blog/2009/08/hadoop-default-ports-quick-reference/



HDFS Shell commands
http://www.thegeekstuff.com/2015/02/hadoop-command-reference/



HBase Architecture

HBase shell commands

Hive
http://thriveschool.blogspot.in/search/label/Hive%20Tutorial
http://www.edureka.co/blog/hive-commands/


Pig

Sqoop
http://hadooped.blogspot.in/2013/05/apache-sqoop-for-data-integration.html

NoSQL – Cassandra

mongodb definitive guide – second edition

NoSQL – CouchDB


NoSQL – Redis
http://www.pdfiles.com/pdf/files/English/Databases/Seven_Databases_In_Seven_Weeks.pdf

NoSQL - Neo4j
http://neo4j.com/docs/stable/cypher-getting-started.html
http://assets.neo4j.org/download/Neo4j_CheatSheet_v3.pdf
http://www.tutorialspoint.com/neo4j/index.htm
https://www.airpair.com/neo4j/posts/getting-started-with-neo4j-and-cypher

Data Science
http://www.datasciencecentral.com/profiles/blogs/66-job-interview-questions-for-data-scientists


Certification Guide:http://marksbiblog.com/how-i-passed-ccd-410-cloudera-certified-developer-for-apache-hadoop-ccdh/
http://www.pantz.org/software/hadoop/cloudera_certified_administrator_for_apache_hadoop_ccah_study_guide.html


Interview preparation:
http://myhadoopguide.blogspot.in/
http://www.slideshare.net/rohitkapa/hadoop-interview-questions
http://www.dezyre.com/article/top-50-hadoop-interview-questions-/92
http://sivasoft-interview-questions.blogspot.in/p/hadoop-interview-questions.html
http://hadoopiq.blogspot.in/2014/08/100-top-hadoop-interview-questions-and.html
http://www.wiziq.com/blog/31-questions-for-hadoop-developers/

http://www.slideshare.net/pappupassindia/hadoop-interview-question?qid=37fd34d3-b5ae-414f-8239-30c43373eacd&v=qf1&b=&from_search=7

http://www.slideshare.net/vemularavi17/hadoop-interview-quations1?qid=37fd34d3-b5ae-414f-8239-30c43373eacd&v=default&b=&from_search=24

Sample Hadoop resume
http://www.slideshare.net/PankajKumar524/pankaj-resume-for-hadoopjavaj2ee-outside-world?qid=37fd34d3-b5ae-414f-8239-30c43373eacd&v=default&b=&from_search=22

Tuesday, May 26, 2015

How to check versions of Hadoop Ecosystem

Checking Versions

1. How to check Ubuntu version

ram@ram-pc:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty

or

ram@ram-pc:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

2. How to check Hadoop version

ram@ram-pc:~$ hadoop version
Hadoop 2.7.0
Subversion https://git-wip-us.apache.org/repos/asf/hadoop.git -r d4c8d4d4d203c934e8074b31289a28724c0842cf
Compiled by jenkins on 2015-04-10T18:40Z
Compiled with protoc 2.5.0
From source with checksum a9e90912c37a35c3195d23951fd18f
This command was run using /usr/local/hadoop/share/hadoop/common/hadoop-common-2.7.0.jar

3. How to check JAVA version

ram@ram-pc:~$ java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

4. How to check HBase version

ram@ram-pc:~$ hbase version
2015-05-26 22:14:13,937 INFO  [main] util.VersionInfo: HBase 1.0.1.1
2015-05-26 22:14:13,938 INFO  [main] util.VersionInfo: Source code repository git://aspire/home/apurtell/tmp/hbase-build-2 revision=e1dbf4df30d214fca14908df71d038081577ea46
2015-05-26 22:14:13,938 INFO  [main] util.VersionInfo: Compiled by apurtell on Sun May 17 12:34:26 PDT 2015
2015-05-26 22:14:13,938 INFO  [main] util.VersionInfo: From source with checksum 111670655c3a2fe747723232c402f0e2


5. How to check Cassandra version

ram@ram-pc:~/cassandra/bin$ cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 2.1.5 | CQL spec 3.2.0 | Native protocol v3]
Use HELP for help.
cqlsh>


6. How to check mongodb version

ram@ram-pc:~$ mongo
MongoDB shell version: 3.0.3
connecting to: test
Server has startup warnings:
2015-06-02T08:32:14.683+0530 I CONTROL  [initandlisten]
2015-06-02T08:32:14.683+0530 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2015-06-02T08:32:14.683+0530 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2015-06-02T08:32:14.683+0530 I CONTROL  [initandlisten]
2015-06-02T08:32:14.683+0530 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2015-06-02T08:32:14.683+0530 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2015-06-02T08:32:14.683+0530 I CONTROL  [initandlisten]
>