Pig: Grunt Usage

Grunt* is Pig’s interactive shell.

  • Start

#pig -x local    //interacte with local file system

#pig                //interacte with hadoop cluster

  • Exit

grunt>quit;

or

CTRL+D

Note:Grunt provides command-line history and editing,as well as Tab completion. It does not provide filename completion via the Tab key. It does not provide a number of commands found in standard Unix shells, such as pipes, re-direction, and background execution.

  • HDFS Commands

grunt>fs -ls

grunt>fs -help 



 

  • Controlling Pig

grunt>kill jobid

grunt>exec [[-param param_name = param_value]] [[-param_file filename]] script

grunt>run [[-param param_name = param_value]] [[-param_file filename]] script

猜你喜欢

转载自ylzhj02.iteye.com/blog/2037467
pig