Posts

Showing posts from 2014

Common Errors Encountered While Working With Hadoop

Failed to start the NameNode :  Installing Hadoop is relative simple, but there may have some problems, after setting up the environment, we need to specify the Java installation path by setting the parameter JAVA_HOME in $Hadoop_path/conf/hadoop-env.sh, otherwise, the HDFS will get error when it try to boot up. No TaskTracker available: The NameNode runs normally and also exist some DataNode, but no TaskTracker exist, that's because if HDFS is not ready, the JobTracker will no accept any TaskTracker to join, HDFS will be in safe mode when it start, it will not allow any modifications to the file system, if the number of DataNode is not enough, it will report error and state in safe mode. It may return “The ratio of reported blocks 0.9982 has not reached the threshold 0.9990. Safe mode will be turned off automatically." Turn on enough DataNode to reach the threshold will solve this problem, if some of DataNode were crashed and the available ratio is not enough,...

MYSQL COMMANDS

1. Opening and logging into mysql Server $ mysql -u root -p password:root 2. To see all the Databases in the mysql Server mysql> show databases; DDL Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples: Create, Alter, Truncate, Drop and Rename. 3. CREATE To create a New Database in the mysql Server mysql> create database databasename ; 4. To use the particular Database; mysql> use databasename; 5. To create a T able (say department) in the Database mysql> create table department(id int, name varchar(255)); 6. ALTER Alter the table (say department) by adding the new column. ALTER TABLE table_name ADD column_name datatype; eg; mysql> alter table department add age int; 7. TRUNCATE Truncate removes all rows from a table. Truncate the table (say department) by using following command mysql> truncate table department...

HADOOP SINGLE NODE INSTALLATION PROCEDURE (UBUNTU)

COMMANDS 1. Disabling IPV6 Step 1: Open the sysctl file using the following command $ sudo gedit /etc/sysctl.conf (Add the following lines end of the file) # disable ipv6 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 Step 2: Test ipv6 is disabled or not.. Run below command $ cat /proc/sys/net/ipv6/conf/all/disable_ipv6 Reboot the machine in order to make the changes take effect A return value of 0 means IPv6 is enabled, a value of 1 means disabled. 2. Setting JAVA PATH Step 1: Following command checks which version of java is currently being used by system. $ java –version Step 2: Following command is used to know the java path $ sudo update-alternatives –config java Step 3: To set the java path, "export" command is used as following $ export JAVA_HOME=/usr/lib/jvm/java-7-oracle Step 4: The Following command conforms the java path is set $ echo "$JAVA_HOME" Step...

JAVA IMPLEMENTATION OF MAP REDUCE WORDCOUNT

  JAVA IMPLEMENTATION OF MAP REDUCE WORDCOUNT HADOOP MAP REDUCE Hadoop MapReduce is a software framework for easily writing applications which process vast amounts of data (multi-terabyte data-sets) in-parallel on large clusters (thousands of nodes) of commodity hardware in a reliable, fault-tolerant manner. A MapReduce job usually splits the input data-set into independent chunks which are processed by the map tasks in a completely parallel manner. The framework sorts the outputs of the maps, which are then input to the reduce tasks. Typically both the input and the output of the job are stored in a file-system. The framework takes care of scheduling tasks, monitoring them and re-executes the failed tasks. HADOOP MAP REDUCE – WORD COUNT The purpose of a WordCount program is to count the number of occurrences of each word in a given file. First data is input to the mapper in (key, value) pairs. For our example, the key will be the line numbe...

my first blog post

Hi world....!