Commands Manual. Table of contents

Similar documents
Commands Guide. Table of contents

Hadoop File System Commands Guide

Hadoop Streaming. Table of contents. Content-Type text/html; utf-8

Hadoop On Demand: Configuration Guide

Hadoop-PR Hortonworks Certified Apache Hadoop 2.0 Developer (Pig and Hive Developer)

Top 25 Hadoop Admin Interview Questions and Answers

Cloudera Exam CCA-410 Cloudera Certified Administrator for Apache Hadoop (CCAH) Version: 7.5 [ Total Questions: 97 ]

Cluster Setup. Table of contents

Vendor: Cloudera. Exam Code: CCA-505. Exam Name: Cloudera Certified Administrator for Apache Hadoop (CCAH) CDH5 Upgrade Exam.

Hadoop. copyright 2011 Trainologic LTD

HDFS Architecture Guide

Hortonworks PR PowerCenter Data Integration 9.x Administrator Specialist.

Hortonworks HDPCD. Hortonworks Data Platform Certified Developer. Download Full Version :

HOD User Guide. Table of contents

3. Monitoring Scenarios

Hadoop On Demand User Guide

Hadoop MapReduce Framework

Table of Contents. 7. sqoop-import Purpose 7.2. Syntax

Exam Questions CCA-505

Hadoop File System S L I D E S M O D I F I E D F R O M P R E S E N T A T I O N B Y B. R A M A M U R T H Y 11/15/2017

TITLE: PRE-REQUISITE THEORY. 1. Introduction to Hadoop. 2. Cluster. Implement sort algorithm and run it using HADOOP

HOD Scheduler. Table of contents

Hadoop Quickstart. Table of contents

MI-PDB, MIE-PDB: Advanced Database Systems

Vendor: Cloudera. Exam Code: CCD-410. Exam Name: Cloudera Certified Developer for Apache Hadoop. Version: Demo

Hadoop with KV-store using Cygwin

TP1-2: Analyzing Hadoop Logs

Konstantin Shvachko, Hairong Kuang, Sanjay Radia, Robert Chansler Yahoo! Sunnyvale, California USA {Shv, Hairong, SRadia,

April Final Quiz COSC MapReduce Programming a) Explain briefly the main ideas and components of the MapReduce programming model.

Big Data and Scripting map reduce in Hadoop

Scaling Namespaces and Optimizing Data Storage

Exam Name: Cloudera Certified Developer for Apache Hadoop CDH4 Upgrade Exam (CCDH)

Hortonworks Data Platform

Google File System (GFS) and Hadoop Distributed File System (HDFS)

UNIT-IV HDFS. Ms. Selva Mary. G

itpass4sure Helps you pass the actual test with valid and latest training material.

Lecture 11 Hadoop & Spark

50 Must Read Hadoop Interview Questions & Answers

The Google File System. Alexandru Costan

$HIVE_HOME/bin/hive is a shell utility which can be used to run Hive queries in either interactive or batch mode.

Batch Inherence of Map Reduce Framework

CS November 2017

Distributed Systems. 09r. Map-Reduce Programming on AWS/EMR (Part I) 2017 Paul Krzyzanowski. TA: Long Zhao Rutgers University Fall 2017

A brief history on Hadoop

Big Data Analytics. Izabela Moise, Evangelos Pournaras, Dirk Helbing

Your First Hadoop App, Step by Step

Getting Started with Spark

Inria, Rennes Bretagne Atlantique Research Center

Hadoop. Course Duration: 25 days (60 hours duration). Bigdata Fundamentals. Day1: (2hours)

2/26/2017. For instance, consider running Word Count across 20 splits

HDFS Design Principles

Database Applications (15-415)

International Journal of Advance Engineering and Research Development. A Study: Hadoop Framework

UNIT V PROCESSING YOUR DATA WITH MAPREDUCE Syllabus

ExamTorrent. Best exam torrent, excellent test torrent, valid exam dumps are here waiting for you

CCA Administrator Exam (CCA131)

Distributed Systems 16. Distributed File Systems II

Namenode HA. Sanjay Radia - Hortonworks

Actual4Dumps. Provide you with the latest actual exam dumps, and help you succeed

Deploying Custom Step Plugins for Pentaho MapReduce

MapReduce. U of Toronto, 2014

Exam Questions CCA-500

Dept. Of Computer Science, Colorado State University

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

CS370 Operating Systems

Hadoop Virtualization Extensions on VMware vsphere 5 T E C H N I C A L W H I T E P A P E R

Hadoop streaming is an alternative way to program Hadoop than the traditional approach of writing and compiling Java code.

7680: Distributed Systems

How to Install and Configure EBF16193 for Hortonworks HDP 2.3 and HotFix 3 Update 2

Session 1 Big Data and Hadoop - Overview. - Dr. M. R. Sanghavi

How to Install and Configure Big Data Edition for Hortonworks

Getting Started with Hadoop/YARN

Facilitating Consistency Check between Specification & Implementation with MapReduce Framework

Hadoop Setup Walkthrough

Hadoop and HDFS Overview. Madhu Ankam

Evaluation of Apache Hadoop for parallel data analysis with ROOT

Distributed Filesystem

Introduction to Hadoop. Scott Seighman Systems Engineer Sun Microsystems

Introduction to HDFS and MapReduce

DePaul University CSC555 -Mining Big Data. Course Project by Bill Qualls Dr. Alexander Rasin, Instructor November 2013

BigData and Map Reduce VITMAC03

A BigData Tour HDFS, Ceph and MapReduce

Introduction to Map/Reduce. Kostas Solomos Computer Science Department University of Crete, Greece

Hortonworks Data Platform

Cloud Computing and Hadoop Distributed File System. UCSB CS170, Spring 2018

HADOOP FRAMEWORK FOR BIG DATA

Hadoop Development Introduction

HDFS Architecture. Gregory Kesden, CSE-291 (Storage Systems) Fall 2017

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

Dept. Of Computer Science, Colorado State University

CCA-410. Cloudera. Cloudera Certified Administrator for Apache Hadoop (CCAH)

Introduction to BigData, Hadoop:-

CLOUD-SCALE FILE SYSTEMS

18-hdfs-gfs.txt Thu Oct 27 10:05: Notes on Parallel File Systems: HDFS & GFS , Fall 2011 Carnegie Mellon University Randal E.

Chapter 5. The MapReduce Programming Model and Implementation

Data-Intensive Computing with MapReduce

Data Intensive Computing

Introduction to MapReduce

We are ready to serve Latest Testing Trends, Are you ready to learn?? New Batches Info

Ghislain Fourny. Big Data 6. Massive Parallel Processing (MapReduce)

Transcription:

Table of contents 1 Overview...2 1.1 Generic Options...2 2 User Commands...3 2.1 archive... 3 2.2 distcp...3 2.3 fs... 3 2.4 fsck... 3 2.5 jar...4 2.6 job...4 2.7 pipes...5 2.8 version... 6 2.9 CLASSNAME...6 3 Administration Commands... 6 3.1 balancer...6 3.2 daemonlog... 6 3.3 datanode...7 3.4 dfsadmin... 7 3.5 jobtracker...9 3.6 namenode...9 3.7 secondarynamenode... 9 3.8 tasktracker...10

1. Overview All the hadoop commands are invoked by the bin/hadoop script. Running hadoop script without any arguments prints the description for all commands. Usage: hadoop [--config confdir] [COMMAND] [GENERIC_OPTIONS] [S] Hadoop has an option parsing framework that employs parsing generic options as well as running classes. --config confdir GENERIC_OPTIONS COMMAND S Overwrites the default Configuration directory. Default is ${HADOOP_HOME}/conf. The common set of options supported by multiple commands. Various commands with their options are described in the following sections. The commands have been grouped into User Commands and Administration Commands. 1.1. Generic Options Following are supported by dfsadmin, fs, fsck and job. Applications should implement Tool to support GenericOptions. GENERIC_OPTION -conf <configuration file> Specify an application configuration file. -D <property=value> Use value for given property. -fs <local namenode:port> -jt <local jobtracker:port> -files <comma separated list of files> -libjars <comma seperated list of jars> -archives <comma separated list of archives> Specify a namenode. Specify a job tracker. Applies only to job. Specify comma separated files to be copied to the map reduce cluster. Applies only to job. Specify comma separated jar files to include in the classpath. Applies only to job. Specify comma separated archives to be unarchived on the compute machines. Applies only to job. Page 2

2. User Commands Commands useful for users of a hadoop cluster. 2.1. archive Creates a hadoop archive. More information can be found at Hadoop Archives. Usage: hadoop archive -archivename NAME <src>* <dest> -archivename NAME src dest Name of the archive to be created. Filesystem pathnames which work as usual with regular expressions. Destination directory which would contain the archive. 2.2. distcp Copy file or directories recursively. More information can be found at DistCp Guide. Usage: hadoop distcp <srcurl> <desturl> srcurl desturl Source Url Destination Url 2.3. fs Usage: hadoop fs [GENERIC_OPTIONS] [S] Runs a generic filesystem user client. The various S can be found at HDFS Shell Guide. 2.4. 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]]] Page 3

<path> -move -delete -openforwrite -files -blocks -locations -racks Start checking from this path. Move corrupted files to /lost+found Delete corrupted files. Print out files opened for write. Print out files being checked. Print out block report. Print out locations for every block. Print out network topology for data-node locations. 2.5. jar Runs a jar file. Users can bundle their Map Reduce code in a jar file and execute it using this command. Usage: hadoop jar <jar> [mainclass] args... The streaming jobs are run via this command. Examples can be referred from Streaming examples Word count example is also run using jar command. It can be referred from Wordcount example 2.6. job Command to interact with Map Reduce Jobs. Usage: hadoop job [GENERIC_OPTIONS] [-submit <job-file>] [-status <job-id>] [-counter <job-id> <group-name> <counter-name>] [-kill <job-id>] [-events <job-id> <from-event-#> <#-of-events>] [-history [all] <joboutputdir>] [-list [all]] [-kill-task <task-id>] [-fail-task <task-id>] -submit <job-file> -status <job-id> Submits the job. Prints the map and reduce completion Page 4

percentage and all job counters. -counter <job-id> <group-name> <counter-name> -kill <job-id> -events <job-id> <from-event-#> <#-of-events> -history [all] <joboutputdir> -list [all] -kill-task <task-id> -fail-task <task-id> Prints the counter value. Kills the job. Prints the events' details received by jobtracker for the given range. -history <joboutputdir> prints job details, failed and killed tip details. More details about the job such as successful tasks and task attempts made for each task can be viewed by specifying the [all] option. -list all displays all jobs. -list displays only jobs which are yet to complete. Kills the task. Killed tasks are NOT counted against failed attempts. Fails the task. Failed tasks are counted against failed attempts. 2.7. pipes Runs a pipes job. Usage: hadoop pipes [-conf <path>] [-jobconf <key=value>, <key=value>,...] [-input <path>] [-output <path>] [-jar <jar file>] [-inputformat <class>] [-map <class>] [-partitioner <class>] [-reduce <class>] [-writer <class>] [-program <executable>] [-reduces <num>] -conf <path> -jobconf <key=value>, <key=value>,... -input <path> -output <path> -jar <jar file> -inputformat <class> Configuration for job Add/override configuration for job Input directory Output directory Jar filename InputFormat class Page 5

-map <class> -partitioner <class> -reduce <class> -writer <class> -program <executable> -reduces <num> Java Map class Java Partitioner Java Reduce class Java RecordWriter Executable URI Number of reduces 2.8. version Prints the version. Usage: hadoop version 2.9. CLASSNAME hadoop script can be used to invoke any class. Usage: hadoop CLASSNAME Runs the class named CLASSNAME. 3. Administration Commands Commands useful for administrators of a hadoop cluster. 3.1. 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>] -threshold <threshold> Percentage of disk capacity. This overwrites the default threshold. 3.2. daemonlog Get/Set the log level for each daemon. Page 6

Usage: hadoop daemonlog -getlevel <host:port> <name> Usage: hadoop daemonlog -setlevel <host:port> <name> <level> -getlevel <host:port> <name> -setlevel <host:port> <name> <level> Prints the log level of the daemon running at <host:port>. This command internally connects to http://<host:port>/loglevel?log=<name> Sets the log level of the daemon running at <host:port>. This command internally connects to http://<host:port>/loglevel?log=<name> 3.3. datanode Runs a HDFS datanode. Usage: hadoop datanode [-rollback] -rollback Rollsback the datanode to the previous version. This should be used after stopping the datanode and distributing the old hadoop version. 3.4. 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]] -report -safemode enter leave get wait Reports basic filesystem information and statistics. 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 Page 7

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 -finalizeupgrade -upgradeprogress status details force -metasave filename -setquota <quota> <dirname>...<dirname> -clrquota <dirname>...<dirname> -help [cmd] 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. Finalize upgrade of HDFS. Datanodes delete their previous version working directories, followed by Namenode doing the same. This completes the upgrade process. Request current distributed upgrade status, a detailed status or force the upgrade to proceed. 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 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. 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. Displays help for the given command or all commands if none is specified. Page 8

3.5. jobtracker Runs the MapReduce job Tracker node. Usage: hadoop jobtracker 3.6. namenode Runs the namenode. More info about the upgrade, rollback and finalize is at Upgrade Rollback Usage: hadoop namenode [-format] [-upgrade] [-rollback] [-finalize] [-importcheckpoint] -format -upgrade -rollback -finalize -importcheckpoint Formats the namenode. It starts the namenode, formats it and then shut it down. Namenode should be started with upgrade option after the distribution of new hadoop version. Rollsback the namenode to the previous version. This should be used after stopping the cluster and distributing the old hadoop version. 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. Loads image from a checkpoint directory and save it into the current one. Checkpoint dir is read from property fs.checkpoint.dir 3.7. secondarynamenode Runs the HDFS secondary namenode. See Secondary Namenode for more info. Usage: hadoop secondarynamenode [-checkpoint [force]] [-geteditsize] -checkpoint [force] Checkpoints the Secondary namenode if Page 9

EditLog size >= fs.checkpoint.size. If -force is used, checkpoint irrespective of EditLog size. -geteditsize Prints the EditLog size. 3.8. tasktracker Runs a MapReduce task Tracker node. Usage: hadoop tasktracker Page 10