|
||||||||||
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
|
static class |
SessionState.ResourceType
|
Field Summary | |
---|---|
protected HiveConf |
conf
current configuration |
protected Hive |
db
cached current connection to Hive MetaStore |
PrintStream |
err
|
static String |
HIVE_L4J
|
protected HiveHistory |
hiveHist
|
InputStream |
in
|
protected boolean |
isSilent
silent mode |
PrintStream |
out
Streams to read/write from |
Constructor Summary | |
---|---|
SessionState()
|
|
SessionState(HiveConf conf)
|
|
SessionState(HiveConf conf,
Hive db)
|
Method Summary | |
---|---|
void |
add_resource(SessionState.ResourceType t,
String value)
|
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 |
String |
getCmd()
|
HiveConf |
getConf()
|
Hive |
getDb()
|
HiveHistory |
getHiveHistory()
get hiveHitsory object which does structured logging |
boolean |
getIsSilent()
|
String |
getQueryId()
|
String |
getSessionId()
|
static void |
initHiveLog4j()
|
Set<String> |
list_resource(SessionState.ResourceType t,
List<String> filter)
|
void |
setCmd(String cmdString)
|
void |
setConf(HiveConf conf)
|
void |
setIsSilent(boolean isSilent)
|
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 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 Hive db
protected HiveHistory hiveHist
public PrintStream out
public InputStream in
public PrintStream err
public static final String HIVE_L4J
Constructor Detail |
---|
public SessionState()
public SessionState(HiveConf conf)
public SessionState(HiveConf conf, Hive db)
Method Detail |
---|
public HiveConf getConf()
public void setConf(HiveConf conf)
public boolean getIsSilent()
public void setIsSilent(boolean isSilent)
public Hive getDb() throws HiveException
HiveException
public void setCmd(String cmdString)
public String getCmd()
public String getQueryId()
public String getSessionId()
public static SessionState start(HiveConf conf)
public static SessionState start(SessionState startSs)
public static SessionState get()
public HiveHistory getHiveHistory()
public static void initHiveLog4j()
public static String validateFile(Set<String> curFiles, String newFile)
public static SessionState.ResourceType find_resource_type(String s)
public void add_resource(SessionState.ResourceType t, String value)
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |