edu.stolaf.cs.wmrserver.db
Class SubmissionDatabase

java.lang.Object
  extended by edu.stolaf.cs.wmrserver.db.SubmissionDatabase

public class SubmissionDatabase
extends java.lang.Object


Constructor Summary
SubmissionDatabase()
           
 
Method Summary
static long add(java.lang.String user, java.lang.String name, boolean test)
           
static void connect(org.apache.hadoop.conf.Configuration conf)
           
protected static java.util.Set<Submission> constructAllSubmissions(java.sql.ResultSet rs)
           
protected static Submission constructSubmission(java.sql.ResultSet rs)
           
static Submission find(long id)
           
static int jobsSince(java.lang.String user, java.sql.Timestamp time)
          Determines the number of jobs a user has submitted since a given time.
static boolean setCompleted(long id)
           
static boolean setHadoopID(long id, java.lang.String hadoopID)
           
static boolean setInputPath(long id, org.apache.hadoop.fs.Path inputPath)
           
static boolean setSubmitted(long id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubmissionDatabase

public SubmissionDatabase()
Method Detail

connect

public static void connect(org.apache.hadoop.conf.Configuration conf)
                    throws java.sql.SQLException,
                           java.lang.ClassNotFoundException
Throws:
java.sql.SQLException
java.lang.ClassNotFoundException

add

public static long add(java.lang.String user,
                       java.lang.String name,
                       boolean test)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

setInputPath

public static boolean setInputPath(long id,
                                   org.apache.hadoop.fs.Path inputPath)
                            throws java.sql.SQLException
Throws:
java.sql.SQLException

setSubmitted

public static boolean setSubmitted(long id)
                            throws java.sql.SQLException
Throws:
java.sql.SQLException

setCompleted

public static boolean setCompleted(long id)
                            throws java.sql.SQLException
Throws:
java.sql.SQLException

setHadoopID

public static boolean setHadoopID(long id,
                                  java.lang.String hadoopID)
                           throws java.sql.SQLException
Throws:
java.sql.SQLException

find

public static Submission find(long id)
                       throws java.sql.SQLException
Throws:
java.sql.SQLException

jobsSince

public static int jobsSince(java.lang.String user,
                            java.sql.Timestamp time)
                     throws java.sql.SQLException
Determines the number of jobs a user has submitted since a given time. If you wish to see this number for all users, pass in the "%" wildcard as the user string.

Throws:
java.sql.SQLException

constructSubmission

protected static Submission constructSubmission(java.sql.ResultSet rs)
                                         throws java.sql.SQLException
Throws:
java.sql.SQLException

constructAllSubmissions

protected static java.util.Set<Submission> constructAllSubmissions(java.sql.ResultSet rs)
                                                            throws java.sql.SQLException
Throws:
java.sql.SQLException