Sunday, November 10, 2013

MySQL: Replication - Skip sql statement from execution

In any MySQL Replication set up, some or the other time we come across errors on the Slave due to which, replication stops.  

If the error is due to manual intervention on replication, we may have to skip the current SQL transaction on Slave which caused the error.

In the case, below is the command to be executed:

SET GLOBAL sql_slave_skip_counter=1;
START SLAVE;



You can increase the counter value if you want to skip multiple consecutive transactions.

Friday, October 4, 2013

Prevent accidental data loss in Hadoop

Some time you have accidentally delete some file which you are not suppose to do. So what will you do in that case? 

The option with you is to enable trash (Recycle bin) for hadoop, and define fs.trash.interval 
to one day with 1440 Minutes or more or less according to the cost of data you host in hadoop.

You can do it in following way :

Open core-site.xml and paste following parameter 
  

Wednesday, September 25, 2013

Starting/Stoping Hadoop and HBase in order

Hadoop Startup Process

Namenode  -->  Datanodes  -->  SecondaryNamenode  -->  JobTracker  -->  TaskTrackers

Hadoop Shutdown Process
JobTracker  -->  TaskTracker  --> Namenode  -->  Datanodes  --> SecondaryNamenode

HBase Startup Process

Zookeepers  -->  HMaster  -->  RegionServers

HBase Shutdown Process

RegionServers  -->  HMaster  -->  Zookeepers

Thursday, September 19, 2013

Too many fetch-failures, hadoop mapreduce job, hadoop mapreduce Too many fetch-failures

This may happen due to following reasons:

1. Wrong DNS Entry, Hosts file entries, 

Description:

Nodes are not able to communicate with each other, so check if nodes where this error comes you can ping or  nslookup to that node

2. Tasktracker http thread

Description:

Check of the value of this tag in mapreduce-site.xml, if it is lower make it somewhat higer around 100.

Tuesday, September 17, 2013

Get Directory path from a file path/Get file name from a filepath in shell Linux/Unix

Get Directory path from a file path.

Command : 

dirname /path/path1/filename

Output :

 /path/path

Get filename from a filepath

Command:

basename /path/path/filename

Output:

filaname

Friday, August 23, 2013

Getting thread count of a process using PID in Linux

Using following command we can get the thread count of a process in Linux, using PID of the process.

ps -o thcoung -p <PID>

If we need some more detail like process type, pid, user under which the process is running we can use following command :

ps -o user,comm,pid,thcount -p <PID>


Tuesday, August 6, 2013

Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'xxxxxx' doesn't exist

FAILED: Error in metadata: MetaException(message:Got exception: javax.jdo.JDODataStoreException Exception thrown obtaining schema column information from datastore)
org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: javax.jdo.JDODataStoreException Exception thrown obtaining schema column information from datastore

Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'xxxxxx' doesn't exist

Follow following to solve this problem.

Friday, July 26, 2013

The path "" is not a valid path to the 3.5.0-17-generic kernel headers / VMWare can't find linux headers path

Error/Problem while installing VMware Tool in Virtual Machine

If you this error falls in front of you (Ubuntu)

Throw this command infront of it :)

sudo apt-get install build-essential linux-headers-`uname -r` psmisc

-or-

sudo apt-get install linux-headers-$(uname -r)


If anyone of this command will executed successfully, then the error will run away from you :)

Featured Posts

How to Install Docker Engine on Ubuntu: Step-by-Step Guide

  Docker has become one of the most important tools in modern software development, DevOps, cloud engineering, and system administration. Wh...