mirror of
https://github.com/apache/sqoop.git
synced 2025-05-09 17:43:28 +08:00
SQOOP-1065: Sqoop2: Remove special lock object in FrameworkManager
(Jarek Jarcec Cecho via Venkat Ranganathan)
This commit is contained in:
parent
9920db114d
commit
05bd42e184
@ -135,12 +135,6 @@ public static void setInstance(JobManager newInstance) {
|
||||
*/
|
||||
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.
|
||||
*
|
||||
@ -372,7 +366,7 @@ public MSubmission submit(long jobId) {
|
||||
|
||||
// Make sure that this job id is not currently running and submit the job
|
||||
// only if it's not.
|
||||
synchronized (submissionMutex) {
|
||||
synchronized (getClass()) {
|
||||
MSubmission lastSubmission = repository.findSubmissionLastForJob(jobId);
|
||||
if(lastSubmission != null && lastSubmission.getStatus().isRunning()) {
|
||||
throw new SqoopException(FrameworkError.FRAMEWORK_0002,
|
||||
|
Loading…
Reference in New Issue
Block a user