Grunt pig

I installed cygwin, hadoop and pig in windows. The configuration looks fine, since I can run pig scripts in batch and inline mode.

When I try to run pigs in a grunt mode, something strange happens. Let me explain. I am trying to run a simple command like

grunt> A = load 'passwd' using PigStorage(':'); 

When I press Enter, nothing happens. The cursor moves to the next line and the grunt> prompt no longer appears. I seem to be typing a text editor.

Has anything like this happened to you? Do you have any idea how I can solve this?

+4
source share
4 answers

The behavior is consistent with what you are observing. For example, I'll take a textbook for pigs .

The following command does not lead to any activity using pig .

 raw = LOAD 'excite.log' USING PigStorage('\t') AS (user, time, query); 

But if you invoke a command that uses the data from the raw variable, using some map thats abbreviations when you see some action in your command shell. Something like the second command that is mentioned there.

 clean1 = FILTER raw BY org.apache.pig.tutorial.NonURLDetector(query); 

Similarly, your command will not lead to any actions, you should use the data from variable A , which leads to the map-reduce command to see some action in the command shell:

 grunt> A = load 'passwd' using PigStorage(':'); 
0
source

Pig will only process commands when you use a command that creates output, namely DUMP (for the console) or STORE you can also use the DESCRIBE command to get the alias structure and EXPLAIN to see the map / abbreviation plan

therefore basically DUMP A; will give you all the entries in A

0
source

Try starting in the windows command window.

C: \ FAST \ JDK64 \ 1.6.0.31/bin/java -Xmx1000m -Dpig.log.dir = C: / cygwin / home / $ USERNAME $ / nubes / pig / logs -Dpig.log.file = pig.log - Dpig.home.dir = C: / cygwin / home / $ USERNAME $ / nubes / pig / -classpath C: / cygwin / home / $ USERNAME $ / nubes / pig / conf; C; C: /FAST/JDK64/1.6.0.31/Library/tools.jar; C: /cygwin/home/$USERNAME$/nubes/pig/lib/jython-standalone-2.5.3.jar; C: / Cygwin / home / $ USERNAME $ / nubes / pig / conf; C: / cygwin / home / $ USERNAME $ / nubes / hadoop / conf; C: /cygwin/home/$USERNAME$/nubes/pig/pig-0.11.1.jar org.apache.pig.Main -x local

Replace $USERNAME$ with your user ID accordingly.

Change the class path and conf path accordingly.

It works well both in local and in map reduction mode.

0
source

Pig pigs hanging in cygwin. But the pig script was successfully executed from the pig script file.

As below:

 $pig ./user/input.txt 

For local mode:

 pig -x local ./user/input.txt 
0
source