public class StatDB
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static java.sql.Connection |
conn |
private static java.lang.String |
driver |
private static org.apache.log4j.Logger |
log |
private static java.lang.String |
protocol |
private static java.lang.String |
statDBName |
| Constructor and Description |
|---|
StatDB() |
StatDB(boolean ignored)
Connect to test database
|
| Modifier and Type | Method and Description |
|---|---|
(package private) static void |
clearStatTable() |
private void |
createStatTable()
rs.getBoolean(i) will return true for any non-zero value and false for 0
on SMALLINT data column.
|
int |
getAbandonedCount(java.sql.Timestamp from,
java.sql.Timestamp to) |
int |
getCancelledCount(java.sql.Timestamp from,
java.sql.Timestamp to) |
private static java.sql.Connection |
getDBConnection() |
java.util.Date |
getEarliestRecord() |
int |
getIncompleteCount(java.sql.Timestamp from,
java.sql.Timestamp to) |
private int |
getIntResult(java.sql.Timestamp from,
java.sql.Timestamp to,
java.lang.String query) |
private static java.sql.Connection |
getTestDBConnection() |
int |
getTotalJobsCount(java.sql.Timestamp from,
java.sql.Timestamp to) |
(package private) void |
insertData(java.util.Set<JobStat> jobstatus) |
static void |
main(java.lang.String[] args) |
java.util.List<JobStat> |
readData(java.sql.Timestamp from,
java.sql.Timestamp to,
Services wservice,
java.lang.Boolean clusterOnly) |
void |
removeRecordedJobs(java.util.Set<JobStat> fsJobs)
Removes the job if
1) It has already been recorded
2) It has not completed and did not timeout - this is to prevent
recording the information on the incomplete jobs.
|
static void |
shutdownDBServer() |
private static final java.lang.String driver
private static final java.lang.String protocol
private static final java.lang.String statDBName
private static final org.apache.log4j.Logger log
static java.sql.Connection conn
public StatDB()
throws java.sql.SQLException
java.sql.SQLExceptionStatDB(boolean ignored) throws java.sql.SQLException
ignored - java.sql.SQLExceptionprivate static java.sql.Connection getDBConnection()
throws java.sql.SQLException
java.sql.SQLExceptionprivate static java.sql.Connection getTestDBConnection()
throws java.sql.SQLException
java.sql.SQLExceptionprivate void createStatTable()
throws java.sql.SQLException
java.sql.SQLExceptionstatic void clearStatTable()
throws java.sql.SQLException
java.sql.SQLExceptionvoid insertData(java.util.Set<JobStat> jobstatus) throws java.sql.SQLException
java.sql.SQLExceptionpublic java.util.Date getEarliestRecord()
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getTotalJobsCount(java.sql.Timestamp from,
java.sql.Timestamp to)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getCancelledCount(java.sql.Timestamp from,
java.sql.Timestamp to)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getAbandonedCount(java.sql.Timestamp from,
java.sql.Timestamp to)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getIncompleteCount(java.sql.Timestamp from,
java.sql.Timestamp to)
throws java.sql.SQLException
java.sql.SQLExceptionprivate int getIntResult(java.sql.Timestamp from,
java.sql.Timestamp to,
java.lang.String query)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.util.List<JobStat> readData(java.sql.Timestamp from, java.sql.Timestamp to, Services wservice, java.lang.Boolean clusterOnly) throws java.sql.SQLException
java.sql.SQLExceptionpublic void removeRecordedJobs(java.util.Set<JobStat> fsJobs) throws java.sql.SQLException
fsJobs - java.sql.SQLExceptionpublic static final void shutdownDBServer()
public static void main(java.lang.String[] args)