Book Image

Learning HBase

By : Shashwat Shriparv
Book Image

Learning HBase

By: Shashwat Shriparv

Overview of this book

Table of Contents (18 chapters)
Learning HBase
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Hadoop shell commands


A binary is present inside the bin directory. We can call the following Hadoop command if we need to know all the commands available:

<Hadoop directory path>bin/hadoop

In the version previous to Hadoop v1, we can use the preceding command. However, in the later versions, we have to use the following command:

<Hadoop directory path>bin/hdfs

A binary without any parameter will display the list of available commands. We can check the actual implementation of Hadoop shell and its Java source at https://github.com/shot/hadoop-source-reading/blob/master/src/core/org/apache/hadoop/fs/FsShell.java.

Tip

We can use bin/hadoop or bin/hdfs based on the version of Hadoop we have. In the newer versions of Hadoop, it is advisable to use HDFS instead of Hadoop. Here, we will use bin/hadoop, but you can use any one of the commands, depending on the version you are using.

Types of Hadoop shell commands

Let's take a look at the Hadoop shell commands. However, first we will look...