public class LensServerDAO extends Object
| Constructor and Description |
|---|
LensServerDAO() |
| Modifier and Type | Method and Description |
|---|---|
void |
createFailedAttemptsTable() |
void |
createFinishedQueriesTable()
Method to create finished queries table, this is required for embedded lens server.
|
void |
dropFinishedQueriesTable()
Drop finished queries table.
|
List<QueryHandle> |
findFinishedQueries(List<QueryStatus.Status> states,
String user,
String driverName,
String queryName,
long fromDate,
long toDate)
Find finished queries.
|
List<FinishedLensQuery> |
findFinishedQueryDetails(List<QueryStatus.Status> states,
String user,
String driverName,
String queryName,
long fromDate,
long toDate)
Find finished queries.
|
Connection |
getConnection() |
void |
getFailedAttempts(FinishedLensQuery query) |
FinishedLensQuery |
getQuery(String handle)
Fetch Finished query from Database.
|
void |
init(org.apache.hadoop.conf.Configuration conf)
Inits the.
|
void |
insertFailedAttempt(org.apache.commons.dbutils.QueryRunner runner,
Connection conn,
String handle,
FailedAttempt attempt,
int index)
DAO method to insert a new Finished query into Table.
|
void |
insertFinishedQuery(FinishedLensQuery query)
DAO method to insert a new Finished query into Table.
|
public void init(org.apache.hadoop.conf.Configuration conf)
conf - the confpublic Connection getConnection() throws SQLException
SQLExceptionpublic void dropFinishedQueriesTable()
public void createFinishedQueriesTable()
throws Exception
Exception - the exceptionpublic void createFailedAttemptsTable()
throws Exception
Exceptionpublic void insertFinishedQuery(FinishedLensQuery query) throws SQLException
query - to be insertedSQLException - the exceptionpublic void insertFailedAttempt(org.apache.commons.dbutils.QueryRunner runner,
Connection conn,
String handle,
FailedAttempt attempt,
int index)
throws SQLException
runner - conn - handle - to be insertedindex - @throws SQLException the exceptionSQLExceptionpublic void getFailedAttempts(FinishedLensQuery query)
public FinishedLensQuery getQuery(String handle)
handle - to be fetchedpublic List<FinishedLensQuery> findFinishedQueryDetails(List<QueryStatus.Status> states, String user, String driverName, String queryName, long fromDate, long toDate) throws LensException
states - the stateuser - the userdriverName - the driver's fully qualified NamequeryName - the query namefromDate - the from datetoDate - the to dateLensException - the lens exceptionpublic List<QueryHandle> findFinishedQueries(List<QueryStatus.Status> states, String user, String driverName, String queryName, long fromDate, long toDate) throws LensException
states - the stateuser - the userdriverName - the driver's fully qualified NamequeryName - the query namefromDate - the from datetoDate - the to dateLensException - the lens exceptionCopyright © 2014–2018 Apache Software Foundation. All rights reserved.