Database Reference
In-Depth Information
Table 3.6 Common File system Commands
File system
Commands
Description
cat Copies source paths to stdout
copyFromLocal Similar to put command, except that the source is
restricted to a local file reference
Counts the number of files within a directory
count
Copies files from source to destination
cp
Copies files to the local file system (opposite of put )
get
Moves files from source to definition within HDFS
mv
Deletes specified files
rm
Displays last KB of the file to stdout
tail
Verifying Hive and Pig
Two tools that you will find yourself using often are Hive and Pig. Both of
these tools are higher-level languages that allow developers to work with
data stored in HDFS without having to write Java programs. Hive is a
SQL-like language that allows developers to apply a table-like structure to
the data so that they can invoke Hive queries in much the same manner
that they invoke SQL Queries. These HiveQL queries are translated into
MapReduce jobs that are submitted to Hadoop for execution.
Pig is another abstracted language, which is scripting in nature. Because of
the scripting nature of Pig, it is very useful as an extract, translate, and load
(ETL)toolfordatamovementandmanipulation.Thenextcoupleofsections
introduce these two tools.
Verifying Hive
To verify Hive, follow these steps:
1. Open the Hadoop command console and enter the following:
cd..
This brings us up one level in the folder structure.
 
Search WWH ::




Custom Search