Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to the basic operation of pig

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "introduction to the basic operation of pig". In the course of the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

What is pig?

My understanding is: pig is equivalent to shell, hadoop is equivalent to linux (so I will use pig to manipulate hadoop files as much as possible)

1. Enter the HADOOP_HOME directory.

two。 Execute sh bin/hadoop

We can see more instructions for the command:

Usage: hadoop [--config confdir] COMMAND

Where COMMAND is one of:

Namenode-format format the DFS filesystem

Secondarynamenode run the DFS secondarynamenode

Namenode run the DFS namenode

Datanode run a DFS datanode

Dfsadmin run a DFS admin client

Fsck run a DFS filesystem checking utility

Fs run a generic filesystem user client

Balancer run a cluster balancing utility

Jobtracker run the MapReduce job Tracker node

Pipes run a Pipes job

Tasktracker run a MapReduce task Tracker node

Job manipulate MapReduce jobs

Queue get information regarding JobQueues

Version print the version

Jar run a jar file

Distcp copy file or directories recursively

Archive-archiveName NAME * create a hadoop archive

Daemonlog get/set the log level for each daemon

Or

CLASSNAME run the class named CLASSNAME

Most commands print help when invoked w/o parameters.

Common pig commands

Ls/ pwd/ cd

For example: view file size

Grunt > fs-du-h-s file name

19.4 G file name

Grunt > help

Commands:

;-See the PigLatin manual for details: http://hadoop.apache.org/pig

File system commands:

Fs-Equivalent to Hadoop dfs command: http://hadoop.apache.org/common/docs/current/hdfs_shell.html

Diagnostic commands:

Describe [::

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report