public class GruntParser
extends org.apache.pig.tools.pigscript.parser.PigScriptParser
Modifier and Type | Class and Description |
---|---|
protected static class |
GruntParser.ExplainState |
static class |
GruntParser.StreamPrinter
StreamPrinter.
|
jj_nt, mConsoleReader, mInteractive, token, token_source
ALIASES, AS, BAG_CONSTANT, BRIEF, CAT, CD, CLEAR, COPY, COPYFROMLOCAL, COPYTOLOCAL, DECLARE, DEFAULT, DESCRIBE, DESCRIBE_SHORT, DIGIT, DOT, DUMP, DUMP_SHORT, EOF, EOL, EXEC, EXPLAIN, EXPLAIN_SHORT, FLOAT, FS, FSSPECIALCHAR, GENERATE, HELP, HISTORY, IDENTIFIER, ILLUSTRATE, ILLUSTRATE_SHORT, IN_BLOCK, IN_COMMAND, IN_DOUBLE_QUOTED_STRING, IN_STRING, INTEGER, KILL, LETTER, LS, MKDIR, MOVE, MULTI_LINE_COMMENT, N, NUMBER, OUT, PARAM, PARAM_FILE, PATH, PIG, PIG_END, PIG_START, PIGDEFAULT, PREVREL, PWD, QUIT, QUIT_SHORT, QUOTE, QUOTEDSTRING, REGISTER, REMOVE, REMOVEFORCE, RUN, SCHEMA_DEFINITION, SCRIPT, SCRIPT_DONE, SEMICOLON, SET, SH, SHELLCMD, SINGLE_LINE_COMMENT, SPECIALCHAR, SQL, SQL_END, SQL_START, tokenImage, USING, XML
Constructor and Description |
---|
GruntParser(InputStream stream) |
GruntParser(InputStream stream,
PigServer pigServer) |
GruntParser(InputStream stream,
String encoding) |
GruntParser(InputStream stream,
String encoding,
PigServer pigServer) |
GruntParser(org.apache.pig.tools.pigscript.parser.PigScriptParserTokenManager tm) |
GruntParser(org.apache.pig.tools.pigscript.parser.PigScriptParserTokenManager tm,
PigServer pigServer) |
GruntParser(Reader reader) |
GruntParser(Reader reader,
PigServer pigServer) |
Modifier and Type | Method and Description |
---|---|
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 |
printClear() |
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 |
processDeclare(String key,
String value) |
protected void |
processDefault(String key,
String value) |
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 |
processHistory(boolean withNumbers) |
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() |
protected void |
processSet(String key,
String value) |
protected void |
processShCommand(String[] cmdTokens) |
protected void |
processSQLCommand(String cmd) |
void |
prompt() |
protected void |
quit() |
static int |
runSQLCommand(String hcatBin,
String cmd,
boolean mInteractive) |
protected void |
setExplainState(GruntParser.ExplainState explainState) |
void |
setInteractive(boolean isInteractive) |
void |
setLoadOnly(boolean loadOnly) |
void |
setScriptIllustrate() |
void |
setValidateEachStatement(boolean b) |
Clear, disable_tracing, enable_tracing, Explain, generateParseException, GetDefaultValue, GetKey, getLineNumber, getNextToken, GetPath, GetReserved, getToken, GetValue, GetValueOrNull, History, Illustrate, parse, ReInit, ReInit, ReInit, ReInit, Script, setConsoleReader
public GruntParser(Reader reader)
public GruntParser(InputStream stream, String encoding)
public GruntParser(InputStream stream, String encoding, PigServer pigServer)
public GruntParser(InputStream stream)
public GruntParser(InputStream stream, PigServer pigServer)
public GruntParser(org.apache.pig.tools.pigscript.parser.PigScriptParserTokenManager tm)
public GruntParser(org.apache.pig.tools.pigscript.parser.PigScriptParserTokenManager tm, PigServer pigServer)
public void setInteractive(boolean isInteractive)
setInteractive
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
public void setValidateEachStatement(boolean b)
public int[] parseStopOnError() throws IOException, org.apache.pig.tools.pigscript.parser.ParseException
IOException
org.apache.pig.tools.pigscript.parser.ParseException
public int[] parseStopOnError(boolean sameBatch) throws IOException, org.apache.pig.tools.pigscript.parser.ParseException
IOException,
- ParseExceptionIOException
org.apache.pig.tools.pigscript.parser.ParseException
public void setLoadOnly(boolean loadOnly)
public void setScriptIllustrate()
public void prompt()
prompt
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
protected void quit()
quit
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
public boolean isDone()
public void parseOnly() throws IOException, org.apache.pig.tools.pigscript.parser.ParseException
IOException
org.apache.pig.tools.pigscript.parser.ParseException
protected void processDescribe(String alias) throws IOException
processDescribe
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processExplain(String alias, String script, boolean isVerbose, String format, String target, List<String> params, List<String> files) throws IOException, org.apache.pig.tools.pigscript.parser.ParseException
processExplain
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
org.apache.pig.tools.pigscript.parser.ParseException
protected void processExplain(String alias, String script, boolean isVerbose, String format, String target, List<String> params, List<String> files, boolean dontPrintOutput) throws IOException, org.apache.pig.tools.pigscript.parser.ParseException
IOException
org.apache.pig.tools.pigscript.parser.ParseException
protected void explainCurrentBatch() throws IOException
IOException
protected void explainCurrentBatch(boolean dontPrintOutput) throws IOException
IOException
protected void printAliases() throws IOException
printAliases
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void printClear()
printClear
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
protected void processRegister(String jar) throws IOException
processRegister
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processRegister(String path, String scriptingLang, String namespace) throws IOException, org.apache.pig.tools.pigscript.parser.ParseException
processRegister
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
org.apache.pig.tools.pigscript.parser.ParseException
protected void processScript(String script, boolean batch, List<String> params, List<String> files) throws IOException, org.apache.pig.tools.pigscript.parser.ParseException
processScript
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
org.apache.pig.tools.pigscript.parser.ParseException
protected void processSet(String key, String value) throws IOException, org.apache.pig.tools.pigscript.parser.ParseException
processSet
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
org.apache.pig.tools.pigscript.parser.ParseException
protected void processSet() throws IOException, org.apache.pig.tools.pigscript.parser.ParseException
processSet
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
org.apache.pig.tools.pigscript.parser.ParseException
protected void processCat(String path) throws IOException
processCat
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processCD(String path) throws IOException
processCD
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processDump(String alias) throws IOException
processDump
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processIllustrate(String alias, String script, String target, List<String> params, List<String> files) throws IOException, org.apache.pig.tools.pigscript.parser.ParseException
processIllustrate
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
org.apache.pig.tools.pigscript.parser.ParseException
protected void processKill(String jobid) throws IOException
processKill
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processLS(String path) throws IOException
processLS
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processPWD() throws IOException
processPWD
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processHistory(boolean withNumbers)
processHistory
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
protected void printHelp()
printHelp
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
protected void processMove(String src, String dst) throws IOException
processMove
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processCopy(String src, String dst) throws IOException
processCopy
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processCopyToLocal(String src, String dst) throws IOException
processCopyToLocal
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processCopyFromLocal(String src, String dst) throws IOException
processCopyFromLocal
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processMkdir(String dir) throws IOException
processMkdir
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processPig(String cmd) throws IOException
processPig
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processRemove(String path, String options) throws IOException
processRemove
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processFsCommand(String[] cmdTokens) throws IOException
processFsCommand
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processShCommand(String[] cmdTokens) throws IOException
processShCommand
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
public static int runSQLCommand(String hcatBin, String cmd, boolean mInteractive) throws IOException
IOException
protected void processSQLCommand(String cmd) throws IOException
processSQLCommand
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processDefault(String key, String value) throws IOException
processDefault
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void processDeclare(String key, String value) throws IOException
processDeclare
in class org.apache.pig.tools.pigscript.parser.PigScriptParser
IOException
protected void setExplainState(GruntParser.ExplainState explainState)
Copyright © 2007-2017 The Apache Software Foundation