azkaban-aplcache
Details
azkaban-db/build.gradle 2(+1 -1)
diff --git a/azkaban-db/build.gradle b/azkaban-db/build.gradle
index 97df2b4..3e2bb70 100644
--- a/azkaban-db/build.gradle
+++ b/azkaban-db/build.gradle
@@ -22,7 +22,7 @@ task testJar(type: Jar, dependsOn: testClasses) {
}
configurations {
- testOutput.extendsFrom (testCompile)
+ testOutput.extendsFrom(testCompile)
}
artifacts {
diff --git a/azkaban-db/src/main/java/azkaban/db/DatabaseOperator.java b/azkaban-db/src/main/java/azkaban/db/DatabaseOperator.java
index c001ac6..b00ec9b 100644
--- a/azkaban-db/src/main/java/azkaban/db/DatabaseOperator.java
+++ b/azkaban-db/src/main/java/azkaban/db/DatabaseOperator.java
@@ -20,9 +20,9 @@ import java.sql.SQLException;
import org.apache.commons.dbutils.ResultSetHandler;
/**
- * This interface is to define Base Data Access Object contract for Azkaban. All azkaban
- * DB related operations must be performed upon this interface. AZ DB operators all leverages
- * QueryRunner interface.
+ * This interface is to define Base Data Access Object contract for Azkaban. All azkaban DB related
+ * operations must be performed upon this interface. AZ DB operators all leverages QueryRunner
+ * interface.
*
* @see org.apache.commons.dbutils.QueryRunner
*/
@@ -41,9 +41,9 @@ public interface DatabaseOperator {
throws SQLException;
/**
- * Provide a way to allow users define custom SQL operations without relying on fixed
- * SQL interface. The common use case is to group a sequence of SQL operations without
- * commit every time.
+ * Provide a way to allow users define custom SQL operations without relying on fixed SQL
+ * interface. The common use case is to group a sequence of SQL operations without commit every
+ * time.
*
* @param operations A sequence of DB operations
* @param <T> The type of object that the operations returns. Note that T could be null
@@ -60,8 +60,8 @@ public interface DatabaseOperator {
*/
int update(String updateClause, Object... params) throws SQLException;
- /**
- * @return datasource wrapped in the database operator.
- */
- AzkabanDataSource getDataSource();
+ /**
+ * @return datasource wrapped in the database operator.
+ */
+ AzkabanDataSource getDataSource();
}
diff --git a/azkaban-db/src/main/java/azkaban/db/DatabaseSetup.java b/azkaban-db/src/main/java/azkaban/db/DatabaseSetup.java
index 7d3f9ff..477c7a1 100644
--- a/azkaban-db/src/main/java/azkaban/db/DatabaseSetup.java
+++ b/azkaban-db/src/main/java/azkaban/db/DatabaseSetup.java
@@ -74,6 +74,7 @@ public class DatabaseSetup {
findMissingTables();
createNewTables();
}
+
private void findMissingTables() {
final File directory = new File(this.scriptPath);
final File[] createScripts =
@@ -88,6 +89,7 @@ public class DatabaseSetup {
}
}
}
+
private void createNewTables() throws SQLException, IOException {
final Connection conn = this.dataSource.getConnection();
conn.setAutoCommit(false);
diff --git a/azkaban-db/src/main/java/azkaban/db/DatabaseTransOperator.java b/azkaban-db/src/main/java/azkaban/db/DatabaseTransOperator.java
index 42cd42f..e409512 100644
--- a/azkaban-db/src/main/java/azkaban/db/DatabaseTransOperator.java
+++ b/azkaban-db/src/main/java/azkaban/db/DatabaseTransOperator.java
@@ -36,8 +36,8 @@ import org.apache.commons.dbutils.ResultSetHandler;
public interface DatabaseTransOperator {
/**
- * returns the last id from a previous insert statement.
- * Note that last insert and this operation should use the same connection.
+ * returns the last id from a previous insert statement. Note that last insert and this operation
+ * should use the same connection.
*
* @return the last inserted id in mysql per connection.
*/
diff --git a/azkaban-db/src/main/java/azkaban/db/DatabaseTransOperatorImpl.java b/azkaban-db/src/main/java/azkaban/db/DatabaseTransOperatorImpl.java
index 78c9de3..1756c5f 100644
--- a/azkaban-db/src/main/java/azkaban/db/DatabaseTransOperatorImpl.java
+++ b/azkaban-db/src/main/java/azkaban/db/DatabaseTransOperatorImpl.java
@@ -38,12 +38,12 @@ class DatabaseTransOperatorImpl implements DatabaseTransOperator {
}
/**
- * The ID that was generated is maintained in Mysql server on a per-connection basis.
- * This means that the value returned by the function to a given client is
- * the first AUTO_INCREMENT value generated for most recent statement
+ * The ID that was generated is maintained in Mysql server on a per-connection basis. This means
+ * that the value returned by the function to a given client is the first AUTO_INCREMENT value
+ * generated for most recent statement
*
- * This value cannot be affected by other callers, even if they generate
- * AUTO_INCREMENT values of their own.
+ * This value cannot be affected by other callers, even if they generate AUTO_INCREMENT values of
+ * their own.
*
* @return last insertion ID
*/
diff --git a/azkaban-db/src/main/sql/create.active_executing_flows.sql b/azkaban-db/src/main/sql/create.active_executing_flows.sql
index 6c2f8e4..b1363fe 100644
--- a/azkaban-db/src/main/sql/create.active_executing_flows.sql
+++ b/azkaban-db/src/main/sql/create.active_executing_flows.sql
@@ -1,5 +1,5 @@
CREATE TABLE active_executing_flows (
- exec_id INT,
- update_time BIGINT,
- PRIMARY KEY (exec_id)
+ exec_id INT,
+ update_time BIGINT,
+ PRIMARY KEY (exec_id)
);
diff --git a/azkaban-db/src/main/sql/create.active_sla.sql b/azkaban-db/src/main/sql/create.active_sla.sql
index 1bbc1b8..53f5078 100644
--- a/azkaban-db/src/main/sql/create.active_sla.sql
+++ b/azkaban-db/src/main/sql/create.active_sla.sql
@@ -1,9 +1,9 @@
CREATE TABLE active_sla (
- exec_id INT NOT NULL,
- job_name VARCHAR(128) NOT NULL,
- check_time BIGINT NOT NULL,
- rule TINYINT NOT NULL,
- enc_type TINYINT,
- options LONGBLOB NOT NULL,
- primary key(exec_id, job_name)
-);
\ No newline at end of file
+ exec_id INT NOT NULL,
+ job_name VARCHAR(128) NOT NULL,
+ check_time BIGINT NOT NULL,
+ rule TINYINT NOT NULL,
+ enc_type TINYINT,
+ options LONGBLOB NOT NULL,
+ PRIMARY KEY (exec_id, job_name)
+);
diff --git a/azkaban-db/src/main/sql/create.execution_flows.sql b/azkaban-db/src/main/sql/create.execution_flows.sql
index bc3a4e8..33ebfc4 100644
--- a/azkaban-db/src/main/sql/create.execution_flows.sql
+++ b/azkaban-db/src/main/sql/create.execution_flows.sql
@@ -1,23 +1,29 @@
CREATE TABLE execution_flows (
- exec_id INT NOT NULL AUTO_INCREMENT,
- project_id INT NOT NULL,
- version INT NOT NULL,
- flow_id VARCHAR(128) NOT NULL,
- status TINYINT,
- submit_user VARCHAR(64),
- submit_time BIGINT,
- update_time BIGINT,
- start_time BIGINT,
- end_time BIGINT,
- enc_type TINYINT,
- flow_data LONGBLOB,
- executor_id INT DEFAULT NULL,
- PRIMARY KEY (exec_id)
+ exec_id INT NOT NULL AUTO_INCREMENT,
+ project_id INT NOT NULL,
+ version INT NOT NULL,
+ flow_id VARCHAR(128) NOT NULL,
+ status TINYINT,
+ submit_user VARCHAR(64),
+ submit_time BIGINT,
+ update_time BIGINT,
+ start_time BIGINT,
+ end_time BIGINT,
+ enc_type TINYINT,
+ flow_data LONGBLOB,
+ executor_id INT DEFAULT NULL,
+ PRIMARY KEY (exec_id)
);
-CREATE INDEX ex_flows_start_time ON execution_flows(start_time);
-CREATE INDEX ex_flows_end_time ON execution_flows(end_time);
-CREATE INDEX ex_flows_time_range ON execution_flows(start_time, end_time);
-CREATE INDEX ex_flows_flows ON execution_flows(project_id, flow_id);
-CREATE INDEX executor_id ON execution_flows(executor_id);
-CREATE INDEX ex_flows_staus ON execution_flows(status);
\ No newline at end of file
+CREATE INDEX ex_flows_start_time
+ ON execution_flows (start_time);
+CREATE INDEX ex_flows_end_time
+ ON execution_flows (end_time);
+CREATE INDEX ex_flows_time_range
+ ON execution_flows (start_time, end_time);
+CREATE INDEX ex_flows_flows
+ ON execution_flows (project_id, flow_id);
+CREATE INDEX executor_id
+ ON execution_flows (executor_id);
+CREATE INDEX ex_flows_staus
+ ON execution_flows (status);
diff --git a/azkaban-db/src/main/sql/create.execution_jobs.sql b/azkaban-db/src/main/sql/create.execution_jobs.sql
index a62d3a9..d2379f2 100644
--- a/azkaban-db/src/main/sql/create.execution_jobs.sql
+++ b/azkaban-db/src/main/sql/create.execution_jobs.sql
@@ -1,19 +1,22 @@
CREATE TABLE execution_jobs (
- exec_id INT NOT NULL,
- project_id INT NOT NULL,
- version INT NOT NULL,
- flow_id VARCHAR(128) NOT NULL,
- job_id VARCHAR(128) NOT NULL,
- attempt INT,
- start_time BIGINT,
- end_time BIGINT,
- status TINYINT,
- input_params LONGBLOB,
- output_params LONGBLOB,
- attachments LONGBLOB,
- PRIMARY KEY (exec_id, job_id, attempt)
+ exec_id INT NOT NULL,
+ project_id INT NOT NULL,
+ version INT NOT NULL,
+ flow_id VARCHAR(128) NOT NULL,
+ job_id VARCHAR(128) NOT NULL,
+ attempt INT,
+ start_time BIGINT,
+ end_time BIGINT,
+ status TINYINT,
+ input_params LONGBLOB,
+ output_params LONGBLOB,
+ attachments LONGBLOB,
+ PRIMARY KEY (exec_id, job_id, attempt)
);
-CREATE INDEX exec_job ON execution_jobs(exec_id, job_id);
-CREATE INDEX exec_id ON execution_jobs(exec_id);
-CREATE INDEX ex_job_id ON execution_jobs(project_id, job_id);
+CREATE INDEX exec_job
+ ON execution_jobs (exec_id, job_id);
+CREATE INDEX exec_id
+ ON execution_jobs (exec_id);
+CREATE INDEX ex_job_id
+ ON execution_jobs (project_id, job_id);
diff --git a/azkaban-db/src/main/sql/create.execution_logs.sql b/azkaban-db/src/main/sql/create.execution_logs.sql
index b1ed376..2d26e1b 100644
--- a/azkaban-db/src/main/sql/create.execution_logs.sql
+++ b/azkaban-db/src/main/sql/create.execution_logs.sql
@@ -1,15 +1,18 @@
CREATE TABLE execution_logs (
- exec_id INT NOT NULL,
- name VARCHAR(128),
- attempt INT,
- enc_type TINYINT,
- start_byte INT,
- end_byte INT,
- log LONGBLOB,
- upload_time BIGINT,
- PRIMARY KEY (exec_id, name, attempt, start_byte)
+ exec_id INT NOT NULL,
+ name VARCHAR(128),
+ attempt INT,
+ enc_type TINYINT,
+ start_byte INT,
+ end_byte INT,
+ log LONGBLOB,
+ upload_time BIGINT,
+ PRIMARY KEY (exec_id, name, attempt, start_byte)
);
-CREATE INDEX ex_log_attempt ON execution_logs(exec_id, name, attempt);
-CREATE INDEX ex_log_index ON execution_logs(exec_id, name);
-CREATE INDEX ex_log_upload_time ON execution_logs(upload_time);
+CREATE INDEX ex_log_attempt
+ ON execution_logs (exec_id, name, attempt);
+CREATE INDEX ex_log_index
+ ON execution_logs (exec_id, name);
+CREATE INDEX ex_log_upload_time
+ ON execution_logs (upload_time);
diff --git a/azkaban-db/src/main/sql/create.executor_events.sql b/azkaban-db/src/main/sql/create.executor_events.sql
index 1ff4799..853c099 100644
--- a/azkaban-db/src/main/sql/create.executor_events.sql
+++ b/azkaban-db/src/main/sql/create.executor_events.sql
@@ -1,9 +1,10 @@
CREATE TABLE executor_events (
- executor_id INT NOT NULL,
- event_type TINYINT NOT NULL,
- event_time DATETIME NOT NULL,
- username VARCHAR(64),
- message VARCHAR(512)
+ executor_id INT NOT NULL,
+ event_type TINYINT NOT NULL,
+ event_time DATETIME NOT NULL,
+ username VARCHAR(64),
+ message VARCHAR(512)
);
-CREATE INDEX executor_log ON executor_events(executor_id, event_time);
\ No newline at end of file
+CREATE INDEX executor_log
+ ON executor_events (executor_id, event_time);
diff --git a/azkaban-db/src/main/sql/create.executors.sql b/azkaban-db/src/main/sql/create.executors.sql
index b5516a6..ba89c47 100644
--- a/azkaban-db/src/main/sql/create.executors.sql
+++ b/azkaban-db/src/main/sql/create.executors.sql
@@ -1,10 +1,11 @@
CREATE TABLE executors (
- id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- host VARCHAR(64) NOT NULL,
- port INT NOT NULL,
- active BOOLEAN DEFAULT false,
+ id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ host VARCHAR(64) NOT NULL,
+ port INT NOT NULL,
+ active BOOLEAN DEFAULT FALSE,
UNIQUE (host, port),
UNIQUE INDEX executor_id (id)
);
-CREATE INDEX executor_connection ON executors(host, port);
+CREATE INDEX executor_connection
+ ON executors (host, port);
diff --git a/azkaban-db/src/main/sql/create.project_events.sql b/azkaban-db/src/main/sql/create.project_events.sql
index dd24d5f..dda35a8 100644
--- a/azkaban-db/src/main/sql/create.project_events.sql
+++ b/azkaban-db/src/main/sql/create.project_events.sql
@@ -1,9 +1,10 @@
CREATE TABLE project_events (
- project_id INT NOT NULL,
- event_type TINYINT NOT NULL,
- event_time BIGINT NOT NULL,
- username VARCHAR(64),
- message VARCHAR(512)
+ project_id INT NOT NULL,
+ event_type TINYINT NOT NULL,
+ event_time BIGINT NOT NULL,
+ username VARCHAR(64),
+ message VARCHAR(512)
);
-CREATE INDEX log ON project_events(project_id, event_time);
+CREATE INDEX log
+ ON project_events (project_id, event_time);
diff --git a/azkaban-db/src/main/sql/create.project_files.sql b/azkaban-db/src/main/sql/create.project_files.sql
index 7dc3737..e7e9071 100644
--- a/azkaban-db/src/main/sql/create.project_files.sql
+++ b/azkaban-db/src/main/sql/create.project_files.sql
@@ -1,10 +1,11 @@
CREATE TABLE project_files (
- project_id INT NOT NULL,
- version INT not NULL,
- chunk INT,
- size INT,
- file LONGBLOB,
- PRIMARY KEY (project_id, version, chunk)
+ project_id INT NOT NULL,
+ version INT NOT NULL,
+ chunk INT,
+ size INT,
+ file LONGBLOB,
+ PRIMARY KEY (project_id, version, chunk)
);
-CREATE INDEX file_version ON project_files(project_id, version);
\ No newline at end of file
+CREATE INDEX file_version
+ ON project_files (project_id, version);
diff --git a/azkaban-db/src/main/sql/create.project_flows.sql b/azkaban-db/src/main/sql/create.project_flows.sql
index 336ef83..28df2ce 100644
--- a/azkaban-db/src/main/sql/create.project_flows.sql
+++ b/azkaban-db/src/main/sql/create.project_flows.sql
@@ -1,11 +1,12 @@
CREATE TABLE project_flows (
- project_id INT NOT NULL,
- version INT NOT NULL,
- flow_id VARCHAR(128),
- modified_time BIGINT NOT NULL,
- encoding_type TINYINT,
- json BLOB,
- PRIMARY KEY (project_id, version, flow_id)
+ project_id INT NOT NULL,
+ version INT NOT NULL,
+ flow_id VARCHAR(128),
+ modified_time BIGINT NOT NULL,
+ encoding_type TINYINT,
+ json BLOB,
+ PRIMARY KEY (project_id, version, flow_id)
);
-CREATE INDEX flow_index ON project_flows(project_id, version);
+CREATE INDEX flow_index
+ ON project_flows (project_id, version);
diff --git a/azkaban-db/src/main/sql/create.project_permissions.sql b/azkaban-db/src/main/sql/create.project_permissions.sql
index 5d5825b..3e69cee 100644
--- a/azkaban-db/src/main/sql/create.project_permissions.sql
+++ b/azkaban-db/src/main/sql/create.project_permissions.sql
@@ -1,10 +1,11 @@
CREATE TABLE project_permissions (
- project_id VARCHAR(64) NOT NULL,
- modified_time BIGINT NOT NULL,
- name VARCHAR(64) NOT NULL,
- permissions INT NOT NULL,
- isGroup BOOLEAN NOT NULL,
- PRIMARY KEY (project_id, name)
+ project_id VARCHAR(64) NOT NULL,
+ modified_time BIGINT NOT NULL,
+ name VARCHAR(64) NOT NULL,
+ permissions INT NOT NULL,
+ isGroup BOOLEAN NOT NULL,
+ PRIMARY KEY (project_id, name)
);
-CREATE INDEX permission_index ON project_permissions(project_id);
+CREATE INDEX permission_index
+ ON project_permissions (project_id);
diff --git a/azkaban-db/src/main/sql/create.project_properties.sql b/azkaban-db/src/main/sql/create.project_properties.sql
index 7adf25e..b91da50 100644
--- a/azkaban-db/src/main/sql/create.project_properties.sql
+++ b/azkaban-db/src/main/sql/create.project_properties.sql
@@ -1,11 +1,12 @@
CREATE TABLE project_properties (
- project_id INT NOT NULL,
- version INT NOT NULL,
- name VARCHAR(255),
- modified_time BIGINT NOT NULL,
- encoding_type TINYINT,
- property BLOB,
- PRIMARY KEY (project_id, version, name)
+ project_id INT NOT NULL,
+ version INT NOT NULL,
+ name VARCHAR(255),
+ modified_time BIGINT NOT NULL,
+ encoding_type TINYINT,
+ property BLOB,
+ PRIMARY KEY (project_id, version, name)
);
-CREATE INDEX properties_index ON project_properties(project_id, version);
+CREATE INDEX properties_index
+ ON project_properties (project_id, version);
diff --git a/azkaban-db/src/main/sql/create.project_versions.sql b/azkaban-db/src/main/sql/create.project_versions.sql
index 3356559..82644e9 100644
--- a/azkaban-db/src/main/sql/create.project_versions.sql
+++ b/azkaban-db/src/main/sql/create.project_versions.sql
@@ -1,14 +1,15 @@
CREATE TABLE project_versions (
- project_id INT NOT NULL,
- version INT not NULL,
- upload_time BIGINT NOT NULL,
- uploader VARCHAR(64) NOT NULL,
- file_type VARCHAR(16),
- file_name VARCHAR(128),
- md5 BINARY(16),
- num_chunks INT,
- resource_id VARCHAR(512) DEFAULT NULL,
- PRIMARY KEY (project_id, version)
+ project_id INT NOT NULL,
+ version INT NOT NULL,
+ upload_time BIGINT NOT NULL,
+ uploader VARCHAR(64) NOT NULL,
+ file_type VARCHAR(16),
+ file_name VARCHAR(128),
+ md5 BINARY(16),
+ num_chunks INT,
+ resource_id VARCHAR(512) DEFAULT NULL,
+ PRIMARY KEY (project_id, version)
);
-CREATE INDEX version_index ON project_versions(project_id);
+CREATE INDEX version_index
+ ON project_versions (project_id);
azkaban-db/src/main/sql/create.projects.sql 25(+13 -12)
diff --git a/azkaban-db/src/main/sql/create.projects.sql b/azkaban-db/src/main/sql/create.projects.sql
index 923b040..8879fbd 100644
--- a/azkaban-db/src/main/sql/create.projects.sql
+++ b/azkaban-db/src/main/sql/create.projects.sql
@@ -1,15 +1,16 @@
CREATE TABLE projects (
- id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
- name VARCHAR(64) NOT NULL,
- active BOOLEAN,
- modified_time BIGINT NOT NULL,
- create_time BIGINT NOT NULL,
- version INT,
- last_modified_by VARCHAR(64) NOT NULL,
- description VARCHAR(2048),
- enc_type TINYINT,
- settings_blob LONGBLOB,
- UNIQUE INDEX project_id (id)
+ id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ name VARCHAR(64) NOT NULL,
+ active BOOLEAN,
+ modified_time BIGINT NOT NULL,
+ create_time BIGINT NOT NULL,
+ version INT,
+ last_modified_by VARCHAR(64) NOT NULL,
+ description VARCHAR(2048),
+ enc_type TINYINT,
+ settings_blob LONGBLOB,
+ UNIQUE INDEX project_id (id)
);
-CREATE INDEX project_name ON projects(name);
+CREATE INDEX project_name
+ ON projects (name);
diff --git a/azkaban-db/src/main/sql/create.properties.sql b/azkaban-db/src/main/sql/create.properties.sql
index aaa37ec..27694fd 100644
--- a/azkaban-db/src/main/sql/create.properties.sql
+++ b/azkaban-db/src/main/sql/create.properties.sql
@@ -1,7 +1,7 @@
CREATE TABLE properties (
- name VARCHAR(64) NOT NULL,
- type INT NOT NULL,
- modified_time BIGINT NOT NULL,
- value VARCHAR(256),
- PRIMARY KEY (name, type)
-);
\ No newline at end of file
+ name VARCHAR(64) NOT NULL,
+ type INT NOT NULL,
+ modified_time BIGINT NOT NULL,
+ value VARCHAR(256),
+ PRIMARY KEY (name, type)
+);
diff --git a/azkaban-db/src/main/sql/create.triggers.sql b/azkaban-db/src/main/sql/create.triggers.sql
index 523ad5a..944f51b 100644
--- a/azkaban-db/src/main/sql/create.triggers.sql
+++ b/azkaban-db/src/main/sql/create.triggers.sql
@@ -1,8 +1,8 @@
CREATE TABLE triggers (
- trigger_id INT NOT NULL AUTO_INCREMENT,
- trigger_source VARCHAR(128),
- modify_time BIGINT NOT NULL,
- enc_type TINYINT,
- data LONGBLOB,
- PRIMARY KEY (trigger_id)
+ trigger_id INT NOT NULL AUTO_INCREMENT,
+ trigger_source VARCHAR(128),
+ modify_time BIGINT NOT NULL,
+ enc_type TINYINT,
+ data LONGBLOB,
+ PRIMARY KEY (trigger_id)
);
diff --git a/azkaban-db/src/main/sql/upgrade.3.20.0.to.3.22.0.sql b/azkaban-db/src/main/sql/upgrade.3.20.0.to.3.22.0.sql
index 0bba336..e2f38ba 100644
--- a/azkaban-db/src/main/sql/upgrade.3.20.0.to.3.22.0.sql
+++ b/azkaban-db/src/main/sql/upgrade.3.20.0.to.3.22.0.sql
@@ -3,4 +3,5 @@
-- Release 3.21.0 is broken
-- PR #1024 introduces a new column to 'project_versions' table.
--
-ALTER TABLE project_versions ADD resource_id VARCHAR(512);
+ALTER TABLE project_versions
+ ADD resource_id VARCHAR(512);
diff --git a/azkaban-db/src/test/java/azkaban/db/DatabaseOperatorImplTest.java b/azkaban-db/src/test/java/azkaban/db/DatabaseOperatorImplTest.java
index b278cfc..68e6474 100644
--- a/azkaban-db/src/test/java/azkaban/db/DatabaseOperatorImplTest.java
+++ b/azkaban-db/src/test/java/azkaban/db/DatabaseOperatorImplTest.java
@@ -16,7 +16,11 @@
*/
package azkaban.db;
-import static org.mockito.Mockito.*;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
import java.sql.Connection;
import java.sql.SQLException;