|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.Context
public class Context
Context for Semantic Analyzers. Usage: not reusable - construct a new one for each query should call clear() at end of use to remove temporary folders
Field Summary | |
---|---|
protected boolean |
explain
|
protected int |
pathid
|
Constructor Summary | |
---|---|
Context(HiveConf conf)
|
|
Context(HiveConf conf,
String executionId)
Create a Context with a given executionId. |
Method Summary | |
---|---|
void |
clear()
|
static String |
generateExecutionId()
Generate a unique executionId. |
boolean |
getExplain()
Find out whether the current query is an explain query. |
String |
getExternalTmpFileURI(URI extURI)
Get a path to store tmp data destined for external URI. |
String |
getLocalScratchDir()
Create a local scratch directory on demand and return it. |
String |
getLocalTmpFileURI()
Get a tmp path on local host to store intermediate data. |
String |
getMRScratchDir()
Create a map-reduce scratch directory on demand and return it. |
String |
getMRTmpFileURI()
Get a path to store map-reduce intermediate data in. |
org.apache.hadoop.fs.Path |
getQueryPath()
|
org.apache.hadoop.fs.Path |
getResDir()
|
org.apache.hadoop.fs.Path |
getResFile()
|
DataInput |
getStream()
|
org.antlr.runtime.TokenRewriteStream |
getTokenRewriteStream()
|
boolean |
isLocalOnlyExecutionMode()
Does Hive wants to run tasks entirely on the local machine (where the query is being compiled)? Today this translates into running hadoop jobs locally |
boolean |
isMRTmpFileURI(String uriStr)
Check if path is tmp path. |
void |
setExplain(boolean value)
Set the context on whether the current query is an explain query. |
void |
setResDir(org.apache.hadoop.fs.Path resDir)
|
void |
setResFile(org.apache.hadoop.fs.Path resFile)
|
void |
setTokenRewriteStream(org.antlr.runtime.TokenRewriteStream tokenRewriteStream)
Set the token rewrite stream being used to parse the current top-level SQL statement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int pathid
protected boolean explain
Constructor Detail |
---|
public Context(HiveConf conf) throws IOException
IOException
public Context(HiveConf conf, String executionId) throws IOException
IOException
Method Detail |
---|
public void setExplain(boolean value)
value
- true if the query is an explain query, false if notpublic boolean getExplain()
public String getMRScratchDir()
public String getLocalScratchDir()
public boolean isMRTmpFileURI(String uriStr)
public String getMRTmpFileURI()
public String getLocalTmpFileURI()
public String getExternalTmpFileURI(URI extURI)
extURI
- external URI to which the tmp data has to be eventually moved
public org.apache.hadoop.fs.Path getResFile()
public void setResFile(org.apache.hadoop.fs.Path resFile)
resFile
- the resFile to setpublic org.apache.hadoop.fs.Path getResDir()
public void setResDir(org.apache.hadoop.fs.Path resDir)
resDir
- the resDir to setpublic void clear() throws IOException
IOException
public DataInput getStream()
public void setTokenRewriteStream(org.antlr.runtime.TokenRewriteStream tokenRewriteStream)
tokenRewriteStream
- the stream being usedpublic org.antlr.runtime.TokenRewriteStream getTokenRewriteStream()
public static String generateExecutionId()
public org.apache.hadoop.fs.Path getQueryPath()
public boolean isLocalOnlyExecutionMode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |