5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-10 00:13:17 +08:00

SQOOP-1065: Sqoop2: Remove special lock object in FrameworkManager

(Jarek Jarcec Cecho via Venkat Ranganathan)
This commit is contained in:
Venkat Ranganathan 2013-06-22 09:51:43 -07:00
parent 9920db114d
commit 05bd42e184

View File

@ -135,12 +135,6 @@ public static void setInstance(JobManager newInstance) {
*/ */
private long updateSleep; private long updateSleep;
/**
* Mutex for creating new submissions. We're not allowing more then one
* running submission for one job.
*/
private final Object submissionMutex = new Object();
/** /**
* Base notification URL. * Base notification URL.
* *
@ -372,7 +366,7 @@ public MSubmission submit(long jobId) {
// Make sure that this job id is not currently running and submit the job // Make sure that this job id is not currently running and submit the job
// only if it's not. // only if it's not.
synchronized (submissionMutex) { synchronized (getClass()) {
MSubmission lastSubmission = repository.findSubmissionLastForJob(jobId); MSubmission lastSubmission = repository.findSubmissionLastForJob(jobId);
if(lastSubmission != null && lastSubmission.getStatus().isRunning()) { if(lastSubmission != null && lastSubmission.getStatus().isRunning()) {
throw new SqoopException(FrameworkError.FRAMEWORK_0002, throw new SqoopException(FrameworkError.FRAMEWORK_0002,