Categories

Buy Ipad at a Cheap price

Latest Book

Learn Shell Scripting

Apache cookbook

Effective awk Programming

Definitive Centos Guide

The Linux bible 2011

Linux Interview Questions

Linux Sys Admin Questions

INFORMATION SECURITY SPECIALIST

JAVA / J2EE Interview Questions

IT News

FACEBOOK Billion dollar IPO is now LIVE: The social network got to public worth over $104 billion and a share price of FB:$38

Your Ad Here

FB: $38: , yes it’a big day for social network giant, Facebook.

Mark Zuckerberg and FB’s IT engineers are in the IPO now.

The team is working around the clock and working hard to push new features to the production site before company’s CEO ring the opening bell of NASDAQ from it’s headquarters.

900M+ number of people who check their FB’s account at least once a month, but millions more are holdouts. If all those people continue to shun FB, teh social network could become akin to a postal service that only delivers mail to houses on the street.

Facebook has priced its initial public offering of it’s stock at $38 per share.

For the Harvard born in a dorm room eight years ago and has grown into a worldwide network of almost a billion people, is making the most talked-about stock market debut in years, the stock sale means more money to operate the IT departments and can hire best engineers.

Facebook is the third-highest valued company to ever go public and its early investors now stand to reap as much as $18.4 billion from the IPO and puts the company value around $104 billion, above Kraft foods inc, Disney and Amazon.com.

Google, the second-largest tech IPO on record, raised $1.9 billion in its 2004 IPO.

Of course, the shares are merely an investment, nothing more: Facebook chief executive Mark Zuckerberg is selling about 30 million shares and will reamin FB’s largest shareholder which will retain the voting rights to a majority of the company’s shares, giving him absolute power as far as corporate decisions are concerned.

If you like this post , please do click on F! like as it’s talk bout the social giant :)

 

 

Post Reads: 34
Your Ad Here
Linux

Linux Interview Questions and Answers

Your Ad Here

Q. How to know what shell i am using.

  • A. echo $SHEL
Q. How to know the paret and child prcess id relationship.
  • A. pstree
Q. How do you know the statistics of a PID.
  • A. cat /proc/PID/status or stat — age of the PID.
Q. How to know total physical RAM(Memory) in Linux 
  • A. free -m
 Q. How to display/examine memory map.
  • A. pmap <pid>
Q. How to know the run kernel version in use. 
  • A. cat /proc/version.
Q. How to display Linux release (fedora/redhat/centOS)
  • cat /etc/redhat-release
Q. How to know how long the system is running.
  • A. uptime.
Q. How to know how many users and which terminal logged in and what they are doing.
  • A. w or who
Q. How do list all currently loaded kernel moduels.
  • A. /sbin/lsmo.
Q. How do display the system’s current runlevel.
  • A. runlevel
 Q. hostname of the system
  • A. hostname.
Q. How to list runlevels of services/daemon. 
  • A. chkconfig –list
Q. How to know runtime system messages/erros related to h/w  s/w.
  • A. dmesg
Q. How to know password details of the user?
  • A. chage -l <username>
Q. How to know id of a user and gid.
  • A. id
Q. How to know last commands entered by a logged in user.
  • A. history.
Q. How to display all envrionemtn variables of a logged in user.
  • A. env/set
Post Reads: 80
Your Ad Here
Hadoop

Troubleshooting Hadoop

Your Ad Here

 

 

 

Handy Hadoop…

Here are tips and tricks you might find useful if you are dealing with Hadoop/Hbase on daily basis to keep it running smoothly…

As an Hadoop Admin you should know basics HDFS componenets.

About Namenode (NN):

Admin port for Hadoop: 50070, Jobtracker: 50030, Hbase port: 60010

Directory structure:

A newly formatted namenode creates the following directory structure:

  • ${dfs.name.dir}/current/VERSION
  •                                                              /edits
  •                                                             /fsimage
  •                                                            /fstime

Administration Commands

Commands useful for administrators of a hadoop cluster.

balancer

Runs a cluster balancing utility. An administrator can simply press Ctrl-C to stop the rebalancing process. See Rebalancer for more details.

Usage: hadoop balancer [-threshold <threshold>]

COMMAND_OPTION

Description

-threshold <threshold> Percentage of disk capacity. This overwrites the default threshold.

daemonlog

Get/Set the log level for each daemon.

Usage: hadoop daemonlog -getlevel <host:port> <name>
Usage: hadoop daemonlog -setlevel <host:port> <name> <level>

COMMAND_OPTION

Description

-getlevel <host:port> <name> Prints the log level of the daemon running at <host:port>. This command internally connects to http://<host:port>/logLevel?log=<name>
-setlevel <host:port> <name> <level> Sets the log level of the daemon running at <host:port>. This command internally connects to http://<host:port>/logLevel?log=<name>

datanode

Runs a HDFS datanode.

Usage: hadoop datanode [-rollback]

COMMAND_OPTION

Description

-rollback Rollsback the datanode to the previous version. This should be used after stopping the datanode and distributing the old hadoop version.

dfsadmin

Runs a HDFS dfsadmin client.

Usage: hadoop dfsadmin [GENERIC_OPTIONS] [-report] [-safemode enter | leave | get | wait] [-refreshNodes] [-finalizeUpgrade] [-upgradeProgress status | details | force] [-metasave filename] [-setQuota <quota> <dirname>...<dirname>] [-clrQuota <dirname>...<dirname>] [-help [cmd]]

COMMAND_OPTION

Description

-report Reports basic filesystem information and statistics.
-safemode enter | leave | get | wait Safe mode maintenance command. Safe mode is a Namenode state in which it
1. does not accept changes to the name space (read-only)
2. does not replicate or delete blocks.
Safe mode is entered automatically at Namenode startup, and leaves safe mode automatically when the configured minimum percentage of blocks satisfies the minimum replication condition. Safe mode can also be entered manually, but then it can only be turned off manually as well.
-refreshNodes Re-read the hosts and exclude files to update the set of Datanodes that are allowed to connect to the Namenode and those that should be decommissioned or recommissioned.
-finalizeUpgrade Finalize upgrade of HDFS. Datanodes delete their previous version working directories, followed by Namenode doing the same. This completes the upgrade process.
-upgradeProgress status | details | force Request current distributed upgrade status, a detailed status or force the upgrade to proceed.
-metasave filename Save Namenode’s primary data structures to <filename> in the directory specified by hadoop.log.dir property. <filename> will contain one line for each of the following
1. Datanodes heart beating with Namenode
2. Blocks waiting to be replicated
3. Blocks currrently being replicated
4. Blocks waiting to be deleted
-setQuota <quota> <dirname>…<dirname> Set the quota <quota> for each directory <dirname>. The directory quota is a long integer that puts a hard limit on the number of names in the directory tree.
Best effort for the directory, with faults reported if
1. N is not a positive integer, or
2. user is not an administrator, or
3. the directory does not exist or is a file, or
4. the directory would immediately exceed the new quota.
-clrQuota <dirname>…<dirname> Clear the quota for each directory <dirname>.
Best effort for the directory. with fault reported if
1. the directory does not exist or is a file, or
2. user is not an administrator.
It does not fault if the directory has no quota.
-help [cmd] Displays help for the given command or all commands if none is specified.

mradmin

Runs MR admin client

Usage: hadoop mradmin [ GENERIC_OPTIONS ] [-refreshQueueAcls]

COMMAND_OPTION

Description

-refreshQueueAcls Refresh the queue acls used by hadoop, to check access during submissions and administration of the job by the user. The properties present in mapred-queue-acls.xml is reloaded by the queue manager.

jobtracker

Runs the MapReduce job Tracker node.

Usage: hadoop jobtracker [-dumpConfiguration]

COMMAND_OPTION

Description

-dumpConfiguration Dumps the configuration used by the JobTracker alongwith queue configuration in JSON format into Standard output used by the jobtracker and exits.

namenode

Runs the namenode. More info about the upgrade, rollback and finalize is at Upgrade Rollback

Usage: hadoop namenode [-format] | [-upgrade] | [-rollback] | [-finalize] | [-importCheckpoint]

COMMAND_OPTION

Description

-format Formats the namenode. It starts the namenode, formats it and then shut it down.
-upgrade Namenode should be started with upgrade option after the distribution of new hadoop version.
-rollback Rollsback the namenode to the previous version. This should be used after stopping the cluster and distributing the old hadoop version.
-finalize Finalize will remove the previous state of the files system. Recent upgrade will become permanent. Rollback option will not be available anymore. After finalization it shuts the namenode down.
-importCheckpoint Loads image from a checkpoint directory and save it into the current one. Checkpoint dir is read from property fs.checkpoint.dir

secondarynamenode

Runs the HDFS secondary namenode. See Secondary Namenode for more info.

Usage: hadoop secondarynamenode [-checkpoint [force]] | [-geteditsize]

COMMAND_OPTION

Description

-checkpoint [force] Checkpoints the Secondary namenode if EditLog size >= fs.checkpoint.size. If -force is used, checkpoint irrespective of EditLog size.
-geteditsize Prints the EditLog size.

tasktracker

Runs a MapReduce task Tracker node.

Usage: hadoop tasktracker

 

Entering and leaving safe mode.

% hadoop dfsadmin -safemode get

Safe mode is ON

Replace, Remove, Add disk into Running node in cluster.

How to remove disk from hadoop DN(datanode)

On DN first stop Hbase.
  • <hbase_home>/bin/stop-hbase.sh

 

Then stop Hadoop

  • <hadoop_home/bin/stop-all.sh

 

Edit file(using vi or your choice of editor) hdfs-site.xml
Remove the partition (disk slice) from the config parameter called dfs.data.dir

<hadoop_home/conf/hdfs-site.xml
<property>
<name>dfs.data.dir</name>
<value>/disk1/hdfs/data, /disk2/hdfs/data/ </value>
</property>
<property>
Take /disk1/hdfs/data out from the file, save it.
  • Start Hadoop

 

  • Start Hbase

Put it back when you are done with the disk.
Or if replacing same time, Keep node down until replaced and just bounce the node.

Starting and Stopping Hadoop Daemons
/bin/

  • start-balancer.sh start-dfs.sh start-mapred.sh

or just say start-all.sh

This will detect what kind of node (datanode, namenode, secondary namenode, etc) and start/stop services appropriately.

Hadoop Filesystem

  • hadoop fsck / -blocks

A successful check will end with these words:
The filesystem under path ‘/’ is HEALTHY

  • hadoop dfsadmin -report

Cleaning Up a CORRUPT Filesystem
When the namenode is in safemode, no edits to the filesystem are allowed. First, run fsck and determine the extent of the damage. If it is acceptable to delete or otherwise move aside the damaged files, turn off safemode, and move the file using the following command:

  • hadoop fsck -move

This moves any files with problematic blocks into /lost+found in the Hadoop namespace.
Restoring from a checkpoint

fsck

Runs a HDFS filesystem checking utility. See Fsck for more info.

Usage: hadoop fsck [GENERIC_OPTIONS] <path> [-move | -delete | -openforwrite] [-files [-blocks [-locations | -racks]]]

COMMAND_OPTION Description
<path> Start checking from this path.
-move Move corrupted files to /lost+found
-delete Delete corrupted files.
-openforwrite Print out files opened for write.
-files Print out files being checked.
-blocks Print out block report.
-locations Print out locations for every block.
-racks Print out network topology for data-node locations.

 

Finally To ensure that everything is working correctly hit your IP address with following ports. And this is the good list of ports to open while being hit by firewall.

HDFS: 50070
JobTracker: 50030
TaskTracker: 50060
Hbase Master: 60010
Hbase RegionServer: 60030

Post Reads: 108
Your Ad Here
Oracle

ORACLE DEVELOPMENT TOOLS

Your Ad Here
                                                                                        ORACLE DEVELOPMENT TOOLS (source: http://www.oracle.com/us/products/tools/index.html?ssSourceSiteId=otnen)
JAVA & SOA

BUSINESS INTELLIGENCE

SOLARIS & LINUX

DATABASE & PL/SQL

.NET

JAVA APIs

RELATED SOLUTIONS

Post Reads: 75
Your Ad Here
Android

How to setup Android development on Ubuntu

Your Ad Here

Step One.

Before installing anything please run the following command (actually 2 commands)

1
 sudo apt-get update && sudo apt-get upgrade

Install Java! You develop on android or not Java is a must on all my machines

1
$ sudo apt-get install sun-java6-jdk

You can now check your java installation by issuing two commands:

1
$ java -version
1
$ javac -version

You should be able to see output stating that you have java 6 installed, huuraaayy!

Step Two.

Download and install Android SDK
You can download the latest android SDK from the android development website (developer.android.com), the link to the latest version is here
After your download completes, unzip the file to the directory of your choice. I copy the whole folder into my home directory but the doesn’t really matter.
Open up your favourite text editor (VIM of course) and add the following line at the very bottom of the .bashrc file:

1
export PATH=${PATH}:/home/kris/android-sdk-linux_x86-1.5_r1/tools

Stepp Three

Download and Install Eclipse

I wish I could go for the easy one here and download the version using apt-get but unfortunately not as the version in repos is 3.2 and ADT plugin requires version 3.3 or higher. You have to download the eclipse for www.eclipse.org and unpack it. Once unpacked its ready to use!

Step Four

Download and install Eclipse plugin
This is instruction from the developer.android.com with one small modification, instead of https use http:

1. Start Eclipse, then select Help > Software Updates….
2. In the dialog that appears, click the Available Software tab.
3. Click Add Site…
4. Enter the Location:

http://dl-ssl.google.com/android/eclipse/

If you have trouble aqcuiring the plugin, try using “http” in the Location URL, instead of “https” (https is preferred for security reasons).

Click OK.
5. Back in the Available Software view, you should see the plugin listed by the URL, with “Developer Tools” nested within it. Select the checkbox next to Developer Tools and click Install…
6. On the subsequent Install window, “Android DDMS” and “AndroidDevelopment Tools” should both be checked. Click Next.
7. Read and accept the license agreement, then click Finish.
8. Restart Eclipse.

After executing all the steps above you are ready for Android development. The last step in this tutorial is to run example android projects on your linux dev machine.
If you encounter an error saying :

An error occurred during provisioning.
Cannot connect to keystore.
JKS

Please check your java version. If its set to 1.5 than please run the following command:

1
sudo update-java-alternatives -s java-6-sun

Once you finish installing required plugins, restart your eclipse and go to Window->Preferences->Android and set up a path to your android SDK

Step Five

Check your configuration

If all went fine you can try to develop Hello World application in android. You can find the instruction on the android development site:
http://developer.android.com/guide/tutorials/hello-world.html

Post Reads: 88
Your Ad Here