public class HWISessionItem extends Object implements Runnable, Comparable<HWISessionItem>
Modifier and Type | Class and Description |
---|---|
static class |
HWISessionItem.WebSessionItemStatus
Represents the state a session item can be in.
|
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
l4j |
Thread |
runnable |
Constructor and Description |
---|
HWISessionItem(HWIAuth auth,
String sessionName)
Creates an instance of WebSessionItem, sets status to NEW.
|
Modifier and Type | Method and Description |
---|---|
void |
addQuery(String query)
Adds a new query to the execution list.
|
void |
clearQueries() |
void |
clientKill() |
void |
clientRenew()
This method clears the private member variables.
|
void |
clientStart()
HWISessionItem is a Runnable instance.
|
int |
compareTo(HWISessionItem other)
to support sorting/Set.
|
boolean |
equals(Object other)
Uses the sessionName property to compare to sessions.
|
HWIAuth |
getAuth() |
String |
getErrorFile()
Currently unused.
|
HiveHistoryViewer |
getHistoryViewer() |
String |
getHiveConfVar(HiveConf.ConfVars wanted)
Helper function to get configuration variables.
|
String |
getHiveConfVar(String s) |
String |
getJobTrackerURL(String jobid) |
List<String> |
getQueries()
Returns an unmodifiable list of queries.
|
List<Integer> |
getQueryRet()
The HWISessionItem stores the result of each query in an array.
|
ArrayList<ArrayList<String>> |
getResultBucket()
gets the value for resultBucket.
|
int |
getResultBucketMaxSize()
returns the value for resultBucketMaxSize.
|
String |
getResultFile() |
String |
getSessionName()
The session name is an identifier to recognize the session.
|
boolean |
getSSIsSilent()
This is a chained call to SessionState.getIsSilent().
|
HWISessionItem.WebSessionItemStatus |
getStatus()
Used to represent to the user and other components what state the
HWISessionItem is in.
|
protected void |
killIt()
This is a callback style function used by the HiveSessionManager.
|
void |
removeQuery(int item)
Removes a query from the execution list.
|
void |
run() |
void |
runQuery()
runQuery iterates the list of queries executing each query.
|
protected void |
setAuth(HWIAuth auth) |
void |
setErrorFile(String errorFile)
Currently unused.
|
void |
setResultBucketMaxSize(int size)
sets the value for resultBucketMaxSize.
|
void |
setResultFile(String resultFile) |
void |
setSSIsSilent(boolean silent)
This is a chained call to SessionState.setIsSilent().
|
protected static final org.apache.commons.logging.Log l4j
public Thread runnable
public void clientStart() throws HWIException
HWIException
public void clientKill() throws HWIException
HWIException
public void clientRenew() throws HWIException
HWIException
protected void killIt()
public String getHiveConfVar(HiveConf.ConfVars wanted) throws HWIException
wanted
- a ConfVarHWIException
public String getHiveConfVar(String s) throws HWIException
HWIException
public String getJobTrackerURL(String jobid) throws HWIException
HWIException
public void runQuery()
public void setSSIsSilent(boolean silent) throws HWIException
HWIException
public boolean getSSIsSilent() throws HWIException
HWIException
public int compareTo(HWISessionItem other)
compareTo
in interface Comparable<HWISessionItem>
public HiveHistoryViewer getHistoryViewer() throws HWIException
HWIException
public boolean equals(Object other)
public String getResultFile()
public void setResultFile(String resultFile)
public String getSessionName()
public HWISessionItem.WebSessionItemStatus getStatus()
public String getErrorFile()
public void setErrorFile(String errorFile)
errorFile
- the full path to the file for results.public HWIAuth getAuth()
protected void setAuth(HWIAuth auth)
auth
- the auth to setpublic void addQuery(String query) throws HWIException
query
- query to be added to the listHWIException
public void removeQuery(int item) throws HWIException
item
- the 0 based index of the item to be removedHWIException
public void clearQueries() throws HWIException
HWIException
public int getResultBucketMaxSize()
public void setResultBucketMaxSize(int size)
size
- the new sizepublic ArrayList<ArrayList<String>> getResultBucket()
Copyright © 2017 The Apache Software Foundation. All rights reserved.