Posts

Showing posts from September, 2014

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...