diff --git a/vault/src/main/java/org/opencadc/vault/JobAbortedException.java b/vault/src/main/java/org/opencadc/vault/JobAbortedException.java index 64f78bcb..67eb6893 100644 --- a/vault/src/main/java/org/opencadc/vault/JobAbortedException.java +++ b/vault/src/main/java/org/opencadc/vault/JobAbortedException.java @@ -78,27 +78,23 @@ * @author yeunga * */ -public class JobAbortedException extends VOSException -{ +public class JobAbortedException extends VOSException { private static final long serialVersionUID = -4453433718383619175L; private Job job; - public JobAbortedException(Job job) - { + public JobAbortedException(Job job) { super("job aborted"); this.job = job; } - public JobAbortedException(Job job, String message) - { + public JobAbortedException(Job job, String message) { super(message); this.job = job; } - public Job getJob() - { + public Job getJob() { return job; } diff --git a/vault/src/main/java/org/opencadc/vault/JobManager.java b/vault/src/main/java/org/opencadc/vault/JobManager.java index 44df0c43..e2e7cfe3 100644 --- a/vault/src/main/java/org/opencadc/vault/JobManager.java +++ b/vault/src/main/java/org/opencadc/vault/JobManager.java @@ -73,8 +73,7 @@ import ca.nrc.cadc.uws.server.impl.PostgresJobPersistence; import org.apache.log4j.Logger; -public abstract class JobManager extends SimpleJobManager -{ +public abstract class JobManager extends SimpleJobManager { private static final Logger log = Logger.getLogger(JobManager.class); diff --git a/vault/src/main/java/org/opencadc/vault/RecursiveDeleteNodeJobManager.java b/vault/src/main/java/org/opencadc/vault/RecursiveDeleteNodeJobManager.java index f857dfc8..e4af6241 100644 --- a/vault/src/main/java/org/opencadc/vault/RecursiveDeleteNodeJobManager.java +++ b/vault/src/main/java/org/opencadc/vault/RecursiveDeleteNodeJobManager.java @@ -78,16 +78,14 @@ * * @author pdowler, majorb, yeunga, adriand */ -public class RecursiveDeleteNodeJobManager extends JobManager -{ +public class RecursiveDeleteNodeJobManager extends JobManager { private static final Logger log = Logger.getLogger(RecursiveDeleteNodeJobManager.class); - private static final Long MAX_EXEC_DURATION = Long.valueOf(12*7200L); // 24 hours? - private static final Long MAX_DESTRUCTION = Long.valueOf(7*24*3600L); // 1 week - private static final Long MAX_QUOTE = Long.valueOf(12*7200L); // same as exec + private static final Long MAX_EXEC_DURATION = Long.valueOf(12 * 7200L); // 24 hours? + private static final Long MAX_DESTRUCTION = Long.valueOf(7 * 24 * 3600L); // 1 week + private static final Long MAX_QUOTE = Long.valueOf(12 * 7200L); // same as exec - public RecursiveDeleteNodeJobManager() - { + public RecursiveDeleteNodeJobManager() { super(); // jp is instantiated in parent org.opencadc.cavern.JobManager JobUpdater ju = jp; diff --git a/vault/src/main/java/org/opencadc/vault/RecursiveDeleteNodeRunner.java b/vault/src/main/java/org/opencadc/vault/RecursiveDeleteNodeRunner.java index ac9a0b65..d3ff2000 100644 --- a/vault/src/main/java/org/opencadc/vault/RecursiveDeleteNodeRunner.java +++ b/vault/src/main/java/org/opencadc/vault/RecursiveDeleteNodeRunner.java @@ -142,8 +142,8 @@ private void doit() { if (ep == null) { throw new IllegalStateException( - "Could not change the job phase from " + ExecutionPhase.QUEUED + - " to " + ExecutionPhase.EXECUTING); + "Could not change the job phase from " + ExecutionPhase.QUEUED + + " to " + ExecutionPhase.EXECUTING); } VOSURI nodeURI = null; @@ -212,8 +212,7 @@ private void doit() { } } if (!endPhase.equals(ep)) { - log.warn("Could not change the job phase from " + ExecutionPhase.EXECUTING + - " to " + endPhase); + log.warn("Could not change the job phase from " + ExecutionPhase.EXECUTING + " to " + endPhase); } } catch (FileNotFoundException e) { sendError("NotFound"); @@ -317,8 +316,8 @@ private void checkJobPhase() } if (!ExecutionPhase.EXECUTING.equals(ep)) { - throw new IllegalStateException("Job should be in phase " + - ExecutionPhase.EXECUTING + " but is in phase " + ep); + throw new IllegalStateException("Job should be in phase " + + ExecutionPhase.EXECUTING + " but is in phase " + ep); } } } @@ -339,12 +338,12 @@ private void sendError(String message) { ExecutionPhase.ERROR, error, new Date()); if (!ExecutionPhase.ERROR.equals(ep)) { - log.warn("Could not change the job phase from " + ExecutionPhase.EXECUTING + - " to " + ExecutionPhase.ERROR + " because it is " + jobUpdater.getPhase(job.getID())); + log.warn("Could not change the job phase from " + ExecutionPhase.EXECUTING + + " to " + ExecutionPhase.ERROR + " because it is " + jobUpdater.getPhase(job.getID())); } } catch (Throwable t) { - log.error("Failed to change the job phase from " + ExecutionPhase.EXECUTING + - " to " + ExecutionPhase.ERROR, t); + log.error("Failed to change the job phase from " + ExecutionPhase.EXECUTING + + " to " + ExecutionPhase.ERROR, t); } } }