How to check if ZooKeeper is running or up from command prompt?

To check if Zookeeper is accessible. One method is to simply telnet to the proper port and execute the stats command. root@host:~# telnet localhost 2181 Trying 127.0.0.1… Connected to myhost. Escape character is ‘^]’. stats Zookeeper version: 3.4.3-cdh4.0.1–1, built on 06/28/2012 23:59 GMT Clients: Latency min/avg/max: 0/0/677 Received: 4684478 Sent: 4687034 Outstanding: 0 Zxid: 0xb00187dd0 … Read more

what’s the difference between “hadoop fs” shell commands and “hdfs dfs” shell commands?

Following are the three commands which appears same but have minute differences hadoop fs {args} hadoop dfs {args} hdfs dfs {args} hadoop fs <args> FS relates to a generic file system which can point to any file systems like local, HDFS etc. So this can be used when you are dealing with different file systems … Read more

How does Hadoop process records split across block boundaries?

Interesting question, I spent some time looking at the code for the details and here are my thoughts. The splits are handled by the client by InputFormat.getSplits, so a look at FileInputFormat gives the following info: For each input file, get the file length, the block size and calculate the split size as max(minSize, min(maxSize, … Read more