|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.session.SessionState
public class SessionState
SessionState encapsulates common data associated with a session. Also provides support for a thread static session object that can be accessed from any point in the code to interact with the user and to retrieve configuration information
Nested Class Summary | |
---|---|
static class |
SessionState.LogHelper
This class provides helper routines to emit informational and error messages to the user and log4j files while obeying the current session's verbosity levels. |
static interface |
SessionState.ResourceHook
ResourceHook. |
static class |
SessionState.ResourceType
ResourceType. |
Field Summary | |
---|---|
PrintStream |
childErr
Error output from any child process(es). |
PrintStream |
childOut
Standard output from any child process(es). |
protected HiveConf |
conf
current configuration. |
PrintStream |
err
|
static String |
HIVE_EXEC_L4J
|
static String |
HIVE_L4J
|
protected HiveHistory |
hiveHist
|
InputStream |
in
Streams to read/write from. |
protected boolean |
isSilent
silent mode. |
protected boolean |
isVerbose
verbose mode |
PrintStream |
out
|
Constructor Summary | |
---|---|
SessionState()
|
|
SessionState(HiveConf conf)
|
Method Summary | |
---|---|
void |
add_resource(SessionState.ResourceType t,
String value)
|
String |
add_resource(SessionState.ResourceType t,
String value,
boolean convertToUnix)
|
void |
delete_resource(SessionState.ResourceType t)
|
boolean |
delete_resource(SessionState.ResourceType t,
String value)
|
static SessionState.ResourceType |
find_resource_type(String s)
|
static SessionState |
get()
get the current session. |
HiveAuthenticationProvider |
getAuthenticator()
|
HiveAuthorizationProvider |
getAuthorizer()
|
String |
getCmd()
|
String |
getCommandType()
|
HiveConf |
getConf()
|
static SessionState.LogHelper |
getConsole()
initialize or retrieve console object for SessionState. |
CreateTableAutomaticGrant |
getCreateTableGrants()
|
HiveHistory |
getHiveHistory()
get hiveHitsory object which does structured logging. |
HiveOperation |
getHiveOperation()
|
boolean |
getIsSilent()
|
boolean |
getIsVerbose()
|
LineageState |
getLineageState()
Get the lineage state stored in this session. |
static String |
getMatchingSchemaAsRegex()
Returns the list of filesystem schemas as regex which are permissible for download as a resource. |
String |
getQueryId()
|
String |
getSessionId()
|
static void |
initHiveLog4j()
|
Set<String> |
list_resource(SessionState.ResourceType t,
List<String> filter)
|
static boolean |
registerJar(String newJar)
|
void |
setAuthenticator(HiveAuthenticationProvider authenticator)
|
void |
setAuthorizer(HiveAuthorizationProvider authorizer)
|
void |
setCmd(String cmdString)
|
void |
setCommandType(HiveOperation commandType)
|
void |
setConf(HiveConf conf)
|
void |
setCreateTableGrants(CreateTableAutomaticGrant createTableGrants)
|
void |
setIsSilent(boolean isSilent)
|
void |
setIsVerbose(boolean isVerbose)
|
static SessionState |
start(HiveConf conf)
start a new session and set it to current session. |
static SessionState |
start(SessionState startSs)
set current session to existing session object if a thread is running multiple sessions - it must call this method with the new session object when switching from one session to another. |
static boolean |
unregisterJar(String jarsToUnregister)
|
static String |
validateFile(Set<String> curFiles,
String newFile)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HiveConf conf
protected boolean isSilent
protected boolean isVerbose
protected HiveHistory hiveHist
public InputStream in
public PrintStream out
public PrintStream err
public PrintStream childOut
public PrintStream childErr
public static final String HIVE_L4J
public static final String HIVE_EXEC_L4J
Constructor Detail |
---|
public SessionState()
public SessionState(HiveConf conf)
Method Detail |
---|
public LineageState getLineageState()
public HiveConf getConf()
public void setConf(HiveConf conf)
public boolean getIsSilent()
public void setIsSilent(boolean isSilent)
public boolean getIsVerbose()
public void setIsVerbose(boolean isVerbose)
public void setCmd(String cmdString)
public String getCmd()
public String getQueryId()
public String getSessionId()
public static SessionState start(HiveConf conf) throws HiveException
HiveException
public static SessionState start(SessionState startSs)
HiveException
public static SessionState get()
public HiveHistory getHiveHistory()
public static void initHiveLog4j()
public static SessionState.LogHelper getConsole()
public static String validateFile(Set<String> curFiles, String newFile)
public static boolean registerJar(String newJar)
public static boolean unregisterJar(String jarsToUnregister)
public static SessionState.ResourceType find_resource_type(String s)
public void add_resource(SessionState.ResourceType t, String value)
public String add_resource(SessionState.ResourceType t, String value, boolean convertToUnix)
public static String getMatchingSchemaAsRegex()
public boolean delete_resource(SessionState.ResourceType t, String value)
public Set<String> list_resource(SessionState.ResourceType t, List<String> filter)
public void delete_resource(SessionState.ResourceType t)
public String getCommandType()
public HiveOperation getHiveOperation()
public void setCommandType(HiveOperation commandType)
public HiveAuthorizationProvider getAuthorizer()
public void setAuthorizer(HiveAuthorizationProvider authorizer)
public HiveAuthenticationProvider getAuthenticator()
public void setAuthenticator(HiveAuthenticationProvider authenticator)
public CreateTableAutomaticGrant getCreateTableGrants()
public void setCreateTableGrants(CreateTableAutomaticGrant createTableGrants)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |