org.apache.pig.tools.grunt
Class GruntParser

java.lang.Object
  extended by PigScriptParser
      extended by org.apache.pig.tools.grunt.GruntParser

public class GruntParser
extends PigScriptParser


Nested Class Summary
static class GruntParser.StreamPrinter
          StreamPrinter.
 
Constructor Summary
GruntParser(InputStream stream)
           
GruntParser(InputStream stream, String encoding)
           
GruntParser(PigScriptParserTokenManager tm)
           
GruntParser(Reader stream)
           
 
Method Summary
protected  void explainCurrentBatch()
           
protected  void explainCurrentBatch(boolean dontPrintOutput)
           
 boolean isDone()
           
 void parseOnly()
           
 int[] parseStopOnError()
           
 int[] parseStopOnError(boolean sameBatch)
          Parses Pig commands in either interactive mode or batch mode.
protected  void printAliases()
           
protected  void printHelp()
           
protected  void processCat(String path)
           
protected  void processCD(String path)
           
protected  void processCopy(String src, String dst)
           
protected  void processCopyFromLocal(String src, String dst)
           
protected  void processCopyToLocal(String src, String dst)
           
protected  void processDescribe(String alias)
           
protected  void processDump(String alias)
           
protected  void processExplain(String alias, String script, boolean isVerbose, String format, String target, List<String> params, List<String> files)
           
protected  void processExplain(String alias, String script, boolean isVerbose, String format, String target, List<String> params, List<String> files, boolean dontPrintOutput)
           
protected  void processFsCommand(String[] cmdTokens)
           
protected  void processIllustrate(String alias, String script, String target, List<String> params, List<String> files)
           
protected  void processKill(String jobid)
           
protected  void processLS(String path)
           
protected  void processMkdir(String dir)
           
protected  void processMove(String src, String dst)
           
protected  void processPig(String cmd)
           
protected  void processPWD()
           
protected  void processRegister(String jar)
           
protected  void processRegister(String path, String scriptingLang, String namespace)
           
protected  void processRemove(String path, String options)
           
protected  void processScript(String script, boolean batch, List<String> params, List<String> files)
           
protected  void processSet(String key, String value)
           
protected  void processShCommand(String[] cmdTokens)
           
 void prompt()
           
protected  void quit()
           
 void setInteractive(boolean isInteractive)
           
 void setLoadOnly(boolean loadOnly)
           
 void setParams(PigServer pigServer)
           
 void setScriptIllustrate()
           
 void setValidateEachStatement(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GruntParser

public GruntParser(Reader stream)

GruntParser

public GruntParser(InputStream stream,
                   String encoding)

GruntParser

public GruntParser(InputStream stream)

GruntParser

public GruntParser(PigScriptParserTokenManager tm)
Method Detail

setInteractive

public void setInteractive(boolean isInteractive)

setValidateEachStatement

public void setValidateEachStatement(boolean b)

parseStopOnError

public int[] parseStopOnError()
                       throws IOException,
                              ParseException
Throws:
IOException
ParseException

parseStopOnError

public int[] parseStopOnError(boolean sameBatch)
                       throws IOException,
                              ParseException
Parses Pig commands in either interactive mode or batch mode. In interactive mode, executes the plan right away whenever a STORE command is encountered.

Throws:
IOException, - ParseException
IOException
ParseException

setLoadOnly

public void setLoadOnly(boolean loadOnly)

setParams

public void setParams(PigServer pigServer)

setScriptIllustrate

public void setScriptIllustrate()

prompt

public void prompt()

quit

protected void quit()

isDone

public boolean isDone()

parseOnly

public void parseOnly()
               throws IOException,
                      ParseException
Throws:
IOException
ParseException

processDescribe

protected void processDescribe(String alias)
                        throws IOException
Throws:
IOException

processExplain

protected void processExplain(String alias,
                              String script,
                              boolean isVerbose,
                              String format,
                              String target,
                              List<String> params,
                              List<String> files)
                       throws IOException,
                              ParseException
Throws:
IOException
ParseException

processExplain

protected void processExplain(String alias,
                              String script,
                              boolean isVerbose,
                              String format,
                              String target,
                              List<String> params,
                              List<String> files,
                              boolean dontPrintOutput)
                       throws IOException,
                              ParseException
Throws:
IOException
ParseException

explainCurrentBatch

protected void explainCurrentBatch()
                            throws IOException
Throws:
IOException

explainCurrentBatch

protected void explainCurrentBatch(boolean dontPrintOutput)
                            throws IOException
Throws:
IOException

printAliases

protected void printAliases()
                     throws IOException
Throws:
IOException

processRegister

protected void processRegister(String jar)
                        throws IOException
Throws:
IOException

processRegister

protected void processRegister(String path,
                               String scriptingLang,
                               String namespace)
                        throws IOException,
                               ParseException
Throws:
IOException
ParseException

processScript

protected void processScript(String script,
                             boolean batch,
                             List<String> params,
                             List<String> files)
                      throws IOException,
                             ParseException
Throws:
IOException
ParseException

processSet

protected void processSet(String key,
                          String value)
                   throws IOException,
                          ParseException
Throws:
IOException
ParseException

processCat

protected void processCat(String path)
                   throws IOException
Throws:
IOException

processCD

protected void processCD(String path)
                  throws IOException
Throws:
IOException

processDump

protected void processDump(String alias)
                    throws IOException
Throws:
IOException

processIllustrate

protected void processIllustrate(String alias,
                                 String script,
                                 String target,
                                 List<String> params,
                                 List<String> files)
                          throws IOException,
                                 ParseException
Throws:
IOException
ParseException

processKill

protected void processKill(String jobid)
                    throws IOException
Throws:
IOException

processLS

protected void processLS(String path)
                  throws IOException
Throws:
IOException

processPWD

protected void processPWD()
                   throws IOException
Throws:
IOException

printHelp

protected void printHelp()

processMove

protected void processMove(String src,
                           String dst)
                    throws IOException
Throws:
IOException

processCopy

protected void processCopy(String src,
                           String dst)
                    throws IOException
Throws:
IOException

processCopyToLocal

protected void processCopyToLocal(String src,
                                  String dst)
                           throws IOException
Throws:
IOException

processCopyFromLocal

protected void processCopyFromLocal(String src,
                                    String dst)
                             throws IOException
Throws:
IOException

processMkdir

protected void processMkdir(String dir)
                     throws IOException
Throws:
IOException

processPig

protected void processPig(String cmd)
                   throws IOException
Throws:
IOException

processRemove

protected void processRemove(String path,
                             String options)
                      throws IOException
Throws:
IOException

processFsCommand

protected void processFsCommand(String[] cmdTokens)
                         throws IOException
Throws:
IOException

processShCommand

protected void processShCommand(String[] cmdTokens)
                         throws IOException
Throws:
IOException


Copyright © 2012 The Apache Software Foundation